diff --git a/.claude/audits/2026-10-22-rust-r5-draft-security.md b/.claude/audits/2026-10-22-rust-r5-draft-security.md new file mode 100644 index 00000000..bd88f286 --- /dev/null +++ b/.claude/audits/2026-10-22-rust-r5-draft-security.md @@ -0,0 +1,157 @@ +# Security gate: Rust R5.3 draft pipeline (2026-10-22) + +Mode: audit (delta list). Branch `feature/rust-r5-pipeline-core`, uncommitted working tree. +Scope: the R5.3 change set (8 modified files, 17 new files), read whole; `--check` run once +(read-only, exit 0, seed folder unchanged). No code was edited. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 25 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] symlink check covers the final component only — crates/core/src/bin/import_equine.rs:182-203 + - [LOW] check-then-write is not atomic (TOCTOU) — crates/core/src/bin/import_equine.rs:213-228 + - [LOW] serde_json::Map indexed with [] (panics on a missing key) — crates/core/src/bin/import_equine.rs:111 + - [LOW] INIT_CWD trusted from the environment — crates/core/src/bin/import_equine.rs:206-211 + - [LOW] seed SQL assembled by string formatting — crates/core/src/curation/draft/seed.rs:28-29,91-101 + - [LOW] new test file carries the suite's clippy allow line (convention, not a scanner suppression) — crates/core/tests/curation_draft.rs:7 + - [MEDIUM] guardrails SB-POLICY-NOT-OWNER, outside the R5.3 delta, pre-existing — supabase/migrations/20261008110000_anatomical_sheets.sql:1177 +PROOF: semgrep 725 rules on 25 files → 0 findings; checklist 9 checks → 6 findings (all LOW); guardrails scan.py --domain api,supabase → 0 FAIL, 1 WARN (out of delta), 1 MANUAL; anti-gaming → 0 new un-gated suppressions +``` + +## Files scanned (25) + +Modified: `crates/core/src/bin/import_equine.rs`, `crates/core/src/curation/mod.rs`, +`crates/core/Cargo.toml`, `package.json`, `CLAUDE.md`, `CHANGELOG.md`, +`docs/development/RUST.md`, `.claude/tasks/TODO.md`. +New: `crates/core/src/curation/draft/{mod,schema,targets,fields,ops,rename,apply,records,migration_map,pipeline,seed,stats}.rs`, +`crates/core/tests/curation_draft.rs`, `crates/core/tests/oracles/r5/curation-synthetic.json`, +`packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts`, `scripts/import-equine.sh`, +`.claude/tasks/contracts/2026-10-22-rust-r5-draft.md`. + +## Findings in detail + +### 1. [LOW] Symlink check covers the final component only + +`crates/core/src/bin/import_equine.rs:182-203`. `writable_destination` calls +`fs::symlink_metadata(out)` and refuses when `out` itself is a symbolic link. An ancestor +of `out` that is a symlink is not resolved: `--out /link/new` with +`link -> ` creates `new/legacy-import` and `new/draft` under the real target of +`link`, and the success line prints the typed path. Because the destination must be absent +or an empty folder, nothing existing can be overwritten or deleted; the effect is new files +in a folder other than the one typed. Fix direction: `fs::canonicalize` the nearest existing +ancestor of `out` and refuse when it differs from the typed ancestor, or at least print the +canonical destination in the success line. + +### 2. [LOW] Check-then-write is not atomic + +`crates/core/src/bin/import_equine.rs:213-228`. `write` validates with +`writable_destination`, then runs `fs::create_dir_all` and `fs::write` per file. A process +that swaps `out` (or a created subfolder) for a symbolic link between the check and the +writes would have the writes follow it. A development tool on the owner's machine has no +such adversary; reported for completeness since the brief names TOCTOU. Fix direction: +when `out` is absent, claim it with `fs::create_dir(out)` (fails if something appears) and +re-run `symlink_metadata` on the result before writing; a `std::fs::DirBuilder` without +`recursive` for the two folder levels achieves the same. + +### 3. [LOW] `serde_json::Map` indexed with `[]` + +`crates/core/src/bin/import_equine.rs:111`: +`result.view_boxes[HEAD_VIEW_ID].as_str()`. `Index` on `serde_json::Map` panics on a +missing key (unlike `Index` on `Value`). The legacy importer inserts both `main` and +`head` unconditionally (`crates/core/src/curation/legacy/importer.rs:365-370`), so the +panic is unreachable today; the same pattern was replaced by `get` in commit 6afc1e0 after +a previous gate. Same line in `crates/core/tests/curation_draft.rs:72` (test code, allowed). +Fix direction: `result.view_boxes.get(HEAD_VIEW_ID).and_then(Value::as_str)` with a +typed error. + +### 4. [LOW] `INIT_CWD` trusted from the environment + +`crates/core/src/bin/import_equine.rs:206-211`. `base_dir` takes `INIT_CWD` as the base +of a relative `--out` without checking it is absolute or exists. pnpm sets it to the +invocation folder, which is the intent; a stale or foreign value exported in the shell +silently retargets a relative `--out`. Mitigations already present: the destination must +be absent or empty, the resolved path is printed, an absolute `--out` ignores the base +(`PathBuf::join` replaces it). Fix direction: accept `INIT_CWD` only when absolute, else +fall back to `current_dir`. + +### 5. [LOW] Seed SQL assembled by string formatting + +`crates/core/src/curation/draft/seed.rs:28-29` (`sql_text`, doubles single quotes) and +`:91-101` (`document_literal`, dollar-quoted with the tag collision refused). The checklist +flags SQL built by concatenation; here the output is a committed seed file reviewed by diff +and run by `supabase db reset`, not a runtime query. Every interpolated value is derived by +the pipeline: the uuid sheet id, the sha256 hex and byte size of the frozen asset, the +constant file name, the constant change note, and the Prettier-formatted document inside +`$equine_doc$ ... $equine_doc$`. No request or user-typed value reaches it. Parity with +`packages/anatomy/src/curation/seed.ts`. Not a parameterization case; listed so it is not +silently dropped. + +### 6. [LOW] Clippy allow line in the new test file + +`crates/core/tests/curation_draft.rs:7`: +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. A new +file, so new to the tree, but the identical line heads all 31 committed +`crates/core/tests/*.rs` files and `crates/clippy.toml` states the rule ("tests and the +worker binary allow these lints locally where they own I/O"). Test code, not a security +scanner suppression. The binary's pre-existing `#![allow(clippy::disallowed_methods)]` +(`import_equine.rs:15`) is an unchanged context line and the documented exception for the +two files allowed `std::fs`. + +### 7. [MEDIUM, outside the delta] Guardrails `SB-POLICY-NOT-OWNER` + +`supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, policy +`species_select_active` on `species` not tied to `auth.uid()`. The scanner runs on the +project root; this file is not part of the R5.3 change set and the policy predates it. +`species` is shared reference data, so an owner scope is likely not the intent; confirm and +record the exception rather than leave it to be re-flagged. `SB-RLS-LIVE` is MANUAL (not +reported here). + +## Considered, no finding + +- Non-ASCII slicing: `targets.rs:121` slices at `find(':')` and `migration_map.rs:68` at + `rfind('/')`, both ASCII bytes and therefore char boundaries; `migration_map.rs:55-59` + (`strip`) works on UTF-16 units with `from_utf16_lossy`; `schema.rs:319` uses + `strip_prefix`; `fields.rs:84` splits on `'.'`. +- Indexing on parsed JSON in library code: `targets.rs:250,252,253,282,415` read + `ids[0]`, `ids[1]`, `ids[2..]` after `parse_target` guarantees one id (collections) or at + least two (findings); `fields.rs:92` reads `[0]` of a `split('.')` that always yields one + element; `pipeline.rs:81-84` reads four numbers after `len() != 4` is refused; + `migration_map.rs:185` is a slice pattern; `ops.rs:277,304,309,259` remove/insert at + indices produced from the same list moments before (`insertion_index` refuses + `index > len`, `u64 -> usize` saturates). No `unwrap`, `expect`, `panic!`, `unreachable!`, + `unsafe` or `Map[...]` in `crates/core/src/curation/draft/*`. +- Panics from a hand-written `changes.json` / `references.json`: both parsed with strict + serde (`deny_unknown_fields`), custom validators return errors; every op failure refuses + the whole changeset with the change id and op index (`apply.rs:103-109`); the final strict + parse into `AnatomicalSheetDocument` and `validate_sheet_document` refuse shape and + integrity errors (`apply.rs:128-144`); `CHG-000` reserved id refused (`pipeline.rs:127`). + Recursion in `walk`, `touch_tree`, `strip_marks` is bounded by document depth (serde_json + caps parsed nesting at 128; only repeated authored `add`s could deepen it; a stack overflow + would abort a developer tool, nothing more). +- `--check` is read-only: `fs::read`, `fs::read_dir`, `println!`/`eprintln!` only. + Ran once from `crates/core` on the native toolchain: exit 0, + `legacy-import: 6 files, 0 differences`, `draft: 6 files, 0 differences`, six R5.4 files + listed as pending; `git status` shows the seed folder untouched. +- `--out` never deletes: no `remove_*` call in the binary; refuses an empty path, a + symbolic link, a non-folder, a non-empty folder; file names come from constants and the + render functions (no `..`); parents created with `create_dir_all`. +- `scripts/import-equine.sh`: `set -euo pipefail`, `"$@"` quoted, `cargo run --locked`; + `scripts/rust-env.sh` only appends an absolute `$CARGO_HOME/bin` when `cargo` is absent. +- TypeScript generator `packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts`: + writes only `crates/core/tests/oracles/r5/curation-synthetic.json` + (`OUT = resolve(HERE, '../../../crates/core/tests/oracles/r5')`), and only under + `MAKE_R5_ORACLES=1`; otherwise it reads and compares. +- Secrets: none in the change set; no tracked `.env` or credential file; the seed SQL + carries no credential (`creator_user_id null`, `visibility 'private'`). +- Logging: stderr lines carry paths of the developer's own repository; a CLI for the + developer, not an end-user surface. +- Semgrep: 0 results, 0 errors, 0 skipped paths across the three pinned packs + (725 code rules loaded; Rust coverage in these packs is thin, so the manual checklist + carries the weight for `crates/`). +- Observation outside the change set: `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` + appeared as modified (1 line) during the audit; not produced by `--check` (no write path). + +REPORT_WRITTEN: /home/bchanot/Documents/faunosteo/.claude/audits/2026-10-22-rust-r5-draft-security.md diff --git a/.claude/audits/2026-10-22-rust-r5-draft-verify.md b/.claude/audits/2026-10-22-rust-r5-draft-verify.md new file mode 100644 index 00000000..2734cc69 --- /dev/null +++ b/.claude/audits/2026-10-22-rust-r5-draft-verify.md @@ -0,0 +1,73 @@ +# Verification: Rust R5.3 draft pipeline (2026-10-22) + +Contract `.claude/tasks/contracts/2026-10-22-rust-r5-draft.md`. Fresh verifier, report-only (persisted by the orchestrator: the agent has no write tool). + +## Pass 1: ECARTS(1) + +- C1 to C12 MET, each with code references and proofs run by the verifier: `cargo test --features curation --test curation_draft` 6/6, `curation_legacy` 5/5, the whole crate with `--features curation --locked` 22 suites green, clippy `-D warnings` clean, fmt clean, `import-equine --check` 12 files 0 differences (git status unchanged), `--out` into a `mktemp -d` folder then `diff -r` (legacy identical; draft identical but the three R5.4 entries), produced `document_sha256` = `27c7383c…2660` = sha256 of the produced `document.json`, 8 refusal and success probes of `--out`, anatomy 142/142, domain 262/262, `tsc --noEmit` clean. +- C13 partial by design: `pnpm check:all` and the security gate were the orchestrator's (both green / PASS); docs present (RUST.md §11.12 and §11.13, CHANGELOG, CLAUDE.md). +- Gap: the floor scan flagged the plan heading of §B.3.5 (`.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md:94`, pre-existing at HEAD, R5.1), whose status words read as an unfinished marker. Resolved: heading reworded to "(approved at A.5, applied at R5.6)", the status BDR-068 records. +- Semantic fidelity (beyond the declared `set` without `value`): no reachable divergence. Four unreachable ones: (1) `id_text` printed a non-string id as JSON text; aligned on `js_string` (`String()`); (2) `trimEnd` stripped U+0085; aligned on the core's exact JavaScript white-space set (`is_js_space`); (3) an added item with a `null` child: TypeScript throws at the op, Rust refuses at the shape gate (both refuse; kept, declared in RUST.md §11.12); (4) a position beyond 2^64: both refuse "out of range", the printed number differs (kept, declared). +- Reproduced quirks: `strip` slices eight UTF-16 units of `op.to`; `apply_record` reads `record.op` whatever the record target (declared observation, RUST.md §11.12). + +## Pass 2: ECARTS(3) + +- C1, C3 to C12 MET (proofs rerun: fmt, clippy, curation_draft 6 + curation_legacy 5, `--check` 12 files 0 differences, 11 `--out` probes incl. a symlinked parent printing the canonical path and a dangling symlink refused, `diff -r`, anatomy 142, domain 262). +- C2 NOT MET: JSON `null` on the optional `scope` (set, cite), `position` (add, move) and `field` (add) parsed as absent by serde; Zod `.optional()` refused it. Not reached by the committed changeset. C13 NOT MET on the same root (undeclared). Fixed: those fields deserialised through `js::present` (absent accepted, `null` refused); three refused synthetic cases `schema-null-{scope,position,field}` added to the generator (58 cases: 9 compared, 49 refused alike). +- Floor: the pass 1 record above quoted the flagged words; reworded. +- Fidelity details, outcome-identical: re-homing candidates on a `Vec` where TS used a `Set` (aligned: deduplicated); `annotation_names` reads a non-string name as empty, duplicate ids first-wins (kept: the legacy import writes strings and unique ids); unlisted counter keys keep insertion order (kept: enum strings); `parseViewBox` error quoting (kept: both refuse). +- Doc line count corrected (2,689). + +## Pass 3: ECARTS(4) (first attempt stopped by an API credit error before any check; rerun on Opus) + +- C1, C4 to C10, C12 MET (fmt, clippy, curation_draft 6 + curation_legacy 5, `--check` 12/0, `--out` + `diff -r`, anatomy 142, floor clean, a TypeScript probe of 14 changesets and 2 references files). +- C2: three accept/refuse splits at parse, undeclared: (a) a repeated key outside `ops` refused by serde's derive where `JSON.parse` keeps the last value; (d) a lone surrogate escape; (e) nesting deeper than 128. Fixed (a): both files parsed through `js::parse_json` then read into the typed shape (test `a_repeated_key_keeps_its_last_value_as_json_parse_does`); declared (d), (e) in RUST.md §11.12. +- C3: (b) a field path ending in `__proto__`: TypeScript swallowed the write, Rust refuses at the gate: declared. (c) an authored `"\u0000touched"` key: TypeScript refused at the gate, Rust took it for a touch mark and the cleanup dropped it silently: a defect, fixed by refusing any NUL-prefixed key in the changeset at parse (test `a_reserved_touch_mark_key_in_an_authored_value_is_refused`). +- C11: `--out /` (trailing slash) followed the link into an empty folder: fixed, the destination is rebuilt from its components before the symlink check (probed: `alink/` and `alink//` refused, rc 2, target left empty). +- C13: the splits above undeclared, and §11.13 claimed a leftover mark would be refused by the gate while the cleanup removed it: both corrected. +- The verifier asked the orchestrator to run a probe harness it had written in the scratchpad (its own run was refused by the permission layer); not run: the cases are covered by the tests above and the declared table. + +## Pass 4: ECARTS(1), on C13 only + +- C1 to C12 MET (fmt, clippy, curation_draft 8 + curation_legacy 5, `--check` 12/0, `--out` + `diff -r`, refusal probes incl. `symlink/` and `symlink/.` rc 2, `pnpm r5:import-equine --check` rc 0, anatomy 142, floor clean). +- C13: undeclared (a) invalid UTF-8 in changes.json / references.json: TS lossy, Rust refused. Fixed: `read_text` lossy, as R5.2 kept for the catalog. Declared: (b) `1e400` in a discarded value, (c) an inherited `Object.prototype` member in a field path; corrected (c') the NUL-key row, (d) test and line counts (8 tests, 2,718 lines). +- Notes kept: synthetic refusals assert `is_err` only (the contract asks no reason); `scripts/import-equine.sh` called directly without INIT_CWD resolves a relative `--out` from the repository root (pnpm sets INIT_CWD). +- Not re-verified by a fresh verifier after these corrections (docs plus the one-line lossy read); `pnpm check:all` rerun green on the final code (00:10:03), `--check` 12 files 0 differences. + +## Final round on 8654905 (owner 2026-10-23: fresh verifier on C1 to C13 + fresh security) + +- Verifier ECARTS(2): C3 and C13, one defect. A `set` field path whose segment starts with NUL (`name.\u0000touched`, any settable holder, self or subtree) was written and then stripped with the touch marks: author value lost, a record claiming the write; TypeScript refused it at the gate. C1, C2, C4 to C12 MET (15 + 200 tests, `--check` 0/12, 14 destination probes, floor clean). +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final.md`): MEDIUM-1 a 20,000-segment field path (40 KB changes.json) overflowed the stack; MEDIUM-2 `--out` writes not exclusive after the claim; LOW-1 the NUL field path (same as the verifier); LOW-2 `..` and parents created before a failed claim; LOW-3 a destination inside the seed accepted; LOW-4 INIT_CWD and direct-run base; LOW-5 non-UTF-8 argument panic; LOW-6 clippy disallowed list partial (pre-existing); LOW-7 the test allow line (convention). +- Fixed: NUL segment refused at the op (`reserved key`); field paths capped at 8 segments; document depth capped at 64 levels after every op (iterative walk); `--out`: `..` refused, parent must exist, destination inside the seed refused, destination printed before writing, every folder `create_dir`, every file `create_new`; `args_os`. Documented: direct-run base (LOW-4). Kept: LOW-6 (pre-existing lint scope, out of R5.3), LOW-7 (test convention). Tests added: field-path refusals and 20,000 segments refused without crash, 40 nested adds refused at the bound, 8 `--out` refusals against the built binary with nothing written. +- Next: a fresh verifier and a fresh security audit on the fixed commit. + +## Second final round on 314cf04 + +- Verifier ECARTS(3): C2, C3 (one family) and C13. serde's derives accept a struct written as a positional array and a unit enum written as a one-key map, in changes.json, references.json and the curated document (gate through the R2 derives); Zod refused all. 55,000-changeset random differential (TS generator, Rust probe): 7,436 accepted on both sides byte-identical, 335 mismatches, all this family but one message (`document has no "categories"` vs `document has no list "categories"`). C1, C4 to C12 MET (18 tests, 203 crate tests, `--check` 0/12, refusal probes, floor clean). Note: the same derives sit in the R2 report and archive contracts (unverified there). +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final2.md`): MEDIUM memory amplification (no cap); LOW quadratic depth walk, `--check` and reads following symlinks, residual TOCTOU, `write_exclusive` any component, lossy normalisation, test aimed at the real seed, suppressions context, lint list gaps. +- Fixed: `draft/shape.rs` (typed reading serialised back, compared by shape) on both authored files and the gate; 10 changesets + 2 references files frozen from TS (all refused by TS, refused alike); missing-list message aligned; reads: regular file, 16 MiB cap; `listed` does not follow links; `write_exclusive` plain names, root re-checked; seed guard as pure `inside` + unit test, integration test no longer targets the seed. Kept, declared in §11.13: memory amplification, quadratic walk, single-user TOCTOU residual, lossy UTF-8 and repeated keys. Raised to the owner: the R2 derive leniency in the gated readers. + +## Third final round on 42bbc48 + +- Verifier ECARTS(2), C3 + C13, one family: a null or primitive among the children of an added item. TS: TypeError where walked (refused), skipped by a reference rename's citation walk (accepted if later removed), gate if kept. Rust: tolerated by touch/walk (accepted), refused by rename's item_at_mut. Three splits; §11.12 claimed "both refuse" for the null child, false. Differential: 82,000 random changesets, 13,758 accepted identical (document, records, stats, map), 63 schema + 34 references probes agree. C1, C2, C4 to C12 MET (19 tests). +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final3.md`), LOW only: reads follow folder links out of the seed; shape comparison ignores array length; a folder appearing after the claim accepted; seed guard wiring untested; `set name.fr.x` records `before: null`; lint allows (context). +- Fixed: non-object children refused at the add (3 TS-frozen cases, 1 declared refusal); reads confined to the canonical seed; array length compared; only folders this run created; `claim_destination(typed, seed)` + fixture unit test. Declared: replaced-string `before` (TS same), memory factor ~2x TS. + +## Fourth final round on 6c0fe88 + +- Verifier ECARTS(2), C3 + C13: records differ (document identical) on array index keys in authored values or field segments (JSON.parse puts them first) and on integers beyond 2^53 (JSON.parse rounds; a Rust record held 9007199254740993 while document.json printed ...992); §11.12 declared-case count wrong. C1, C2, C4 to C12 MET; 25,000 random changesets: 0 accept/refuse splits, 4,331 accepted identical. +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final4.md`): MEDIUM a present non-list `children` replaced by `[]` (author data lost); LOW `--check` lists through a top-level folder link, mount alias of the seed, walk cost understated (8.2 MB file ~36 s, cap-bound worst case ~45 min), fixture in shared temp, context items. +- Fixed: `text::js_normalize` (key order + big integers at parse) and `text::js_insert` (field path writes); non-list `children`/`categories` refused at add, `children_path` never replaces; `--check` requires each generated folder to be the seed's own; `inside_by_identity` (dev, ino of every ancestor); `MAX_DOCUMENT_VALUES` 200,000; fixture under target/. Cases frozen from TS: 2 key-order, 1 integer, 1 declared non-list children; Rust tests: big integer from raw text, value bound. + +## Fifth final round on 3ece1a6 + +- Verifier ECARTS(2), C3 + C13: a `__proto__` segment in a field path: at the end, TS records `before: {}` (setter ignored the primitive) where Rust recorded null and kept a plain key; in the middle, TS polluted Object.prototype and refused, Rust accepted when overwritten; RUST.md claimed the inherited-member family refused by TS at the op, false for `__proto__`; test count stale (15 vs 13). C1, C2, C4 to C12 MET; 120,000 random changesets: 40,494 accepted identical, no other undeclared split. +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final5.md`): LOW identity guard covers the seed folder only (a subfolder alias passes), quadratic id comparisons (parse_references 31 s at 160,000), seed SQL formatting (checked), test allow (context). +- Fixed: `__proto__` segment refused at the op (reserved key), declared case frozen from TS (the non-polluting one; the polluting one tested in Rust only, it would corrupt the generator's process); identity guard over every folder of the seed tree; HashSet in assert_declared, distinct, duplicates; docs rows and counts. + +## Sixth final round on c6e0d85: CONFORME 13/13 (R5.3 closed) + +- Verifier CONFORME: C1 to C13 MET on the committed state c6e0d85 (23 curation tests, `--check` 12/0 via cargo and pnpm, `--out` + `diff -r`, 21 destination probes, anatomy 142, floor clean; TS-vs-Rust differential on 70,073 changesets: 9,397 accepted identical, 0 Rust-only accepts, TS-only accepts all declared families). +- Security PASS (`.claude/audits/2026-10-23-rust-r5-draft-security-final6.md`), LOW only: destination folder itself not identity-checked (needs an empty seed folder + a hand mount; none exists), one linear membership in cite (doc precision), seed SQL formatting (checked), test allow (context). +- check:all green 10:54:50 on c6e0d85. +- Carried into R5.4 (not applied to the verified state): destination identity check, cite membership hashed, "seed folder unreadable" message, stale test comment, doc nits (inherited row: remove form too; 200,000-value row in the table; line count 2,908; set-without-value counted among schema refusals). diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final.md new file mode 100644 index 00000000..dc308015 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final.md @@ -0,0 +1,237 @@ +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 31 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] unbounded-nesting-stack-overflow — crates/core/src/curation/draft/fields.rs:111 + - [MEDIUM] out-writes-not-exclusive-toctou — crates/core/src/bin/import_equine.rs:232 + - [LOW] reserved-nul-key-bypass-via-field-path — crates/core/src/curation/draft/fields.rs:83 + - [LOW] out-dotdot-and-parent-creation — crates/core/src/bin/import_equine.rs:192 + - [LOW] out-inside-seed-not-refused — crates/core/src/bin/import_equine.rs:186 + - [LOW] init-cwd-base-resolution — crates/core/src/bin/import_equine.rs:223 + - [LOW] args-non-utf8-panic — crates/core/src/bin/import_equine.rs:282 + - [LOW] core-no-io-lint-partial (pre-existing, context) — clippy.toml:4 + - [LOW] suppressions (context) — crates/core/tests/curation_draft.rs:7 (new), crates/core/src/bin/import_equine.rs:15 (pre-existing) +PROOF: semgrep 163 rules on 31 files → 0 findings; checklist 18 checks → 9 findings (0 CRITICAL, 0 HIGH, 2 MEDIUM, 7 LOW) +``` + +Security gate, fresh run, 2026-10-23. Scope: `git diff 5e114da..HEAD` (HEAD 8654905, branch +`feature/rust-r5-pipeline-core`), 31 changed files, all present. Product files read whole: +`crates/core/src/curation/draft/*.rs` (11), `crates/core/src/bin/import_equine.rs`, +`crates/core/src/curation/mod.rs`, `crates/core/Cargo.toml`, `crates/core/tests/curation_draft.rs`, +`packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts`, `scripts/import-equine.sh`, +`package.json`. Docs and `.claude` files grepped for secrets only. + +Semgrep's packs carry few Rust rules, so the Rust review below is manual. Two behaviours were +confirmed by a scratch probe (a throwaway binary in the session scratchpad linking +`faunosteo-core` with `curation`, run on the mini baseline of `oracles/r5/curation-synthetic.json`; +nothing in the repository was touched). `import-equine --out` was never run: its behaviour is +traced by reading. `import-equine --check` was run as the brief allows: `legacy-import: 6 files, +0 differences`, `draft: 6 files, 0 differences`, 6 pending R5.4 files listed, exit 0, `git status` +clean afterwards. + +## Checklist + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (diff incl. docs, `.claude`, oracle JSON) | none | +| 2 | SQL by interpolation (`seed.rs`) | none, see note A | +| 3 | Unsanitized render / eval | n/a (no web output; the TS test has no eval) | +| 4 | Sensitive endpoint without authz | n/a (no endpoint; seed SQL design pre-existing) | +| 5 | Stack trace / internal path to an end user | none (dev CLI, stderr to the developer) | +| 6 | Secret / PII in a log | none | +| 7 | Tracked `.env` / credential file | none in the diff (repo tracks `.env.example` only) | +| 8 | Guardrails scanner (`api,supabase`) | 0 FAIL; 1 WARN `SB-POLICY-NOT-OWNER` in `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the diff, dropped (gate rule) | +| 9 | Panics from `changes.json` / `references.json`: indexing, unwrap, byte slicing | none, see note B | +| 10 | Unbounded recursion, depth and resource caps | MEDIUM-1 | +| 11 | Reserved NUL-key refusal | LOW-1 | +| 12 | `--out` claim: symlinks, trailing `/`, `.` / `..`, TOCTOU | MEDIUM-2, LOW-2, LOW-3 | +| 13 | `INIT_CWD` | LOW-4 | +| 14 | `--check` writes nothing | verified (run + read: no write call on that path) | +| 15 | Generator writes outside `crates/core/tests/oracles/r5/` | none: one constant path, `curation-synthetic.json`, only under `MAKE_R5_ORACLES=1` | +| 16 | Core has no fs / env / clock access | holds by inspection; lint partial, LOW-6 | +| 17 | CLI argument handling | LOW-5 | +| 18 | New suppressions (anti-gaming) | LOW-7 (context, non-blocking) | + +## Findings + +### MEDIUM-1: nesting built by ops is unbounded, a small `changes.json` aborts the tool + +- Files: `crates/core/src/curation/draft/fields.rs:83-89` (`split_field`, no segment cap) and + `:111-126` (`write_field` creates one object per segment); first recursive walker hit + `crates/core/src/curation/draft/records.rs:114-123` (`strip_marks`, called at + `apply.rs:114`); same class in `records.rs:88-105` (`touch_tree`), `targets.rs:298-322` + (`walk`), `apply.rs:129` (`doc.clone()` + `from_value`), and the recursive `Value` drop. +- serde_json's 128-level parse limit (no `unbounded_depth` feature) caps each authored value, + but the ops build depth past it. A `set` whose `field` is `name` followed by N `.a` segments + creates N nested objects in one op. +- Probe, release build (the profile `scripts/import-equine.sh` uses): N = 10,000 is refused cleanly + (`curated document is not shape-valid: unknown field 'a'`). N = 20,000 (a ~40 KB + `changes.json`) gives `thread 'main' has overflowed its stack`, `fatal runtime error: stack + overflow, aborting`, exit 134. The debug build (`cargo run` without `--release`) has larger + frames and a lower threshold. +- The finding tree has the same problem, by analysis only (not run): repeated `add` ops (each up to + ~63 finding levels under the parse limit) or `move` chains deepen the tree without limit. + `walk` clones the growing path for every entry, so memory grows with depth² before the stack + overflows. +- Impact: the process aborts where it should give a typed refusal. It still fails closed: the + pipeline (`folders()`) runs before `claim_destination`, so no folder is created and nothing is + written. The input is a committed, owner-authored file. Robustness of a dev tool, and a gap in + the "depth and resource caps kept" requirement. Not exploitable beyond a crash. +- Fix: cap `split_field` segments, refusing beyond the deepest settable path (`name.fr`, + `count_range.min`, `geometry.cx`: 2 segments, so a cap of 4 is generous). Cap the finding tree + depth with an iterative check after each `add` and `move`, e.g. a `MAX_FINDING_DEPTH` constant + that refuses with the change id and op index. + +### MEDIUM-2: `--out` writes are not exclusive, so the claim can be raced + +- File: `crates/core/src/bin/import_equine.rs:232-247` (`write`: `fs::create_dir_all` at :239, + `fs::write` at :242), together with `:186-219` (`claim_destination`). +- The claim checks the folder once: absent then `mkdir`, or existing and empty. The writes then + use `create_dir_all`, which follows an existing symlink, and `fs::write`, which is `O_CREAT | + O_TRUNC` and follows symlinks. Anything planted between the claim and the writes is followed or + truncated. That could be `/draft` turned into a symlink to the real seed `draft/`, or a + file created early. The claimed path could also be swapped for a symlink before `canonicalize` + (:218). An existing empty folder is accepted whatever its owner and mode. The cross-user vector + is an empty, world-writable folder pre-created by another account in a shared location. +- The doc comment at :182-185 says "created here, so nothing can appear between the check and the + writes". That holds against a symlink at the final component (`mkdir` gives `EEXIST`), but not + against entries created inside the folder afterwards. +- Impact: a concurrent same-user process, or a hostile local account on a multi-user host, can + redirect or overwrite files. On the single-user dev machine this needs an attacker who already + has the user's rights. It is still an overstatement of the "never overwrites" guarantee the + owner asked for, and the std-only fix is cheap. +- Fix: create every subfolder under the root with `fs::create_dir`, never `_all` (fails on any + existing entry and does not follow a final symlink). Write every file with + `OpenOptions::new().write(true).create_new(true)` (`O_EXCL`: refuses an existing file or + symlink). Optionally refuse an existing claimed folder that is not owned by the current uid or + is group/world-writable (`std::os::unix::fs::MetadataExt`). Correct the comment. + +### LOW-1: the reserved NUL-key refusal does not cover dotted `field` segments + +- Files: `crates/core/src/curation/draft/schema.rs:389-410` (`reserved_key` scans JSON object keys + only), `fields.rs:83-89` (`split_field` accepts any non-empty segment), `records.rs:16` + (`TOUCH_MARK = "\u{0}touched"`), `records.rs:114-123` (`strip_marks` removes that key at every + level). +- Probe: `{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.\u0000touched","value":"author text"}` + is accepted. The document's `name` stays `{"fr":"mobility fr","en":"mobility en"}` and a record + `field="name.\0touched" after="author text"` is still emitted. The authored value is dropped + silently while the trace (the R5.4 CHANGELOG) claims the write. Any other NUL-prefixed segment, + e.g. `name.\u0000other`, is refused by the strict shape gate. The TypeScript kept the key and + refused at that gate. +- No review-rule bypass: the first segment must be settable, so the mark cannot be set at item + level. Every authored JSON key holding the mark is refused at parse. +- Fix: refuse a `field` segment that starts with `\0` (in `split_field` or the `SetOp` parse), + with the same "reserved key" message. + +### LOW-2: `..` is kept and resolved after symlinks, and a failed claim leaves created folders + +- File: `crates/core/src/bin/import_equine.rs:192-200`. +- Rebuilding the path from `components()` drops a trailing `/` and inner `.` components, which is + correct: a final symlink is then refused by `symlink_metadata`, dangling links included. + `..` is kept, though, and the kernel resolves it after any symlinked component. + `--out link/../new` creates `/new`, not the lexical `./new`. + `--out link/..` is always refused (the parent of the target is never empty). +- In the absent branch, `create_dir_all(parent)` runs before the final `create_dir`. A claim that + then fails, e.g. `--out link/new/..` (`mkdir ..` gives `EEXIST`), leaves `/new` + behind, created through the symlink, while the tool prints "nothing written". +- Parent symlinks are followed by design (doc comment), but the resolved destination is printed + only after the files are written. +- Fix: refuse any `Component::ParentDir`. Create only the final component, refusing a missing + parent, or document the parent creation. Print the canonical destination before the first + write. + +### LOW-3: a destination inside the official seed tree is not refused + +- File: `crates/core/src/bin/import_equine.rs:186-219`. +- `--out supabase/seed/anatomical-sheets/equine/x` passes the claim, being absent, and writes + `x/legacy-import/...` and `x/draft/...` inside the seed. Committed files are never overwritten, + and the populated folders (`legacy-import/`, `draft/`) are refused as not empty. The owner + requirement "never modifies the official seed automatically" holds, since this needs an + explicitly typed path. But generated folders can land untracked in the seed, and `--check` then + reports them as "not produced". +- Fix: refuse when the canonical destination is under `fs::canonicalize(SEED)`, or under the + repository root. + +### LOW-4: `INIT_CWD` and the base of a relative `--out` + +- Files: `crates/core/src/bin/import_equine.rs:223-229`, `scripts/import-equine.sh:12`. +- Any absolute `INIT_CWD` in the environment is trusted, including one inherited or left stale by + an outer pnpm. Without pnpm, the script `cd`s to the repository root, so a relative `--out` from + `bash scripts/import-equine.sh` resolves against the repository root, not the caller's folder. + The doc says "else the current one". If `current_dir()` fails, the base becomes empty and the + path stays relative to a cwd that no longer exists, which fails harmlessly. Not dangerous with + the claim rules (new or empty folder only), but surprising. +- Fix: print the resolved destination before claiming, and state in the doc that direct runs + resolve from the repository root. Or refuse a relative `--out` when `INIT_CWD` is unset. + +### LOW-5: a non-UTF-8 argument panics + +- File: `crates/core/src/bin/import_equine.rs:282` (`env::args()` panics on non-Unicode argv). + Self-inflicted, CLI only, not reachable from `changes.json`. +- Fix: `env::args_os()` and a usage error on a non-UTF-8 argument. + +### LOW-6 (pre-existing, context): the core's no-I/O guarantee is only partly lint-enforced + +- File: `clippy.toml:4-14` (not in this diff). `disallowed-methods` lists `fs::read`, + `read_to_string`, `write`, `File::open`, `File::create`, `env::var`, `var_os` and the clocks. + It does not list `fs::create_dir(_all)`, `remove_file`, `remove_dir(_all)`, `read_dir`, + `rename`, `copy`, `metadata`, `symlink_metadata`, `canonicalize`, `OpenOptions::open`, + `env::current_dir`, `env::args(_os)` or `process::Command::new`. +- A grep of `crates/core/src/curation/` finds no `std::fs`, `std::env`, `std::process`, + `OpenOptions` or `unsafe`, and no `allow(clippy` in the draft modules. The claim holds today by + inspection, not by lint. +- Fix: extend the list so a future library change cannot add file system access unnoticed. + +### LOW-7 (context): suppressions + +- New: `crates/core/tests/curation_draft.rs:7` + `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. This is a + test target, the established pattern of the crate's integration tests (`anatomy_*`, + `archive_rules`, `curation_format`, `curation_legacy` and others), and the pattern `clippy.toml` + itself documents ("Tests ... allow these lints locally where they own I/O"). It allows a + robustness/architecture lint, not a security scanner (`nosemgrep`, `nosec`, `eslint-disable + security`), so it is not counted as an un-gated suppression. +- Pre-existing: `crates/core/src/bin/import_equine.rs:15` `#![allow(clippy::disallowed_methods)]` + (present at 5e114da, line 11). +- No `nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore` or `noqa` was added in product files. + +## Notes (verified, no finding) + +A. Seed SQL (`seed.rs`). Every single-quoted value is a constant or derived from one: +`sheet_id_for(EQUINE_SPECIES_ID, EQUINE_SHEET_VERSION)`, sha256 hex, the uuid asset id, `usize`, +`horse.svg`, the description and the change note. Quotes are doubled, and backslashes are literal +under `standard_conforming_strings`. Author data reaches only the dollar-quoted document literal, +which is refused when the JSON contains `$equine_doc$`. The close cannot overlap the body's tail, +because the body is a pretty-printed JSON object trimmed to its final `}`, so no suffix of it is a +prefix of the tag. Ported verbatim from `seed.ts`. + +B. Panics. Library unwrap/expect are denied by workspace lints. Every index is guarded: +`numbers[0..3]` after `len == 4`, `ids[0]`/`[1]`/`[2..]` after the `ids.len() >= 2` check for +findings, and `split_field(..)?[0]` on a non-empty split. Byte slices cut on ASCII `:` and `/` +(char boundaries). `Vec::insert` is bounded by `insertion_index` (checked `<= len`, `After` gives +at most `len`). `Vec::remove` uses an index `locate` just resolved. `move` re-locates the +destination after the removal. `u64` positions saturate and are refused by the range check. +The only aborts found are the stack overflows of MEDIUM-1 (`panic = "abort"` in release; a stack +overflow aborts in any profile). + +C. Strict validation. `deny_unknown_fields` on every authored struct; the `op` tag is removed +before strict parsing of the variant. `.optional()` semantics: `null` is refused, absent is +accepted. `CHG-\d{3,}` ids, duplicate change and reference ids, level C without a question, the +reserved `CHG-000` and empty ops or citations are all refused. Repeated JSON keys keep the last +value, as `JSON.parse` does. `references.json` is parsed into the strict `Reference`. + +D. `--check` only reads: `fs::read`, `read_dir`, `is_dir`. `listed` follows directory symlinks in +the seed. A loop ends in an `ELOOP` error and a symlinked file is only compared, never printed. +These are trusted, committed contents. + +E. The oracle generator writes only +`crates/core/tests/oracles/r5/curation-synthetic.json` (`resolve(HERE, '../../../crates/core/tests/oracles/r5')`, +a constant), only when `MAKE_R5_ORACLES === '1'`, and otherwise just compares. +`crates/core/tests/curation_draft.rs` only reads. + +F. Secrets: none in the 31 files (diff grep for key, token, password, bearer, `service_role`, JWT, +PEM, cloud key prefixes and `user:pass@` URLs; semgrep `p/secrets` 0). The references use example +URLs without credentials. diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final2.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final2.md new file mode 100644 index 00000000..14acb635 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final2.md @@ -0,0 +1,211 @@ +# Security gate (fresh): R5.3 draft port, final 2 + +Branch `feature/rust-r5-pipeline-core`, HEAD `314cf04`, scope `git diff 5e114da..HEAD` +(32 files), focus on `9f11499`. Fresh run: no earlier verdict consulted. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 32 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] resource-cap/memory-amplification — crates/core/src/curation/draft/records.rs:68 + - [LOW] resource-cap/cpu-quadratic — crates/core/src/curation/draft/apply.rs:109 + - [LOW] check-follows-symlinks — crates/core/src/bin/import_equine.rs:148 + - [LOW] out-toctou-residual — crates/core/src/bin/import_equine.rs:203 + - [LOW] write-exclusive-components — crates/core/src/bin/import_equine.rs:246 + - [LOW] silent-input-normalisation — crates/core/src/bin/import_equine.rs:66 + - [LOW] test-targets-real-seed — crates/core/tests/curation_draft.rs:681 + - [LOW] suppression-context (new, test crate, documented policy) — crates/core/tests/curation_draft.rs:7 + - [LOW] suppression-context (pre-existing) + lint list gaps — crates/core/src/bin/import_equine.rs:15 +PROOF: semgrep 129 rules on 32 files → 0 findings; checklist 10 checks → 9 findings +``` + +## Tool notes + +- semgrep 1.168.0, pinned packs only, `--metrics=off`. The first run died inside semgrep-core + (`io_uring_queue_init: Cannot allocate memory`, sandbox memlock limit). The rerun with + `EIO_BACKEND=posix` scanned all 32 files: 0 errors, 129 rules run (163 loaded), 0 findings. +- These packs carry almost no Rust rules. The Rust analysis below therefore rests on a full + read of every changed product file plus runtime probes, not on semgrep. +- Guardrails scanner (`api,supabase`): 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER` in + `supabase/migrations/20261008110000_anatomical_sheets.sql`, outside the diff, dropped). + +## Checklist + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (diff incl. docs, `.claude`, oracle JSON) | none (only `https://example.org/a`) | +| 2 | SQL by concatenation / interpolation | none: `seed.rs` interpolates constants only, `sql_text` doubles quotes, the document goes into `$equine_doc$…$equine_doc$`, and a document holding the tag is refused. The trimmed document always ends with `}`, so no prefix of the tag can join the closing tag. `config.toml` `sql_paths` lists literal files, so an `--out` under `supabase/seed/` is never executed by `db reset` | +| 3 | Unsanitised render / `eval` | none (no rendering; the TS oracle test has no sink) | +| 4 | Sensitive endpoint without authz | N/A (dev tool, no endpoint) | +| 5 | Stack trace / internal path to end users | none (operator CLI only) | +| 6 | Secret / PII in a log | none | +| 7 | Tracked `.env` / credential file | none (`.env.example` only, outside the diff) | +| 8 | Guardrails scanner | 0 findings in diff files | +| 9 | New suppressions (anti-gaming) | no `nosemgrep` / `nosec` / `eslint-disable` / `ts-ignore` / `noqa`; one clippy allow (L7) | +| 10 | Brief-specific: seed protection, `--check` read-only, `--out` semantics, caps, strict validation, author data | M1, L1 to L6 | + +## Findings + +### M1 [MEDIUM] No memory cap: hostile `changes.json` amplifies about 10,000× (non-blocking) + +`records.rs:68-75`: every record deep-clones the whole `Op`, value included, plus +`before`/`after`. `ops.rs:145-164`: a subtree `set` writes the value into every entry and +records it once per entry. `ops.rs:193,197`: a `rename` records the whole item twice, subtree +included. `import_equine.rs:60-68`: input reads have no size bound. The depth and segment +caps of `9f11499` bound the stack. Nothing bounds memory, the document size or the record +volume. + +Measured with the release probe under `ulimit -v 3000000`: + +| input | size | peak RSS | outcome | +|---|---|---|---| +| real `changes.json` | 227 KB | 14 MB | OK, 825 records | +| add 1,000 nodes + subtree `set` of a 100 KB description | 154 KB | 1.10 GB | OK, accepted and rendered | +| same, 2,000 nodes | 211 KB | > 2.38 GB | abort: `memory allocation of 804175406 bytes failed` | +| 5,000-node category + 200 rename ping-pongs | 300 KB | 2.13 GB | OK | +| same, 500 renames | 326 KB | > 3 GB | abort | + +Growth is linear in (ops × item size): one 90-byte rename op on that category costs about +10 MB. A 1 MB hostile file asks for tens of GB. This host has 14 GB of RAM with its 3 GB of +swap already full, so the result is an OOM kill or thrashing, during `--check` as well. No +data is lost and nothing is written. The input is an authored repository file, which can come +from a contributor PR on an MIT project. The TypeScript cloned the same way, so this is a +parity issue. It still falls short of the owner's explicit "depth and resource caps" +requirement. + +Fix direction: +- Cap the input files in the binary (for example `changes.json` ≤ 4 MiB; the real file is + 227 KB). +- Bound the curated document next to `assert_depth`: node count or serialised size, plus + string length. +- Optionally, records reference the op (index or `Rc`) instead of cloning it. + +### L1 [LOW] Quadratic CPU: whole-document depth walk after every op + +`apply.rs:109,125-147`: `depth_of` (new in `9f11499`) walks the whole document after each op. +A 2.4 MB input (20,000-node added subtree, then 10,000 one-field `set` ops) takes 9.9 s. The +cost is O(ops × document). Fix direction: the input cap of M1. Otherwise compute depth +incrementally (the depth of the touched item's path plus the depth of the written or inserted +value). + +### L2 [LOW] `--check` and input reads follow symbolic links of the committed seed + +`import_equine.rs:148`: `listed` decides recursion with `entry.path().is_dir()`, which follows +links. `import_equine.rs:60-62,163`: `fs::read` follows links and has no size bound. Two +consequences: +- A committed `draft/x -> /` makes `--check` walk the filesystem and print file names to + stderr, bounded only by ELOOP and time. +- `curation/changes.json -> /dev/zero`, or a FIFO, ends in OOM or a hang. + +Both stay read-only and local, with no exfiltration. Traced by reading: no symlink was planted +in the repository. Fix direction: use `entry.file_type()` (no follow) and report a symlink as a +difference; read inputs only after a `symlink_metadata` regular-file check and under a size +cap. + +### L3 [LOW] Residual check-then-use window in `--out` + +The path is canonicalised at `import_equine.rs:203`, then the folder is created at `:216`. +Each intermediate folder is checked with `symlink_metadata` at `:252`, then the file is opened +at `:257-261`. All of these are path-based. A concurrent local actor with write access to the +destination's parent, or the owner of a pre-existing empty destination, could swap a +component for a symlink between check and use. The impact is bounded: every file is +`create_new` (O_EXCL) with a fixed name, so nothing is overwritten, truncated or deleted. The +worst case is new fixed-name files in another folder the user can write. Fix direction, only +if wanted: hold the claimed root as a directory fd and create children with +`openat`/`mkdirat` + `O_NOFOLLOW` (rustix or cap-std). Otherwise document the single-user +machine assumption. + +### L4 [LOW] `write_exclusive` accepts any path component + +`import_equine.rs:244-255` pushes each component of `relative` without refusing `RootDir`, +`ParentDir` or `Prefix`. Today every name is a compile-time constant (`render_artifacts`, +`render_draft_artifacts`, `assets/Horse.svg`), so this is not exploitable. It becomes a +traversal if R5.4 derives a file name from data, for example review drawings named after view +ids. Fix direction: refuse any component other than `Component::Normal`. + +### L5 [LOW] Silent input normalisation, against "author data never dropped silently" + +- `import_equine.rs:66-68`: invalid UTF-8 in `changes.json` or `references.json` silently + becomes U+FFFD. +- `schema.rs:382-384` (`js::parse_json`): a duplicated key keeps its last value, and the first + is dropped without notice. + +Both are declared parity with `readFile(..., 'utf8')` and `JSON.parse`. Fix direction: refuse +invalid UTF-8 (`String::from_utf8`) and duplicate keys in the authored files, or warn. + +### L6 [LOW] A test runs the real binary against the official seed path + +`curation_draft.rs:676-701` runs `import-equine --out /new-folder`. If the seed guard +regressed, the test itself would create `new-folder/` with 12 files inside the official seed +before its assertion fails (no overwrite). For the same reason this gate did not run +`cargo test --test curation_draft`: the brief forbids `--out` against a repository path. Fix +direction: assert the seed refusal through the pure claim logic with an injectable seed root, +or keep it and accept the regression risk knowingly. + +### L7 [LOW, context] New lint allow in a test crate: not a security suppression + +`curation_draft.rs:7` adds +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. It sits on an +integration-test crate, uses the same line as 10 existing test files, and follows the policy +written in `clippy.toml` ("Tests … allow these lints locally where they own I/O"). It silences +no security scanner and no security finding, so it is not blocking. + +### L8 [LOW, context] Pre-existing allow, and gaps in the I/O ban list + +`import_equine.rs:15` `#![allow(clippy::disallowed_methods)]` was already present at +`5e114da`. Separately, `clippy.toml` bans only `fs::read`, `read_to_string`, `write`, +`File::open`/`create`, `env::var`/`var_os` and the clocks. `fs::create_dir*`, +`OpenOptions::open`, `read_dir`, `canonicalize`, `remove_*`, `env::current_dir`, +`env::args_os` and `process::Command` would pass the lint inside the library. A grep confirms +that `crates/core/src` outside `src/bin` uses none of them today. Fix direction: extend the +list. + +## Verified, no finding + +Stack and validation. The probe linked `faunosteo-core` with the `curation` feature and ran +in debug on a 2 MiB thread, in debug on the main thread, and in release: +- a 20,000-segment field and a 9-segment field are refused; the 8-segment field is refused + later by the strict shape check; +- `name.\0touched` is refused; a `\0touched` key inside a value is refused at parse; +- a value at serde's 128 nesting limit is refused with "recursion limit exceeded"; +- a 122-deep object value, a 58-level children chain and 40 chained adds (refused at op 29) + all end with "nests more than 64 levels"; +- moving an item into itself is refused; +- no crash, no panic in any mode. + +Margins on real data: document depth 10 against the cap of 64; field segments at most 2 +against the cap of 8. + +`--check`, as briefed: `legacy-import` 6 files, 0 differences; `draft` 6 files, 0 differences +(6 pending R5.4). `git status` clean afterwards. + +`--out`, 20 cases in a fresh `mktemp -d`. A copy of the binary was built there; the +repository stayed clean. +- Written: + - an absent folder: 12 files, `document.json` byte-identical to the seed; + - an existing empty folder; + - a parent symlink: the files land at the canonical path; + - an interior `./`; + - a relative path with an absolute `INIT_CWD`; a relative `INIT_CWD` is ignored. +- Refused with exit code 2 and nothing created: + - an existing non-empty folder; a file; + - a symlink, `symlink/`, `symlink/.`, a dangling symlink (its target is not created); + - a missing parent; `..`; `""`; `/`; an extra argument; a non-UTF-8 argument. + +Scratch total: 74 files = 6 × 12 + 2 fixtures. + +Seed protection, traced by reading and not run against the repository: +- the parent is canonicalised, then compared with `starts_with` component by component + against the canonical seed; +- a root equal to the seed, or to any ancestor, is non-empty and refused; +- a final-component symlink is refused; +- `folders()` is computed before the claim, so a refused changeset creates nothing. + +The library performs no file system, environment or process access. The Rust ownership model +rules out reference cycles from `move`. + +Probe artefacts (scratch only): +`/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/secfinal2.SbMNbq` diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final3.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final3.md new file mode 100644 index 00000000..d8efb9a5 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final3.md @@ -0,0 +1,188 @@ +# Security gate (fresh, audit mode): R5.3 curated draft, third final round + +Branch `feature/rust-r5-pipeline-core`, HEAD `42bbc48`. Scope: `git diff 5e114da..HEAD`, 34 files, +with the fix commit `776c709` read whole (shape.rs, schema.rs, apply.rs, targets.rs, +bin/import_equine.rs, tests/curation_draft.rs), plus every other changed product file under +`crates/core/src/curation/draft/` and `scripts/import-equine.sh`. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 34 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] reads-follow-directory-symlinks — crates/core/src/bin/import_equine.rs:74 + - [LOW] shape-array-length-not-enforced — crates/core/src/curation/draft/shape.rs:47 + - [LOW] write-exclusive-accepts-a-new-folder — crates/core/src/bin/import_equine.rs:282 + - [LOW] seed-guard-wiring-untested — crates/core/src/bin/import_equine.rs:223 + - [LOW] write-field-before-null-on-replaced-holder — crates/core/src/curation/draft/fields.rs:131 + - [LOW] clippy-allow-new-in-test (context) — crates/core/tests/curation_draft.rs:7 + - [LOW] clippy-allow-pre-existing (context) — crates/core/src/bin/import_equine.rs:15 +PROOF: semgrep 163 rules on 34 files → 0 findings; checklist 14 checks → 7 findings +``` + +## Method + +- semgrep 1.168.0, the three pinned packs, `--metrics=off --quiet --json`, on the 34 existing + files of the diff (16 `.rs`, 13 `.md`, 2 `.json`, 1 `.ts`, 1 `.sh`, 1 `.toml`). Exit 0, 0 + errors, 0 results; the `--time` rerun counts 163 rules. No `EIO_BACKEND=posix` was needed. + These packs carry few Rust rules, so the verdict rests on reading the code and on the probes. +- Checklist (14 checks): hardcoded secrets, SQL built by formatting, unsafe render, authz, + errors to the user, secrets in logs, tracked `.env` / credentials, guardrails scanner, + new suppressions, `--out` destination containment, read containment, shape and strictness + gate, depth and resource caps, author data loss and audit trail. +- Probes, all under + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe.m1yh/`: + a copy of the seed (`seedroot/sheets/equine`), a throwaway crate linking `faunosteo-core` + with `curation`: `ie` = `import_equine.rs` with only the `SEED` constant pointed at the + copy (diff = those lines only), and `shape` = direct calls to `parse_changeset` and + `assert_same_shape`. No `--out` ever targeted the repository. Nothing was deleted; the + scratch artifacts stay in place. + +| Probe | Result | +|---|---| +| `ie --check` on the unmodified copy | legacy-import 6 files 0 differences, draft 6 files 0 differences, 6 pending R5.4, exit 0 | +| `--out` parent = symlink into the seed (`seedlink/new`, `//seedlink//new`) | refused, inside the seed folder | +| `--out` = symlink to the seed (`seedlink`, `seedlink/`) | refused, a symbolic link | +| `--out` = seed itself / empty folder inside seed / new folder inside seed / `sheets/./equine/new` | refused (not empty / inside the seed folder) | +| `--out /`, `--out ""` | refused | +| `INIT_CWD=` with a relative `--out` | refused, inside the seed folder | +| FIFO at a committed file name in `draft/` | not opened, reported, exit 1, no hang | +| 17 MiB sparse input in `legacy-sources/` | refused, larger than 16777216 bytes, exit 2 | +| `add` of a value nested 118 levels; `add` of a 60-level children chain (level B) | refused, nests more than 64 levels, exit 2, no stack overflow | +| changeset value nested 120 / 140 levels | parsed / refused by serde's recursion limit | +| title as array, level as map, scope as map, change as array, position as array | all refused (shape gate or untagged enum) | +| `draft/assets` and `curation` replaced by directory symlinks to outside folders | see L1: read through both links | + +## Findings (all LOW, non-blocking) + +**L1. Reads follow a symbolic link in any folder component. `import_equine.rs:64-75` +(read at :74), callers :84, :96-97, :123-127, :178.** +`read` checks the final component with `symlink_metadata` (:67), then `fs::read(path)` (:74) +resolves the whole path again. A directory symlink inside the seed is followed. Measured: with +`draft/assets` and `curation` swapped for directory symlinks to folders outside the seed copy, +`--out` wrote its 12 files, exit 0, no warning, built from the changeset and the cleaned drawing +read through the links. `--check` read `assets/horse.svg` through the link without calling it +missing, and only flagged `not produced: assets`, exit 1. Between :67 and :74 a swap of the +final component is also followed, and a FIFO swapped in would block the read. Impact is small: +read-only, regular files under 16 MiB, output only to a fresh folder or a comparison, and the +symlink must already sit in the user's own repository. But the docstring at :64 ("never a +symbolic link") and RUST.md:3017 ("every read a regular file under 16 MiB, never a link") +claim more than the code does, and the owner requirement says no unintended access through +symbolic links. The §11.13 single-user residual names `--out` only. +Fix: open once and check the handle. Either canonicalise the path and require it to equal the +lexical path under the canonical seed (no link in any component), then `File::open`, +`file.metadata()` for `is_file` and length, and read through `take(MAX_FILE_BYTES + 1)`. Or +open with `O_NOFOLLOW` per component. Otherwise, correct :64 and RUST.md:3017 to "final +component only" and add reads to the §11.13 residual. + +**L2. The shape gate does not enforce array length. `shape.rs:47-53`.** +When two arrays differ in length, the length guard on the array arm (:47) fails, and the +fall-through at :52 returns `None` because both are arrays. Probe: +`assert_same_shape({"a":[1,2,3]}, {"a":[1]})` returns `Ok(())`. The module doc (:5) and +RUST.md:2969 promise "an array an array of the same length". This is unreachable today. No +deserializer in `draft/schema.rs` or `domain/sheet/schema.rs` changes an array's length: +`non_empty_strings`, `stable_ids` and `at_least_three` keep every element, and `Point` reads +an exact 2-tuple. So it is a latent gap: a future filtering or deduplicating deserializer +would drop elements without the gate noticing. +Fix: `(Value::Array(w), Value::Array(t)) if w.len() != t.len() => Some(format!("expected +{} elements at {path}, received {}", t.len(), w.len()))` ahead of the equal-length arm. + +**L3. `write_exclusive` accepts a folder that appeared after the claim. +`import_equine.rs:280-284`, docstring :261-263, RUST.md:2902.** +The docs say an entry that appeared since the claim, "file, folder or symbolic link, is +refused". Line 282 accepts any existing real directory. It has to, for the folders this run +created itself (`legacy-import/` for its second file, `assets/`). This is harmless: it stays +inside the claimed root, a symlink is still refused (`symlink_metadata`), and files stay +`create_new`, so nothing is overwritten. It falls within the declared single-user residual. +Fix: correct the docs to "a file or a symbolic link". Or record the folders this run created +and refuse any other one that already exists. + +**L4. The seed guard is tested as a predicate, never through its call site. +`import_equine.rs:223` (wiring), :365-380 (test).** +The unit test pins `inside()` on literal paths. No test runs `claim_destination` against a +seed. A regression at the call site would pass the whole suite: comparing the lexical `out` +instead of the canonical `parent`, or dropping :222-225. That guard backs the owner's first +requirement. The probes above show today's wiring is correct. +Fix: make the seed a parameter of `claim_destination` (the binary passes `SEED`). Then test it +on a temporary "seed" folder: a parent symlinked into it, the seed itself, a new folder under +it. This never touches the real seed. + +**L5. Replacing a non-object intermediate records `before: null`. +`fields.rs:126-139` (replace at :131-133), `read_field` :111-122, used at `ops.rs:116-118`.** +`set name.fr.x` turns the string `name.fr` into `{x: …}`. `read_field` returns `None` for +that path, so the record says `before: null` and the original string appears in no record. +The TypeScript does the same (`fields.ts:62-80`). The final document is safe: the strict gate +refuses the stray object unless a later op overwrites the field. In that case the CHANGELOG +trail lacks the original value. This is the family of the declared inherited-member row +(§11.12) and is not declared. +Fix: declare it in the §11.12 table, or refuse a write through an existing non-object +intermediate (always an author error). + +**L6. New lint allow in a test (context). `crates/core/tests/curation_draft.rs:7`.** +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` on an +integration test that reads fixtures and runs the built binary. This is not a security-scanner +suppression, and product code keeps the lint. No `nosemgrep`, `nosec`, `eslint-disable`, +`ts-ignore` or `noqa` was added anywhere in the diff. + +**L7. Pre-existing lint allow (context). `crates/core/src/bin/import_equine.rs:15`.** +`#![allow(clippy::disallowed_methods)]` was already present at `5e114da` (line 11). This file +is the one place of the tool allowed the file system. + +## Checklist results + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (diff incl. docs, `.claude`, oracles) | none | +| 2 | SQL by formatting | `seed.rs`: fixed and pipeline values through `sql_text` (quotes doubled), the document in `$equine_doc$` with the tag refused (:91); no injection path. Nothing new | +| 3 | innerHTML / eval / unsafe render | none in code (prose in memory files only) | +| 4 | Endpoint without authz | N/A (local tool, no endpoint) | +| 5 | Internals surfaced to a user | N/A (the operator's own CLI) | +| 6 | Secret / PII in a log | none | +| 7 | Tracked `.env` / credentials | `.env.example` only | +| 8 | guardrails `scan.py --domain api,supabase` | 0 FAIL; 1 WARN `SB-POLICY-NOT-OWNER` at `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the delta, not counted; 1 MANUAL | +| 9 | New suppressions (anti-gaming) | none un-gated; L6, L7 context | +| 10 | `--out` containment | passes every probe; L3, L4 | +| 11 | Read containment | L1 | +| 12 | Shape and strictness gate | Zod's two refusals reproduced; L2 latent | +| 13 | Depth and resource caps | 16 MiB reads, serde depth 128, 8 field segments, document depth 64: all hold under probes | +| 14 | Author data loss, audit trail | NUL keys refused, marks stripped; L5 | + +## Owner requirements + +- Official seed never modified automatically: met. `--out` under or at the seed is refused + on canonical paths (8 probe paths), `--check` writes nothing, the binary test aims only at + `CARGO_TARGET_TMPDIR`, and the TypeScript generator writes oracles only under + `MAKE_R5_ORACLES=1`. Test gap: L4. +- `--check` writes nothing: met. Its code path holds only `symlink_metadata`, `read`, + `read_dir`. +- `--out` never deletes or overwrites: met. No remove call; `create_dir` and `create_new`. +- Dangerous paths and invalid destinations refused: met (empty, `..`, missing parent, `/`, + symlink with `/` or `/.`, file, non-empty folder, inside the seed). +- No unintended access through symbolic links: met on the write side (outside the declared + residual window). Partly met on the read side: L1. +- Strict changeset validation: met. L2 is latent. +- Depth and resource caps: met. +- Author data never dropped silently: met for the document. L5 concerns the record trail only. + +## Declared residuals (RUST.md §11.13) checked + +- Memory: no new cap. One correction: the Rust records clone the whole op per record + (`records.rs:70`), while the TypeScript shared `ctx.op` (`types.ts:41-48`). A subtree `set` + therefore holds its value twice per record, against once in the TypeScript: about twice the + TypeScript, so "as the TypeScript's clones would" (RUST.md:3032) is low by about 2x. The + conclusion (unbounded, over 2 GB) stands. Not material. +- Depth walk after every op (`apply.rs:110`, :126-139): matches the code. Not re-timed. +- `--out` check-then-use window: consistent. Reads have the same window (L1). +- Lossy UTF-8 (`import_equine.rs:79-81`) and repeated keys (`schema.rs:387-389`): + consistent. + +## Permission note + +One probe command was refused by the permission system. It was a compound command: write the +shape probe, `cd` into the scratch crate, export `CARGO_TARGET_DIR`, source +`scripts/rust-env.sh`, then `cargo build`. No rule text came back. I did not retry that form +and did not source the env file. The probe file was written alone. The build then ran as a +plain `cargo build --manifest-path `, with `cargo` already on PATH, and the +permission system allowed it. diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final4.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final4.md new file mode 100644 index 00000000..7f310562 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final4.md @@ -0,0 +1,170 @@ +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 35 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] author-data-silently-replaced (non-array `children` of an added item) — crates/core/src/curation/draft/ops.rs:252 + crates/core/src/curation/draft/targets.rs:246 + - [LOW] check-lists-through-top-level-folder-link — crates/core/src/bin/import_equine.rs:193 (listed, :164) + - [LOW] seed-containment-is-path-based (bind-mount alias) — crates/core/src/bin/import_equine.rs:230 (inside, :253) + - [LOW] declared-depth-walk-cost-understates-cap-bound-worst-case — crates/core/src/curation/draft/apply.rs:110 / docs/development/RUST.md:3046 + - [LOW] unit-test-fixture-in-shared-temp-with-fixed-name — crates/core/src/bin/import_equine.rs:383 + - [LOW] context: clippy purity lint allowed in a new test file (project convention, not a scanner suppression) — crates/core/tests/curation_draft.rs:7 + - [LOW] context: seed SQL rendered by string formatting from pipeline values — crates/core/src/curation/draft/seed.rs:29 +PROOF: semgrep 129 rules on 35 files → 0 findings; checklist 9 checks → 7 findings (1 MEDIUM, 6 LOW) +``` + +# R5.3 draft, security gate (fresh, final 4) + +Branch `feature/rust-r5-pipeline-core`, HEAD `6c0fe88`, scope `git diff 5e114da..HEAD` +(35 files, 11 commits), with attention to `86273b6`. Read whole: `bin/import_equine.rs`, +`curation/draft/{shape,ops,apply,schema,targets,fields,records,rename,stats,migration_map,seed,pipeline,mod}.rs`, +`curation/mod.rs`, `scripts/import-equine.sh`, the `package.json` line, the binary and +integration tests that touch the file system, the oracle generator's write guard +(`MAKE_R5_ORACLES=1` only). Every probe ran in +`/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/sec4.j5fliv` +on a copy of the seed, through a probe binary that is `import_equine.rs` byte for byte except +the `SEED` constant (pointed at the copy). Nothing ran `--out` against the repository, nothing +was deleted, `git status` is clean after the run. + +## Semgrep + +`semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten +--metrics=off` on the 35 existing files of the diff: 129 rules run, 0 findings, 0 errors. +The rulesets carry almost no Rust rules; the Rust code was covered by reading and probing. + +## Checklist + +| Check | Result | +|---|---| +| Hardcoded secret / token / key / auth URL | none (grep over the 35 files) | +| SQL by string interpolation | `seed.rs` renders the seed file by formatting: LOW context below, not a runtime query | +| Unsanitized render (innerHTML, eval…) | not applicable (Rust CLI and library, no DOM) | +| Sensitive endpoint without authz | not applicable (no endpoint) | +| Stack trace / internal path to an end user | not applicable (errors go to the local developer's stderr) | +| Secret / PII in a log | none (stdout/stderr carry paths, counts and refusals) | +| Tracked `.env` / credential file | only `.env.example` tracked | +| Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the diff, dropped), 1 MANUAL | +| New suppressions (anti-gaming) | no `nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore`, `noqa`; one clippy allow in a new test file (LOW context below) | + +## Owner requirements, verified + +- Seed never modified automatically: every read goes through `read()` (canonical path inside + the canonical seed, regular file, 16 MiB cap). Probed: `curation/` as a folder link out of + the seed and `changes.json` as a file link out of it are both refused (`leads outside the + seed folder`); a folder link that stays inside the seed is accepted. +- `--check` writes nothing: only `canonicalize`, `metadata`, `read`, `read_dir` on that path. + Probe copy: 12 files, 0 differences, nothing new under the fixture seed (`find -newer`). +- `--out` refusals, probed on the fixture seed: a link to the seed and to `draft/` (as the + destination and as its parent), a link chain `p/q` ending in a seed link, the seed path + itself plus `/new`, `legacy-import/new`, `INIT_CWD` set inside the seed, `..`, an empty path, + `/`: all refused, nothing created. A relative `INIT_CWD` is ignored. A valid destination + gets 12 files identical to the seed (`diff -rq`), a second run on it is refused `not empty`. + Files are `create_new`, folders `create_dir` tracked in `created`, so an entry that appears + after the claim is refused. File names are pipeline constants. +- Strict changeset validation, depth and resource caps: `deny_unknown_fields`, the `op` + discriminator, non-empty strings, the shape comparison (now with array length), reserved + NUL keys at parse and in field paths, 8 field segments, serde_json's 128 parse depth, 64 + document levels after each op (iterative walk), 16 MiB per file. Recursive walks + (`reserved_key`, `first_mismatch`, `strip_marks`, `walk`, `touch_tree`, `js_deep_equal`) are + all bounded by the 128 parse depth or the 64-level check. +- `86273b6`: `assert_object_children` refuses a non-object entry of a `children` or + `categories` list (explicit stack); the length arm of `first_mismatch` sits before the + element arm; `claim_destination(typed, seed)` with its fixture test refuses before any + `create_dir`. All correct. One gap left next to the first: MEDIUM below. + +## Findings + +### MEDIUM: a non-array `children` on an added item is silently replaced by `[]` + +`crates/core/src/curation/draft/ops.rs:252` (`assert_object_children` skips a `children` +value that is not an array) and `crates/core/src/curation/draft/targets.rs:246` +(`children_path` overwrites any present non-array `children` with `[]`). An `add` whose value +carries `"children"` as an object, a string or `null`, followed by an `add` (or a `move`) +into that item, is accepted: the strict gate never sees the author's value, which is gone +from `document.json` and the migration map. Probed on the real equine changeset plus one +level-A change: `"children": {"author-note": {"id": "kept", ...}}` (a whole nested finding +written as an object instead of an array), `"children": "author text"` and +`"children": null` all give `probe-node.children = [probe-child]`, exit 0, 12 files written. +Only the add record's `after` keeps the value; no R5.3 output shows it (the CHANGELOG is +R5.4). Parity with the TypeScript `childrenOf`, and not declared: §11.12 says "a lean leaf +gets `children: []` appended on demand", which covers an absent key, not a present value +replaced. This breaks the owner's "author data never dropped silently" through a plausible +typo (object in place of array). Non-blocking: no security boundary is crossed. +Hint: in `assert_object_children`, refuse a present `children` or `categories` key whose +value is not an array (same message family, same place as the entry check), or make +`children_path` refuse a present non-array value and append `[]` only when the key is absent. +Declare the split in the §11.12 table with a frozen TypeScript case. + +### LOW: `--check` lists through a top-level folder link + +`crates/core/src/bin/import_equine.rs:193` calls `listed(&target, ...)` on +`SEED/legacy-import` or `SEED/draft` without checking the folder itself: `read_dir` follows +it when it is a link. Probed with `legacy-import` pointing out of the seed: the reads are +refused (`missing: ...`), but `not produced: private-name.txt` and `not produced: +sub/deep.txt` print the names of files outside the seed, subfolders included. Read-only, +names only, same user. §11.12's "`--check` lists a link without walking into it" holds for +entries, not for the generated folder itself. +Hint: canonicalize the target and require `inside(&canonical, &seed)` before listing, or +refuse a target whose `symlink_metadata` is a link. + +### LOW: the seed guard is path-based, a mount alias passes it + +`crates/core/src/bin/import_equine.rs:230` compares canonical paths (`starts_with`). +`canonicalize` resolves links, not mounts: if the seed (or the repository) is reachable +through a second path (bind mount, the same NAS share mounted twice), `--out +/.../equine/new` passes `inside` and creates a new folder inside the official seed. +Only new files (never an overwrite, never a delete); the user must type the alias. Reasoned, +not probed (a mount needs privileges). +Hint: also compare `(dev, ino)` (`std::os::unix::fs::MetadataExt`) of the canonical parent and +each of its ancestors with the seed folder's; a bind mount root shares the source's pair. + +### LOW: the declared depth-walk cost understates the cap-bound worst case + +`crates/core/src/curation/draft/apply.rs:110` runs `assert_depth` over the whole document +after every op; RUST.md:3046 declares it with one sample ("a 2.4 MB changeset takes about +10 s"). The sample is right (probe: 2.3 MB, one 1 M-node add then 2,000 sets, 12.4 s, +455 MB). The worst case inside the 16 MiB read cap is two orders larger: 8.2 MB, one 4 M-node +add then 1,000 sets, 35.7 s and 1.7 GB, so about 30 ms per op, and the remaining 8 MB holds +about 94,000 more ops: roughly 45 minutes of CPU before the final gate refuses. Twenty +thousand plain sets on the real document take 0.9 s, so ordinary changesets are not affected. +Local developer tool, interruptible. The declaration is not wrong, it is incomplete. +Hint: state the cap-bound figure in §11.13, or bound the work: a total node cap on the +document after each op (also bounds memory), or a depth check limited to the subtree the op +wrote. + +### LOW: unit-test fixture at a fixed name in the shared temp folder + +`crates/core/src/bin/import_equine.rs:383`: `env::temp_dir().join("faunosteo-import-equine-claim")` +with `create_dir_all`. On a multi-user host another account can pre-create or link that +name. The test only runs refusals, so the worst outcome is a failed test or an empty folder +created where the link points. The integration test already uses the private +`CARGO_TARGET_TMPDIR`. +Hint: put the fixture under the target folder (for example +`concat!(env!("CARGO_MANIFEST_DIR"), "/../../target/...")`) or a per-run name created +exclusively. + +### LOW (context): clippy purity lint allowed in a new test file + +`crates/core/tests/curation_draft.rs:7` `#![allow(clippy::disallowed_methods, +clippy::unwrap_used, clippy::expect_used)]`. A determinism and robustness lint (no I/O, no +clock in the core), not a security scanner suppression. The same line heads the ten other +core test files. The binary's `#![allow(clippy::disallowed_methods)]` was already present at +`5e114da`. Not blocking. + +### LOW (context): seed SQL rendered by string formatting + +`crates/core/src/curation/draft/seed.rs:29` (`sql_text`) and `:90` (`document_literal`). Every +interpolated value is a pipeline constant, a sha256 hex, a derived uuid or a byte count; +quotes are doubled (correct with `standard_conforming_strings` on, the PostgreSQL default); +the document is embedded in a `$equine_doc$` literal and refused if it holds the tag; the +formatted JSON always ends with `}`, so no tag can form at the closing boundary. This +generates a reviewed seed file, it is not a runtime query. No action. + +## Residual risks declared in RUST.md §11.13 + +Memory without a cap beyond 16 MiB per file: confirmed (1.7 GB from an 8.2 MB file), in line +with the declaration. Single-user check-then-use window on reads and `--out`: confirmed as +described, every file stays `create_new`. Lossy UTF-8 and repeated keys: as declared. The +quadratic walk: LOW above. diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final5.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final5.md new file mode 100644 index 00000000..0eae8a3c --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final5.md @@ -0,0 +1,141 @@ +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 37 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] seed-guard-identity-coverage — crates/core/src/bin/import_equine.rs:263-273 (claim at :236; claim in docs/development/RUST.md §11.13) + - [LOW] quadratic-id-comparisons — crates/core/src/curation/draft/ops.rs:355-383, :404-408; schema.rs:369-380 + - [LOW] sql-built-by-formatting (checked, not injectable) — crates/core/src/curation/draft/seed.rs:29-135 + - [LOW] new-lint-allow-in-test (context, not a scanner suppression) — crates/core/tests/curation_draft.rs:7 +PROOF: semgrep 129 rules on 37 files → 0 findings; checklist 14 checks → 4 findings + +# Security gate, R5.3 curated draft, fifth final round (fresh, blind) + +- Repository: /home/bchanot/Documents/faunosteo, branch `feature/rust-r5-pipeline-core`, HEAD `3ece1a6`. +- Scope: `git diff 5e114da..HEAD` (37 files, all present), focus on `07d6307`. +- Product files read in full: `crates/core/src/bin/import_equine.rs`, `crates/core/src/curation/text.rs`, + `crates/core/src/curation/draft/{apply,fields,migration_map,mod,ops,pipeline,records,rename,schema,seed,shape,stats,targets}.rs`, + `crates/core/src/curation/mod.rs` (diff), `crates/core/Cargo.toml`, `package.json`, `scripts/import-equine.sh`; + test files and the TypeScript oracle generator inspected for file system and process calls. + +## Semgrep + +`EIO_BACKEND=posix semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten --metrics=off --json <37 files>`: +129 rules run (multilang 41, json 3, ts 84, bash 1), 37 targets, 0 findings, 0 errors. These packs carry no Rust +rule: the Rust code is covered by the checklist and the probes below, not by semgrep. + +## Checklist (14 checks) + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (diff incl. docs, `.claude`, oracle JSON) | none (oracle holds only `https://example.org/a`) | +| 2 | SQL built by string formatting | seed.rs generator, quoting verified: LOW 3 | +| 3 | Unsanitized render, `eval`, `unsafe` | none (no web render, no `unsafe` in scope) | +| 4 | Sensitive endpoint without authz | not applicable (no endpoint; dev CLI and library) | +| 5 | Stack trace, internal path, DB error to an end user | none (CLI messages go to the developer running the tool) | +| 6 | Secret or PII in a log | none (stdout/stderr carry paths, counts, refusals) | +| 7 | Tracked `.env` or credential file | none in the diff (`.env.example` only, pre-existing) | +| 8 | Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`) outside the diff, filtered out; 1 MANUAL not reported | +| 9 | New suppressions (anti-gaming) | no `nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore`, `noqa`; one clippy allow in a test file: LOW 4 | +| 10 | `--check` writes nothing | proven: strace of the built binary, 28 `openat`, none with `O_WRONLY`/`O_RDWR`/`O_CREAT`/`O_TRUNC`, no `mkdir`/`unlink`/`rename`/`truncate`/`symlink`/`link`/`chmod`; seed file list, sizes and mtimes identical before and after; `git status` clean; output 12 files, 0 differences | +| 11 | `--out` destinations | 14 probes in a fresh `mktemp -d` under the scratchpad, all as designed (below) | +| 12 | Seed guard of `--out` (canonical path + device/inode) | covers the seed folder and its aliases; not an alias of a seed subfolder: LOW 1 | +| 13 | Resource caps (depth, value bound, non-list children, memory, CPU) | depth, value bound and children refusals hold; memory matches the §11.13 declaration; CPU has an undeclared quadratic term: LOW 2 | +| 14 | `js_insert` / `js_normalize` | behave as `JSON.parse`/assignment (index keys ascending first, `"01"` and `"4294967295"` named, existing key keeps its place, integers past 2^53 rounded, past u64 already f64); recursion bounded by the parser's 128 levels; only called on parsed values and on field-path writes | + +### Probes run (scratchpad only, never `--out` into the repository, no recursive delete) + +Binary built with `CARGO_TARGET_DIR` in the scratchpad (`cargo build --release --locked --offline -p faunosteo-core --features curation --bin import-equine`); +a throwaway library probe linking `faunosteo-core` with `curation`. + +- `--out`: absent folder (written, 12 files); same folder again (`not empty, nothing written`); empty folder with trailing `/` (written); + parent through a symlink to another scratch folder (parent resolved, canonical path printed before the first write); final symlink, + with `/` and as a dangling link (`a symbolic link, nothing written`); `./new/.` (normalised, written); `""` (usage error); `/` + (`not a destination folder`); relative path with `INIT_CWD` unset, relative (ignored) and absolute (typed from it). No entry outside + the probe folder appeared. +- Non-list `children` / `categories` in an added value: object, `null`, string, nested object, nested `null` entry, each refused at the add. +- Depth: an added or set value nested 60 to 122 levels is refused by the 64-level bound after the op; 122+ is refused by the parser's + limit; a 58-level `children` chain (the `touch_tree` recursion) refused by the bound, no stack overflow. +- Memory: one `set` of a 976 KiB array peaks at 156 MB RSS, a 3.9 MiB array at 610 MB (about 156 times the input, refused by the + 200,000-value bound after the op). A 16 MiB changeset therefore asks for about 2.5 GB in one op, in line with the §11.13 row + ("memory in proportion to ops × items × value size", "more than 2 GB"): declaration accurate, not reported. + +## Findings (all non-blocking) + +### LOW 1: the identity guard covers the seed folder, not an alias of one of its subfolders + +`crates/core/src/bin/import_equine.rs:263-273` (`inside_by_identity`, called at `:236`). The guard compares the (device, inode) of +the seed folder with every ancestor of the canonical parent. A bind mount of the seed itself (or of an ancestor) is refused, as +intended. A bind mount of a seed subfolder, for example `draft/` mounted at `/mnt/d`, has the inode of `draft/`, not of the +seed: `--out /mnt/d/x` passes both checks and creates `draft/x/legacy-import/…` and `draft/x/draft/…` inside the official seed. +The same applies to a network share mounted twice with distinct superblocks (distinct `st_dev`). Traced by reading; not probed +(a mount needs privileges and is the user's to run). + +Why only LOW: it needs a mount the owner made by hand; every write is `create_dir`/`create_new` into a new or empty folder, so +nothing is overwritten or deleted, and the stray folder shows up in `--check` as `not produced`. What is materially off is +the wording: the code comment says "a share mounted twice is caught too" and RUST.md §11.13 says "a second mount path of +the seed is refused too". Both hold for the seed folder only. + +Suggested fix: collect the (device, inode) of every folder of the seed tree once (a few dozen) and refuse a parent whose +ancestor matches any of them; or keep the code and narrow the comment and §11.13 to "a second mount path of the seed folder or +of an ancestor". + +### LOW 2: id comparisons are quadratic, a CPU cost the residual-risk declaration does not name + +- `ops.rs:355-372` `assert_declared`: `declared.contains` on a `Vec` costs O(ids × declared), per cite op and per change + (`apply.rs:104`). The TypeScript used a `Set` here (`ops.ts:185`). +- `ops.rs:375-383` `distinct`: O(n²), called once per scope entry inside the cite loop (`:404`). The TypeScript used `new Set`. +- `ops.rs:406` `before.contains` per added id: O(ids × existing), same as the TypeScript's `includes`. +- `schema.rs:369-380` `duplicates`: O(n²) on change and reference ids, same order as the TypeScript's `indexOf`. + +Measured (release build): `parse_references` takes 0.24 s at 20,000 references, 1.9 s at 40,000, 6.0 s at 80,000 and 31 s at +160,000 (10.5 MiB). A subtree cite of every reference on 5 items takes 1.16 s at 16,000 ids and 4.7 s at 32,000, where the +200,000-value bound then refuses. The value bound caps the apply phase near 30,000 references, so a hostile 16 MiB pair of +files stays in minutes, the same order as the declared "a 16 MiB changeset of tiny ops could take minutes". The §11.13 +CPU sentence names only the bound walk. + +Suggested fix: a `HashSet<&str>` for `assert_declared`, `distinct` and the `duplicates` scan (output order kept by walking +the original list). Or add one clause to §11.13 ("id comparisons are quadratic, minutes at the 16 MiB cap"). + +### LOW 3: seed SQL built by string formatting, checked and not injectable + +`crates/core/src/curation/draft/seed.rs:29-135`. A checklist hit on "SQL built by interpolation", but this code writes a +generated seed file (run by `supabase db reset` and the PGlite harness). It is not a runtime query, and no untrusted text +reaches it in an injectable form: + +- the `sql_text` values are pipeline constants, the sheet id from `sheet_id_for(EQUINE_SPECIES_ID, EQUINE_SHEET_VERSION)`, + sha256 hex, a uuid from the sha256 and the fixed `horse.svg`, all quoted by doubling `'` (`standard_conforming_strings` is on + by default in both runners); +- the authored document is dollar-quoted, and a text holding `$equine_doc$` is refused (`:91`). The text is `format_json` + of an object, so it starts with `{` and ends with `}` after `trimEnd`: no tag can form at a junction, and a `$` + escape is decoded and re-emitted as a literal `$`, then caught. + +Same construction as the TypeScript. No action needed. If touched later, keep the tag check on the final text. + +### LOW 4 (context): new lint allow in an integration test + +`crates/core/tests/curation_draft.rs:7` `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. +This allows the project's no-I/O/no-clock lint and the unwrap lints in a test file, as every other core test file does +(`anatomy_*`, `pdf_*`, `curation_format.rs`, `curation_legacy.rs`, …). It does not silence a security scanner, so it is not +a gated suppression. The binary's `#![allow(clippy::disallowed_methods)]` (`import_equine.rs:15`) was already present at `5e114da`. + +## Owner requirements, checked + +- The official seed is never modified automatically: `--check` is proven read-only. The `--out` seed guard holds for the seed + folder and its aliases (exception: LOW 1). +- `--out` never deletes (no remove call in the binary) and never overwrites (`create_dir`, `create_new`, the claimed folder + re-checked before each file). Refusals probed for an empty path, `..`, a missing parent, a symlink (trailing `/`, `/.`, + dangling), a non-folder and a non-empty folder. +- Strict changeset validation: strict shapes plus the shape comparison; NUL keys refused at parse and in field segments; + non-list or non-object children refused at the add, never replaced (`targets.rs:245-256`). +- Depth and resource caps: parser 128, field path 8 segments, document 64 levels and 200,000 values after each op, files + under 16 MiB. Memory matches the declaration; the undeclared CPU term is LOW 2. +- Author data is never dropped silently in the final document: an overwritten value is recorded as `before`. A path through + a non-object replaces it (`before: null`), which matches the TypeScript (`isItem` excludes arrays too) and is declared in §11.12. + +## Not done + +- Semgrep has no Rust rules in the pinned packs. Rust coverage comes from the reading, the checklist and the probes. +- Mount aliases (LOW 1) were traced by reading, not reproduced. +- The test suites were not run (the verifier's job); only the release binary and the probe were built, outside the repository. diff --git a/.claude/audits/2026-10-23-rust-r5-draft-security-final6.md b/.claude/audits/2026-10-23-rust-r5-draft-security-final6.md new file mode 100644 index 00000000..93a4165f --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-draft-security-final6.md @@ -0,0 +1,151 @@ +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 38 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] seed-guard-destination-identity — crates/core/src/bin/import_equine.rs:236 (destination branch :243-253) + - [LOW] cite-membership-linear (doc precision, RUST.md §11.13) — crates/core/src/curation/draft/ops.rs:401-405 + - [LOW] sql-built-by-formatting (checked, not injectable) — crates/core/src/curation/draft/seed.rs:29-135 + - [LOW] new-lint-allow-in-test (context, not a scanner suppression) — crates/core/tests/curation_draft.rs:7 +PROOF: semgrep 163 rules on 38 files → 0 findings; checklist 14 checks → 4 findings + +# Security gate, R5.3 curated draft, sixth final round (fresh, blind) + +- Repository: /home/bchanot/Documents/faunosteo, branch `feature/rust-r5-pipeline-core`, HEAD `c6e0d85`. +- Scope: `git diff 5e114da..HEAD`, 38 files, all present. Focus on `f245b3e`. +- Product files read in full: `crates/core/src/bin/import_equine.rs`, + `crates/core/src/curation/draft/{apply,fields,migration_map,mod,ops,pipeline,records,rename,schema,seed,shape,stats,targets}.rs`, + `crates/core/src/curation/{mod,text}.rs`, `scripts/import-equine.sh`, and the diffs of `crates/core/Cargo.toml` and + `package.json`. The test files and the TypeScript oracle generator were checked for file system and process calls. + +## Semgrep + +`EIO_BACKEND=posix semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten --metrics=off --quiet --json <38 files>`: +163 rules run (javascript 73, generic 57, typescript 11, python 6, package managers 5, json 3, java 3, scala 3, bash 1, +ruby 1), 38 files scanned, 0 findings, 0 errors. The pinned packs hold no Rust rule, so the Rust code is covered by the +reading, the checklist and the probes below. + +## Checklist (14 checks) + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (whole diff incl. docs, `.claude`, oracle JSON) | none | +| 2 | SQL built by string formatting | `seed.rs` generator, quoting verified: LOW 3 | +| 3 | Unsanitized render, `eval`, `unsafe`, process spawn | none in scope | +| 4 | Sensitive endpoint without authz | not applicable (dev CLI and library, no endpoint) | +| 5 | Stack trace, internal path, DB error to an end user | none (CLI messages go to the developer running the tool) | +| 6 | Secret or PII in a log | none (stdout and stderr carry paths, counts, refusals) | +| 7 | Tracked `.env` or credential file | none (`.env.example` only, pre-existing, outside the diff) | +| 8 | Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN `SB-POLICY-NOT-OWNER` at `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the diff, filtered out; 1 MANUAL not reported | +| 9 | New suppressions (anti-gaming) | no `nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore`, `noqa`; one clippy allow in a test file: LOW 4 | +| 10 | `--check` writes nothing | built binary run: 12 files, 0 differences, 6 R5.4 files listed as pending; seed file list and mtimes identical before and after; `git status` clean | +| 11 | `--out` destinations | 11 probes in a fresh `mktemp -d` under the scratchpad, all as designed (below) | +| 12 | Seed guard of `--out` (canonical path, then device/inode over the seed tree) | holds for every parent path; the destination folder itself is not identity-checked: LOW 1 | +| 13 | `__proto__` field segments | refused at every position, before any write (probe below) | +| 14 | Resource caps and id comparisons | parser depth, 8 segments, 64 levels, 200,000 values hold; hash sets in `distinct`, `assert_declared`, `duplicates` keep the old semantics; one linear membership left in `cite`: LOW 2 | + +### Probes (scratchpad only; no `--out` into the repository; no recursive delete) + +The binary was built with `CARGO_TARGET_DIR` in the scratchpad (`cargo build --release --locked --offline -p faunosteo-core --features curation --bin import-equine`). +Two throwaway probes ran there: one linking `faunosteo-core` with `curation`, and one compiling lines 213-293 of +`import_equine.rs` verbatim against a scratch seed tree. + +- `split_field`: `__proto__`, `name.__proto__`, `name.__proto__.x` and `name.fr.__proto__` are all refused with + `reserved key "__proto__"`. `name.__proto__ ` (trailing space), `name.__PROTO__`, `name.constructor` and `name.prototype` are + plain keys, as in JavaScript on a plain object. A NUL segment, 9 segments and an empty segment are refused. + `apply_changeset` with `set name.__proto__…` followed by an overwriting `set name` refuses at `CHG-001 op 0` in all four + variants. `is_settable` calls `split_field` before `item_at_mut`, so nothing is touched or written first. +- Identity guard (verbatim copy, scratch tree `seed/{a/b/c,d}` plus a link to `/` and a link loop inside it): the walk + records 5 identities and follows neither link. `seed/a/b/new`, `seed/new`, a parent link into `seed/a/b` and a parent link + to `seed` are all refused as `inside the seed folder`, with nothing created. A final link, a trailing `/` and a trailing + `/.` are refused as `a symbolic link`. A sibling folder is accepted. With one seed folder made unreadable (`chmod 000`, + restored afterwards), every claim is refused: the walk fails closed. +- Real binary `--out`: absent folder (12 files written, then `diff -r` against the seed shows only the 6 R5.4 files); + the same folder again (`not empty`, exit 2); an empty folder (written); a regular file (`not a folder`); a final link, with + `/` and `/.` (`a symbolic link`, exit 2, link target left empty); `empty/../x` (`..` refused); a missing parent; `""` + (usage error); a relative path with `INIT_CWD` unset (typed from the current folder, the canonical path printed before the + first write). No entry appeared outside the probe folder. +- Cite cost (release build): citing 28,000 declared ids twice on one finding takes 0.92 s, four times 2.7 s. The value bound + then refuses a larger registry plus its citations. + +## Findings (all non-blocking) + +### LOW 1: the destination folder itself is never identity-checked + +`crates/core/src/bin/import_equine.rs:236` runs `inside_by_identity(&parent, seed)`, which checks the ancestors of the +canonical parent. When the destination already exists (`:247-253`), only its emptiness is checked, never its own +(device, inode). Suppose an existing empty folder is a second mount path (a bind mount, or a share mounted twice on the +same device) of an empty folder of the seed. The claim accepts it, and `write` then creates `legacy-import/…` and +`draft/…` inside the seed tree. A mount alias of a non-empty seed folder is refused as `not empty`. + +Why only LOW: this needs an empty folder under the seed (none in the checkout: `find … -type d -empty` returns nothing, +and git tracks no empty folder) plus a mount made by hand at the destination. Every write is `create_dir` or `create_new`, +so nothing is overwritten or deleted. Also, the §11.13 sentence "a second mount path of the seed or of any of its folders +on the same device is refused too" holds for every parent, but not for the destination itself. Traced by reading, not +reproduced: a mount needs privileges and is the user's to run. + +Suggested fix: in the existing-folder branch, also refuse when `inside_by_identity(&root, seed)` is true (`root.ancestors()` +starts with `root` itself). Alternatively, run the identity check on `root` once it exists, created or not. Or narrow the +§11.13 sentence to the ancestors of the destination. + +### LOW 2: one cite comparison is still linear, while §11.13 says cite uses hash sets + +`crates/core/src/curation/draft/ops.rs:401-405`: for each scope entry, every distinct cited id is checked with +`before.contains(&Value::from(id))` on the item's existing citations. That costs O(distinct × existing) per item. `distinct` +and `assert_declared` are hashed now, but this membership is not, and §11.13 reads "id comparisons use hash sets (cite, +declared references, duplicate ids)". Measured: about 0.9 s per repeated op at the largest registry the 200,000-value bound +admits (about 28,000 references, each serialised as 6 values). Spread over a subtree, the worst case is about twice that. +A 16 MiB changeset therefore stays in minutes, the same order as the declared CPU residual. So this is a precision issue +in the declaration, not a new risk. + +Suggested fix: build a `HashSet<&str>` of the string entries of `before` once per item and keep the output order by +walking `distinct`. Or reword §11.13 ("cite deduplication and the declared check are hashed; the check against existing +citations is linear, bounded by the value bound"). + +### LOW 3: seed SQL built by string formatting, checked and not injectable + +`crates/core/src/curation/draft/seed.rs:29-135`. This is a checklist hit on "SQL built by interpolation", but the code +writes a generated seed file, not a runtime query. The `sql_text` values are pipeline values: the sheet id from the legacy +import, sha256 hex, the asset id derived from it, the fixed file name and the constant change note. All of them are quoted +by doubling `'`. The authored document goes into a `$equine_doc$` dollar-quoted literal, and a document text that holds the +tag is refused (`:91`). The text is `format_json` of an object, so it begins with `{` and ends with `}` after `trimEnd`, and +no tag can form at a junction. Same construction as the TypeScript. No action needed. If this is touched later, keep the +tag check on the final text. + +### LOW 4 (context): lint allow in a new integration test + +`crates/core/tests/curation_draft.rs:7` `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. +Every other core test file carries the same allow, and `clippy.toml` documents it ("Tests and the worker binary allow these +lints locally where they own I/O"). It silences no security scanner, so it is not a gated suppression. The binary's +`#![allow(clippy::disallowed_methods)]` (`import_equine.rs:15`) was already present at `5e114da`. The core library itself has +no file system, environment, clock or process call (grep over `crates/core/src` outside `bin/`). + +## Owner requirements, checked + +- The official seed is never modified automatically. `--check` was run and is read-only. `--out` refuses every parent + inside the seed by canonical path and by identity over the whole seed tree (exception: LOW 1, the destination itself). +- `--out` never deletes (the binary has no remove call) and never overwrites (`create_dir`, `create_new`, the claimed + folder re-checked before each file). It refuses an empty path, `..`, a missing parent, a symbolic link (trailing `/` and + `/.` included), a non-folder and a non-empty folder. +- Strict changeset validation: strict shapes plus the shape comparison; NUL keys refused at parse and in field segments; + `__proto__` segments refused at the op; non-list or non-object children refused at the add. +- Depth and resource caps: parser 128 levels, field path 8 segments, document 64 levels and 200,000 values after each op, + source files under 16 MiB. The seed walk is iterative and follows no link. +- Author data is not dropped silently. An overwritten value is recorded as `before`, and the cases with no faithful reading + (`__proto__`, NUL keys, non-list children) refuse. +- The residual risks declared in §11.13 (record memory, the per-op bound walk, the single-user check-then-use window, lossy + UTF-8 and repeated keys, a share mounted twice on distinct devices) match the code. The exceptions are the two wording + points in LOW 1 and LOW 2. + +## Notes (no severity) + +- When the seed walk fails, the refusal reads `inside the seed folder` (`import_equine.rs:287-289`). That fails closed, but + the message is misleading. Something like "seed folder unreadable" would point at the real cause. +- The doc comment of `crates/core/tests/curation_draft.rs:520-526` lists `__proto__` among the ordinary keys, then says it + is refused. It is stale wording in a test. + +## Not done + +- The pinned semgrep packs have no Rust rules: Rust coverage comes from the reading, the checklist and the probes. +- LOW 1 was traced by reading. No mount was made. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-10.md b/.claude/audits/2026-10-23-rust-r5-review-security-10.md new file mode 100644 index 00000000..4d5d4591 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-10.md @@ -0,0 +1,125 @@ +SECURITY — VERDICT: BLOCK(1) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 29 files +BLOCKING: + 1. [HIGH] review-drawings-amplification — crates/core/src/curation/draft/pipeline.rs:209 (bound at :205, projection at :211; amplifier reached through crates/core/src/curation/draft/app_review.rs:33 → crates/core/src/anatomy/layer.rs:108-118) — the 64 MiB review-drawing bound projects only the cleaned drawing repeated per view; every unnamed detail trigger copies the opened view's fr and en names four times into review/app-.svg, so T triggers × a view name of S bytes write 4·T·S bytes unchecked: a 485,140-byte changes.json produced a 131,713,082-byte app-main.svg (no refusal), a 1,202,892-byte changes.json made the run abort on a 1 GiB allocation under a 3 GB cap, about 44 GiB at the 16 MiB read cap — hint: project each view's layer bytes before render_layer (per annotation: fixed overhead + geometry text + 4 × the name it carries, the opened view's names for an unnamed trigger) and refuse past MAX_REVIEW_DRAWINGS_BYTES together with the cleaned-drawing projection; add a test with unnamed triggers opening a long-named view; correct the RUST.md §11.14 row +REPORTED (non-blocking): + - [LOW] report-tables-bound-per-table — crates/core/src/curation/markdown.rs:162 (and changelog.rs:118) + - [LOW] report-guard-stale-doc — crates/core/src/curation/report_guard.rs:14 + - [LOW] record-weight-omits-position — crates/core/src/curation/draft/records.rs:187 + - [LOW] test-lint-relaxation (convention, not a scanner suppression) — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 +PROOF: semgrep 162 rules on 29 files → 0 findings; checklist 12 checks → 5 findings + +## Scope and method + +Range `c6e0d85..HEAD` (HEAD 29eb499), paths `crates/core`, `packages/anatomy/tests`, +`docs/development/RUST.md`: 29 added or modified files, all scanned by semgrep (162 rules +loaded from the three pinned packs, 0 results, 0 errors). + +Checklist, in order: hardcoded secrets (none), SQL by string building (none in the diff; the +seed SQL writer is unchanged R5.3 code), unsanitised render (Markdown reports and SVG drawings, +below), sensitive endpoint authz (none: a local CLI and a library), internals surfaced to a user +(CLI stderr on a developer machine, not applicable), secrets in logs (none), tracked `.env` or +credential (only `.env.example`, outside the diff), guardrails scanner (`--domain api,supabase`: +0 FAIL, 1 WARN in `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the +diff, dropped), new suppressions (two test headers, LOW below), then the brief's threat model: +Markdown parity against Prettier 3.8.3, resource bounds (records, tables, drawings), CLI file +system confinement, SVG well-formedness. + +Probes live in the session scratchpad, never in the repository: +`/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe` +(a crate with a path dependency on `crates/core`, feature `curation`; `src/main.rs` wraps +`report_guard::format_report`, `src/bin/amplify.rs` runs the draft pipeline in memory on the +committed seed plus one extra change), `.../scratchpad/scripts/fmt.mjs` (the repository's +Prettier 3.8.3 with the options of `packages/anatomy/src/format.ts`) and +`.../scratchpad/scripts/{gen,gen2,widths,strong,diff}.py` (case generators and the +differential). Nothing was written to the seed or any tracked file. + +## Finding 1 (HIGH): the review-drawing bound does not cover the markers + +`pipeline::review_drawings` refuses before rendering when +`cleaned_svg.len() * 2 * views > MAX_REVIEW_DRAWINGS_BYTES` (64 MiB). RUST.md §11.14 states the +guarantee as "review drawings past 64 MiB in all, projected before any is rendered … refused +before rendering". The projection counts the cleaned drawing only. The application drawing of a +view (`app_review::render_app_review_drawing` → `anatomy::layer::render_layer`) writes, for each +detail trigger without a name of its own, the opened view's French and English names into +`data-anno-name-fr`, `data-anno-name-en` and the `` text `fr / en`: four copies of the +view name per trigger. Nothing caps a view name (the sheet contract has no label length) or the +number of triggers opening one view (integrity only requires the trigger to sit in the opened +view's parent). + +An authored change of one `set view:head name {fr: S bytes, en: S bytes}` and T `add document +annotations` of unnamed detail triggers in `main` opening `head` passes the applier, the records +bound, the 200,000-value document bound and the integrity gate, then writes about 4·T·S bytes in +`review/app-main.svg`: + +| S (per language) | T | changes.json | result | +|---|---|---|---| +| 1,024 | 10 | 166,322 B | 2.87 MB in all (baseline) | +| 32,768 | 1,000 | 485,140 B | `review/app-main.svg` 131,713,082 B written, no refusal, peak RSS 429 MB | +| 262,144 | 2,000 | 1,202,892 B | `memory allocation of 1073741824 bytes failed`, SIGABRT under `ulimit -v 3000000` (peak RSS 2.65 GB) | + +At the read cap the records bound allows about S = 2 MiB and T = 5,600 (the set records 4·S +units, each add about 1,500), so the tool would try to build about 44 GiB from a 5.4 MB +changeset. `pnpm r5:import-equine --check` and `--out` both build every file before comparing or +writing, so either mode dies on such a changeset. The TypeScript has the same amplification; +the defect is that the port's declared bound, the control the round-8 fix introduced for this +class, does not hold. + +Reproduce: `cd .../scratchpad && (ulimit -v 4000000; ./probe/target/release/amplify 32768 1000)`. + +Fix direction: project each view's drawing bytes before `render_layer`: the cleaned drawing, +plus, per annotation of the view, a fixed overhead, its geometry text and four times the name +bytes it carries (own name, or the opened view's names through `localized_names` for an +unnamed trigger), plus the overlay's markers; refuse the sum past the bound. Freeze it with a +test of unnamed triggers opening a long-named view, and restate the §11.14 row. + +## LOW findings + +- `markdown.rs:162` / `changelog.rs:118`: `MAX_TABLE_COLUMNS_TOTAL` bounds each table, not the + report. The three level tables of the CHANGELOG can each approach 32 Mi columns: a synthetic + raw report with three 6,000-row tables and one 5,300-byte cell each was admitted and aligned + into 97,356,707 bytes (peak RSS 272 MB). Reaching it through the applier takes about 18,000 + records, at the edge of the 16 Mi-unit records bound. Bounded, consistent with the RUST.md + wording ("an aligned report table"); a whole-report bound would make the worst case explicit. +- `report_guard.rs:14-17`: the module doc says a code span admits "anything but a carriage + return or a tab"; `generated_code` (`:186-193`) admits only `[A-Za-z0-9_:/. -]`, as RUST.md + states. The code is the stricter one; the doc of the control is stale. +- `records.rs:187-197`: `op_weight` does not charge the `position` anchor of an `add` or a + `move` (`{"after": …}` / `{"before": …}`), which each record clones. One record per such op + and the anchor must name an existing sibling, so the total stays under the changeset size: + no amplification, the weight model is only incomplete. +- `tests/curation_markdown.rs:6`, `tests/curation_review.rs:6`: + `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` in two new + integration-test files. The same header is on every test file of the crate, and `clippy.toml` + says "Tests and the worker binary allow these lints locally where they own I/O". The library's + I/O and clock ban stays enforced in `src/`. This is not a scanner-finding suppression, so it + does not block. + +## What held + +- Markdown guard against Prettier 3.8.3: 189,394 generated reports in the templates of + `changelog.rs` and `review_report.rs` (list items, bibliography, vet-flag lines, eight-column + rows with `cell()` escaping). The cases cover random token mixes, admitted-only mixes, every + code point from U+00A0 to U+33FF plus one in three up to U+2FFFF, in a table cell and in a + list line, and `**word**` over the same letters. Result: 99,447 admitted, every admitted one + byte for byte equal to Prettier, 0 silent differences. Structure forging (headings, list + items, links, HTML, autolinks, references, code spans from authored text) is refused at the + guard or at `assert_single_line` / `assert_authored`. +- Records: every producer goes through `charge` (`ops.rs`, `rename.rs`, `apply.rs` + marking). Raw report rows are bounded with the records. Aligned tables are refused before + they are built. The guard and the aligner are linear per line. +- SVG: element and attribute names are the generator's. Values and texts are escaped (`&`, + `<`, `>`, `"`, tab, LF, CR). `first_unwritable` refuses non-XML-1.0 code points and CR. No + author text can open a script or an href. +- `--check`: byte identity, and the tree fallback only for `review/app-*` with the declared rule, + after the committed file rebuilds from its tree. The committed drawing goes through the core + reader first (depth cap), and `roxmltree` keeps its DTD refusal. Reads are confined to the + canonical seed and capped at 16 MiB. A symlinked folder is never walked. +- `--out`: no `..`, the parent is canonicalised, the final symlink is refused, the destination + must be absent or empty, and it is refused inside the seed by path and by (dev, inode) over + the whole seed tree. Writes use `create_dir` / `create_new`, never truncate, never delete. + The check-to-write swap is the single-user residual already declared (§11.13). +- Oracle generators (`packages/anatomy/tests/r5.*.test.ts`) write only under + `MAKE_R5_ORACLES=1`, into `crates/core/tests/oracles/r5`. The Rust tests write only under + the target folder. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-11.md b/.claude/audits/2026-10-23-rust-r5-review-security-11.md new file mode 100644 index 00000000..8ad3048e --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-11.md @@ -0,0 +1,153 @@ +# Security gate R5.4 (round 11): review files in Rust + +Mode: audit (delta). Repository `/home/bchanot/Documents/faunosteo`, branch +`feature/rust-r5-pipeline-core`, HEAD `411e105`. Scope: +`git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md` +(29 files, 21 commits). Blind run: no prior verdict or finding list consulted. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 29 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] anti-gaming/new-lint-allow — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 + - [LOW] report-guard/bare-url-autolink — crates/core/src/curation/report_guard.rs:119 +PROOF: semgrep 128 rules on 29 files → 0 findings; checklist 14 checks → 2 findings +``` + +## Semgrep + +`semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten +--metrics=off --quiet --json <29 files>`: 0 results, 0 errors, 29 targets scanned, 128 rules +run (most of the 725 loaded rules do not apply to Rust). Ruleset content is fetched at run +time, so the rule count can change on unchanged code. + +## Checklist (14 checks) + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth-bearing URL (added lines and the two oracle JSON files) | 0 | +| 2 | SQL built by concatenation | 0 (no SQL in the diff; `seed.rs` untouched) | +| 3 | Unsanitized render, `eval`, process spawn | 0 | +| 4 | Sensitive endpoint without authz | n/a (no endpoint, offline CLI and library) | +| 5 | Stack trace or internal path to an end user | 0 (the CLI prints paths to the local operator only) | +| 6 | Secret or PII in a log | 0 | +| 7 | Tracked `.env` or credential file | 0 (only `.env.example`, outside the diff) | +| 8 | Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`), outside the diff, filtered | +| 9 | New suppressions (anti-gaming) | 2 new lint allows in test files: LOW, see L1 | +| 10 | Markdown structure forging (sections, list items, code spans, links, HTML) | 0 forging path; one LOW note, see L2 | +| 11 | Silent difference from Prettier 3.8.3 on admitted text (differential probe) | 0 | +| 12 | Non-well-formed review SVG | 0 | +| 13 | Resource bounds (records, tables, drawings, quadratic scans) | 0 new | +| 14 | CLI file-system confinement (`--check`, `--out`) | 0 | + +### 10. Report structure forging + +Every authored channel that reaches CHANGELOG.md or REVIEW-REPORT.md was traced: + +- Line breaks: list-item fields (title, rationale, question, citation, URL, DOI, vet-flag + values) refuse any control character (`review_report.rs:364`). Table cells turn `\n` into a + space (`markdown.rs:47`), and the guard refuses `\r` and `\t` (`report_guard.rs:198`). + No authored text starts a line: every template line begins with generated text (`- `, + `N. `, `| `). Line-start constructs (headings, setext underlines, link reference + definitions, footnote definitions, blockquotes, tables) are therefore out of reach. +- Code spans: authored texts refuse backticks (`assert_authored`). Ids are validated at the op + (`ops.rs` `assert_stable_id` on add, nested children and rename). Change ids match + `^CHG-\d{3,}$`. Change reference ids must be declared references (`assert_declared`), whose ids + are stable ids. Field segments are limited to `[A-Za-z0-9_-]` (`fields.rs`) and ids are not + settable. Targets resolve to existing items. The code-span alphabet check + (`[A-Za-z0-9_:/. -]`) and the per-line backtick parity hold as a second layer. +- Inline constructs: links, images, references, HTML tags, autolinks `<…>`, character + references, liquid and padded wiki brackets are refused. Cross-field pairs were checked: + `**` opened in the title and closed in the rationale is refused by `outside_strong`, and `](` + across fields is refused by `rewritten_construct`. +- Invisible or bidi characters (U+202E, U+200B, NBSP) are neither alphanumeric nor in + `PUNCTUATION`: refused. + +### 11. Differential probe against Prettier 3.8.3 + +Probe: `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/diff.mjs` +and `.../diff2.mjs`. A Rust binary calls `report_guard::format_report`, and the repository's +`prettier@3.8.3` runs on the same raw report with the `format.ts` options. Random authored +texts (letters, accents, CJK, every admitted punctuation sign, `_`, `\`, `*`, `**word**`, URL +starts, `&name=`, `&`, `&#`, brackets, list and heading markers) are placed in four +templates: a list-item title and rationale, a table row (cell escape as `cell()` does), a +bibliography citation and URL, and a trailing question. Eight seeds produced 146,000 cases. +44,330 were admitted by the guard and 0 differed from Prettier byte for byte. + +### 12. Review SVG well-formedness + +Drawings are built as trees and printed by `anatomy::svg::serialize`. Attributes escape +`& < > "` and `\t \n \r`, and text escapes `& < >`. `drawing::first_unwritable` refuses any +code point outside the XML 1.0 `Char` production, and any carriage return, in every attribute +and text node before writing. Element and attribute names are fixed. Colours come from the +strict document (`#rrggbb`), and no `href`, `on*` or `style` value is author-controlled. + +### 13. Resource bounds + +- Records: `records::charge` runs before the change and op are cloned. It is called from every + `record` site (set, subtree set, add, remove, move, cite, rename links and citations, B/C + marking). Each record's weight includes the change texts, the op, and the before and after + values. +- Tables: the three CHANGELOG level tables are summed in `assert_table_bound` from the cell + bytes before `table()` joins them. Bytes are never fewer than the display width: the first + width-2 code point is U+1100, which takes 3 bytes. Every other table is checked in `align` + before padding. +- Review drawings: per-annotation projection. A probe binary + (`.../scratchpad/probe/src/bin/drawings.rs`) compared projected and written bytes on hostile + documents built from the equine draft: 40 points with 6,000-character `&` names (ratio + 0.405), `"<&` names (0.262), 6,000-byte `&"<` paths (0.170), unnamed triggers of a long view + name (0.120), equine (0.406). The projection stays above what is written. The projection loop + itself (views × annotations) took 1.2 s on a 7,000-view, 6,000-annotation document, which + the bound then refuses. +- Guard and aligner scans are linear per line. `underscore_pairs_later` only rescans after + authored plain parts, and generated separators hold no `_`. The `&` and `<` splits are + segment-local. +- Already declared and not re-reported: the 65× parse of `changes.json`, the per-op bound walk + (§11.13), and the linear trigger lookup in `--check`. + +### 14. CLI confinement (`crates/core/src/bin/import_equine.rs`) + +Every read is canonicalized and must lie inside the canonical seed folder. Reads accept only +regular files and are capped at 16 MiB. Output file names come from stable view ids, and +`write_exclusive` accepts only `Normal` components and `create_new`. Exercised in the +scratchpad (fresh folders only, nothing in the repository): + +- `--out` into an absent folder wrote 18 files. `diff -r` against the seed matched except + `review/app-main.svg`, the declared R3 difference. +- A second run into the same folder was refused: `not empty, nothing written`. +- A symbolic link was refused with and without a trailing `/`. +- A path holding `..` was refused, and so was an empty path. + +`--check` against the repository reported `legacy-import: 6 files, 0 differences` and +`draft: 12 files, 0 differences` (one `declared:` line), with `git status` clean afterwards. +The `--out` refusal of a destination inside the seed was verified by reading the code and the +unit test. It was not run against the real seed. + +Tests run: `cargo test -p faunosteo-core --features curation --release` on `curation_review` +(11), `curation_markdown` (2), `curation_draft` (18), `curation_format` (7) and the +`import-equine` binary tests (3): all green. + +## Reported findings (non-blocking) + +### L1. [LOW] New lint allows in two new test files + +`crates/core/tests/curation_markdown.rs:6` and `crates/core/tests/curation_review.rs:6` +both add `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. +The lint allowed here is the core's no-I/O and no-clock rule, which `clippy.toml` documents +as allowed locally in tests. The same line heads the ten existing integration test files. +It is a test-harness convention and does not suppress a security scanner (no `nosemgrep`, +`nosec` or eslint-security in the diff), so it does not block. Context only. + +### L2. [LOW] Bare URLs in any authored field render as autolinks + +`report_guard.rs` admits bare URLs (`url_tokens`, line 119; the `&name=` query rule) in every +authored text, not only in the reference `url` and `doi` fields. In a GFM viewer (Gitea), a +URL typed in a title, rationale or question becomes a clickable link. This does not forge or +disguise anything: the visible text is the target, and the output is the TypeScript's byte +for byte. The link cannot swallow generated text either, because every authored field is +followed by a space, ` |`, a line end, or a trailing `,` or `)` that GFM excludes. Owner +choice: keep it, or confine URLs to the bibliography fields if links in rationales are +unwanted. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-12.md b/.claude/audits/2026-10-23-rust-r5-review-security-12.md new file mode 100644 index 00000000..122b5c39 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-12.md @@ -0,0 +1,129 @@ +# Security gate R5.4 (round 12): review files in Rust + +Date: 2026-10-23. Mode: audit (fresh, blind). Branch `feature/rust-r5-pipeline-core`, HEAD +`c4e717d`. Scope: `git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md` +(29 files, none deleted). + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 29 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] quadratic-scan (latent, unreachable today) — crates/core/src/curation/report_guard.rs:216 + - [LOW] quadratic-scan (bounded, ~2 s at the document bound) — crates/core/src/curation/draft/pipeline.rs:256 + - [LOW] new lint allowance (context, documented convention) — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 + - [LOW] declaration precision (R5.3 code, outside the diff) — crates/core/src/curation/draft/schema.rs:430 +PROOF: semgrep 128 rules on 29 files → 0 findings; checklist 9 checks → 0 findings (guardrails 0 FAIL, 1 WARN outside the diff); differential probes 38,378 admitted template reports + 898 admitted real-pipeline reports → 0 silent differences; display width 1,112,032 code points → 0 differences +``` + +## Tool run + +- `semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten --metrics=off` + on the 29 scope files: 128 rules applicable, 0 results, 0 errors. +- Guardrails scanner (`--domain api,supabase`, project root): 0 FAIL, 1 WARN + (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, not in + the diff, dropped), 1 MANUAL (not reported). + +## Checklist (9 checks) + +| Check | Result | +|---|---| +| hardcoded secret, token, key, auth URL in added lines | none | +| SQL by concatenation | none in the diff (`seed.rs` untouched) | +| unsanitized render, `eval`, shell | none; SVG output escaped (below) | +| sensitive endpoint without authz | N/A (offline CLI, no endpoint) | +| stack trace or DB error to an end user | N/A (operator CLI; refusals print `{:?}`, control characters escaped) | +| secret or PII in a log | none | +| tracked `.env` or credential file | none (`git ls-files`) | +| guardrails scanner | run, nothing in the diff | +| new suppression (anti-gaming) | no `nosemgrep`, `nosec`, `eslint-disable`; two lint allowances in test files (LOW 3) | + +## What was verified, by probe or by reading + +Markdown guard (`report_guard.rs`) against Prettier 3.8.3 with the repository options, from a +scratch harness (Prettier imported from the repository's `node_modules`, the Rust guard through a +scratch crate depending on `faunosteo-core` with `curation`): + +- template reports reproducing the ten list-item and cell positions of the two reports (title, + rationale, question, citation, URL, DOI, vet-flag before/after, label cell): 1,197 hand probes + (reference shapes `[a] [b]`, `[a] (b)`, `\|` outside tables, `+`/`>`/`1.`/`#` mid-line, URL + trailing punctuation and `&name=`, `_` near URLs, `**word**`), 27,000 random single-field, 10,000 + random cross-field and 36,000 URL-centric cases: 38,378 admitted, 0 differ from Prettier; +- the real generators: 7,200 random changesets run through the TypeScript (`applyChangeset`, + `renderChangelog`, `renderReviewReport`, `formatMarkdown`) and through the Rust + (`apply_changeset`, `render_changelog`, `render_review_report`, `format_report`): 898 admitted, + 6,302 refused, 0 raw-text differences, 0 silent formatted differences; +- `text::display_width` against Prettier's `util.getStringWidth` for `"a" + c`, every scalar value + from U+0020 to U+10FFFF: 0 differences wherever the port measures (it refuses the rest). + +Report structure: authored texts carry no backtick (`assert_authored` on every authored field +of both reports), list-item fields refuse control characters, cells turn `\n` into a space and +escape `|`; ids written by `add`/`rename` are stable ids or region codes, field segments +`[A-Za-z0-9_-]`, targets resolve only to existing stable ids, so no author byte starts a line or +writes a code span. Email autolinks need `@`, which the allowlist refuses. + +SVG drawings: the serializer escapes `& < >` in text and `& < > " \t \n \r` in attributes +(`]]>` cannot appear); `drawing::first_unwritable` refuses non-XML characters and CR; element and +attribute names are constants; colours are `#rrggbb` by schema; view ids (file names) are stable +ids. Drawings projection: names copied at most four times per annotation, worst escape `&` → 5 +bytes per JSON byte, so `24 × (json + longest name)` holds. + +Records bound: every record site goes through `Recorder::record` or `mark_to_confirm`, both +charged before the clone. Aligned tables: CHANGELOG projected from cell bytes (bytes ≥ display +width, numbers ≤ 25), every table rechecked in `align` before padding. + +CLI `import_equine.rs`: reads only canonical regular files inside the canonical seed, 16 MiB +cap; `--check` refuses a generated folder that is not the seed's own, lists without following +links, compares bytes (app drawings only through the strict rebuild rule); `--out` refuses `..`, +symlinks, non-empty folders and any path inside the seed by prefix or by (dev, inode), writes +with `create_dir`/`create_new`, deletes nothing; file names from views are stable ids and +`write_exclusive` accepts only normal components. The check/use race is declared (§11.13). + +Timing of the guard on adversarial lines (linear): 400,000 `& ` in 7.9 ms, 400 KB of `[[x`, +`x ]]`, `**ab**`, `<`, URL `&a=1` runs under 10 ms, a 1.4 MB 100,000-column table in 95 ms. + +## Findings (non-blocking) + +### LOW 1: `underscore_pairs_later` is quadratic, latent + +`crates/core/src/curation/report_guard.rs:216`. For every plain part holding `_`, the function +rescans all later code parts and re-collects each into a `Vec<char>`. A synthetic line of 100,000 +`` `ab` x_y `` (900 KB) took 53.7 s. Not reachable today: authored text holds no backtick, so the +generator alone interleaves code spans and plain parts, and on every line of both reports at most +two plain parts can carry an authored `_` (title with rationale, question), which keeps the scan +linear. A future line that puts authored text between generated spans would turn it quadratic. +Hint: scan the parts right to left once, keeping a "a later code part closes" flag. + +### LOW 2: drawings projection walks views × annotations before the bound + +`crates/core/src/curation/draft/pipeline.rs:256`. `review_drawings_bytes` runs `layer_bytes` over +every annotation for every view, and the view count is not yet bounded there (only by the +200,000-value document bound). Measured on a synthetic `DraftResult`: 10,000 × 10,000 in 1.8 s, +20,000 × 20,000 in 7.6 s; the document bound allows about 11,000 of each, so about 2 s. Hint: +group annotations by `view_id` once, or stop as soon as the running total passes the bound. + +### LOW 3: lint allowances in the two new test files (context) + +`crates/core/tests/curation_markdown.rs:6`, `crates/core/tests/curation_review.rs:6`: +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. The lint is the +core's no-clock, no-file-system rule; `clippy.toml` documents that tests allow it locally, and +every existing integration test file carries the same line. Not a security-rule suppression. + +### LOW 4: §11.15 names `changes.json` alone for the parse amplification + +`crates/core/src/curation/draft/schema.rs:430`. `parse_references` goes through the same +`json_parse` as `parse_changeset`, so `references.json` under its 16 MiB cap should hold the same +order of memory (factor not measured here). R5.3 code, outside this diff; the residual line could +name both files. + +## Notes + +- The working tree changed during the run (comment and doc lines only, by another agent): + `.claude/audits/2026-10-23-rust-r5-review-verify.md`, `docs/development/RUST.md`, + `packages/anatomy/tests/r5.review-synthetic-oracles.test.ts`. HEAD stayed `c4e717d`; this gate + judges the committed range. +- Declared residuals (§11.15, including the ~65× `changes.json` parse) not re-reported. +- Probes and harnesses live in the session scratchpad only; no tracked file touched, the + `import-equine` binary never run; the scratch crates read only the committed sweep oracle. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-2.md b/.claude/audits/2026-10-23-rust-r5-review-security-2.md new file mode 100644 index 00000000..82f346ef --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-2.md @@ -0,0 +1,195 @@ +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 32 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] markdown-guard-bypass-via-ids — crates/core/src/curation/draft/review_report.rs:367 (also markdown.rs:149, ops.rs:286, ops.rs:197, changelog.rs:81) + - [MEDIUM] uncapped-recursive-parse — crates/core/src/curation/draft/svg_compare.rs:108 (called at :129) + - [MEDIUM] silent-prettier-difference-and-wrong-declaration — crates/core/src/curation/markdown.rs:115 (docs/development/RUST.md §11.14, §11.15) + - [LOW] overlay-non-finite-number — crates/core/src/curation/draft/overlay.rs:163 + - [LOW] new-lint-allow-in-tests (context) — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 +PROOF: semgrep 128 rules on 32 files → 0 findings; checklist 9 checks (8 defaults + anti-gaming) → 1 finding (LOW); targeted probes (68 authored changesets through the Rust renderers, 136 report comparisons against Prettier 3.8.3; compare_drawing at depths 60 to 100000; one read-only --check) → 4 findings +``` + +Gate on `git diff c6e0d85..HEAD` (HEAD 68dec25, branch feature/rust-r5-pipeline-core), focus on fix commit 94f8b35. +No HIGH or CRITICAL. Three MEDIUMs: one makes a declared guard leak, one regresses a depth cap +the project documents as an invariant, one shows the RUST.md parity declarations are wrong. None is +reachable from outside the repository: every input is authored in the owner's own seed folder. + +## Method + +- semgrep 1.168.0 (`EIO_BACKEND=posix`, `--metrics=off`, the three pinned packs) on the 32 diff + files that still exist: 128 rules, 0 findings, 0 errors. +- Checklist (CLAUDE.md defaults) over the diff: secrets, SQL concatenation, unsanitized render, + authz, error exposure, secrets in logs, tracked `.env`, guardrails scanner; anti-gaming suppressions. +- Guardrails `scan.py --domain api,supabase`: 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`). That file is not in the diff, so the WARN is filtered out. +- I read whole: `markdown.rs`, `review_report.rs`, `svg_compare.rs`, `drawing.rs`, `overlay.rs`, + `app_review.rs`, `changelog.rs`, `labels.rs`, `stats.rs`, `pipeline.rs`, `bin/import_equine.rs`. + I also read the parts of `ops.rs`, `apply.rs`, `schema.rs`, `targets.rs`, `fields.rs`, + `anatomy/svg/{serialize,tree}.rs` and roxmltree 0.21.1 `tokenizer.rs` that these files rely on. +- Probes, all in the scratchpad (`/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/`): + a throwaway crate linking `faunosteo-core` (feature `curation`). It feeds 68 authored changesets + on the mini sheet of `oracles/r5/markdown-sweep.json` through `apply_changeset`, + `render_changelog`, `render_review_report` and `format_markdown`. A Node script then runs the + repository's Prettier 3.8.3 (the options of `packages/anatomy/src/format.ts`) on the same raw + texts and compares (136 comparisons: 118 identical, 4 refused, 14 silent differences). A second + entry point calls `compare_drawing` on nested input. Finally `import-equine --check` ran once + (target dir in the scratchpad, `--locked`): `legacy-import: 6 files, 0 differences`, + `draft: declared: review/app-main.svg`, `draft: 12 files, 0 differences`. The working tree was + clean before and after. `--out` was never run. + +## Findings + +### 1. [MEDIUM] Markdown guard bypassed through ids: forged headings, sections and tables, raw CR in table rows + +Where: `review_report.rs:367` (`assert_list_items_single_line`), `markdown.rs:149` (code parts +checked only for emptiness and outer spaces), `ops.rs:286` (`add` takes any string id), +`ops.rs:197` (`rename` takes any string id), `fields.rs:115` (only the first field segment is +checked), `changelog.rs:81` (`cell()` turns `\n` into a space but leaves `\r`). + +The single-line check covers titles, rationales, questions, citations, URLs, DOIs and vet-flag +values. It misses the other authored texts the review report writes into list items. These are: + +- the record subjects (op target plus field), at lines 97, 167 and 181; +- the change `reference_ids`, at lines 98 and 339. + +Ids are only checked as stable ids at the end of the changeset (`apply.rs:210`, +`curated_issues`). So an item added with an arbitrary id and then removed, or renamed away, leaves +its raw id in the records while the final document stays valid. The same holds for a field path +`name.<anything>` set on such an item. A reference added and removed the same way can be cited in +`reference_ids`, because `assert_declared` runs before the ops. + +`guard_line` checks line by line. A newline inside a code span, with one backtick on each side, +therefore yields lines that each pass. Measured, all passing the whole guard (`format_markdown` +Ok on both reports): + +- Add then remove annotation `x`␊`## 11. Section forgée`␊`y` (written with a backtick after `x` + and before `y`). REVIEW-REPORT §2 and §3 then read: + ``` + - `CHG-001` Titre (niveau A, Correction, confirmation requise : non). Raison. Objets : `annotation:x` + ## 11. Section forgée + `y`. Références : aucune. + ``` + The report gets an eleventh section. A `kind: translation` change forges an H1 in §7. A + reference id forges a heading in the `Références :` part. Prettier puts blank lines around the + heading, so the Rust file also differs silently from the TypeScript's. +- An id carrying the lines `| Forgé | Tableau |`, `| --- | --- |`, `| a | b |` produces a table + inside REVIEW-REPORT, which `format_markdown` aligns. Prettier keeps it indented inside the list + item, so this is a silent difference again. +- Id `x\ry`. CR is refused in plain text but not inside a code span. The CHANGELOG row + `| `CHG-001` Titre | `annotation:x\ry` | ...` keeps a raw CR. GFM (goldmark on Gitea) reads it + as a line ending, which breaks the table. Prettier normalizes it to LF, splitting the row in its + own output. The same raw CR shows up in the REVIEW-REPORT list item. + +Impact: the reports, the CHANGELOG and the review document the osteopath signs off on, can carry +structure that never came from the generator. The owner's contract ("refused, never a report that +differs silently") does not hold for this channel. It takes a deliberately crafted changeset in +the repository (add then remove, or a rename chain). No accidental path was found. + +Fix direction: +- At the root: check ids as stable ids when the op runs. That covers the added item's `id` (and + the key field), `rename.id`, and every target id segment and field segment. The final document + requires stable ids anyway, so refusing earlier loses nothing that could be published. +- Defence in depth: `guard_text` refuses any control character inside a code part, and + `assert_list_items_single_line` also checks record subjects and change `reference_ids`. +- Add these probes to the sweep, then declare the refusal in RUST.md. + +### 2. [MEDIUM] Uncapped recursive XML parse of the committed drawing, ahead of the prescan + +Where: `svg_compare.rs:108`. `outside_root` calls `roxmltree::Document::parse` with default +options. Its caller is line 129, before `parse_svg`, which is the function that runs +`prescan(SVG_CAPS)`. This ordering is new in 94f8b35. + +roxmltree's `parse_element` → `parse_content` → `parse_element` recurses once per nesting level. +The workspace manifest itself says the core prescan must cap depth before any parse. Measured with +`compare_drawing(produced, committed, Some(rule))`: depths 60, 70 and 1000 are refused cleanly. +At depth 100000 (a 300 KB committed text, far below the 16 MiB read cap) the process dies with +`thread 'main' has overflowed its stack`, exit 134. In `--check` this happens whenever a +`review/app-*.svg` differs from the produced bytes. + +Impact: an abort, not a pass. It fails closed, writes nothing and exits non-zero. Still, it breaks +the "depth and resource caps" requirement and the project's own prescan-first invariant. +`drawing.rs` orders the same two calls correctly (`read_svg` first). + +Fix direction: call `parse_svg(committed)` before `outside_root`, or run `prescan(text, &SVG_CAPS)` +at the top of `outside_root`. Add a nested-input case to `curation_review.rs`. + +### 3. [MEDIUM] Authored plain text that passes the guard but which Prettier rewrites; RUST.md §11.14 and §11.15 overstate the guarantee + +Where: `markdown.rs:115` (the `_` rule tests `is_alphanumeric` on both neighbours), and the guard +having no rule for link syntax. + +Measured, each passing the guard, then differing from Prettier with no refusal: + +- `中_中`, `ア_ア`, `한_한` in a title, rationale or changed label. Prettier's text splitter makes + each CJK, kana or Hangul character its own word, so the `_` sits on a word boundary. In tables + it becomes `中\_中`. In a review list item that holds two such texts, Prettier reads + `_中 … 中_` as emphasis and prints `中*中 … 中*中`. Rust writes the raw text. +- `[a]( https://x.org )` in a changed label: Prettier prints `[a](https://x.org)`, Rust keeps the + spaces. + +These do not break the Rust output's structure. They break parity: TypeScript-era files and Rust +files differ without a refusal. Two declarations are therefore wrong as written: +- §11.14 says the port "refuses ... every text Prettier would rewrite, never writing a report that + differs silently". That holds for the 220 sweep probes only. +- §11.15 says "links in authored text are kept as the TypeScript kept them". The TypeScript output + was Prettier's, which normalizes this link form. + +Fix direction: +- Refuse `_` when either neighbour is a character Prettier's splitter isolates (CJK, kana, + Hangul), or more simply whenever a neighbour is not an ASCII or Latin letter or digit. +- Refuse a link destination with surrounding whitespace, or refuse `](` outright, since the equine + reports use none. +- Add these probes to the sweep and correct both declarations. + +### 4. [LOW] Overlay prints an overflowed coordinate as `null` + +Where: `overlay.rs:163`. `text_of` special-cases NaN only. `js_number` prints a non-finite value +as `null`, where `String(Infinity)` printed `Infinity`. It is reachable with finite but extreme +document values (a view box `min_y` near `f64::MAX`, or polygon points around `1e308`, whose sum +overflows). The XML stays well-formed and nothing is injected. It is a silent parity gap only. +Fix: print `Infinity` / `-Infinity` in `text_of`. + +### 5. [LOW] New lint allows in the two new test files (context, anti-gaming) + +Where: `curation_markdown.rs:6` and `curation_review.rs:6`, both +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. This is the +pattern `clippy.toml` documents for tests that do their own I/O; 34 existing test files carry it. +It is not a security suppression. There is no `nosemgrep`, `nosec`, `eslint-disable`, +`ts-ignore` or new allow in library code. + +## Checked and clean + +- Strict SVG comparison logic (apart from finding 2). The fallback accepts only when + `produced == prolog + serialize(rule(parse(committed))) + epilog` and the committed file + rebuilds byte for byte from its own tree. So the produced file can differ from the committed one + only where the rule changed the tree. The rule's values come from the produced document's view + names, and `document.json` is compared byte for byte. A changed French name makes the rule + change nothing, which is refused. A DTD is refused by roxmltree's default options. Comments, + PIs, entity forms and other encodings fail the rebuild check. I found no way to get an + unauthorized difference accepted. +- Markup injection in the drawings: the serializer escapes `& < > "`, plus `\t \n \r` in + attributes and `& < > \r` in text. Element and attribute names are fixed by code. + `drawing_text` refuses non-XML characters and CR before writing. +- Table cells: `|` is always escaped. An authored `\|`, a trailing backslash and a backslash before + a space are refused. Pipes and a trailing backslash inside code spans format exactly like + Prettier. The per-cell backtick check and the cell-count check in `align` hold. +- Control characters (NUL, FF, VT, NEL, U+2028), NBSP, BOM, U+3000, zero-width space, `#`, `-`, + `+`, `1.`, `>`, `---`, `~x~`, `~~x~~`, backslash escapes before punctuation, entities, autolinks, + images, footnote syntax and raw HTML at the start of a cell: all identical to Prettier. +- Panics on authored input: none found in the new library code. There is no `unwrap`, `expect` or + unchecked index, and the slices fall on ASCII or roxmltree boundaries. Tree recursion + (`first_difference`, `TriggerNames::apply`, `serialize`) runs on trees from `parse_svg`, which + is depth-capped at 64. `first_unwritable` uses an explicit stack. +- Resources: the guard and the alignment are linear per line. Renderers are indexed (subjects + grouped, citation counts in one walk, hashed previous markers). Record memory is a declared + residual (§11.13). +- `--check`: read-only, as declared. Reads go through the canonical-path, regular-file and + 16 MiB checks. A file that is missing, not produced or different fails. `declared:` is printed + only after the strict match. `--out` claim logic: the only change is that an existing + destination is now checked against the seed by identity. Sound. +- Secrets, SQL built from strings, authz, error exposure, logging of secrets or PII, tracked + `.env`: nothing in the diff (only `.env.example` is tracked). diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-3.md b/.claude/audits/2026-10-23-rust-r5-review-security-3.md new file mode 100644 index 00000000..2159aded --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-3.md @@ -0,0 +1,182 @@ +# Security gate (fresh, round 3): R5.4 review files, `c6e0d85..077d91b` + +Branch `feature/rust-r5-pipeline-core`, HEAD `077d91b`, attention on `df82424`. Blind run: no +earlier verdict or finding list was read. + +``` +SECURITY — VERDICT: BLOCK(2) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 34 files +BLOCKING: + 1. [HIGH] markdown-guard/strong-span — crates/core/src/curation/markdown.rs:79-106 (outside_strong), :157-163 — the `**strong**` model accepts pairings Prettier reads or escapes differently: a report differs from the TypeScript+Prettier output with no refusal — hint: treat `**` as a text boundary (refuse `_` or `\` next to a delimiter, a `*` run longer than 2, strong content starting or ending with a non-ASCII-space whitespace, Cf or Cc character); add these classes and a seeded random set to the TS sweep + 2. [HIGH] markdown-guard/underscore-before-autolink-literal — crates/core/src/curation/markdown.rs:157-163, :109-145 — `_` between a letter and `http://`, `https://` or `www.` passes the neighbour test, Prettier escapes it (`Voir_https://…` → `Voir\_https://…`): silent difference — hint: refuse `_` directly before or after a bare URL literal (`http://`, `https://`, `www.`), add the probe to the sweep +REPORTED (non-blocking): + - [LOW] field-segment/nul-mid-segment — crates/core/src/curation/draft/fields.rs:104 + - [LOW] markdown-guard/trailing-space-latent — crates/core/src/curation/markdown.rs:169 + - [LOW] anti-gaming/test-allow (context) — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 +PROOF: semgrep 128 rules on 34 files → 0 findings; checklist 9 checks → 5 findings +``` + +## Method + +- semgrep 1.168.0, `EIO_BACKEND=posix`, the three pinned packs, on the 34 files of + `git diff --name-only c6e0d85..HEAD` that exist: 128 rules ran (41 multilang on 34 files, 84 + TypeScript on 2, 3 JSON on 2), 0 findings, 0 errors. The packs carry no Rust rule: the Rust + product files were read whole and probed by hand. +- Differential probing, all under the fresh + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe.x3u0rG/`: + a throwaway binary linking `faunosteo-core` (feature `curation`) calls `format_markdown` and + the real renderers; a Node script runs the repository's Prettier 3.8.3 with the options of + `packages/anatomy/src/format.ts`; a `tsx` script runs the TypeScript pipeline + (`applyChangeset`, `renderChangelog`, `renderReviewReport`, `formatMarkdown`) on the same + changesets. About 52,000 report texts compared (targeted sweeps plus two seeded random + fuzzes), then 9 changesets end to end through both pipelines. +- `import-equine --check` rebuilt in the scratchpad target dir and run (read-only). `--out` was + not run; its write path was read. `git status` clean after every run. +- Test suites `curation_draft` (16), `curation_markdown` (1), `curation_review` (9): pass. + +## Blocking findings + +### 1. [HIGH] The strong-span model of the Markdown guard lets silent differences through + +`outside_strong` (markdown.rs:79-106) removes every `**…**` pair it judges well formed and +`plain_rewrite` (:147-173) then checks the text left. Four input classes pass the guard while +Prettier 3.8.3 (remark-parse 7 underneath) rewrites them: + +| Class | Example authored text | Rust writes | TypeScript + Prettier writes | +|---|---|---|---| +| content made only of whitespace, format or control characters other than U+0020 | `** **` (also U+1680, U+2000-200A, U+2028/2029, U+202F, U+205F, U+3000, U+FEFF, U+200B-200D, U+2060, U+00AD, U+180E, C0/C1 controls) | `** **` | `\*\* \*\*` | +| a backslash right before either delimiter | `\**a**`, `x\**a**`, `**1&é.\**-` | as written | `\*\*a\*\*` | +| touching pairs | `**a****b**` | as written | `**a\*\***b\*\*` | +| underscore next to a delimiter, judged on the text with the delimiters removed (`x_a`) | `x_**a**`, `**a**_x` | as written | `x\_**a**`, `**a**\_x` | + +Every channel that writes plain text is affected: title, rationale, question, citation, URL, +DOI, vet-flag values in the review list items, and label, description and value texts in the +CHANGELOG cells, where the table widths change as well. + +End-to-end proof on the mini sheet of `oracles/r5/markdown-sweep.json` +(`probe.x3u0rG/e2e_in.json`, results `e2e_out.json` for Rust and `ts_out.json` for the +TypeScript, comparator `js/cmp_e2e.py`): the raw texts are identical in all 8 changesets. In 7 +of them Rust accepts a final CHANGELOG different from the TypeScript's, and in 6 a different +REVIEW-REPORT. Excerpt (changeset 2, rationale `Raison x_**important**.`): + +``` +rust: …confirmation requise : oui). Raison x_**important**. Objets… +ts: …confirmation requise : oui). Raison x\_**important**. Objets… +``` + +Impact: no structure is forged. The Rust output is the authored raw text, which equals the +TypeScript raw text: no line, item or cell is created. Rendered meaning is mostly unchanged. +The broken property is the owner's requirement for this tool: "byte-identical or loudly +refused". The guarantee written in RUST.md §11.14 (line 3158 "never writing a report that +differs silently", line 3174 "0 silent difference") holds only for the 247 sweep probes, so +that declaration is wrong. Today `--check` would catch such a change against the committed +TypeScript output. After the switch, the report is written and committed silently, and a later +`pnpm format` (`prettier --write .`, the draft folder is not in `.prettierignore`) rewrites it, +so `--check` then fails far from the cause. + +Why HIGH: this guard is the only thing that enforces an explicit owner integrity requirement, +the documented guarantee is false, and inputs reach it through ordinary authoring. Beyond that +requirement there is no exploit. + +Fix direction: treat each `**` as the edge of a text node. Refuse `_` or `\` next to a +delimiter, a run of three or more `*`, and strong content whose first or last character is a +Unicode whitespace, a format (Cf) or a control (Cc) character. Then grow the TypeScript sweep +with these four classes plus a seeded random combination set. The random fuzz here found them +within a minute: the sweep's hand-picked probe list is the weak point. + +### 2. [HIGH] An underscore glued to a bare URL passes the guard and is escaped by Prettier + +The underscore rule (markdown.rs:157-163) accepts `_` between two ASCII letters or digits. +Before `http://`, `https://` or `www.`, the next letter belongs to a link that remark-parse 7 +opens at the URL. The underscore then ends a text node, and Prettier escapes it. +`rewritten_construct` (:109-145) has no rule for bare URLs. + +| Authored text | Rust writes | TypeScript + Prettier writes | +|---|---|---| +| `Voir_https://example.org/x` (title) | `Voir_https://example.org/x` | `Voir\_https://example.org/x` | +| `Voir_www.example.org` (citation) | `Voir_www.example.org` | `Voir\_www.example.org` | +| `&b_http://x.y1`, `b_www.a.b>#` (random fuzz) | as written | `\_` inserted | + +End to end: changesets 1 and 6 of `e2e_in.json`. The raw texts are identical, both reports +differ, Rust raises no refusal. `mailto:` did not trigger the difference. Impact and severity +are those of finding 1. + +Fix direction: refuse `_` directly before or after `http://`, `https://` or `www.`, and add +the probe to the sweep. + +## Reported, non-blocking + +- [LOW] field-segment/nul-mid-segment, `crates/core/src/curation/draft/fields.rs:104`. + `c.is_control() && c != '\0'` exempts NUL everywhere, while line 110 refuses it only as the + first character of a segment. The ops `set name.f\0r` then `set name {fr,en}` give a valid + final document and leave a NUL in the record subject and in both reports' code spans. This + was verified end to end: the TypeScript writes the same bytes and Prettier keeps them, so + there is no divergence. It contradicts the comment at line 101 and the RUST.md §11.14 row at + line 3182 ("a field segment holding a control character … refused"). Fix: refuse `\0` + anywhere in a segment. +- [LOW] markdown-guard/trailing-space-latent, `crates/core/src/curation/markdown.rs:169`. The + guard never refuses a space that ends a line, which Prettier strips. Only a question reaches a + line end (`change_line`, review_report.rs:79). Today it is refused by accident: section 10 + (`professional_decisions`, :319) reprints every question mid-line, where the trailing space + becomes a double space (end-to-end changeset 0). A layout change of section 10 would reopen + it. Fix: refuse trailing whitespace at the end of a guarded line. +- [LOW] anti-gaming/test-allow (context). The new + `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` in + `crates/core/tests/curation_markdown.rs:6` and `crates/core/tests/curation_review.rs:6` is a + test-only allow for reading oracle files, the same pattern as the pre-existing + `crates/core/tests/curation_draft.rs:7`. It is not a security suppression. No `nosemgrep`, + `nosec`, `eslint-disable`, `ts-ignore` or `noqa` was added. + +## Checklist (9 checks) + +| Check | Result | +|---|---| +| Hardcoded secret, token, key, auth URL | none in added lines (audit texts only name the rulesets) | +| SQL built by concatenation | no SQL change in the diff | +| Unsanitized render of authored text | Markdown: findings 1, 2, LOW trailing space; SVG: clean (below) | +| Sensitive endpoint without authz | none (offline dev tool) | +| Stack trace, internal path, DB error to a user | none (CLI messages to the operator) | +| Secret or PII in a log | none (stdout and stderr carry file names, counts, refusals) | +| Tracked `.env` or credential file | only `.env.example` tracked, not in the diff | +| Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, a migration outside the diff, dropped), 1 MANUAL | +| New suppressions (anti-gaming) | LOW context only | + +## Verified clean + +- Ids at the op (`df82424`): `add` checks the item's key and every nested `children` / + `categories` id, `rename` checks the new id (a region code for a region). Record targets + resolve to existing, validated ids, change ids match `CHG-\d{3,}`, and reference ids come from + the strictly parsed registry or a validated add. I found no remaining path for a line break or + a backtick into a code span. +- Code spans: 739 probes (NBSP, U+2000, U+3000, U+FEFF, zero-width characters, controls and NUL + at the edges and inside, `\`, `|`, `\|` in table code), 0 divergence. +- Display width: about 110 pictograph, combining, format and wide characters in cells. Each one + is either equal to Prettier or refused (`UnsupportedWidth`). +- List items: `assert_single_line` covers the title, rationale, question, citation, URL, DOI and + vet values. CHANGELOG cells turn `\n` into a space and escape `|`, and the guard refuses CR + and TAB anywhere. +- Drawings: the serialiser escapes `& < > "` and `\t \n \r` in attributes and `& < > \r` in + text, identical to xmldom 0.9.12 on 11 probe values. `first_unwritable` refuses non-XML code + points and CR. The overlay prints `Infinity`, `-Infinity` and `NaN` as `String(number)`. +- `compare_drawing`: `parse_svg` (prescan: depth 64, 20,000 elements) runs before any roxmltree + parse. The committed file must rebuild to itself byte for byte, the rule must change the tree, + and the ruled text must equal the produced one byte for byte. Only `review/app-*` may use the + rule; the overlays compare as bytes only. I found no path that accepts a difference other than + the declared trigger-name rule. A trigger whose own English name equals the view's French name + is refused (a false refusal, and a loud one). +- Panics and resources: slicing only at ASCII `**` offsets, `get` elsewhere. The two indexings + (`style()[0]`, `split_field(..)?[0]`) cannot be empty. The guard is linear (splits into + pieces, never suffixes) and the renderers are indexed. Record memory stays as declared in + §11.13. +- `import-equine --check`: `legacy-import: 6 files, 0 differences`; `draft: declared: + review/app-main.svg (byte-identical once the R3 trigger-name rule is applied)`; `draft: 12 + files, 0 differences`. `--out` (read): `create_dir` / `create_new` only, `Normal` components + only, file names built from validated view ids, seed identity checks as declared. + +## Reproduction + +`/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe.x3u0rG/`: +`rs/` (probe crate, binaries `gateprobe` and `e2e`), `js/fmt.mjs` (Prettier), +`js/ts_e2e.mts` (TypeScript pipeline), `js/gen*.py` (probe generators), `e2e_in.json`, +`e2e_out.json`, `ts_out.json`, `cmp1.txt`, `cmp2.txt`, `cmp4.txt` (divergence lists). diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-4.md b/.claude/audits/2026-10-23-rust-r5-review-security-4.md new file mode 100644 index 00000000..30f320c4 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-4.md @@ -0,0 +1,166 @@ +# Security gate R5.4, round 4 (fresh): feature/rust-r5-pipeline-core @ 6d4fdd6 + +Scope: `git diff c6e0d85..HEAD` (36 existing files), focus on 124d954 (`curation/report_guard.rs`, +`curation/markdown.rs`, `draft/{pipeline,fields,ops}.rs`). Product files read whole: report_guard.rs, +markdown.rs, changelog.rs, review_report.rs, overlay.rs, drawing.rs, app_review.rs, svg_compare.rs, +labels.rs, stats.rs, bin/import_equine.rs, plus the R5.4 hunks of fields.rs, ops.rs, pipeline.rs, mod.rs. + +``` +SECURITY — VERDICT: BLOCK(3) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 36 files +BLOCKING: + 1. [HIGH] markdown-guard/character-reference — crates/core/src/curation/report_guard.rs:43 — a character reference without its `;`, or with a name over 32 characters, passes the guard and Prettier rewrites it: `a * b` → `a \* b`, `*` → `\*`, `_` → `\_`, `a_b` → `a_b`, `�…042;` (35-character name) → `\*`; a non-terminated reference followed later by a bare `&` before `,` or `"` makes Prettier overwrite that `&`: `< x &` → `< x <`, `A x &` → `A x A` — hint: outside code spans refuse `&#` whatever follows, and `&` followed by a legacy (non-terminated) entity name with or without `;`; keep `&` before other text admitted (the equine REVIEW-REPORT holds `&pid=S1019` in a URL) + 2. [HIGH] markdown-guard/image-reference — crates/core/src/curation/report_guard.rs:33 — `![…]` is not among the refused constructs; Prettier parses it as an image reference and prints the alt from its decoded, unescaped value: `![a\"b]` → `![a"b]`, `![a\|b]` → `![a|b]`, `![x|y]` in a CHANGELOG cell, `![&]` → `![&]`, `![<]` → `![<]`, `![*]` → `![*]`; the `![` and its `]` can come from two insertions on one list line (title, rationale, question) — hint: refuse `![` outside code spans (the equine reports hold none) + 3. [HIGH] markdown-guard/wiki-link — crates/core/src/curation/report_guard.rs:34 — the padded-wiki check splits on `[[`, so the text between a `[[` and the first `]]` is never examined when another `[[` sits in between; Prettier's tokenizer (`/^\[\[(?<linkContents>.+?)\]\]/su`, contents trimmed) matches across it: `[[ a [[b]]` → `[[a [[b]]`, also `[[ é [[中]]`, `[[ 1 [[2]]`, `[[a]] [[ b [[c]]`, `[[ x [ [[y]]` — hint: for every `[[` occurrence (overlapping `[[[` included) take the text up to the first following `]]` and refuse it when it starts or ends with whitespace, or refuse `[[` followed by whitespace and whitespace followed by `]]` +REPORTED (non-blocking): + - [MEDIUM] declaration-wrong (guarantee overstated) — docs/development/RUST.md:3164, 3169, 3184, 3214 + - [LOW] resource/quadratic-underscore-check — crates/core/src/curation/report_guard.rs:88 + - [LOW] lint-allow in test files (convention, not a scanner suppression) — crates/core/tests/curation_review.rs:6, crates/core/tests/curation_markdown.rs:6 +PROOF: semgrep 128 rules on 36 files → 0 findings; checklist 13 checks → 6 findings +``` + +## Severity basis + +The three blocking findings break the owner requirement this guard exists for: a report is byte for +byte what the TypeScript+Prettier pipeline wrote, or it is refused loudly. Each one is a silent +difference reachable through the normal authoring channel (a title, rationale or question in +`changes.json`, a citation in `references.json`, a label set by an op), with no refusal and a clean +exit. There is no confidentiality or availability impact and no actor beyond the author of the +curation files; the classification rests on the explicit integrity requirement and on the fact that +RUST.md states the opposite (finding M1). In two families the TypeScript output is the one that alters +the author's text (`< x &` became `< x <`), so the fix is a refusal, never an imitation of +Prettier. + +## Method and evidence (differential, all in the scratchpad) + +- TypeScript side: `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/ts/sweep.mts`, + the sweep generator's exact `changesFile(probe)` on the mini sheet, run through `packages/anatomy/src` + (`applyChangeset`, `renderChangelog`, `renderReviewReport`) and `formatMarkdown` (Prettier 3.8.3, + options of `packages/anatomy/src/format.ts`). +- Rust side: `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/rs/src/main.rs`, + a throwaway binary linking `faunosteo-core` (`curation`), same changeset through `apply_changeset`, + `render_changelog`, `render_review_report`, `format_report`. Raw texts matched the TypeScript in every + case (no RAWDIFF), so every difference is the guard admitting what Prettier rewrites. +- Batches: 79 hand-picked probes (20 silent), 2,500 seeded random strings over the admitted alphabet + plus `&#`, `&`, `<`, `![`, `[[` atoms (151 silent, every one holding `&#`, a legacy entity or + `![`), 3,000 seeded random strings without `&`, `![` or `[[` (0 silent), 55 targeted edges (7 silent), + 13 entity variants (2 silent). Total 5,647 probes, 180 silent differences, all in the three families. + Probe lists and results: `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/out/`. +- Prettier internals confirmed in `prettier@3.8.3/plugins/markdown.js`: wiki tokenizer + `/^\[\[(?<linkContents>.+?)\]\]/su` with `.trim()`, placed before `link`; the unescape restore keeps the + source of a one-character text node except `*` and `_` (`Tf=/^\\?.$/su`), which is why `*` and + `_` come out as `\*` and `\_`; `imageReference` prints `node.alt`, the decoded value. + +Sample (review list item, probe in the title): + +``` +rust: - `CHG-001` Titre a * b (niveau C, … +ts: - `CHG-001` Titre a \* b (niveau C, … +rust: - `CHG-001` Titre ![a\"b] (niveau C, … +ts: - `CHG-001` Titre ![a"b] (niveau C, … +rust: - `CHG-001` Titre [[ a [[b]] (niveau C, … +ts: - `CHG-001` Titre [[a [[b]] (niveau C, … +rust: … `probe-ref` Citation < x &, cité par 1 nœud(s). +ts: … `probe-ref` Citation < x <, cité par 1 nœud(s). +``` + +In the CHANGELOG the same probes also shift the table alignment (Prettier pads on the rewritten text). + +## Findings in detail + +### H1 [HIGH] character references not terminated by `;` (report_guard.rs:43-53) + +`reference` requires `after.contains(';')` and `name.len() <= 32`. The parser Prettier uses decodes +non-terminated numeric references (`*`, `*`, `*`) and the legacy named ones (`<`, `&`, +`©`…), and numeric references take any number of leading zeros, so the 32 cap lets +`*` through. A reference decoding to `*` or `_` is escaped +(`\*`, `\_`) or merged (`a_b` → `a_b`); a non-terminated reference followed later by a bare `&` (seen +before `,` and `"`, i.e. at the end of a citation or a JSON value) gets that `&` replaced by the decoded +character. Fix direction: refuse `&#` outside code spans unconditionally, and `&` followed by a legacy +entity name (the non-terminated set) regardless of `;`; keep the existing `&name;` rule; keep `&` before +anything else admitted, since the equine REVIEW-REPORT carries `&pid=S1019` inside a URL. Add the +reproducers above to `r5.markdown-sweep-oracles.test.ts`. + +### H2 [HIGH] image references (report_guard.rs:33-55) + +`rewritten_construct` refuses `](` and `][` but not a shortcut image reference `![…]`. Its alt is printed +from the decoded, unescaped value, so any `\"`, `\|` (including the `\|` that `cell()` adds in the +CHANGELOG) or reference inside it is rewritten. `![a]` with plain text stays identical, which is why the +sweep's `![img](x.png)` (refused through `](`) never showed it. Fix direction: refuse `![` outside code +spans. + +### H3 [HIGH] wiki links whose contents hold a `[[` (report_guard.rs:34-41) + +`plain.split("[[")` yields the segments between occurrences, not the text the regex matches: for +`[[ a [[b]]` the first segment ` a ` holds no `]]` and is skipped, the second `b]]` is unpadded, so the +line is admitted while Prettier matches ` a [[b` and trims it. Fix direction: emulate the lazy match +from each `[[` position (a `]]` at offset 1 or more), or refuse `[[` followed by whitespace and +whitespace followed by `]]`. + +### M1 [MEDIUM] declarations overstated (docs/development/RUST.md) + +- Line 3164: "a `[[ … ]]` padded inside" is refused: false for H3. +- Line 3169: "so an unknown form is refused by default": false; the allowlist is per character, and + constructs built from admitted characters (`&`, `#`, `!`, `[`, `]`) are admitted. +- Line 3184: "the constructs refused whole (links, HTML tags, autolinks, character references)": false for + non-terminated or long references (H1), and image references are not refused at all (H2). +- Line 3214: the residual risk says an uncovered combination "could still differ" and that the last rounds + "found none": three families with 180 reproducers were found in one round. The declaration must be + rewritten with the fixes, and the sweep extended with these families. + +### L1 [LOW] quadratic underscore check (report_guard.rs:88) + +For each `_`, `chars[i + 1..].iter().collect::<String>()` copies the rest of the text to test the URL +starts: O(n²) per authored text. Measured with the probe binary: 10 KB of `a_` 14 ms, 40 KB 221 ms, 80 KB +0.91 s (x4 per doubling), so about 2.5 min per occurrence at 1 MB and hours near the 16 MiB file cap; a +title or rationale is checked in up to four places. Owner-authored input of a dev tool, hence LOW. Fix +direction: compare the slice in place (`chars[i + 1..].starts_with(&['h','t','t','p',…])` or byte offsets +on the `&str`). + +### L2 [LOW] lint allows in the new test files (context) + +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` heads +`curation_review.rs` and `curation_markdown.rs`, the same header as the pre-existing `curation_draft.rs`: +test-only file access and unwraps, not a security-scanner suppression. No `nosemgrep`, `nosec`, +`eslint-disable`, `ts-ignore` or new allow in library code. + +## Checklist (13 checks) + +| # | Check | Result | +|---|---|---| +| 1 | Hardcoded secret, token, key, auth URL (added lines, incl. docs and oracle JSON) | none | +| 2 | SQL built by concatenation | none in the diff (the seed SQL writer is R5.3, unchanged) | +| 3 | Unsanitized render (innerHTML, eval, raw) | none; SVG text goes through the R3 serializer (`& < > "` and tab/newline escaped in attributes) after `first_unwritable` (XML 1.0 code points, CR refused) | +| 4 | Sensitive endpoint without authz | not applicable (offline dev tool, no endpoint) | +| 5 | Stack trace or internal path to a user | not applicable (CLI stderr for the developer) | +| 6 | Secret or PII in a log | none (stdout and stderr carry file names, counts, refusals) | +| 7 | Tracked `.env` or credential file | only `.env.example`; nothing in the diff | +| 8 | Guardrails scanner (`--domain api,supabase`) | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`) outside the diff, filtered | +| 9 | New suppressions (anti-gaming) | none in library code; L2 | +| 10 | Markdown guard differential (5,647 probes) | H1, H2, H3, M1 | +| 11 | Strict SVG comparison | holds (below) | +| 12 | Resource use of the new code | L1; renderers indexed, document bound unchanged | +| 13 | `--check` / `--out` behaviour | holds (below) | + +## What holds + +- Channels: both draft reports pass every raw line through `format_report` (pipeline.rs:273-274); no + authored text reaches a heading; list-item fields with a control character are refused + (`assert_list_items_single_line`); ids that reach code spans are stable ids or region codes, checked at + the op (ops.rs `assert_stable_id`), field segments refuse controls (NUL included) and backticks; a line + with an odd backtick count is refused, so no code span can hide a line break. The R5.2 IMPORT-REPORT + stays on `format_markdown` with legacy sources only. View ids in file names are stable ids, and + `write_exclusive` refuses any non-normal path component. +- Strict SVG comparison (`svg_compare.rs`), 11 crafted cases against the committed `app-main.svg`: the + legitimate trigger-name difference is the only acceptance; an extra comment, trailing text, a prolog + change, another English name, a renamed attribute, a DOCTYPE, an empty or 100,000-level produced file, + a 100,000-level committed file and a stylesheet PI in the committed file are all refused, none panics. +- `--check` (binary built in the scratchpad, read-only): `legacy-import: 6 files, 0 differences`, + `draft: declared: review/app-main.svg`, `draft: 12 files, 0 differences`, exit 0. +- `--out` into a fresh `mktemp -d` under the scratchpad: 18 files written; a second run refused + `not empty, nothing written` (exit 2); legacy identical to the seed, draft identical except + `app-main.svg`. Working tree clean afterwards. +- Panics: none found in the new code (slices after an ASCII `**` match, `chars[i + 1..]` with `i < len`, + `compact_value` cut bounded by the length test, overlay NaN paths printed as `String(number)`). +- semgrep: 128 rules (p/security-audit, p/secrets, p/owasp-top-ten) on 36 files, 0 findings, 0 errors. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-5.md b/.claude/audits/2026-10-23-rust-r5-review-security-5.md new file mode 100644 index 00000000..968f44fb --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-5.md @@ -0,0 +1,192 @@ +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 37 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] report-guard/wiki-link-across-code-spans (silent family F2) — crates/core/src/curation/report_guard.rs:55-59 (rule applied per plain part from :177-183); crates/core/src/curation/draft/review_report.rs:90-100 + - [MEDIUM] report-guard/opener-closed-inside-code-span (silent family F1) — crates/core/src/curation/report_guard.rs:178-179; crates/core/src/curation/draft/fields.rs:104-112,123-125; crates/core/src/curation/draft/review_report.rs:91-98 + - [LOW] declaration/code-spans-called-generator-only — docs/development/RUST.md:3166-3173,3176-3178,3221-3230; crates/core/src/curation/report_guard.rs:14-17 + - [LOW] report-guard/quadratic-cost-per-line — crates/core/src/curation/report_guard.rs:116-122,126-141,55-59 + - [LOW] anti-gaming/test-only-clippy-allow (context, not a security suppression) — crates/core/tests/curation_review.rs:6; crates/core/tests/curation_markdown.rs:6 +PROOF: semgrep 162 rules on 37 files → 0 findings; checklist 9 checks → 1 finding (LOW); guard differential (Rust format_report vs Prettier 3.8.3 with the repository options) 147,789 report documents, then the Rust pipeline vs the TypeScript pipeline end to end on 13 changesets → 2 silent families reproduced end to end (MEDIUM), 2 LOW + +# Security gate 5, R5.4 review files (2026-10-23) + +Scope: `git diff c6e0d85..1b12d90` (HEAD of `feature/rust-r5-pipeline-core`), 37 files, read from a +pristine `git archive` copy of 1b12d90 in the session scratchpad. Product files read whole: +`curation/report_guard.rs`, `curation/markdown.rs`, `curation/mod.rs`, `draft/changelog.rs`, +`draft/review_report.rs`, `draft/svg_compare.rs`, `draft/drawing.rs`, `draft/overlay.rs`, +`draft/app_review.rs`, `draft/fields.rs`, `bin/import_equine.rs`, the diffs of `pipeline.rs`, `ops.rs`, +`mod.rs` and `Cargo.toml`, RUST.md §11.14 and §11.15, and the TypeScript sweep generator. + +## Grading + +No HIGH or CRITICAL: the inputs are the owner's own `changes.json` and `references.json`, the tool is +never deployed and exposes nothing, and no finding crosses a security boundary (no write outside the +claimed folder, no seed modification, no code execution). The two MEDIUMs breach the owner's +stated contract for this tool ("a report never differs silently from what the TypeScript+Prettier +pipeline wrote: byte-identical or loudly refused"). The gate does not block on them, but by that +contract they are defects to fix before R5.4 closes. Both were reproduced end to end: the raw +texts of the two pipelines are identical, the Rust `CHANGELOG.md` is identical, and the Rust +`REVIEW-REPORT.md` differs from the TypeScript one with no refusal. + +Both new families have one root cause. The guard decides inline constructs per stretch of text +between two backticks. Prettier's parser builds wiki links, link references and liquid tags across +the generator's code spans, and its bracket counting does not see code spans at all. + +## MEDIUM 1: wiki link split across two authored fields (F2) + +`rewritten_construct` (report_guard.rs:53-80) runs on each plain part separately (`guard_text`, +:177-183). Its padded wiki rule (:55-59) needs the `[[` and the `]]` in the same plain part. In +the review report, `change_line` (review_report.rs:90-100) writes the title and the rationale +before the generated `Objets : \`…\`` and `Références : …` code spans and the question after them, +all on one line. A `[[` in the title or rationale and a `]]` in the question form one wiki link +that spans the code spans. Prettier's wiki-link plugin trims its content, so a space next to either +bracket is dropped. The guard never sees the pair. + +Reproduced end to end on the sweep's mini sheet (Rust `apply_changeset`, `render_review_report`, +`format_report` against the TypeScript `applyChangeset`, `renderReviewReport`, `formatMarkdown`). +Changeset: one level C change, op `set finding:hip/hip-dysfunctions/mobility name.en = "Mobility"`, +title `Mobilité`, rationale `Libellé repris de [[`, question `Faut-il garder ]] ?`: + +``` +rust: … Libellé repris de [[ Objets : `finding:…name.en`, … Question : Faut-il garder ]] ? +ts : … Libellé repris de [[Objets : `finding:…name.en`, … Question : Faut-il garder]] ? +``` + +The same happens with title `Renommer [[mobilité` and question `Garder le nom ]] ?`, with rationale +`Voir [[ la fiche` and question `Confirmer]] ?`, and with title `Mobilité [[` (the generator's +following space pads it). Three random seeds of a mixed sweep without any field trick (48,000 +documents, 26,244 admitted) gave 55 silent differences, all from this family. + +How contrived: the changeset is fully valid and the document is untouched. It only needs wiki-link +brackets split between the title or rationale and the question of one change, with a space next to +one bracket. Wiki-link syntax is rare in French clinical prose, so accidental occurrence is +unlikely, but no malformed data is involved. + +Fix direction: evaluate the construct rules on the whole line, code spans included, the way the +parser does (at least: a `[[` with a later `]]` anywhere on the line, a space next to either); +or refuse `[[` and `]]` in the list-item fields unless they form a closed, unpadded pair inside the +same field. Add cross-field probes to the sweep. Today it puts the same probe in every field, so +an opener in one field and its closer in another lies outside it by construction. + +## MEDIUM 2: an authored opener closed inside a generated code span (F1) + +Inside a code part, the guard admits anything but a carriage return or a tab (:178-179). The module +doc and RUST.md call code spans "the generator's alone (ids, targets, field names)", but field +names are authored. `is_settable` checks only the first segment of a `set` field +(fields.rs:123-125), and `split_field` refuses only empty segments, control characters, backticks, +NUL starts and `__proto__` (:91-121). Any other sub-segment reaches the review report's `Objets` +code spans through `record_subject`. If the title or the rationale holds an unclosed `[`, `[[` or +`{%`, the parser closes it at a `]`, `]]` or `%}` inside that code span, re-pairs every backtick +after it, and re-prints the rest of the span as Markdown. + +Reproduced end to end. Change title `Mobilité [voir note`. Ops: +`set finding:hip/hip-dysfunctions/mobility name.<130 × "p">.a]_ = "x"`, then +`set … name = {"fr":"Mobilité","en":"Mobility"}`. The second op makes the final document valid +again, and the padding pushes the stray key past the CHANGELOG's 120-unit value cut, where the guard +would otherwise refuse it: + +``` +rust: … Objets : `finding:…name.ppp….a]_`, `finding:…name`, … +ts : … Objets : `finding:…name.ppp….a]\_`, `finding:…name`, … +``` + +Other reproduced variants: title `Titre [[x` with segment `a]] *b*` (TS prints `_b_`), `Titre [x` +with `a][b` (TS prints `a]b`), `Titre {%x` with `a%} *b*`, and the opener in the rationale. The +same breakage also turns the tail of a code span into live Markdown. With segment +`a] [lien](https://example.org) <b>gras</b> x` and title `voir [x`, the parsed report holds a link +and two inline HTML nodes, and `, ` becomes a code span. Both pipelines print that identically, so +it is no silent difference, but it gets past the guard's "no link, no HTML tag" rule. The author +already controls the file, so nothing is gained in privilege. + +How contrived: very. It needs a field path with a stray sub-segment (a typo-class authoring error) +that a later op overwrites or removes, because every sheet object is strict and the final document +would be refused otherwise. The stray key must also stay out of the first 120 UTF-16 units of every +CHANGELOG value, or the guard refuses it there and the whole run stops. And the change's title or +rationale needs an unclosed opener. + +Fix direction: refuse at `split_field` any segment outside the id alphabet (`[A-Za-z0-9_-]`, which +every settable path uses: `name.fr`, `view_box.min_x`, `count_range.min`). That is a declared +refusal where the TypeScript accepted. Then make the code-span rule an allowlist of what the +generator really writes (ids, `CHG-ddd`, `kind:id/…`, dotted field names). + +## LOW: the residual-risk declaration is accurate in kind, wrong in two specifics + +§11.14 and §11.15 correctly call the guarantee empirical and say an unprobed combination could +still differ. Two statements are false as written, though. "Code spans are the generator's alone +(ids, targets, field names); inside them, anything but a carriage return or a tab" (RUST.md +:3170-3173, report_guard.rs:14-17) hides that field sub-segments are authored, and that this channel +has the weakest rule of the guard. "Nested padded wiki links" and the other constructs are listed +as ruled (:3166-3168), but they are ruled only within one stretch between backticks. The sweep's +blind spot also deserves a line: one probe copied into every field never puts an opener and its +closer in two different fields. Fix: correct the module doc and §11.14 and §11.15 when F1 and F2 are +fixed. + +## LOW: quadratic guard cost per line + +`in_url_token` (:116-122) scans back to the token start for every `&` that is followed by a +lowercase letter (:129). The padded-wiki rule (:55-59) runs `contains` over the rest of the part +for every `[[` or `]]`. Measured on the release build: a 160 kB token +`https://x.org/?a=1&b=1&b=1…` takes 4.1 s and a 640 kB one 28.4 s. 640 kB of ` ]]` takes 5.6 s. Memory +stays flat (8 MB). Authored texts have no length cap below the 16 MiB file bound +(`MAX_FILE_BYTES`), and each text is guarded in two or three lines, so a multi-megabyte rationale +stalls the run for minutes to hours. It is owner-authored and can be interrupted. Fix: one forward +pass (track the current token's start and whether it holds a URL literal; precompute the first `[[` +and the last `]]` of the line), or a length cap on authored texts. + +## LOW: new lint allows (anti-gaming, context) + +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` heads the two new +integration test files (curation_review.rs:6, curation_markdown.rs:6), the same as the +pre-existing curation_draft.rs:7. These are test-only lint allows (oracle file reads, unwraps) in +separate test crates. They do not weaken the library's no-I/O rule and do not silence a security +scanner. The diff adds no `nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore` or `noqa`. Not +blocking. + +## Checked and clean + +- semgrep, pinned packs, `--metrics=off` (EIO_BACKEND=posix), 37 files (rs, ts, md, json, toml): + 0 results, 0 errors. +- Checklist: no secret, token, key or credential URL in the added lines (pattern grep plus + p/secrets). No SQL built in the diff (the seed SQL renderer is unchanged R5.3 code). No + innerHTML, `eval` or HTML sink. No endpoint, so no authz surface. No secret in a log. No tracked + `.env` or credential file (the tracked `.env.example` is the placeholder convention, outside the + scope; reading it was refused by a permission deny rule, so it was not opened). +- Guardrails scanner (`--domain api,supabase`, on the pristine copy): 0 FAIL, 1 WARN, 1 MANUAL. The + WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`) is in + a file outside the diff and is excluded. +- No authored text reaches a report outside the guard: both reports go through `format_report` + (pipeline.rs). Every authored field the reports print passes `assert_authored` (changelog.rs:70-71, + 91-92; review_report.rs:361-389). Cell pipes are escaped and an authored `\|` is refused. Line + breaks become spaces in cells and are refused in list items. A row with another cell count is + refused. No authored text ever starts a line, so no heading, section, list or table can be forged. + Code spans are the exception, see F1. +- Drawings: every label, id, path and number goes through the core serializer's escaping, and + `first_unwritable` refuses XML-invalid text and CR. View ids used in file names are stable ids, + and `write_exclusive` accepts only plain components. +- Strict SVG comparison (`svg_compare.rs`): the committed file must rebuild byte for byte from its + tree, the rule must change that tree, and the rebuilt text after the rule must equal the produced + file byte for byte. The rule touches only `data-anno-name-en` and `FR / FR` titles of elements + that open a view, so it cannot hide another difference. +- `import-equine --check`, built in the scratch copy (read-only): `legacy-import: 6 files, 0 + differences`, `draft: declared: review/app-main.svg …`, `draft: 12 files, 0 differences`, exit 0. + Its `--out` path checks (no `..`, parent canonicalized, seed refused by path and by inode, + symbolic link refused, non-empty refused, `create_dir` and `create_new` only) were read, not run. +- Panics: none found by reading the guard's slicing. A fuzz of 20,000 random multi-line documents + (tabs, CR, combining marks, U+2028, emoji, ZWJ, backticks, brackets) produced no panic. + +## Method + +Throwaway probes in the scratchpad only: `examples/guard_probe.rs` (calls `format_report`) and +`examples/pipeline_probe.rs` (the sweep's pipeline on a changes file), linked against the pristine +copy with `--features curation`; Node scripts running the repository's Prettier 3.8.3 with the +options of `packages/anatomy/src/format.ts`, and the TypeScript pipeline of `packages/anatomy/src` +through the tsx loader. Differential harness: raw report lines built like the reports (list items, +ordered items, table rows with `cell()` escaping), admitted by Rust then compared with Prettier. +Code-span channel: 1,476 documents, 0 silent without an opener. Random authored text: 66,000 +documents, 48,737 admitted, 0 silent. Openers against code-span contents: 8,312 documents (F1). +Mixed fields: 72,000 documents (F1 and F2 only, every silent case classified). Fuzz: 20,000. +End to end: 13 changesets. No `--out` was run, nothing was deleted, and no file of the repository +was modified except this report. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-6.md b/.claude/audits/2026-10-23-rust-r5-review-security-6.md new file mode 100644 index 00000000..bb27375c --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-6.md @@ -0,0 +1,153 @@ +# Security gate R5.4, round 6 (fresh, blind) + +Branch `feature/rust-r5-pipeline-core`, HEAD `aeb5050`. Scope: +`git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md` +(25 files). Mode: audit (this file is the only write). The brief carried a list of earlier +findings; per the auditor contract it was not used as a checklist. The scan below is complete +on its own and covers those areas anyway. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 25 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] resource/changelog-table-amplification — crates/core/src/curation/draft/changelog.rs:100 (via crates/core/src/curation/markdown.rs:133) + - [LOW] resource/per-view-drawing-amplification — crates/core/src/curation/draft/pipeline.rs:204 + - [LOW] resource/guard-underscore-pairing-quadratic-in-isolation — crates/core/src/curation/report_guard.rs:216 + - [LOW] markdown/invisible-hangul-fillers-admitted — crates/core/src/curation/report_guard.rs:159 + - [LOW] markdown/unpadded-wiki-link-in-table-cell (context, by design) — crates/core/src/curation/report_guard.rs:58 + - [LOW] anti-gaming/clippy-allow-in-new-test-file (context, convention) — crates/core/tests/curation_markdown.rs:6 + - [LOW] anti-gaming/clippy-allow-in-new-test-file (context, convention) — crates/core/tests/curation_review.rs:6 +PROOF: semgrep 162 rules on 25 files → 0 findings; checklist 13 checks → 7 findings +``` + +## What was run + +- semgrep 1.168.0, the three pinned packs, `--metrics=off`, on the 25 existing files of the + diff: 162 rules, 25 files scanned, 0 results, 0 errors. +- Checklist greps on the added lines: secrets, SQL concatenation, unsafe render, logging, + suppressions, tracked `.env` / credential files (only `.env.example` is tracked). Nothing + found. No endpoint in scope (authz check N/A). +- Guardrails scanner (`--domain api,supabase`): 0 FAIL, 1 WARN, 1 MANUAL. The WARN + (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`) is + outside the diff, not counted. +- `cargo test -p faunosteo-core --features curation`: every suite green. `cargo clippy + --all-targets -D warnings` (curation): clean. No `std::fs`, `std::env`, clock or process use + in the new core modules (only the binary, which already carried its documented allow). +- `import-equine --check`: legacy 6 files 0 differences; draft 12 files 0 differences, one + `declared:` line for `review/app-main.svg`. +- Differential fuzz of `report_guard::format_report` against Prettier 3.8.3 (the TypeScript + formatter, same options as `packages/anatomy/src/format.ts`), through a scratch binary on the + core library. 10,201 generated reports (seeded random strings over the admitted alphabet plus + Markdown tokens: URL starts, entities, `**`, `[[`, `](`, `<a`, `{%`, `[^1]`, `:warning:`, + line-start markers), placed in the list-item fields (with the pipeline's own + `assert_single_line` / `assert_authored` pre-filters) and in CHANGELOG table cells (with the + `cell()` escape). 2,226 admitted, 7,975 refused. 0 admitted report differs from Prettier's + output. AST census of every admitted report (Prettier's own Markdown parser): heading, list, + item, table, row and code-span counts always equal the template's; no link other than a bare + URL autolink literal, no image, HTML, emphasis, footnote, definition, break, liquid node. + One `wikiLink` node, in a table cell (see LOW 5). +- Table width parity: 28 unusual letters (combining marks with the Alphabetic property, Indic + vowel signs, CJK, fullwidth, halfwidth, Hangul jamo and fillers, non-BMP letters) in a table + cell: 26 admitted and identical to Prettier, 2 refused. No silent alignment difference. +- Guard timing on 12 pathological 0.4 to 1 MB lines (debug build): 32 to 224 ms each, linear. +- `--out` / `--check` file safety, 18 probes in the scratchpad: fresh folder (18 files, `diff + -r` identical but the declared `app-main.svg`); non-empty folder, symbolic link (plain, + trailing `/`, trailing `/.`), dangling link (target not created), path inside the seed, + inside the seed through a linked parent, link to `draft/`, `..`, empty path, existing file, + missing parent, `/`, extra arguments: every one refused, nothing written; non-absolute + `INIT_CWD` falls back to the current folder. The seed and the git tree are unchanged. +- Resource probe on the real equine pipeline (scratch binary, release build, `ulimit -v`). + +## Findings + +### MEDIUM 1: the CHANGELOG grows as rows × the widest cell of each column + +`changelog.rs:100` `level_section` builds one table per level, and `format_report` aligns it +(`markdown.rs:133` `align`, `:163` `padded`): every row is padded to the widest cell of its +column. Titles and rationales are authored and uncut (only `Avant` / `Après` are cut to 120 +units). One change with a long rationale plus another change producing many records makes every +row as wide as that rationale. Measured on the equine pipeline, all level A: + +| added to changes.json | records | CHANGELOG | max RSS | +|---|---|---|---| +| +25 KB (200 subtree sets) | 5,226 | 7.8 MB | 45 MB | +| +45 KB (same, one 20 KB rationale) | 5,226 | 98 MB | 233 MB | +| +105 KB (same, one 80 KB rationale) | 5,226 | 381 MB | 788 MB | +| +155 KB (600 sets, one 80 KB rationale) | 14,026 | 1.09 GB | 2.2 GB | + +A rationale cloned into many records (the R5.3 shape) aborted at 4.4 GB under a 6 GB +`ulimit` from +175 KB. Within the 16 MiB read cap the demand reaches terabytes: certain OOM of +the tool, and `--out` would try to write a file of that size (into a fresh folder, never +overwriting). Prettier aligns tables the same way, so the TypeScript had the same output. This +is not the declared R5.3 residual (records cost ops × items × value size): here a single wide +cell multiplies every row, with the records themselves staying small. No integrity or +confidentiality impact; a local developer tool fed by an authored file that goes through review. +Hint: compute the aligned size (rows × the sum of column widths) before building the strings and +refuse past a stated cap with a loud `PipelineError`, or cap authored title / rationale length. +Declare the bound in RUST.md next to the 200,000-value one. + +### LOW 2: two drawings per view, no view count bound + +`pipeline.rs:204` `review_drawings` writes an overlay and an application drawing per view, each +a clone of the whole cleaned drawing (`overlay.rs:350`, `app_review.rs:27`), about 137 KB each, +all held in memory before any write or comparison. A detail view needs about 25 document values +(view, view box, trigger annotation), so the 200,000-value bound allows about 7,700 views: +around 2.1 GB of output. Estimated, not measured. Same output as the TypeScript. Hint: the same +output-size cap as MEDIUM 1 covers it. + +### LOW 3: `underscore_pairs_later` is O(parts × length) on its own + +`report_guard.rs:216`: for each plain part holding `_` it rescans every later code span. 40,000 +`a_b \`cN\`` parts (509 KB) took 213 s (debug). The generator never writes such a line: at most +two authored parts per line (title + rationale, question) and the separators between code spans +hold no `_`; the realistic worst case, one underscore part followed by 100,000 code spans (1 MB), +takes 224 ms. So the "linear guard" holds for the generator's line shapes only. Hint: one +backward pass that records whether a later code span can close. + +### LOW 4: invisible Hangul fillers pass the allowlist + +`report_guard.rs:159` admits `char::is_alphanumeric`, which includes U+3164, U+115F, U+1160 and +U+FFA0 (Hangul fillers, category Lo, rendered blank). An authored title or rationale can carry +invisible runs in REVIEW-REPORT.md. No structure is forged and Prettier keeps them (identical +output). Hint: refuse Default_Ignorable_Code_Point letters with the other refused classes. + +### LOW 5 (context, by design): unpadded `[[x]]` admitted in a table cell + +Only padded wiki links are refused in cells (`report_guard.rs:58`); list items refuse `[[` +and `]]` whole (`review_report.rs:364`). Prettier parses `[[x]]` in a CHANGELOG cell as a +`wikiLink` and prints it back byte for byte, so the output matches the TypeScript. Recorded so +the per-cell rule stays a conscious choice. + +### LOW 6 (context): clippy allow attributes in the two new test files + +`tests/curation_markdown.rs:6` and `tests/curation_review.rs:6` add +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. They are not +security-scanner suppressions (no `nosemgrep`, `nosec`, `eslint-disable`): they are the +convention `clippy.toml` documents ("Tests and the worker binary allow these lints locally where +they own I/O"), present in the same form in all 34 existing integration test files. Not +blocking. + +## Areas checked and found sound + +- Report structure: no authored text reaches a line start (control characters refused in + list-item fields, `\n` → space and `\r` refused in cells); code spans come from the generator + only (authored backticks refused, content limited to `[A-Za-z0-9_:/. -]`, field segments to + `[A-Za-z0-9_-]`, change ids `CHG-\d{3,}`, reference ids declared and stable, ids written by an + op checked at the op); `](`, `][`, `![`, `<` before a letter / `/` / `!` / `?`, character + references, `{%`, `%}` refused; `*` only as `**word**`; `_` only intraword plus the + code-span closer rule; backslash only before `"` or `|`; table cell count checked. +- SVG: elements and attribute names are fixed or come from the frozen drawing read by the + core's reader (refused if anything is removed); values escaped (`& < > "`, `\t \n \r` as + references in attributes); XML-invalid code points and CR refused (`drawing.rs:41`); file + names built from stable view ids. +- `--check`: the tree fallback only for `review/app-*`, only with the declared rule, and only + when the committed file rebuilds from its tree byte for byte, the rule changes it and the + result equals the produced bytes; the committed file goes through the core reader's prescan + first. +- `--out`: `..` refused, final symbolic link refused (trailing slash handled), parent + canonicalised, seed refused by path and by (device, inode) of every seed folder, existing + destination identity-checked and must be empty, folders `create_dir`, files `create_new`, + components all `Normal`. The swap window between check and use stays as declared (§11.13). diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-7.md b/.claude/audits/2026-10-23-rust-r5-review-security-7.md new file mode 100644 index 00000000..6aec9f6f --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-7.md @@ -0,0 +1,88 @@ +# Security gate R5.4 (round 7): review files in Rust + +Branch `feature/rust-r5-pipeline-core`, HEAD `777c800`. Scope: `git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md` (26 files). Blind, complete scan. No prior verdict was read. + +``` +SECURITY — VERDICT: BLOCK(2) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 26 files +BLOCKING: + 1. [HIGH] resource-bound/output-amplification — crates/core/src/curation/draft/changelog.rs:68 (record_row), :116-119 (table built whole); crates/core/src/curation/markdown.rs:52-63 (table), :139-159 (bound checked after the raw rows exist); crates/core/src/curation/draft/pipeline.rs:247-252; docs/development/RUST.md:3206 — the CHANGELOG raw table (rows × authored rationale/title) is fully built, joined and split before MAX_TABLE_COLUMNS_TOTAL is checked, so the declared case "80 KB rationale over 14,000 records" still exhausts memory: a 1.9 MB changes.json aborts at a 3 GB address-space cap; RUST.md's "refused before any row is built" is false — hint: bound before render_changelog builds a row (project rows × widest authored cell per level from the records, or cap the raw length while table() accumulates), and pin it with a pipeline-level test (build + render of the declared case under a memory ceiling), not format_markdown on a hand-built table + 2. [HIGH] resource-bound/record-amplification — crates/core/src/curation/draft/ops.rs:197 (rename), :384 (remove); crates/core/src/curation/draft/records.rs:18-28 (out of diff, same pipeline) — every rename/remove record deep-copies the whole item (before and after) and every record clones the ChangeSummary (title, rationale, question); MAX_DOCUMENT_VALUES (200,000) bounds the document after an op, never the sum of the records: an 810 KB changes.json (one 5,000-child add, 400 renames back and forth) reaches 4.3 GB RSS at build, linear at ~10.7 MB per rename; ~1,400 renames exceed the 15 GB dev machine; R5.4's CHANGELOG then serialises each whole item again (compact_value) — hint: bound the records (total values or bytes recorded, checked as each record is pushed, refused with Guard) or record ids/paths and share the ChangeSummary (index or Rc) instead of cloning +REPORTED (non-blocking): + - [LOW] new lint relaxation `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 (integration tests only, same line as every existing test file; not a security-rule suppression) + - [LOW] pre-existing suppression `#![allow(clippy::disallowed_methods)]` — crates/core/src/bin/import_equine.rs:17 (the tool's declared I/O file, context) + - [LOW] error echo size — crates/core/src/curation/report_guard.rs:29-31 (UnsupportedMarkdown carries the whole refused line, multi-MB on stderr; authored content, no secret) + - [LOW] subfolder race — crates/core/src/bin/import_equine.rs:353-389 (write_exclusive re-checks the claimed root only, not the subfolders this run created; same-user swap, declared out of model in RUST.md §11.13; unchanged by this diff) +PROOF: semgrep 128 rules on 26 files → 0 findings; checklist 12 checks → 6 findings (2 HIGH, 4 LOW) +``` + +## Checklist detail + +| Check | Result | +|---|---| +| Hardcoded secret, token, key, credentialed URL | none in the added lines | +| SQL by concatenation | none (no SQL in the diff) | +| Unsanitized render (innerHTML, eval, raw) | none | +| Sensitive endpoint without authz | not applicable (offline CLI and pure core) | +| Stack trace or internal path to a user | none (CLI messages to the operator) | +| Secret or PII in a log | none; `println!` lines print file names and counts | +| Tracked `.env` or credential file | only `.env.example` tracked | +| guardrails `scan.py --domain api,supabase` | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the diff: dropped) | +| Anti-gaming (new suppressions) | two test-file lint allows, convention of all test files, LOW | +| Report structure forgery (sections, list items, code spans, links, HTML) | held, see below | +| SVG well-formedness and injection | held: serializer escapes `& < > "` and CR/TAB/LF in attributes, `first_unwritable` refuses non-XML-1.0 code points and CR, element and attribute names are fixed, no href or event attribute written | +| Resource bounds and file safety | 2 HIGH (above); quadratic scans and `--out`/`--check` held, see below | + +## Finding 1: CHANGELOG raw table amplified before its bound + +`render_changelog` builds one row per record, each carrying the change's title and rationale (`changelog.rs:89`, `:94`). `table()` joins every row, wraps it, and joins again. `format_report` then guards each line, and `align` splits every row into owned strings. Only after all of that does it compare `row_width × rows` with `MAX_TABLE_COLUMNS_TOTAL`. So the bound caps the padded copy only. The raw table, which already holds N × R bytes, gets built four to five times first. + +Measured with the full pipeline (`build_equine_draft` + `render_draft_artifacts` on the real legacy sources and the committed changeset, plus one appended change of `set` ops): + +| changes.json | rationale × set ops | Result | +|---|---|---| +| 545 KB | 20 KB × 3,000 | Guard refusal, peak 373 MB | +| 506 KB | 100 KB × 2,000 | Guard refusal, peak 1.19 GB | +| 1.04 MB | 400 KB × 4,000 | `memory allocation failed`, signal 6, at the 6 GB cap | +| 1.92 MB | 80 KB × 14,000 (the case RUST.md declares held) | `memory allocation failed`, signal 6, at the 3 GB cap | + +The 16 MiB read cap allows inputs of hundreds of GB of raw table. Without a ulimit the process grows until the OOM killer acts. The failure is fail-closed: `folders()` finishes before `claim_destination`, so nothing gets written. The impact is availability of the developer machine, and that includes `--check`. The test `an_aligned_table_past_the_bound_is_refused_before_it_is_built` calls `format_markdown` on a table it built by hand, so it cannot see the pipeline's allocation. + +## Finding 2: records deep-copy whole items + +`ChangeRecord` keeps a `ChangeSummary` clone plus deep copies of `before` and `after`, and for a rename or remove those copies are the whole item (`records.rs:18`). An `add` of a 5,000-child category followed by N renames that swap its id back and forth gives: + +| renames | build-only RSS | +|---|---| +| 0 | 56 MB | +| 100 | 1.13 GB | +| 200 | 2.20 GB | +| 400 | 4.34 GB (810 KB changes.json) | + +`MAX_DOCUMENT_VALUES` is checked on the document after each op, not on what the records accumulate. The cloning lines are R5.3 code, but they sit in a file of this diff (`ops.rs`, whose `apply_rename` the diff modifies), and the R5.4 renderers consume every record. The TypeScript had the same amplification but V8's heap limit stopped it with a clean error. The Rust process has no such ceiling. + +## What held + +Markdown guard. I ran a differential of `report_guard::format_report` (Rust) against Prettier 3.8.3 `format(…, parser: 'markdown')` with the repository options, on raw reports shaped like the generator's output: list items with title, rationale and question, CHANGELOG rows with `cell()` applied, bibliography and decision lines. Authored texts followed the same preconditions as the code (no backtick; no control character or wiki/liquid bracket in list items). Results: +- 201,000 random probes over the admitted alphabet plus adversarial tokens (`&`, `&#`, URL starts, `**`, `_`, `\`, brackets, wide and zero-width characters). 20,969 were admitted and 0 diverged. +- 960 targeted probes: reference-style links with a space, `[a]: b` mid-line, `1.`, `#`, `+`, `>` at a cell start, bare URLs with `_`, `)`, `&`, `x@y`, `**é**`, `a\|b` outside tables, `<3`, `<-`. 689 were admitted and 0 diverged. + +None of these forged a section, list item, code span, link or HTML. A newline in a list-item field is refused, and table cells turn newlines into spaces. The guard's scans stayed linear: 18 lines of 4 MB with 20,000 code spans each ran in 1.19 s. + +`--check` and `--out`: +- `compare_file` falls back on trees only for `review/app-*` with the declared rule. `compare_drawing` returns an error with no rule, requires the committed file to rebuild byte for byte from its tree, and requires the rule to change it. +- `inside_by_identity` now fails closed with an explicit error. +- Reads stay canonical-inside-seed, regular-file-only and capped at 16 MiB. +- Written names are `Component::Normal` only, and view ids are stable ids. +- Writes use `create_new`, and the existing destination is identity-checked against the seed. + +SVG: `drawing_text` refuses unwritable text, and the overlay and the app layer only emit fixed element and attribute names. Depth is bounded by the core reader's prescan before `first_difference` or `TriggerNames::apply` recurse. + +## Probes (scratchpad only, no tracked change, nothing deleted) + +- `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe/src/main.rs` (guard probe), `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe/src/bin/amp.rs` (pipeline memory probe; `BUILD_ONLY=1` stops after the build) +- `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/scripts/fuzz.py`, `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/scripts/targeted.py`, `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/scripts/prettier.mjs` +- `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/scripts/mkchg.py` (finding 1 inputs), `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/scripts/mkren.py` (finding 2 inputs) + +Memory probes ran under `ulimit -v` (3 to 6 GB). Cargo built into a scratchpad `CARGO_TARGET_DIR`. `git status` stayed clean at `777c800`. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-8.md b/.claude/audits/2026-10-23-rust-r5-review-security-8.md new file mode 100644 index 00000000..fb5ac9fd --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-8.md @@ -0,0 +1,148 @@ +# Security gate R5.4, round 8 (fresh): 2026-10-23 + +Scope: `git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md`, +HEAD 5880dfa, branch `feature/rust-r5-pipeline-core`. Mode: audit (REPORT path given; this file +is the only write). Blind run: no prior verdict or finding list read. + +``` +SECURITY — VERDICT: BLOCK(1) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 28 files +BLOCKING: + 1. [HIGH] resource-bound/records-checked-after-op — crates/core/src/curation/draft/apply.rs:140,145 (sites: apply.rs:66-96 mark_to_confirm, ops.rs:126-168 set_subtree, ops.rs:417-452 apply_cite, records.rs:61-76 Recorder::record) — the document-values and records-weight bounds only run after a whole op (and after the B/C marking); inside one op every record clones the change texts and the op value, once per item, so about 1 MB of changeset allocates GBs before any bound runs (measured: 711 KB → 1.37 GB RSS; 1.1 MB → abort at a 3 GB cap; 646 KB → 2.0 GB; 494 KB → 2.1 GB). RUST.md:3244-3245 says "tens of MB at most", which is false — hint: count the weight as each record is pushed (Recorder::record and mark_to_confirm), refuse before cloning; keep a per-op values budget for subtree writes (set/cite); or share ChangeSummary/Op (Arc) instead of cloning them; include CiteOp in record_weight; correct the RUST.md residual +REPORTED (non-blocking): + - [MEDIUM] resource-bound/review-drawings-per-view (declared residual, now measured) — crates/core/src/curation/draft/pipeline.rs:204-226 + - [LOW] record_weight ignores the op cloned into each record for cite/rename/remove/move — crates/core/src/curation/draft/records.rs:125-128 + - [LOW] TriggerNames::apply linear view search per trigger element (views × triggers, --check only) — crates/core/src/curation/draft/svg_compare.rs:36-50 + - [LOW] new test-file lint allows `#![allow(clippy::disallowed_methods, …)]`, test crates only, same convention as 20 earlier test files, not a security-scanner suppression — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 + - [LOW] pre-existing (context) `#![allow(clippy::disallowed_methods)]` in the CLI — crates/core/src/bin/import_equine.rs:17 +PROOF: semgrep 162 rules on 28 files → 0 findings; checklist 15 checks → 5 findings (1 HIGH, 1 MEDIUM, 3 LOW) + 1 pre-existing LOW +``` + +## Blocking finding 1: the records and values bounds run after the op + +What the code claims: `apply.rs` bounds the records at 16 Mi weight units, "checked after every +op, before the next one records anything". RUST.md §11.15 states the residual as "one op still +records up to about three copies of an item under the 200,000-value bound before the records +bound is checked (tens of MB at most)". + +What happens. `Recorder::record` (records.rs:61-76) clones `self.change` (title, rationale, +question, reference ids) and `self.op` (including a set's or an add's value) into every record. +`assert_depth` and `assert_recorded` (apply.rs:139-140) run only once `apply_op` returns, and +`mark_to_confirm` (apply.rs:66-96) is checked only after it has pushed one record per touched +item (apply.rs:145). One op that reaches N items therefore allocates about N × (author text or +value) before any bound runs. N is bounded only by the 200,000-value document cap; the size of +the text or value is bounded only by the 16 MiB read cap. + +Three paths, measured with a scratch probe built on `faunosteo-core` (`--features curation`, +the real legacy import, the committed changes and references, with one or two hostile changes +appended). Each run had `ulimit -v 3000000`: + +| Path | changes.json | Peak RSS | Outcome | +|---|---|---|---| +| level B `add` of a node with 10,000 children, rationale 128 KiB → `mark_to_confirm` pushes 10,001 records, each cloning the rationale | 711 KB | 1,372,972 KB | refused afterwards ("records weigh more") | +| same, rationale 512 KiB (about 5 GB needed) | 1.1 MB | 2,996,672 KB | `memory allocation of 524288 bytes failed`, SIGABRT | +| level A add of 10,000 children, then `set` `description` (64 KiB value) with `scope: subtree` → 10,000 writes plus 10,000 records holding the value twice | 646 KB | 2,027,252 KB | refused afterwards | +| add of 2,000 children, then `cite` 4,000 declared references with `scope: subtree` (references.json 150 KB) → 8 M values written before `assert_depth` | 344 KB | 2,112,620 KB | refused afterwards ("more than 200000 values") | + +The cost grows linearly in N × size, so a changeset of a few MB asks for tens to hundreds of +GB. The documented "tens of MB at most" is wrong, and the `mark_to_confirm` path is declared +nowhere. Impact is availability only: a hostile or careless `changes.json` run through +`pnpm r5:import-equine --check|--out`, or through the test suites, exhausts the memory of the +developer machine. The OOM killer may then take down other processes, such as the Docker +Supabase stack. No integrity or confidentiality impact. It is blocking because it breaks a +bound that both the code and the threat model of this gate require, and because the +documented residual misstates it. + +Fix direction: +- Enforce the budget at push time: route `mark_to_confirm` through the same accounting, and + make `Recorder::record` refuse once the running weight would pass the bound. +- Bound the per-op writes of subtree `set` and `cite` (items × value size, or a running values + budget) before writing. +- Alternatively, stop cloning: share `ChangeSummary` and `Op` across records (`Arc`), so a + record weighs only its own before and after. +- Count the cite op's `reference_ids` in `record_weight`. +- Correct RUST.md §11.15 and add a test per path (marking, subtree set, subtree cite) that + fails before any GB-scale allocation. + +Probe source: `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/sec8/probe/src/main.rs` +(modes `add <rationale bytes> <children>`, `value2 <value bytes> <children>`, +`cite <references> <children>`). + +## Reported findings + +MEDIUM, review drawings per view (declared in RUST.md §11.15, now measured). Each view of the +curated document yields `review/annotations-<view>.svg` and `review/app-<view>.svg`. Each file +holds a full copy of the cleaned drawing, and all files sit in memory before the CLI writes +them. Level A adds of a detail view plus its trigger: 500 views → 1,011 files, 138.8 MB, +176 MB RSS; 2,000 views → 4,011 files, 547 MB, 638 MB RSS. That is about 273 KB per view, so +about 1.3 GB at the records bound (about 4,800 views), consistent with the declared "about +2 GB" estimate. The multiplier is the drawing's size. The frozen `horse.svg` is 130 KB, but +the core reader admits up to 2 MiB, so a replaced drawing would scale the same views to about +19 GB. Not blocking because it is declared and the estimate holds. A view-count or output-bytes +bound would close it. + +LOW findings: +- `record_weight` counts the op only for `set` and `add` (records.rs:125-128), but every record + clones the op. A cite's `reference_ids` list is copied uncounted into each record, so the + weight under-counts by about a third on that path. +- `TriggerNames::apply` searches the view list linearly for every element carrying + `data-anno-opens-view` (views × triggers). This runs in `--check` only, on committed files, + in seconds at the bounds. +- The two new test files carry the crate's usual test allow (`disallowed_methods`, `unwrap`, + `expect`) for fixture reads. They are test crates only and do not suppress a security scanner. +- Context, outside the diff: `clippy.toml`'s `disallowed-methods` bans `fs::read`, + `fs::write`, `File::open|create` and `env::var`. It does not ban `OpenOptions::open`, + `fs::create_dir`, `fs::read_dir`, `fs::remove_*` or `fs::rename`, so "the core has no I/O" + rests on review for those. A grep of `crates/core/src/curation` finds no `std::fs`, + `std::env`, `std::process` or clock use today. + +## What was checked and held + +- Markdown guard, differential against Prettier 3.8.3: `report_guard::format_report` against + the repository's Prettier (`parser: markdown`, the repository options), on raw reports in the + generator's three line forms: the list item of `change_line`, the 8-column CHANGELOG row via + `cell()`, and the bibliography line. 16,395 cases (hand-picked cell-start and line constructs, + CJK, Hangul, Arabic with harakat, Devanagari and Thai marks, URLs with `_` and `&name=`, + `{{ }}`, wiki and strong forms, plus three seeded random sets). 4,696 were admitted. The only + 3 differences were wiki links opened in one list-item field and closed in another across code + spans. `format_report` was called directly there; in the pipeline, + `review_report::assert_single_line` refuses `[[`/`]]` in every list-item field first. Table + cells parse on their own and showed no difference. No silent difference is reachable in + this sample. +- Structure forging: line breaks never reach a line start. List-item fields refuse control + characters, and `cell()` maps `\n` to a space. `\\|` (an authored `\|` after escaping) is + refused. Code spans are limited to `[A-Za-z0-9_:/. -]`, authored backticks are refused, and + field segments are limited to `[A-Za-z0-9_-]`. Ids written by add and rename must be stable + ids at the op. +- SVG: hostile annotation and view names (`<a href>`, `&`, `A`, `]]>`, `<!-- -->`, + `<?pi?>`, quotes, U+0085, U+2028, NBSP, tab, newline) and a path `d` holding + `" onload="x` produce four well-formed drawings (xml.dom.minidom). The values stay data, + with no `onload` attribute and no `a` or `script` element. Non-XML characters and CR are + refused (`drawing_text`). The cleaned drawing goes through the core reader first: 2 MiB, + 20,000 elements, depth 64, DOCTYPE and ENTITY refused. `compare_drawing` parses the committed + file with the capped reader before roxmltree and requires a byte-exact rebuild. +- CLI file safety: `--check` passes at HEAD (legacy-import 6/0, draft 12/0, app-main declared). + `--out` refusals were run in a scratch folder: empty path, symlink, symlink with a trailing + `/`, non-empty folder, `..`, a destination through a symlink into the seed or into `draft/`, + a missing parent. A fresh folder gets 18 files, and a second run refuses "not empty". Writes + are `create_new`, folders are `create_dir` and components must be `Normal`. Reads are + canonical, confined to the seed, regular files only, capped at 16 MiB. Same-user TOCTOU is + declared. The working tree stayed clean. +- Quadratic scans: the guard is linear (the `&`, `<`, `[[` and URL scans work per segment). + `underscore_pairs_later` rescans only from the few authored plain parts. The renderers are + hashed. No input under the caps reached a measurable guard time (max 0 ms per case). +- Checklist: no hardcoded secret, token or auth URL in the diff or the oracles. No SQL built in + scope; `seed.rs` is unchanged since R5.3. No HTML render, endpoint, authz surface or logging + in scope. The CLI's error messages go to the local operator only. The only tracked env file + is `.env.example`; reading it was refused by the permission rules (rule: Bash `cat .env.example` + denied), it was not retried another way, and it is outside the diff. Guardrails scanner + (`--domain api,supabase`): 0 FAIL, 1 WARN, `SB-POLICY-NOT-OWNER` + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the diff and dropped + per the diff-scope rule, plus 1 MANUAL. +- Anti-gaming: no `nosemgrep`, `nosec`, `eslint-disable` or `unsafe` added. The only new allows + are the two test-file lint allows listed above. + +Semgrep note: the three packs carry few Rust rules (162 rules loaded on 28 files, 0 findings), +so semgrep alone says little about this diff. The verdict rests on the checklist and the +probes. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security-9.md b/.claude/audits/2026-10-23-rust-r5-review-security-9.md new file mode 100644 index 00000000..19824402 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security-9.md @@ -0,0 +1,88 @@ +SECURITY — VERDICT: BLOCK(1) +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 29 files (`git diff c6e0d85..HEAD -- crates/core packages/anatomy/tests docs/development/RUST.md`, HEAD 8bdb079) +BLOCKING: + 1. [HIGH] resource-bound / records weight undercount — crates/core/src/curation/draft/records.rs:176-177 (`parts_weight`) — `change.reference_ids` costs 1 unit per byte, but every record clones the whole `ChangeSummary`, and each 1-char id clone takes about 56 bytes (24-byte String header plus the smallest malloc chunk). The 16 Mi-unit bound therefore lets roughly 0.9 GB of cloned ids through before it trips. — hint: charge each id at 64 + len, as `op_weight` already does for `Cite`, or stop cloning the summary into every record (share it, or index the change) +REPORTED (non-blocking): + - [MEDIUM] resource-bound / parse amplification (pre-existing R5.3 code, outside the diff) — crates/core/src/curation/draft/schema.rs:405-412 (`parse_changeset`: Value tree, `value.clone()`, typed value, `assert_same_shape` serialising it back), plus the Change clones in pipeline.rs:147-159 + - [MEDIUM] guardrails SB-POLICY-NOT-OWNER (outside the diff) — supabase/migrations/20261008110000_anatomical_sheets.sql:1177 + - [LOW] new lint allowance (clippy, not a security suppression; same convention as the 20 existing integration test files) — crates/core/tests/curation_markdown.rs:6, crates/core/tests/curation_review.rs:6 +PROOF: semgrep 162 rules on 29 files → 0 findings; checklist 8 checks → 4 findings (1 HIGH, 2 MEDIUM, 1 LOW) + +## Detail + +### 1. [HIGH] The records bound does not bound memory for change reference ids + +The bound comes from R5.4 (`records::charge`, `MAX_RECORDED_WEIGHT` = 16 Mi units). It is +documented (records.rs:36-41, RUST.md §11.14) as keeping the records, and the reports built +from them, small. `parts_weight` adds `change.reference_ids` as the sum of their byte lengths. +Each record clones the change's summary, so it clones the whole id vector too. Duplicate ids +are accepted (`non_empty_strings` does no dedup), and one declared 1-char reference id is enough. + +Measured with a scratch harness that runs `build_equine_draft` + `render_draft_artifacts` on +the seed's legacy sources and frozen drawing (read-only), a crafted `changes.json`, and +`references.json` plus one reference `r`. One level A change with `reference_ids` = `["r"] × N` +and M `set` ops on one finding (`/usr/bin/time -f %M`): + +| changes.json | N | M | outcome | peak RSS | +|---|---|---|---|---| +| equine (committed) | — | — | 11 files written | 17.8 MB | +| 1.0 MB | 200,000 | 100 | refused at op 83 by the records bound | 948 MB | +| 2.0 MB | 400,000 | 60 | refused at op 41 by the records bound | 971 MB | +| 8.0 MB | 2,000,000 | 8 | draft built, refused at the table bound | 1.30 GB | +| 16.4 MB (under the 16 MiB cap) | 4,100,000 | 4 | draft built, refused at the table bound | 1.67 GB | + +The bound trips only after about 0.9 GB is already allocated: a 1 MB input reaches 948 MB. +That breaks the brief's criterion (peak memory well below the GB range for any input under +the 16 MiB caps), and it breaks the R5.4 claim that the records bound keeps the reports' +inputs small. Other record parts are charged closely enough: JSON values cost 64 units for +roughly 32 to 110 bytes, string bytes cost 1 unit for 1 byte. + +Fix direction: charge 64 + len per change reference id, or keep a single copy of each +change's summary and stop cloning it into every record. Add a test with a duplicated +reference-id vector next to `the_records_bound_holds_inside_one_op_and_the_marking`. + +### 2. [MEDIUM] Parse-phase amplification (outside the diff) + +`parse_changeset` on the 16.4 MB / 4.1 M-id file peaks at 1.075 GB by itself (scratch +`parseonly` binary). That is about 65 times the input: the parsed Value tree, a clone of it +passed to `from_value`, the typed value, and `assert_same_shape` serialising the typed value +back. After parsing, `build_equine_draft` clones the changes again, `apply_change` builds a +summary, and `DraftResult.changes` holds more summaries, each about 230 MB for that input. +This code is R5.3 and does not appear in c6e0d85..HEAD, so it is reported, not blocking. +It falls under the same "any input under the 16 MiB caps" criterion and is worth handling +in the same fix (avoid the clone before `from_value`; compare shapes without re-serialising +everything). + +### Checked with no finding + +- `--out` / `--check` file safety (import_equine.rs), by reading: refuses an empty path or + `..`; the parent is canonicalised; a destination inside the seed is refused by prefix and by + (dev, inode) of every seed folder; a symlinked or non-empty destination is refused; writes + use `create_dir` + `create_new`, never overwrite, never delete; generated names must be + plain `Normal` components (an absolute path or `..` is refused); reads are canonicalised + into the seed, regular files only, 16 MiB cap; `--check` never lists through a link. The + TOCTOU on a single-user machine is the declared residual (RUST.md §11.13). +- Markdown structure and parity: the scratch differential fuzz of `format_report` against + Prettier 3.8.3 (repo options) ran 33,000 random reports built from admitted and + construct-prone tokens in list items, bibliography lines and table cells. 8,146 were + admitted, 0 differed. Hand-written constructs (`[a] (b)`, `{{ }}`, `[[a]]`, `<`, `|`, + `\"`, `\|`, setext and list markers mid-line) gave no difference. Every authored field is + mid-line behind a generated prefix; line breaks and controls are refused in list items and + turned into spaces in cells as the TypeScript did; code spans only carry stable ids, + targets and field segments limited to `[A-Za-z0-9_-]`. +- Table alignment: every Alphabetic or Numeric code point from U+00A0 to U+3FFFF in a cell + (149,044) is aligned as Prettier aligns it, or refused (emoji candidates, `UnsupportedWidth`). +- SVG well-formedness: attributes and text are escaped (`& < > "`, `\t \n \r` as references), + XML-invalid code points and CR are refused before writing (`drawing::first_unwritable`), + element names come from the reader's allowlist or are constants, and ids are stable ids. +- Existing suites: `cargo test -p faunosteo-core --features curation --release --test + curation_review --test curation_markdown --test curation_draft` → 30 passed. +- Secrets, SQL concatenation, eval/innerHTML, sensitive logging, tracked `.env`: none in the + diff (the only `println!` added prints a generated file name; `.env.example` is the + placeholder file). + +### Not covered by this run + +I did not finish the bound analysis of the review drawings' markers and labels +(`overlay.rs`, `app_review.rs` through the R3 layer). Nothing is concluded about them here. diff --git a/.claude/audits/2026-10-23-rust-r5-review-security.md b/.claude/audits/2026-10-23-rust-r5-review-security.md new file mode 100644 index 00000000..d1b9c908 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-security.md @@ -0,0 +1,231 @@ +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 25 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] check/declared-tree-rule-too-wide — crates/core/src/curation/draft/svg_compare.rs:104 + - [LOW] check/unchecked-xml-characters — crates/core/src/curation/draft/app_review.rs:33 + - [LOW] check/markdown-structure-injection — crates/core/src/curation/draft/review_report.rs:64 + - [LOW] check/quadratic-renderers — crates/core/src/curation/draft/review_report.rs:223 + - [LOW] anti-gaming/test-clippy-allow (context) — crates/core/tests/curation_review.rs:6 +PROOF: semgrep 162 rules on 25 files → 0 findings; checklist 8 checks + anti-gaming + 5 brief probes → 5 findings +``` + +# R5.4 security gate (fresh), 2026-10-23 + +Repository `/home/bchanot/Documents/faunosteo`, branch `feature/rust-r5-pipeline-core`, HEAD +`0a79c52`, scope `git diff c6e0d85..HEAD` (25 existing files). Every changed product file was +read whole: `crates/core/src/curation/draft/{labels,changelog,review_report,drawing,overlay, +app_review,svg_compare,pipeline,stats,ops,mod}.rs`, `crates/core/src/bin/import_equine.rs`, +plus `crates/core/src/curation/markdown.rs`, `anatomy/svg/{serialize,tree}.rs` and +`anatomy/compose.rs` where the new code relies on them. + +## Method + +- semgrep 1.168.0 (`EIO_BACKEND=posix`), `--config p/security-audit --config p/secrets + --config p/owasp-top-ten --metrics=off --quiet --json` on the 25 files: 162 rules, 0 + results, 0 errors. These packs cover Rust thinly, so the manual review carries the weight. +- Checklist (CLAUDE.md defaults): secrets, SQL concatenation, unsanitized render, authz, + error exposure, secrets in logs, tracked `.env`, guardrails scanner + (`python3 -B ~/.claude/skills/guardrails/scripts/scan.py <root> --domain api,supabase`: + 0 FAIL, 1 WARN, 1 MANUAL; the WARN `SB-POLICY-NOT-OWNER` is in + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, outside the delta, so it + is not reported here). +- Anti-gaming: the diff was scanned for new suppressions. +- Probes, all in the scratchpad: a throwaway crate linking `faunosteo-core` (feature + `curation`) at + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/probe.DaWdIB`, + and `import-equine` built with `CARGO_TARGET_DIR` in the scratchpad. `--check` ran + read-only on the repository. `--out` ran only inside the fresh + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/9b0edf59-ccd2-4662-b90c-e473dd78028e/scratchpad/out.6SamF5`. + Nothing was deleted, and `git status` stayed clean. + +## Findings + +### 1. [MEDIUM] The tree fallback hides more than the declared trigger-name rule + +`crates/core/src/curation/draft/svg_compare.rs:104-123` (`compare_drawing`), used by +`crates/core/src/bin/import_equine.rs:196-215` for `review/app-*.svg`. + +When the bytes differ, both files are parsed with `parse_svg`. That function builds the tree +of the root element only, and it keeps only elements and text +(`anatomy/svg/tree.rs:155, 182-193`). Everything the tree does not carry is therefore never +compared: + +- the prolog: XML declaration and its `encoding`, processing instructions, comments; +- comments and processing instructions inside the root and after it; +- entity and character-reference forms, CDATA against escaped text, attribute quoting, + `<g/>` against `<g></g>`; +- attribute-value whitespace that the parser normalises. + +Measured on the real committed `draft/review/app-main.svg` against the produced one, with +the rule applied: + +| Committed file changed by | `compare_drawing` | +|---|---| +| nothing | `Ok(TreeAfterRule)` | +| `<?xml-stylesheet type="text/css" href="https://attacker.invalid/hide.css"?>` and a comment in the prolog, a comment and a PI right after `<svg …>`, a trailing comment | `Ok(TreeAfterRule)` | +| also `encoding="UTF-8"` replaced by `encoding="ISO-8859-1"` | `Ok(TreeAfterRule)` | + +In all three cases `--check` prints the same `declared: review/app-main.svg (trees equal +under the R3 trigger-name rule)` line it prints today and exits 0. The same holds for +`app-head.svg`, which is byte-identical today: a comment-only change would turn it into a +"declared" file. The only visible sign would be the extra line. + +Impact: the owner requirement "`--check` fails on any unauthorised difference" is not met +for the two application drawings. A stylesheet processing instruction is honoured by +browsers that open a standalone SVG: it could restyle or hide markers in the review drawing +and fetch an external URL, and `--check` would still pass. Exploiting it needs write access +to the repository. The files are dev review artifacts: the app, the bundle and the uploads +never read them (grep of `apps/app`, `vite`, `packages/supabase`). Hence MEDIUM, not +blocking. + +Three declarations are materially wrong: +- `svg_compare.rs:7` says "Any other difference is reported". +- `import_equine.rs:185-186` and the printed "declared" line suggest the rule alone explains + the difference. +- RUST.md §11.15 says the comparison "accepts exactly the trigger-name rule and nothing + else". §11.13's R5.4 condition did mention "declaration, prefixes and whitespace + declared", but §11.15 does not carry that through, and it never covered processing + instructions or comments. + +Fix direction: once the rule has been applied to the committed tree, require the committed +prolog to be byte-equal to the produced one. Then require +`prolog + serialize(committed tree after rule)` to equal the produced text byte for byte. +The core serializer writes the produced file, and `app-head.svg` already matches it byte for +byte. At minimum: compare the prologs and the text after the root, refuse any comment or PI +node in the committed document, and print "declared" only when the rule actually changed +the committed tree. Then correct the three declarations. + +### 2. [LOW] XML-invalid characters from authored strings reach the review drawings unchecked + +`crates/core/src/curation/draft/app_review.rs:33-36` calls `render_layer` directly. The R3 +composition passes the layer through `checked` / `xml_safe` (`anatomy/compose.rs:221-236`, +"refuse one XML cannot carry"), and this path skips that step. The same gap exists in +`overlay.rs:194-198` (path `d`, ids in titles and labels). + +Measured: a changeset that sets `annotation:hock` `name` to `{"fr":"Jarret\u0001<b>&","en":"Hock\u000b"}` +is accepted, and the produced `review/app-main.svg` is not well-formed (roxmltree: "a +non-XML character '\u{1}'"). A path geometry `d` holding U+0001 in an overlay gives the same +result. This is not markup injection: the serializer escaping holds (see "Verified"). It is +a malformed output written by `--out` without any refusal. `--check` then fails, closed. + +Fix direction: run `is_xml_text` over the produced layer and overlay (reuse compose's +`checked`) and refuse. This changes nothing on the committed data. + +### 3. [LOW] Markdown structure injection from authored text + +- `review_report.rs:64-85` (`change_line`: `title.fr`, `rationale`, `question` written raw + in list items); +- `review_report.rs:295-320` (questions); +- `review_report.rs:245-278` (`citation`, `url`, `doi`); +- `changelog.rs:80, 85` (table cells through `markdown.rs:43-49` `cell()`). `cell()` escapes + `|` and `\n`, but not `\r`, and not a backslash in front of a pipe. + +Measured with an added change: +- a rationale `"Ligne un.\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte. <img …>"` + forges a second section 10 inside section 6 of `REVIEW-REPORT.md` (lines 92 and 343) and + passes raw HTML through; +- a `\r` in a title reaches `CHANGELOG.md` raw. GFM treats a CR as a line ending, so the + table row breaks; +- an authored `\|` becomes `\\|`. `format_markdown` and micromark both read that as an + escaped backslash followed by a real delimiter, so the row gains a ninth column under an + eight-column header. + +Context: the text comes from the repository owner, and the code matches the TypeScript +(`markdown.ts`). The current data holds none of this: no LF, CR, pipe or backtick in any +title, rationale or question. The one `<0697:toih>` in a DOI and its URL renders as text, +because a scheme cannot start with a digit. Gitea strips raw HTML. The code spans hold only +constrained strings: `CHG-\d{3,}`, stable ids, resolved targets and allowlisted fields. +§11.11's "Markdown risks" are about Prettier differences, so this risk is not declared +anywhere. + +Fix direction: refuse CR, LF and control characters in single-line authored fields at +`parse_changeset` and `parse_references` (title, question, citation, doi). Either refuse +them in the rationale too, or render newlines as spaces in list items. Escape `\` in front of +`|` in `cell()`. Optionally escape `<`. + +### 4. [LOW] Quadratic renderers on authored volume + +- `review_report.rs:223-234` `citation_count` rebuilds `all_findings(document)`, one + allocated `FindingEntry` per finding, for every reference: O(R × F). +- `overlay.rs:87-143`: linear `find` over `previous` and `kept.contains`, O(A²) per view. +- `review_report.rs:47-54` `subjects`: changes × records. + +Measured with `render_review_report` on synthetic documents: + +| References | Leaves | Time | +|---|---|---| +| 1,000 | 1,000 | 0.35 s | +| 4,000 | 4,000 | 5.9 s | +| 8,000 | 8,000 | 22.6 s | + +Extrapolated, not measured: about 3 to 4 minutes for a balanced document at the 200,000-value +bound. The equine data (48 references, about 600 findings) renders in milliseconds: +`--check` takes 0.13 s wall time and 18 MB RSS. This is the same class as the declared +"minutes for a 16 MiB changeset" risk (§11.13), but these renderers are not declared. + +Fix direction: count citations in one pass into a `HashMap<&str, usize>`, index `previous` +and `kept` with a `HashMap` / `HashSet`, and group records by change id once. + +### 5. [LOW, context] New clippy allow in a test crate + +`crates/core/tests/curation_review.rs:6` +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. This is an +integration test, outside the library, with the same header as all 33 files of +`crates/core/tests`. It is a lint allow, not a security-scanner suppression. No new +`nosemgrep`, `nosec`, `eslint-disable`, `ts-ignore` or `noqa` appears in the diff. Not +blocking. + +## Verified, no finding + +- SVG markup injection: element and attribute names are literals. Values go through the + core serializer, which escapes `& < > "` and `\t \n \r` in attributes and `& < > \r` in + text. Probe: an annotation name `J"><script>alert(1)</script>&`, an English name + `]]><!--x-->`, a view name `T` and an overlay path + `d="M0 0…\"/>"`. The output is well-formed (apart from finding 2's + control character), with 0 `script` elements and every payload escaped. +- File names built from view ids: views are `stable_id` (`[a-z0-9][a-z0-9_-]{0,63}`), + enforced by the typed parse in `pipeline.rs:206` before any write. `write_exclusive` + also refuses any component that is not `Normal`. The `--check` reads stay canonical + inside the seed. +- Panics on authored input: `compact_value` slices only past 120 UTF-16 units and decodes + lossily. The prolog slice ends at roxmltree's root start (`<`, a char boundary). + `style()[0]` is a static slice. Polygon centroid: at least 3 points (typed), NaN otherwise, + never a panic. No `unwrap`, `expect` or unchecked index on data in the product files. + Recursion in `first_difference` and `TriggerNames::apply` is bounded by the reader's + depth cap (64). +- `--check` is read-only: no file in `legacy-import/` or `draft/` changed and `git status` + stayed clean. Output: `legacy-import: 6 files, 0 differences`, `draft: declared: + review/app-main.svg …`, `draft: 12 files, 0 differences`. A file that is missing, not + produced or not UTF-8 fails. A generated folder must canonicalise to the seed's child. + Files other than `review/app-*` have no rule and must be byte-equal. `horse.svg` is + compared with itself, but its sha256 drives `assets.json`, `document.json` and the seed + SQL, so a change to it fails the check. +- `--out`, probed in the mktemp folder: + - refused, nothing written: a non-empty folder, a symbolic link (with and without a + trailing `/`), a file, `x/../fresh`, a missing parent, an empty path; + - written: a fresh relative path through `INIT_CWD` (18 files), and a fresh folder under a + parent link inside the scratchpad (the parent is resolved as documented); + - refused: a second run on the same destination ("not empty"); + - `diff -r` against the seed: `legacy-import` identical, `draft` identical except + `review/app-main.svg`, the declared trigger names. +- R5.3 carry-overs: a seed walk that fails is now an error, and the claim refuses ("the + seed folder cannot be read"). An existing destination folder is identity-checked + (device, inode) against every folder of the seed. Checked by reading only: a second + mount path needs a bind mount (root), and a symlink to the repository was not used, + because the brief forbids `--out` into the repository. +- `ops.rs` cite: the `HashSet` keeps `before.includes(id)` semantics (string equality only). +- No secret, token, auth URL or private key in the diff (the `.claude` audit texts only cite + the semgrep command). No SQL is built in the diff. stdout and stderr carry paths, counts + and refusals only. The only tracked env file is `.env.example`. + +## Residual risks already declared (RUST.md §11.13, §11.15) + +Checked and accurate, apart from the §11.15 sentence corrected by finding 1: +- the emoji refusal of the alignment; +- the single-user TOCTOU of `--out`, mitigated by `create_new`; +- records memory and the bound-walk time; +- the frozen `horse.svg`. diff --git a/.claude/audits/2026-10-23-rust-r5-review-verify.md b/.claude/audits/2026-10-23-rust-r5-review-verify.md new file mode 100644 index 00000000..9837d7bd --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-review-verify.md @@ -0,0 +1,101 @@ +# Verification: Rust R5.4 review files (2026-10-23) + +Contract `.claude/tasks/contracts/2026-10-23-rust-r5-review.md`. Fresh verifier, report-only (persisted by the orchestrator). + +## Round 1 on 0a79c52: verifier ECARTS(2), security PASS (1 MEDIUM, 4 LOW) + +- Verifier: C1, C4 to C9 MET (30 tests, `--check` 0/12 + 1 declared, `--out` ×2 identical, anatomy 143, floor clean; 140 targeted + 10,500 random changesets). C2 NOT MET: `format_markdown` reproduces only Prettier's table alignment; authored Markdown syntax or whitespace (`*`, `_`, double spaces, tabs, line breaks in list items, stray backticks, `\|`) is rewritten by Prettier and not by the port (931 accepted / 909 differing in formatted Markdown on a special-character alphabet, 0 on a safe alphabet); a row with an extra cell lost a cell silently. C3 NOT MET: a CR in a label gives an undeclared tree difference (xmldom raw CR vs core ` `). Notes: emoji refusal set wider than emoji; tree fallback ignores prolog/comments/PIs; stale test comment; quadratic renderers. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security.md`): MEDIUM tree fallback too wide (stylesheet PI, comments, encoding change accepted as "declared"); LOW XML-invalid characters reach the drawings unchecked; LOW Markdown structure injection (rationale forging a section, CR, `\|`); LOW quadratic renderers; LOW test allow (context). +- Fixed: Markdown guard (`UnsupportedMarkdown`) built from a TypeScript sweep `oracles/r5/markdown-sweep.json` (220 probes: 187 identical, 33 refused, 0 silent; equine-safe probes never refused; `**strong**` spans kept as the import report needs), single-line check of list-item fields, table cell-count check; strict drawing comparison (committed file must rebuild from its tree, rule must change it, produced equals rebuilt-after-rule byte for byte; attack test); drawings refuse XML-invalid characters and CR; renderers indexed; stale comment; docs §11.14-11.15 (guard rules, declared table, emoji breadth, residual risks). + +## Round 2 + +Fresh verifier and security on the fixed commit: below. + +## Round 2 on 68dec25: verifier ECARTS(2), security PASS (3 MEDIUM, 2 LOW) + +- Verifier: C1, C3 to C6, C8, C9 MET. C2: silent Prettier rewrites the guard missed (inline link destinations and titles, autolinks with an entity, `[[ a ]]`, character references decoding to `*`/`_`), shown end to end on the equine pipeline with one appended change; §11.15 sentence on links wrong. C7: `markdown-sweep.json` not excepted by the contract. Differential: 2,430 targeted + 4,500 random cases, 0 raw-text or drawing differences. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-2.md`): MEDIUM ids with line breaks (added then removed, renamed, nested, field segments) forging report sections through code spans, raw CR in code spans; MEDIUM uncapped roxmltree parse of the committed drawing before the prescan (stack overflow at depth 100,000); MEDIUM `中_中` / `[a]( x )` silent and §11.14-11.15 overstated; LOW Infinity printed `null`; LOW test allows (context). +- Fixed: construct rules (`](`, `][`, padded `[[ ]]`, autolinks, character references) from new sweep probes; underscore rule ASCII-only (the sweep showed `é_é` rewritten too); CR/TAB refused anywhere in a line; ids validated at the op (add, nested, rename) and field segments without control characters or backticks; core reader before roxmltree in the comparison; `Infinity`; contract clarification for the second oracle; docs (counts 247/187/60, declared rows, §11.15). Tests: forged ids, field segments, 100,000-level drawing. + +## Round 3 + +Fresh verifier and security on the fixed commit: below. + +## Round 3 on 077d91b: verifier ECARTS(2), security BLOCK(2) + +- Verifier: C1, C3 to C8 MET; C2: 57 synthetic + 5 equine end-to-end silent cases (37,510 + 20 probed): touching strong pairs `**a****b**`, bare URLs next to strong spans; C9: §11.14/11.15 claims contradicted, line and test counts, NUL exemption. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-3.md`) BLOCK(2): HIGH strong-span model (whitespace-only, backslash before a delimiter, touching pairs, underscore next to a delimiter), HIGH underscore glued to a bare URL; LOW NUL mid-segment, LOW trailing space latent, LOW test allows. +- Root change: the denylist leaked every round → allowlist guard `curation/report_guard.rs` (`format_report`, the draft's two reports only; the import report keeps `format_markdown`): letters, digits, single spaces, a fixed punctuation set, ASCII intraword `_` not glued to a URL, `\"` and `\|`, `**word**` between spaces, no construct; everything else refused. Sweep regrown: 762 probes incl. the new families, a label alone (cell start) and 400 seeded random strings, digests only: 304 identical, 458 refused, 0 silent. NUL refused anywhere in a field segment; misplaced comment fixed; docs rewritten as an empirical guarantee. + +## Round 4 + +Fresh verifier and security on the fixed commit: below. + +## Round 4 on 6d4fdd6: security BLOCK(3) (verifier pending at fix time) + +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-4.md`): HIGH non-terminated / long character references (`* b` → `\*`, `< x &` → `< x <`), HIGH image references `![…]` (alt reprinted decoded), HIGH nested padded wiki links (`[[ a [[b]]`); MEDIUM §11.14/§11.15 overstated ("unknown form refused by default", "refused whole", "found none"); LOW quadratic underscore check. Control: 3,000 random strings without `&`, `![`, `[[`: 0 silent. +- Fixed: `&` admitted only before a space or as a URL query separator `&name=` (name not a legacy-reference prefix, the 106 HTML legacy names); `![` refused; padded `[[`/`]]` refused when the matching half exists; URL checks without allocation; sweep 782 probes (new families, random alphabet with `&#`, `&`, `<`, `![`, `[[`, `]]`): 279 identical, 503 refused, 0 silent; docs restated exactly. +- Verifier round 4 (on 6d4fdd6, arrived after the security fixes): C2 cross-code-span families: a plain `_` paired by remark with a closing `_` in a later code span (`to_do … \`ref_\``, `a_b \`c_\``; reachable without authored backticks through a reference id `ref_`), a link bracket and a bare URL running into an authored code span; C9 docs (code spans "generated", "refused by default"); floor `.skip(1)` hit in a test. 555,646 Prettier context docs: all pairs and triples of admitted characters 0 silent; 1,080 silent with authored code spans. +- Fixed: authored backticks refused in every authored field (`report_guard::assert_authored`, CHANGELOG cells and review list items); a plain `_` followed by a closing `_` in a later code span refused (the equine `{"min_x":…,"min_y":…}` stays admitted); sweep: reference `probe_ref`, three probes citing `probe_ref_`, five cross-span probes: 790 probes, 279 identical, 511 refused, 0 silent; floor hit rewritten (`match_indices`); CLAUDE.md folder line; docs and module header restated. + +## Round 5 + +Fresh verifier and security on the fixed commit: below. + +## Round 5 on 1b12d90: verifier ECARTS(2), security PASS (2 MEDIUM, 3 LOW) + +- Verifier: C1, C3 to C8 MET. C2: 59 silent of 306,192 probes, all one class: a wiki link opened in one list-item field and closed in another of the same line (code spans between). C9: draft line count (4,376, gain 1,468), report_guard.rs line count, wiki rule wording. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-5.md`): MEDIUM F2 the same wiki link across fields; MEDIUM F1 an authored field segment (`name.x]`) inside a generated code span closing an author's `[`; LOW docs "code spans are the generator's alone" wrong (segments are authored); LOW quadratic `in_url_token` and padded-wiki scans; LOW test allows (context). +- Fixed: field segments limited to `[A-Za-z0-9_-]` at the op (declared refusal; TypeScript accepted any); code spans admit only the generator alphabet `[A-Za-z0-9_:/. -]`; list-item fields refuse `[[`, `]]`, `{%`, `%}` whole; plain parts refuse `{%`/`%}`; URL-token membership in one pass, padded wiki through one find/rfind; sweep 798 probes (eight cross-field construct pairs): 268 identical, 530 refused, 0 silent; segment refusal test with its reason; docs counts (draft 4,385, gain 1,477, report_guard.rs 258) and rules restated. + +## Round 6 on aeb5050: verifier C1 to C8 MET (C9 unverifiable: gates run in parallel; 8 FLOOR lines = keywords quoted in audit prose), security PASS (1 MEDIUM, 6 LOW); `pnpm check:all` green 14:02:00 + +- Verifier: 0 silent over 100,000 guard probes × 3 contexts, 45,000 cross-field pairs (28 guard-level, all stopped first by `assert_single_line`), 32,000 end-to-end changesets TS vs Rust, 148,921 letter/digit code points in a cell. Observations: stale `draft/mod.rs` header; RUST.md: `format_markdown` gained the cell-count refusal (import report too), "combining marks" wording (alphabetic marks pass, aligned alike); declared emoji case skipped its review report and drawings; TODO R5.4a cites `format_markdown`. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-6.md`): MEDIUM CHANGELOG table amplification (rows × widest cell: +155 KB changeset → 1.09 GB, 2.2 GB RSS; TypeScript alike); LOW per-view drawings bounded only by the value bound (≈2 GB estimate); LOW `underscore_pairs_later` O(parts × length) in isolation, unreachable (≤2 authored parts per line); LOW invisible Hangul fillers admitted (Prettier keeps them); LOW unpadded `[[x]]` in a cell by design; LOW test allows (convention). +- Fixed: aligned table bounded at 32 Mi display columns before any row is built (`Guard`, test `an_aligned_table_past_the_bound_is_refused_before_it_is_built`; equine widest ≈0.5 MB), declared in §11.14; residual risks (drawings bound, Hangul fillers) in §11.15; `draft/mod.rs` header; RUST.md wording (format_markdown shared refusals, alphabetic marks); declared emoji case now holds its review report (same text or declared refusal) and drawings; TODO R5.4a. + +## Round 7 on 777c800: security BLOCK(2) (verifier pending at fix time); `pnpm check:all` green 14:43:14 + +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-7.md`): HIGH output amplification: the CHANGELOG raw table (rows × authored rationale) built whole before the round-6 bound (1.9 MB changes.json aborts at 3 GB), RUST.md "refused before any row is built" false; HIGH record amplification: rename/remove records deep-copy the whole item and clone the change texts, no total bound (400 renames of a 5,000-child item → 4.3 GB). LOW test allows, bin allow (context), error echo size, subfolder race (declared out of model). +- Fixed: records bounded in total (`apply::MAX_RECORDED_WEIGHT` 16 Mi units, `records::record_weight`, checked after every op; equine 1,084,422), test `the_records_cannot_outgrow_their_bound`; CHANGELOG tables projected from their cells before the raw table is joined (`markdown::assert_table_bound`), pipeline-level test `a_changelog_whose_alignment_would_explode_is_refused_before_it_is_built`; RUST.md rows rewritten exactly, residual risk (one op's copies before the check). + +## Round 8 on 5880dfa: security BLOCK(1) (verifier pending at fix time); `pnpm check:all` green 15:02:04 + +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-8.md`): HIGH records bound checked only after a whole op and after the B/C marking: one op records once per item, each record cloning the change texts and the op value (B add of 10,000 children + 128 KiB rationale → 1.37 GB; subtree set 64 KiB → 2.0 GB; subtree cite 4,000 refs → 2.1 GB); RUST.md "tens of MB at most" false. MEDIUM review drawings per view (≈273 KB each view, 2,000 views → 547 MB). LOW `record_weight` ignored the op for cite/rename/remove/move; LOW `TriggerNames::apply` linear view search; LOW test allows, bin allow (context). +- Fixed: the records weight charged at each record before the change and the op are cloned (`records::charge`, `RecordParts`; `Recorder::record` and `mark_to_confirm` return the refusal; op weight for every kind; equine 1,195,000), test `the_records_bound_holds_inside_one_op_and_the_marking`; document bound test from a padded baseline (the records bound now stops a growing changeset first); review drawings projected and bounded at 64 MiB before rendering (`pipeline::MAX_REVIEW_DRAWINGS_BYTES`), test `review_drawings_past_their_bound_are_refused_before_rendering`; RUST.md rows and residual risks rewritten exactly. + +## Round 9 on 8bdb079: security BLOCK(1) (verifier pending at fix time); `pnpm check:all` green 15:24:59 + +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-9.md`): HIGH records weight undercount: the change's reference ids at one unit per byte while each cloned id costs ≈56 bytes (200,000 one-character ids × 100 set ops: 948 MB before the bound; 16.4 MB file: 1.67 GB). MEDIUM `parse_changeset` ≈65× the input (1.075 GB at 16.4 MB; R5.3, outside the diff); MEDIUM guardrails WARN in a migration outside the diff; LOW test allows. Not covered: markers and labels bound of the drawings. +- Fixed: every cloned string (texts, ids, op strings, object keys) weighs 64 + its bytes (`records::text_weight`; equine 1,965,944, bound 8.5× above); ids case added to `the_records_bound_holds_inside_one_op_and_the_marking`; parse amplification declared in §11.15 (owner decision on a lower input cap); RUST.md row updated. + +## Round 10 on 29eb499: verifier C1 to C8 MET, C9 NOT-MET (stale counts) + 10 FLOOR (audit prose), security BLOCK(1); `pnpm check:all` green 15:38:01 + +- Verifier: 47,470 TS-vs-Rust Markdown cases 0 silent (the unguarded aligner gave 34 on the same inputs), 117 SVG label cases bytes or declared rule. C9: RUST.md counts stale (review tests 9 → 10, suites, draft lines 4,385 → 4,532) and the `report_guard.rs` header ("anything but CR or tab" inside code spans). Info: "`<` before a letter" means an ASCII letter; number cells 24 bytes where a JS number prints 25. +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-10.md`): HIGH the drawings bound counted the cleaned drawing only: an unnamed trigger copies the opened view's names four times (485 KB changeset → 131 MB `app-main.svg`; 1.2 MB → abort at 3 GB). LOW tables bound per table (three level tables ≈97 MB together); LOW stale `report_guard.rs` header; LOW add/move position anchor not charged; LOW test allows. +- Fixed: drawings projected as an upper bound per annotation (`pipeline::review_drawings_bytes`: 1,024 + 24 × (JSON text + longest view name) per annotation of the view, overlay's two documents and the app drawing; equine 1,390,428), test `unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering`; CHANGELOG tables bound summed over the three level tables (`assert_table_bound` with a running total), number cells 25; position anchor charged (equine records 1,966,163); `report_guard.rs` header; RUST.md counts (draft 4,600 lines, tests 11/2/18/5/3/7), ASCII letter wording, rows rewritten. + +## Round 11 on 411e105: verifier C1 to C8 MET, C9 NOT-MET (2 gaps) + 10 FLOOR (audit prose), security PASS (2 LOW); `pnpm check:all` green 16:02:45 + +- Verifier: own differential 64,000 changesets TS + Prettier vs Rust, 0 silent, 0 raw mismatch; bounds far below their limits on equine and synthetic oracles; adversarial projections held except one. C9: (a) draft line count 4,600 → 4,601; (b) `review_drawings_bytes` 477 bytes under what is written for a change removing every annotation (fixed parts of each drawing, layer group, overlay group and legend, never charged). Obs: test comment cites §11.12 for the emoji refusal (§11.10/§11.14). +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-11.md`): PASS. 146,000 random cases vs Prettier, 44,330 admitted, 0 differ; drawings wrote 0.12 to 0.41 of the projection on hostile documents. LOW test allows (convention); LOW bare URLs autolinked in any authored field (visible text = target, TypeScript alike: owner choice). +- Fixed: 4,096 bytes per drawing for its fixed parts (`pipeline::DRAWING_FIXED_BYTES`; equine projection 1,406,812 for 564,239 written), test `the_drawings_projection_bounds_what_is_written` (equine and no annotations); RUST.md counts (4,606 lines, review 12 tests); test comment sections. + +## Round 12 on c4e717d: verifier C1 to C8 MET, C9 NOT-MET (1 doc gap) + 12 FLOOR (audit prose, reported apart); `pnpm check:all` green 16:41:34 + +- Verifier: own differential 37,264 cases (32,000 random biased to the admitted alphabet, 5,264 handcrafted placements), 0 silent, 0 raw difference; drawings projection ≥ written on 8 adversarial drafts (tightest margin 15,477 B, no annotations); every figure of §11.14/§11.15 checked exact. C9: the emoji refusal is named at the aligner (`UnsupportedWidth`) in RUST.md (synthetic case line, pictograph row) and the TS generator comment, while the report guard refuses first (`UnsupportedMarkdown`); `UnsupportedWidth` applies in the draft reports only to alphanumeric candidates (Ⓜ, 🅰) and in IMPORT-REPORT. +- Fixed: the two RUST.md passages and the generator comment (oracle unchanged, generator green in check mode). +- Security (`.claude/audits/2026-10-23-rust-r5-review-security-12.md`): PASS. 7,200 random changesets through both real pipelines (898 admitted, 0 raw and 0 formatted differences), 73,000 template cases (38,378 admitted, 0 differ), display width on every code point U+0020 to U+10FFFF, guard linear on stress lines. LOW `underscore_pairs_later` quadratic, unreachable (≤2 authored plain parts per line); LOW `review_drawings_bytes` views × annotations (≈2 s at the value bound); LOW test allows (convention); LOW §11.15 parse residual names `changes.json` only (`references.json` same parser). +- Declared: the four LOWs in §11.15 (no code change: a fix would restart the gates; owner decision). + +## Round 13 on 88e4274: verifier C1 to C8 MET, C9 NOT-MET (doc wording) + 13 FLOOR (audit prose, product paths clean) + +- Verifier: 2,290 new probes TS + Prettier vs Rust, 0 silent; widths of 149,106 alphanumeric code points equal Prettier's (123 refused); drawings bound held on escape probes; every figure exact. C9: §11.14 says the synthetic oracle covers "references with URL and DOI" and "a level C question per priority" (no URL, no medium priority there; both covered by the equine report); `&name=` admitted only when the name starts with an ASCII lowercase letter. Notes: `markdown.rs` comment "the one glyph wider than its bytes" inaccurate; `scripts/import-equine.sh` header "(R5.2, R5.3)". +- Fixed: the three wordings, the comment, the script header. + +## Round 14 on eb667ad: verifier C1 to C9 MET, ECARTS(13) = FLOOR only (audit prose quoting suppression keywords; product paths clean on c6e0d85 and develop) + +- Verifier: own differential 17,634 changesets TS + Prettier vs Rust, 12,212 report pairs identical, 22,928 refused, 0 silent, 0 raw difference (planted mutation detected); SVG differential 65 changesets, 236 drawings byte-identical, 4 under the R3 rule, 0 undeclared; every figure exact; `git diff c4e717d..HEAD` changes no executable line. Notes: emoji test accepts either refusal kind (code gives UnsupportedMarkdown); CLAUDE.md "Next: R4, R5" stale (pre-existing); RUST.md §11 heading lists up to R5.3. +- Closing the 13 FLOOR lines needs a contract Clarification (owner); audit records stay append-only. + diff --git a/.claude/audits/2026-10-23-rust-r5-upload-security-2.md b/.claude/audits/2026-10-23-rust-r5-upload-security-2.md new file mode 100644 index 00000000..cab36a19 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-upload-security-2.md @@ -0,0 +1,122 @@ +# Security audit: R5.5 upload tool, fix commits 56593af and fad85c0 + +- date: 2026-10-23 | branch `feature/rust-r5-pipeline-core` | scope `git diff a481af5..fad85c0` +- context read: `crates/core/src/bin/upload_sheet_assets/{main,storage}.rs`, `crates/core/src/curation/upload.rs`, + `scripts/{upload-sheet-assets,sheet-assets-e2e,floor-clarification-check}.sh`, `crates/core/tests/upload_tool.rs`, + contract `.claude/tasks/contracts/2026-10-23-rust-r5-upload.md` +- mode: audit (fresh, blind; no prior verdict used). Nothing was edited but this file. +- not run, by rule: `upload-sheet-assets` against any real stack, `scripts/sheet-assets-e2e.sh`, any service key, + any transfer tool, any recursive delete. + +## What was measured + +| Check | Result | +|---|---| +| semgrep 1.168.0, p/security-audit + p/secrets + p/owasp-top-ten, 75 rules, 11 files (the 10 diff files + `curation/upload.rs`) | 0 findings, 0 errors | +| guardrails `scan.py --domain api,supabase` | 0 FAIL, 1 WARN (`SB-POLICY-NOT-OWNER`, `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`), outside the diff, dropped | +| `cargo test --locked -p faunosteo-core --features upload --test upload_tool` (loopback stub, made-up key, built without `SUPABASE_SERVICE_ROLE_KEY` in the env) | 12 passed, 0 failed | +| `floor-guard.sh develop`, then the script's three regexes applied to its output | 22 findings: 21 requalified (SUPPRESS in `.claude/audits/*.md`), 1 declared (`STUB .claude/memory/evals.md:205`), 0 remaining | +| `/proc/sys/net/ipv{4,6}/ip_nonlocal_bind` | 0 and 0 | +| UDP bind probe (no packet sent) on this host (`enp89s0` 192.168.1.100/24, brd 192.168.1.255) | 192.168.1.100 OK; 192.168.1.255 OK; 224.0.0.1 OK; 0.0.0.0 OK; 192.168.1.0, 192.168.1.101, 10.255.255.254 refused | +| TCP connect to 192.168.1.255:54321 | refused by the kernel, ENETUNREACH (no SYN leaves) | +| new suppressions in added lines (`nosemgrep`, `nosec`, `eslint-disable`, `@ts-ignore`, `noqa`, `#[allow`, `shellcheck disable`, `floor-guard: allow`) | none in code; the only hits are prose in `.claude/audits/2026-10-23-rust-r5-upload-security.md` | +| tracked env files | `.env.example` only | + +## Targeted review of the fixes + +**Error classification and retry** (`storage.rs:17`, `:73-87`, `:189-214`). `ATTEMPTS = 4` gives one try and three +retries, sleeps 1.0 s, 1.5 s, 2.0 s, so contract C6 "retried three times" holds. Retried: `Io`, `Timeout`, +`HostNotFound`, `ConnectionFailed`, `Protocol`, and a 5xx status. Every other `ureq::Error` is final. +`BodyExceedsLimit` maps to a final `State` refusal: the ureq 3.4.2 `LimitReader` raises it wrapped in an +`io::Error`, and `From` unwraps it back (`ureq-3.4.2/src/error.rs:216-227`), so the guard does fire. The +test `upload_tool.rs:319` proves it, with exactly one object GET and no write. A retried POST stays safe, because +`x-upsert: false` turns a replay into a 409 handled as a duplicate and the object is then re-hashed. A retried +confirm is server-idempotent. Secret exposure: the final branch prints only a fixed text or the numeric limit. The +retried branch prints `error.to_string()`. For `Io`, `Timeout` and `Protocol` that text carries no header value: +ureq-proto's `BadHeader` holds the `http::Error` text, not the value, and `BadAuthorizationHeader` has no payload +(`ureq-proto-0.6.4/src/error.rs:45-53`). Request analysis also runs before the prelude is written +(`client/sendreq.rs:42`), so a refused key never reaches the wire. The fix is a strict improvement: before it, +`Http`, `BadUri`, `TooManyRedirects` and the rest were echoed and retried. One residual inaccuracy is listed as L1. + +**DEV-address ownership** (`main.rs:112-124`). `UdpSocket::bind((ip, 0))` sends nothing and is closed on drop. It +runs before the key is read, and `check_destination` still requires a private IPv4 equal to the DEV host +(`upload.rs:190-200`). Unspecified and multicast addresses bind but are not private, so they stay refused. The +directed broadcast of an attached private subnet passes, but the kernel refuses the TCP connection. The test +`upload_tool.rs:342` discriminates: without the filter the run would reach the network (exit 3), not a +`Destination` refusal (exit 1). Residuals: L2. + +**Keys off every argv in the e2e script** (`sheet-assets-e2e.sh:18-32`). The key reaches the binary only through a +prefix assignment inside the `$(...)` subshell (env, not argv). The leak check feeds the patterns to +`grep -f <(printf ...)`: `printf` is a builtin, and grep's argv holds only `/dev/fd/N`. The keys come from the +status JSON on stdin; the `python3 -c` argv carries only the field name. `env -u SUPABASE_SERVICE_ROLE_KEY cargo +build` puts the variable name on argv, never its value. Dropping `env -i` lets the binary inherit the caller's env. +This is no exposure: the tool reads only `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, `FAUNOSTEO_DEV_HOST` and +`INIT_CWD` (the last two are unset there), it uses `proxy(None)`, and the crate has no logger. An empty key or +status field would put an empty pattern into `-f`, which matches every output. That fails the case: fail-safe. + +**Launcher** (`upload-sheet-assets.sh:15-16`). Under `set -euo pipefail`, a failed build stops the script before +the `exec`. Cargo, build scripts and proc macros no longer see the key. Only the `exec`'d binary receives it, in its +environment, with the folder and `--check` as its only argv. Residual: L3. + +**FLOOR declared line** (`floor-clarification-check.sh:16`, `:23-27`). `DECLARED_RE` is anchored and covers one +kind, one file and one line, with the dots escaped and a trailing space, so `:2050` cannot match. On the branch it +matches exactly the one line the R5.4 contract names (`2026-10-23-rust-r5-review.md:69`). Nothing else is +requalified, `requalified` does not count it, and it is printed under `DECLARED`. The negative proof still fails +(real SUPPRESS in `src/*.ts`, `src/*.rs` and an active contract). Residual: L4. + +## Findings + +No CRITICAL, no HIGH, no MEDIUM, no new ungated suppression. + +- **L1** `storage.rs:196` (with `:200-202`): `Protocol(_)` counts as transient. That bucket also holds deterministic + local failures: `BadAuthorizationHeader` for a key with non-ASCII bytes (the `http` crate accepts bytes 0x80 and up + in a value, ureq-proto's `to_str` refuses them), `OutputOverflow` for a huge key, and `HttpParseFail` for a + malformed answer. Each is retried three times and ends as `Network`, exit 3. The `final_error` doc comment says + "a key a header refuses, a malformed answer" are final, which is only true for control characters (`Http`). This + costs about 4.5 s and a wrong exit code, and nothing is sent or printed. Hint: make `Protocol` final, or retry only + its response-side variants, and correct the comment. +- **L2** `main.rs:112-115`: the bind probe also accepts the subnet broadcast (measured: 192.168.1.255). With + `FAUNOSTEO_DEV_HOST=192.168.1.255` and `SUPABASE_URL=http://192.168.1.255:54321`, the destination check passes, + the kernel refuses the TCP connection (ENETUNREACH, measured), the key is never sent, and the run ends `Network` + instead of `Destination`. The probe also degrades to "any private IPv4" on a host with `ip_nonlocal_bind=1` + (0 here). Hint: after the bind, `connect((ip, port))` the UDP socket (sends nothing; a broadcast gives EACCES, + measured) and require `local_addr().ip() == ip`, and document the sysctl dependency. +- **L3** `upload-sheet-assets.sh:15-16` and `sheet-assets-e2e.sh:15,18`: the binary path `target/release/...` is + hard-coded, but cargo honours `CARGO_TARGET_DIR`, `CARGO_BUILD_TARGET` and a user `build.target-dir`. If any is + set, the build lands elsewhere and the script `exec`s a stale binary, possibly pre-fix, with the service key in its + environment (or a missing one). None is set on this machine (measured; no `~/.cargo/config.toml`, and the workspace + `.cargo/config.toml` has no target dir). Hint: `env -u CARGO_TARGET_DIR -u CARGO_BUILD_TARGET` on the build, or + take the path from `cargo build --message-format=json`. +- **L4** `floor-clarification-check.sh:16`: the exemption is pinned by line number, not content. If a + `/prune-memory` rewrite puts another STUB on `evals.md:205`, that STUB is silently exempt, while the original + finding fails loudly. The negative proof has no `evals.md`, so the regex's narrowness is proven only by reading. + Since this change, the script prints OK while the finding waits for the owner's decision. That is a quality-gate + question for the verifier and has no security effect. Hint: also match the snippet prefix (`Anomalies: LOW + report.rs`), and add a proof case with a STUB on another `evals.md` line. +- **L5** `upload_tool.rs:346-347`: the "not this machine" address 10.255.255.254 is the one WSL2 assigns to `lo`. + On such a host the test would connect locally with the made-up key and fail with exit 3. This is a portability + nit (fail-loud) with no exposure. Hint: use a TEST-NET address (192.0.2.1 is not private, so pick a private + address checked to be non-local at run time). + +Context only, outside the diff, not counted: `supabase/config.toml` sets no `jwt_secret` (only `jwt_expiry` at +`:89`). The local stack therefore likely signs with the CLI's public default secret, and port 54321 is open to the +LAN by design (CLAUDE.md "Environments and LAN access"). Anyone on the LAN who knows the public default +service_role JWT would then hold service_role on the local stack, which makes the tool's key secrecy moot there. I +did not verify this against the running stack. The diff's RUST.md text names the same point. + +## Verdict block + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 11 files (10 in a481af5..fad85c0 + crates/core/src/curation/upload.rs read as context) +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] retry-classification (Protocol treated as transient, doc comment overstates finality) — crates/core/src/bin/upload_sheet_assets/storage.rs:196 + - [LOW] dev-address-probe (subnet broadcast binds; relies on ip_nonlocal_bind=0) — crates/core/src/bin/upload_sheet_assets/main.rs:112 + - [LOW] stale-binary-exec (hard-coded target/release vs CARGO_TARGET_DIR) — scripts/upload-sheet-assets.sh:16, scripts/sheet-assets-e2e.sh:15 + - [LOW] floor-declared-line (pinned by line number; no negative proof for DECLARED_RE) — scripts/floor-clarification-check.sh:16 + - [LOW] test-portability (10.255.255.254 is lo on WSL2) — crates/core/tests/upload_tool.rs:346 +PROOF: semgrep 75 rules on 11 files → 0 findings; checklist 9 checks (secrets, SQL concat, unsafe render, authz, error exposure, secret in log, tracked .env, guardrails, new suppressions) + 5 targeted fix reviews → 5 findings (all LOW); cargo test upload_tool 12/12 green; floor classification 22 → 21 requalified, 1 declared, 0 remaining +``` diff --git a/.claude/audits/2026-10-23-rust-r5-upload-security.md b/.claude/audits/2026-10-23-rust-r5-upload-security.md new file mode 100644 index 00000000..68cb78d7 --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-upload-security.md @@ -0,0 +1,185 @@ +# Security audit: Rust R5.5 upload tool (2026-10-23) + +Mode: audit. Scope: `git diff 637ea63..HEAD` (commits 2c44506, a481af5), 25 files, branch +`feature/rust-r5-pipeline-core`. Contract: `.claude/tasks/contracts/2026-10-23-rust-r5-upload.md`. +Fresh, blind scan. No run against a real stack, no transfer tool, no service key used. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 25 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] secret-on-argv — scripts/sheet-assets-e2e.sh:29, :31 + - [LOW] secret-in-build-env — scripts/upload-sheet-assets.sh:14 + - [LOW] destination-trust (cleartext key, DEV address not proven local) — crates/core/src/curation/upload.rs:194-198 + - [LOW] error-classification (non-transient errors retried as Network) — crates/core/src/bin/upload_sheet_assets/storage.rs:76-81 + - [LOW] doc-exit-code — docs/development/SUPABASE.md:152 vs crates/core/src/bin/upload_sheet_assets/main.rs:167-175 + - [LOW] toctou-file-read (documented, hash-mitigated) — crates/core/src/bin/upload_sheet_assets/main.rs:49-67 + - [LOW] confirm-not-hash-bound (pre-existing RPC) — crates/core/src/bin/upload_sheet_assets/storage.rs:173-181 + - [LOW] lint-allow (architecture lint, not security) — crates/core/src/bin/upload_sheet_assets/main.rs:21 + 4 test files + - [LOW] floor-guard-waiver (fixture lines, not security) — scripts/floor-clarification-check.sh:42-45 + - [LOW] serde-tolerance (pre-existing, characterised only) — crates/core/tests/characterisation_serde_tolerance.rs +PROOF: semgrep 45 rules on 25 files → 0 findings; checklist 21 checks → 10 findings +``` + +## Method + +- semgrep 1.168.0, the three pinned packs, `--metrics=off`, on the 25 existing files of the diff: + 45 rules applied (Rust, bash, JSON, YAML, Markdown), 0 findings, 0 errors, 0 skipped rules. + Semgrep's Rust coverage is thin, so the review below is mostly manual reading. +- Checklist (8): hardcoded secret, SQL by concatenation, unsanitised render, sensitive endpoint + authz, internals surfaced, secret in a log, tracked `.env` / credential file, guardrails scanner + (`scan.py --domain api,supabase`: 0 FAIL, 1 WARN outside the diff, see below). +- Anti-gaming (1): every added suppression or waiver line in the diff. +- Brief focus (12): destination allowlist, redirects, proxy, key exposure (logs, errors, argv, env, + stubs, e2e), path traversal and symlinks, TOCTOU, size and memory bounds, overwrite / delete / + visibility, partial failure and resume, error classification, retries on non-idempotent calls, + dependency additions. +- Dynamic, hermetic only: `cargo test -p faunosteo-core --features upload --locked` on + `upload_tool`, `curation_upload`, `curation_caps`, `characterisation_serde_tolerance`: 25/25 + pass (loopback stub, made-up key, `SUPABASE_*` unset). A scratch probe (scratchpad crate, path + dependency, `--offline`) fed 40 crafted URLs to `check_destination`. + +## What holds (verified, not taken from the docs) + +- Destination allowlist. 40 probes: decimal, hex, octal and short IPv4 forms (`2130706433`, + `0x7f000001`, `0177.0.0.1`, `127.1`) all normalise to a loopback and are accepted as such; + IPv4-mapped IPv6 (`[::ffff:127.0.0.1]`, `[::ffff:7f00:1]`), `0.0.0.0`, `0`, `localhost.`, + `localhost.localdomain`, `127.0.0.1.nip.io`, public addresses, names, `ws:`, `file:`, `https:`, + zone ids are refused. Userinfo and backslash tricks (`evil.com\@127.0.0.1`, `127.0.0.1:54321@evil.com`, + `evil.com#@127.0.0.1`) are refused. Accepted oddities (`http://@127.0.0.1:p`, percent-encoded or + full-width `localhost`, `http:127.0.0.1:p`, trailing `/.`) all reduce to an allowed host. The + decisive property: the origin used for every request is rebuilt from the parsed `Host` and port + (`upload.rs:224-233`), never the raw string, so no check/use parser differential exists. +- The key is read only after the destination check (`main.rs:110-115`) and after every local file + is verified (`main.rs:177-178`): a refused destination or a bad file sends nothing. +- No redirect: `max_redirects(0)` in ureq 3.4.2 returns the 3xx as a response, never follows it and + never errors (`ureq-3.4.2/src/run.rs:224-236`, `config.rs:257-258`); the 3xx then fails + `expect_status`. No proxy: `.proxy(None)` overrides the default `Proxy::try_from_env()` + (`ALL_PROXY` / `HTTP_PROXY`). No `gzip` / `brotli` features (workspace `Cargo.toml:43`), so no + decompression bomb; every body is capped (1 MiB, objects 16 MiB + 1). +- Key never in a URL, a message or a log: two headers only (`storage.rs:88-89`), `Secret` has a + redacted `Debug` and no `Display`, `Storage` has no `Debug`; `required_env` names the variable, + never the value; ureq error texts (`error.rs:229-276`) carry no header value; server bodies are + never echoed (`expect_status`). Test key is a made-up literal (`upload_tool.rs:14`). +- No overwrite, delete or visibility change: only GET and POST are issued (`storage.rs:104, 123, + 142, 161, 177`), uploads carry `x-upsert: false`, the bucket must answer `public: false`, an + existing object is hashed and other bytes refuse the run. +- Order and resume: whole plan computed read-only before the first write (`main.rs:180`); the + object is read back and hashed before the row is confirmed (`main.rs:147-163`). The POST retry is + safe: a retried create that already landed answers Duplicate, which leads to the read-back check; + the confirm RPC is idempotent (`20261009100000_sheet_asset_storage.sql:41-50`). +- Paths: folder and files canonicalised and confined with component-wise `starts_with`; manifest + file names are `[A-Za-z0-9._-]`, no leading dot, `.svg`; ids are lowercase hex / uuid, so the + object key and the PostgREST filter carry no injection. +- Memory: drawings are read under 16 MiB, then refused above 2 MiB by the SVG reader + (`prescan.rs:33`), so at most 64 x 2 MiB is held; curation files now capped at 4 MiB with + `take(cap + 1)` (`import_equine.rs:93-99`) and in the core (`schema.rs:386-392`). +- C1: `curation/upload.rs` has no `std::fs`, `std::env`, socket or clock. `ureq` is optional under + `upload` only; `crates/wasm` enables `pdf-read, pdf-write` only. Cargo.lock adds one edge + (`faunosteo-core -> ureq`); ureq 3.4.2 was already locked for the worker, no new package. + +## Findings + +### M1 [MEDIUM] service and anon keys on process argv in the e2e script + +`scripts/sheet-assets-e2e.sh:29` runs `env -i ... SUPABASE_SERVICE_ROLE_KEY="$key" "$BIN"`: +`env` is `/usr/bin/env`, an external process, so the key sits in its argv, readable by every local +user through `/proc//cmdline` and `ps`, and recorded by any execve audit rule. Line 31, +`grep -qF -e "$key" -e "$SERVICE" -e "$ANON"`, puts the service and anon keys on the argv of an +external `grep`. This contradicts the script's own header ("held in variables, never printed") and +the C7 intent. Impact is bounded: the key is the local stack's, the machine is single-user, the +window is short, the owner runs the script. Hint: pass the key as a bash prefix assignment in a +subshell that first unsets the variables you want cleared (`( unset FAUNOSTEO_DEV_HOST INIT_CWD; +SUPABASE_URL="$url" SUPABASE_SERVICE_ROLE_KEY="$key" exec "$BIN" "$@" )`), and match with +`grep -qF -f <(printf '%s\n' "$key" "$SERVICE" "$ANON")` (`printf` is a builtin). + +### L1 [LOW] service key in the environment of the compile step + +`scripts/upload-sheet-assets.sh:14` runs `cargo run --release`: on a first run, or after any source +or lockfile change, cargo builds with the operator's exported `SUPABASE_SERVICE_ROLE_KEY` visible +to every build script and proc-macro of the dependency tree. The tree is locked and cargo-deny'd, +so this is a supply-chain exposure only. Hint: `env -u SUPABASE_SERVICE_ROLE_KEY cargo build +--release --locked ...`, then `exec target/release/upload-sheet-assets "$@"`. + +### L2 [LOW] destination trust: cleartext key, DEV address not proven local + +The key always travels over plain `http` (https is refused), with no server authentication. Any +process listening on the allowed local port receives it: declared and accepted in RUST.md §11.16. +The DEV branch (`upload.rs:194-198`) accepts any private IPv4 equal to `FAUNOSTEO_DEV_HOST` +without proving it is an address of this machine; if both variables name another LAN host, the key +crosses the LAN in clear. C2 allows this and `scripts/dev-env.sh:15` derives the address from +`hostname -I` by default. Hint: in the binary, `UdpSocket::bind((ip, 0))` succeeds only for a +local interface address; refuse otherwise. + +### L3 [LOW] non-transient client-side errors retried and reported as Network + +`storage.rs:76-81` maps every `ureq::Error` to `Network`, retries three times, exit 3. That +includes `BodyExceedsLimit` when the destination holds an object above 16 MiB + 1 under the key +(a State condition: downloaded three times, then "network error") and `Error::Http` from a key +holding characters invalid in a header (a usage error). No write follows either case, so no +security consequence, but C6 says refusals are final and C8 that errors are classified. Hint: +match `BodyExceedsLimit` to `State` and `Http` / `BadUri` to a non-retried kind. + +### L4 [LOW] exit code 2 documented as "usage" + +`docs/development/SUPABASE.md:152` lists "2 usage"; a wrong argument count exits 1 with kind +`Content` (`main.rs:167-175`, asserted by `upload_tool.rs:314`). The code matches C8 ("2 usage +(argument not UTF-8)"); the runbook overstates. Hint: say "2 an argument is not UTF-8". + +### L5 [LOW] check/open race on file reads (documented, mitigated) + +`main.rs:49-67`: canonicalise, then `metadata`, then `open` the canonical path; a component swap +between them is not defended, as the comment states. Mitigation is real: the bytes read must hash to +the manifest's sha256 and pass the SVG reader, so a swap cannot exfiltrate unknown content. Single +user working copy. + +### L6 [LOW] confirmation not bound to the hash (pre-existing RPC) + +`storage.rs:173-181` confirms by asset id; the row hash is checked at plan time and the object is +verified just before, but `confirm_sheet_asset_upload(asset_id)` +(`supabase/migrations/20261009100000_sheet_asset_storage.sql:34-52`, outside the diff) does not +re-check `sha256`. A row hash change between plan and confirm would confirm an unverified pairing. +No API role writes asset rows (`authenticated` holds SELECT only), so the window needs a +service-role actor. Note for a future migration (an expected-hash parameter), not this diff. + +### L7 [LOW] new lint allows (context, not a security suppression) + +`main.rs:21` `#![allow(clippy::disallowed_methods)]` and the same inner attribute (plus +`unwrap_used`, `expect_used`) at the head of the four new test files. `clippy.toml` lists clock, +file and environment methods: an architecture lint for the core's I/O purity (C1), the same pattern +as `import_equine.rs` and `report_compare.rs`. Not a security checker, not blocking. CLAUDE.md +still says "the two files allowed std::fs"; it is three now. + +### L8 [LOW] floor-guard waivers on fixture lines (context) + +`scripts/floor-clarification-check.sh:42-45` carry `# floor-guard: allow negative-proof fixture` +on lines that write `@ts-ignore`, `nosemgrep` and `nosec` into a `mktemp -d` throwaway repo. The +tokens are bash string literals; they silence no semgrep or security check on this repository +(no finding on those lines, semgrep ignores `nosec`). The waiver silences floor-guard (a test-floor +guard, printed WAIVED) and carries no `[gated ]` marker. Not blocking under the security +rule; reported so the orchestrator sees it. + +### L9 [LOW] serde tolerance of the gated readers (pre-existing, characterised only) + +`crates/core/tests/characterisation_serde_tolerance.rs` pins that the R2 contracts accept a struct +as a positional array and a unit enum as a one-key map, where Zod refused. This reaches the +untrusted PDF import path: an integrity risk for crafted files (fields assigned in the wrong order +without error), not a memory or execution one. No reader changed in this diff; the owner decision +is pending before R5.6 (RUST.md §11.16). + +## Outside the diff (not counted) + +- guardrails WARN `SB-POLICY-NOT-OWNER` + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177` (`species_select_active` not + tied to `auth.uid()`): file not in the diff. +- Blind spot for the owner: `supabase/config.toml` sets no `jwt_secret` and no signing keys, so + the local stack most likely signs with the Supabase CLI default secret, making the local + `service_role` key a publicly documented value. ENVIRONMENTS.md exposes the API port 54321 to + the LAN. If that holds, anyone on the private network can already act as `service_role` on the + DEV stack, and the care this tool takes with the key protects little there. I did not run + `supabase status` to confirm the key value. +- Not verified here: `scripts/sheet-assets-e2e.sh` against the real stack (owner-run by design; + not run, per the brief). The anon-key and wrong-key cases rely on the real Storage answer. diff --git a/.claude/audits/2026-10-23-rust-r5-upload-verify.md b/.claude/audits/2026-10-23-rust-r5-upload-verify.md new file mode 100644 index 00000000..d420cc7e --- /dev/null +++ b/.claude/audits/2026-10-23-rust-r5-upload-verify.md @@ -0,0 +1,21 @@ +# R5.5 verification — round 1 (fresh verifier, Opus; pinned model out of credits) on 2c44506 + a481af5 + +Contract `.claude/tasks/contracts/2026-10-23-rust-r5-upload.md`. Persisted by the orchestrator (the verifier is read-only). + +VERIFY — VERDICT: ECARTS(4) + +- C1 MET, C2 MET (`http://127.0.0.1:80` refused, stricter, pinned), C3 MET, C4 MET +- C5 NOT-MET: an object over MAX_ASSET_BYTES+1 hits ureq BodyExceedsLimit, mapped to Network and retried; exit 3 instead of a final State (no write happens, safety holds) +- C6 NOT-MET: ATTEMPTS = 3 is three attempts (two retries), not "retried three times" +- C7 MET (observation: e2e script puts the key on `env` argv, security M1) +- C8 MET, C9 MET, C10 MET +- C11 NOT-MET: SUPABASE.md exit codes say "2 usage", code exits 1 on usage; exit-1 list misses manifest and handshake. Nit: serde table "zone as array" row unpinned and contradictory wording +- C12 MET (no frozen path in the diff, documentSha256 27c7383c…2660, import --check 0 differences 6+12) +- C13 MET with caveat: `floor-clarification-check.sh` cannot print OK while the declared evals.md:205 STUB stands +- C14 UNVERIFIABLE by the verifier (check:all ran elsewhere: green 21:21:38, log in the session scratchpad) +- FLOOR diff-scoped: clean, 4 waived (fixture lines authorised by the R5.4 clarification) +- Runs: cargo test upload 251/29 suites, curation 241/27, workspace 277 (1 ignored), cli 259; fmt, clippy (5 configs), deny ok; `--check` RSS 18696 KB + +## Fixes after round 1 (orchestrator) + +C5: `final_error` maps BodyExceedsLimit to a final State, test `an_oversized_object_is_a_final_state_refusal_not_retried`. C6: ATTEMPTS = 4 (one try, three retries). C11: SUPABASE.md exit codes and retry wording; RUST.md table row reworded. C13: the script lists the declared line apart (still not requalified) and prints OK. Security M1, L1, L2, L3 fixed (RUST.md §11.16, gate round 1). diff --git a/.claude/audits/2026-10-24-rust-r5-5-closing-security.md b/.claude/audits/2026-10-24-rust-r5-5-closing-security.md new file mode 100644 index 00000000..6a774632 --- /dev/null +++ b/.claude/audits/2026-10-24-rust-r5-5-closing-security.md @@ -0,0 +1,208 @@ +# Security audit: R5.5 closing corrections (diff 13db553..257a29b) + +- date: 2026-10-24 | branch `feature/rust-r5-pipeline-core` | mode: audit (targeted diff), fresh run +- contract: `.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md` (K1-K8) +- scope: `git diff 13db553..257a29b`, 15 files (8 code/doc + 7 `.claude/` registry, task, plan files) +- nothing run against a real stack, no service key used, no transfer tool, no delete, no code edited + +## Focus 1: `check_v3_shape` and the untrusted v3 entries + +Entries traced (wasm `crates/wasm/src/lib.rs` → `crates/core/src/facade.rs` → `ops.rs` / `session.rs`): + +| Entry | Path | Shape check | +|---|---|---| +| `SheetHandle.import_pdf` / `import_pdf_bytes` | `facade::import_pdf` → `pdf/import.rs:29` `import_archive` → `read_archive_document` → `read_report_document` | yes (`report/read.rs:80`) | +| `archive.import` op | `ops.rs:345` → `session::import_archive` → same | yes | +| `draft.restore` op, draft text | `ops.rs:316` → `session.rs:85` `read_report_document` | yes | +| `draft.restore` op, archive text | `session.rs:103-106` `parse_envelope` | yes (`archive/read.rs:124-125`) | +| `restore_copy_bytes` | `facade.rs:86-101` → `restore_draft(.., None)` | yes | +| `report-compare` CLI | `pdf/compare/mod.rs:133` → `read_archive_document` | yes | + +These are the only paths by which an external v3 report enters. The remaining typed reads of +`Report` take the store's report, which is always the core's canonical output: the reducers +(`ops.rs:64-87`), `archive.snapshot` (`ops.rs:301-303`), the export session (`pdf/write/input.rs:26`), +and `export_from_envelope` (`pdf/write/export.rs:117-130`, a public library fn with test-only +callers, not exported by wasm or a binary). + +Panic review: `check_v3_shape` (`report/read.rs:55-71`) uses only `Value::get`, `as_array`, +`is_object`, `is_string`, `enumerate` and `format!`. No indexing, no unwrap, no recursion. A +non-object or `null` input returns `Ok` and the typed read refuses it. No panic path. + +Authentic shapes: the core's writer emits `sheet` and `practitioner` as objects and `severity` as +a string or omits it (`skip_serializing_if`). Zod refused arrays, one-key maps and `null` for every +earlier v3 writer. `null` severity was already refused before this diff: `js::present` calls +`Severity::deserialize(null)`, which fails. No authentic shape is newly refused. Hermetic suites +were rerun here and are green: `archive_rules` 38, `report_rules` 17, `characterisation` 4, +`characterisation_serde_tolerance` 5, `pdf_import` 3. + +Bypass found (M1 below). The check reads keys on the raw value, so any shape where the parent +container is itself positional skips it, because `Value::get(&str)` on an array returns `None`. + +## Focus 2: upload tool, `Protocol` and `own_address` + +`Protocol` is final: `storage.rs:189-197` retries `Io`, `Timeout`, `HostNotFound` and +`ConnectionFailed` only, plus 5xx (`storage.rs:79-80`). `final_error` (`storage.rs:203-215`) +carries no error text, so neither the key nor the header shows. The test +`a_malformed_answer_is_final_and_not_retried` is green: one request, exit 1. + +`own_address` (`main.rs:114-122`), measured on this host with the same syscalls (UDP bind then +connect, nothing sent): + +| DEV host | bind | connect | local_addr == ip | own_address | +|---|---|---|---|---| +| 255.255.255.255 (and the host's `brd` addresses, unit test) | ok | EACCES (13) | n/a | false | +| 0.0.0.0 | ok | ok | 127.0.0.1, no | false | +| 224.0.0.251, 239.255.255.250 (multicast) | ok | ok | yes | **true** (L3) | +| another host's private address | EADDRNOTAVAIL (`ip_nonlocal_bind` = 0) | n/a | n/a | false | + +Even with `ip_nonlocal_bind=1`, the connect route lookup refuses a non-local source address +(no `IP_FREEBIND` / `IP_TRANSPARENT` is set). So a non-local unicast address does not pass. + +Defense in depth holds. `host_is_allowed` (`curation/upload.rs:190-200`) only accepts the DEV +host when the URL host is loopback or RFC 1918 and parses equal to it. Multicast and public +addresses are neither. The kernel also refuses a TCP connect to multicast. + +Packet: `own_address` sends nothing. A UDP `connect` only records the peer, there is no +`send`/`send_to`, and the socket is dropped on return. It joins no multicast group. + +## Focus 3: secrets and SQL claims + +- No secret value in the diff. The added lines contain no JWT (`eyJ…`), no CLI default secret + string, no `sb_secret_` / `sb_publishable_` key and no password literal. `iss: supabase-demo` + is a claim name, not a key. +- Repo-wide (tracked, at 257a29b) search for the CLI default JWT secret, `eyJhbGciOi`, + `eyJpc3Mi` and `sb_secret_`/`sb_publishable_` keys. Only `crates/worker/src/config.rs:324,326` + matches: a fabricated test token (payload `{"role":"service_role","exp":…}`, signature + literally `sig`) and the placeholder `sb_secret_abc`. These are not credentials. The only + tracked env file is `.env.example`. +- `supabase/config.toml` `[auth]` (lines 73-96) sets no `jwt_secret` and no signing keys, which + matches ENVIRONMENTS.md §3.6. The claim that the service key is the public demo key was not + checked independently: that would mean reading the key value. +- `confirm_sheet_asset_upload`: `20261009100000_sheet_asset_storage.sql:57-58` runs `revoke all + … from public, anon, authenticated` and `grant execute … to service_role`. No later migration + re-grants it. The function (lines 34-52) sets `uploaded_at` with no `storage.objects` existence + or byte check. pgTAP `006_sheet_asset_storage.sql:73-80` covers editor 42501, service-role + confirm of A and B, and idempotence. It has no `anon` assertion, which matches the doc. +- The bucket has no INSERT, UPDATE or DELETE policy. The only `storage.objects` policies in + all migrations are `anatomical_sheet_assets_read` (select), `avatars_read` (select) and + `avatars_upload` (insert, pinned to `bucket_id = 'avatars'`, `20261013100000:284-291`). + RUST.md §11.18 is accurate. +- No file under `supabase/` changed in the diff (K5). + +## Findings + +### M1 [MEDIUM] `check_v3_shape` bypassable through a positional parent +`crates/core/src/domain/report/read.rs:61-69`, `crates/core/src/domain/archive/read.rs:124-125` + +- An observation written as a positional array (`[id, zones, findings, freeTextFindings, + {"mild": null}, comment]`) is accepted on every entry. `observation.get("severity")` returns + `None` on an array, and serde's derived `Observation` visitor reads the sequence, one-key + severity map included. +- In `parse_envelope`, a `report` written as an array (or the whole envelope as an array) makes + `check_v3_shape` see no keys. All three refused shapes (sheet array, practitioner array, + severity map) are then accepted. +- In the import path a report-level or envelope-level array is still refused, because + `version_of` and `envelope_version_of` require an object. +- K4 states that the three shapes are refused at both v3 entries. That holds only when every + parent is an object. +- Impact is low. The field values still pass every field rule and the core re-serialises + canonically, so there is no injection. What remains is a parser differential with the N-1 Zod + reader. Established by reading: it is the same `visit_seq` mechanism the R5.5 + characterisation proved for `sheet` and `practitioner`. No probe was executed, because writing + a test is outside this audit. +- Fix direction (owner scope): require `observations[i]` to be an object, and in + `parse_envelope` require both `data` and `report` to be objects before the shape check. A + generic guard is an alternative. + +### M2 [MEDIUM, pre-existing, outside the diff, documented by it] DEV API reachable as `service_role` from the LAN +`supabase/config.toml:73-96`, `docs/development/ENVIRONMENTS.md` §3.6 + +- The stack runs on the CLI's public default JWT secret and 54321 is LAN-open by design. +- Any device on the private network can therefore act as `service_role` on DEV data, bypassing + RLS. The doc states this accurately and leaves the choice to the owner. Production is not + involved. +- Not introduced by this diff, so not gated here. Resolve it before any non-test data reaches + DEV: own `jwt_secret` / signing keys through `env()`, or narrow the 54321 rule. + +### L1 [LOW] Remaining serde tolerance on the other nested v3 structs +`crates/core/src/domain/report/read.rs:52-54` + +- `animal`, `owner`, `zones[]`, `findings[]`, `vertebrae[]` and `nextAppointment` variants as + positional arrays, and `side` as a one-key map, are still accepted. +- This is within the owner's go ("three shapes only"). But the doc comment ("The shapes Zod + refused and serde's derives accept") reads as a complete list, and BDR-069's rationale + ("crafted file could swap same-typed fields") applies to these shapes too. +- Hint: word the comment and §11.18 as "three of the shapes". + +### L2 [LOW] Error text contradicts behaviour +`crates/core/src/domain/report/read.rs:66` + +The message says "expected a string or null", but `null` is refused. The test's own comment +says so (`characterisation_serde_tolerance.rs`, "null stays refused"). + +### L3 [LOW] `own_address` accepts IPv4 multicast +`crates/core/src/bin/upload_sheet_assets/main.rs:110-122` + +- Measured: bind and connect succeed and `local_addr` equals the address. The "own unicast" + claim in the doc comment and in RUST.md §11.18 is therefore inaccurate. +- Not exploitable: `host_is_allowed` requires RFC 1918 or loopback, and TCP to multicast is + refused by the kernel. The unit test (`main.rs:255-266`) does not cover multicast. +- Hint: add `!ip.is_multicast()`, or rely on and state the private-range filter. + +### L4 [LOW] `own_address` unit test is vacuous without `ip` +`crates/core/src/bin/upload_sheet_assets/main.rs:237-244` + +If the `ip` command is missing, `unwrap_or_default` yields empty lists and the host unicast and +broadcast loops check nothing. The test still passes. This affects test strength only. + +### L5 [LOW, pre-existing, documented] `confirm_sheet_asset_upload` does not check the object +`supabase/migrations/20261009100000_sheet_asset_storage.sql:34-52` + +The guard is EXECUTE (service_role only) and no API role can place bytes, so this is not +exploitable today. The debt is recorded in RUST.md §11.18: check the object's existence and size +before any public exposure. + +### L6 [LOW] Typed reads of `Report` outside the two checked entries +`crates/core/src/ops.rs:64-87, 301-303`, `crates/core/src/pdf/write/input.rs:26`, +`crates/core/src/pdf/write/export.rs:117-130` + +These take store or core-canonical reports today, so none of them is an external entry. If +`export_from_envelope` ever reads a file-borne envelope, it skips `check_v3_shape`. + +## Anti-gaming + +The diff adds no `nosemgrep`, `nosec` or `eslint-disable` comment and no new `#[allow]`. The +`#![allow(clippy::…)]` in `characterisation_serde_tolerance.rs` predates the diff and is a lint +allowance, not a security suppression. + +## Notes + +- One command was refused by the permission rules: `git check-ignore -v .env.worker .env; grep + -n "SERVICE_ROLE\|SECRET\|KEY" .env.example`. It was not rerun in another form. The + tracked-env check used `git ls-files` instead, and the only result is `.env.example`. +- Guardrails scanner (`--domain api,supabase`): 0 FAIL, 1 WARN, 1 MANUAL. The WARN + (`SB-POLICY-NOT-OWNER`, `20261008110000_anatomical_sheets.sql:1177`) is in a file outside the + diff and is filtered out. MANUAL is not reported. +- Hermetic runs: `cargo test -p faunosteo-core --features upload --bin upload-sheet-assets + --test upload_tool --test characterisation_serde_tolerance --test archive_rules --test + report_rules` gave 1 + 13 + 5 + 38 + 17 passed. `--features pdf-read --test pdf_import --test + characterisation` gave 3 + 4 passed. `upload_tool` targets an in-process loopback stub with a + made-up key. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 15 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] check_v3_shape bypass via positional parent — crates/core/src/domain/report/read.rs:61-69, crates/core/src/domain/archive/read.rs:124-125 + - [MEDIUM] DEV stack service_role reachable from LAN (pre-existing, documented) — supabase/config.toml:73-96, docs/development/ENVIRONMENTS.md §3.6 + - [LOW] other nested v3 serde tolerance, doc comment overstates completeness — crates/core/src/domain/report/read.rs:52-54 + - [LOW] error text "or null" contradicts refusal — crates/core/src/domain/report/read.rs:66 + - [LOW] own_address accepts IPv4 multicast (blocked downstream by host_is_allowed) — crates/core/src/bin/upload_sheet_assets/main.rs:114-122 + - [LOW] own_address test vacuous without `ip` — crates/core/src/bin/upload_sheet_assets/main.rs:237-244 + - [LOW] confirm_sheet_asset_upload no object check (pre-existing, documented) — supabase/migrations/20261009100000_sheet_asset_storage.sql:34-52 + - [LOW] internal typed Report reads skip the shape check — crates/core/src/pdf/write/export.rs:117-130, crates/core/src/ops.rs:64-87 +PROOF: semgrep 74 rules on 15 files → 0 findings (0 errors); checklist 8 checks → 2 findings (+ guardrails 0 FAIL / 1 WARN out of diff, filtered); targeted review 3 focus areas → 6 findings +``` diff --git a/.claude/audits/2026-10-24-rust-r5-6-prep-security.md b/.claude/audits/2026-10-24-rust-r5-6-prep-security.md new file mode 100644 index 00000000..59093c11 --- /dev/null +++ b/.claude/audits/2026-10-24-rust-r5-6-prep-security.md @@ -0,0 +1,168 @@ +# Security audit: R5.6 preparation (diff 1f8873d..3b9a395 + the unapplied switch patch) + +- date: 2026-10-24 | branch `feature/rust-r5-pipeline-core` | mode: audit (targeted delta), fresh run +- scope: `git diff 1f8873d..HEAD` (12 files: `fingerprint.rs`, its test and oracle, the Node differential, + `Cargo.toml`, `mod.rs`, `rust-check.sh`, RUST.md §11.19, plan, TODO, journal, the patch file) and + `.claude/tasks/plans/r5-6-switch.patch` read as the future change (9 files: `pipeline.rs`, `archive/read.rs`, + `report/rebase.rs`, `sheet/loaded.rs`, `facade.rs`, `pdf/compare/lines.rs`, `pdf/write/input.rs`, + `.prettierignore`, `tests/fingerprint_consumers.rs`) +- owner decisions checked against: convention `sha256-rfc8785-validated-v1`; `TRUSTED_ALIASES` the only alias + authority, bound to sheet and content; `sheet-ref.json` block descriptive, a contradiction refused; an archive's + alias list never trusted +- not done on purpose: no worktree, the patch was not applied (`git apply --check` only: applies cleanly). The + auditor contract forbids mutating code, even a scratch copy; every patch claim below comes from reading. + No service key, no network, no transfer tool, no delete, no code edited. Tree clean before and after. +- run: `cargo test -p faunosteo-core --features fingerprint,pdf-read --locked --offline --test sheet_fingerprint` + with `CARGO_TARGET_DIR` in the session scratchpad → 9 passed. Independent Node recomputation of the draft + (`node -e`, no file written): sha256 of the bytes = `27c7383c…2660` (the alias), raw JCS = `a56e4a24…88a1` = + `oracles/r5/fingerprints.json` `b_rfc8785`. + +## Focus 1: can a forged, unknown or foreign-sheet alias make a different document count as the same? + +No. `equivalence` (`crates/core/src/domain/sheet/fingerprint.rs:62-79`) returns `TrustedAlias` only when the two +values are exactly the registered `(canonical, alias)` pair, either way round, under the registered `sheet_id`. +There is no transitivity, no prefix or case folding, and `alias_convention` plays no part. Every unknown value is +`Different`, which fails safe: rebase (data kept, items flagged), snapshot dropped, export refused. + +At each of the patch's call sites the sheet id is compared before or alongside the equivalence, and the shared id is +the one passed in: + +| Site (patch line) | Sheet-id guard | Id passed to `equivalence` | +|---|---|---| +| `report/rebase.rs` (patch L122-126) | `same_sheet &&` | `sheet.reference.sheet_id` | +| `archive/read.rs` `snapshot_matches` (patch L92-100) | `snapshot.sheet_id == report.sheet_id &&` | `report.sheet.sheet_id` | +| `pdf/write/input.rs` `assert_exportable` (patch L248-258) | `sheet_id != … \|\|` | `reference.sheet_id` | +| `pdf/compare/lines.rs` `sheet_line` (patch L212-230) | `sheet_id == … &&` | `reference.sheet_id` | + +`check_declared` (`fingerprint.rs:90-108`) can only refuse. `LoadedSheet::from_bundle` drops the declared block +once checked (patch L170-179) and stores no alias. An archive cannot carry an alias list: `SheetSnapshotRef` is +`deny_unknown_fields` (`crates/core/src/domain/archive/snapshot.rs:42`), and nothing reads one. + +What the registered pair asserts is proven. The committed `draft/document.json` hashes to the alias by bytes and to +the canonical value through `sheet_fingerprint` (test `the_draft_gives_the_frozen_validated_value`), so both values +are the same bytes. The report stamp and the snapshot stamp are both attacker-controlled strings that could already +be set to the bundled value before the patch. The pair therefore gives a forger no new capability. + +## Focus 2: does the patch loosen an archive or envelope check, or hide a real content difference? + +`snapshot_matches` and `assert_exportable` are loosened by exactly the registered pair and nothing else. They hide no +content difference, because the pair is one content. The loosening has one side effect on data compatibility, +finding M1 below. It is not a forging vector. + +## Focus 3: JCS (`canonical_json`) edge cases + +- **Member order:** sorted by `encode_utf16()` vectors (`fingerprint.rs:136-142`), which is RFC 8785's UTF-16 + code-unit order. Astral vs BMP is correct (`U+FB33` after `U+1F600`), cross-checked against Node's `<`. +- **Strings:** `"` and `\` escaped, U+0000-U+001F with the short forms, otherwise lowercase `\u00xx`. DEL, `/`, + U+2028 and U+2029 stay verbatim, with no normalisation (`é` ≠ `e`+U+0301). This matches RFC 8785 §3.2.2.2 and + `JSON.stringify`. Lone surrogates are refused at parse (`crates/core/src/domain/js.rs:42-47`), so they get no hash + and are never altered. +- **Numbers:** `js_number` (V8 oracle, 44,322 rows, green). Parsing uses serde_json `float_roundtrip` (workspace + `Cargo.toml`), so it is correctly rounded like `JSON.parse`. A big integer goes `u64 → f64` with nearest-even + rounding, which equals JS (`9007199254740993 → …992`). `JsInt` is f64-backed (`js.rs:94-125`), so there is no + i64 precision divergence. Non-finite values cannot be reached (the parser refuses them). +- **Injectivity:** `canonical_json` is injective on `Value` except `-0`/`0`, both printed `0`. That collision is + spec-conformant, and the core treats the two the same. +- **Duplicate keys:** last wins, as in `JSON.parse` (L2). +- **Unknown keys:** the typed reading is strict (`deny_unknown_fields` on every object, `schema.rs:4`), so no + collision can come from unknown keys (L1 is a documentation error). +- **Defaults:** filling Zod defaults merges only documents with the same meaning. + +Net: two documents collide only when the core itself cannot tell them apart. The same document always gives the same +hash in this build and in an RFC 8785 implementation fed the same validated value. + +## Focus 4: can the validation before hashing be bypassed? + +No, not on any stamping path. `sheet_fingerprint` (`fingerprint.rs:207-221`) runs a strict parse, the strict R2 type, +`validate_sheet_document` with zero issues (warnings included), then `to_value`, JCS and SHA-256. The patch's only +stamping site hashes the exact text written as `document.json` (`pipeline.rs:309` and `:340`, patch L37). +`canonical_json` is public and unvalidated, but no stamping caller uses it. The legacy TypeScript writer +(`import:equine:legacy` until R5.7) still stamps v0 bytes, and the load check does not notice (M2). + +## Findings + +### M1 [MEDIUM] Envelopes with mixed stamps after the switch lose their snapshot in every pre-switch reader + +- After the switch, an old report keeps its `27c7…` stamp on the alias path. The patch's own test asserts this: + `a_report_on_the_historical_value_is_not_rebased_and_keeps_its_stamp`, patch L300; the code is patch L122-126. +- The export snapshot is stamped from the loaded sheet: + `crates/core/src/domain/archive/snapshot_rules.rs:60` → `12d7…`. +- The patched `assert_exportable` accepts the pair and writes it (`crates/core/src/pdf/write/input.rs:204-213` + after the patch). Every old report re-exported after the switch therefore yields `report=27c7…`, + `sheetSnapshot.ref=12d7…`. +- Readers that compare stamps strictly read these envelopes as `snapshot_rejected: sheet_mismatch`: + - the frozen N-1 reader (`packages/core-wasm/tests/n-1/domain/archive/envelope.ts:97-102`); + - today's reader (`crates/core/src/domain/archive/read.rs:116-119`), which is what a `git revert` rollback + restores; + - any deployed pre-switch build. +- Effect: the report is kept, but the archived labels are lost for those readers. Plan §B.12 anticipates only the + rebase of `12d7…` archives, not this. +- It also makes the `TRUSTED_ALIASES` entry permanent. Removing it later (R5.7 cleanup or after) would drop these + snapshots in the current reader too. +- No rehearsal could catch it, because the seed was never switched (L5). +- Fix direction, an owner decision: (a) stamp the snapshot with the report's own stamp when `equivalence` says + `TrustedAlias`; or (b) re-stamp the report with the canonical value on the alias path, which contradicts "stamp + kept"; or (c) accept it, and record "a registry entry is never removed" plus an N-1 test of a re-exported old + report. + +### M2 [MEDIUM] The declared-block check is incomplete against "a contradiction must be refused" and plan §B.4/§B.11 + +Where: patch L148-149 and L170-179 (`crates/core/src/domain/sheet/loaded.rs`), and `fingerprint.rs:90-108`. + +- **(a) The check is opt-in.** The block is `#[serde(default)] Option<…>`, and `BundledRef` ignores unknown keys. An + absent or misspelled block (`fingerprints`) skips every check, but plan §B.4 says a reference without a known + convention name is refused. +- **(b) A legacy value under v1 passes.** `check_declared` iterates only the listed aliases. + `document_sha256: "27c7…"` with `{convention: v1, aliases: []}` passes: a sheet declaring v1 while carrying the + v0 value. +- **(c) No hex check.** Nothing checks the bundle's `document_sha256` as 64-hex at load. Plan §B.11 lists "a + malformed hex value" as a tested refusal, and that refusal is absent. +- **(d) Loose block type.** `DeclaredFingerprint` accepts unknown keys. + +No false equivalence follows, because `equivalence` never reads the block. The residual risk is convention drift that +goes undetected, for example `import:equine:legacy` rewriting `sheet-ref.json` without the block. + +Fix direction: refuse when `document_sha256` is a registered alias of this sheet under a declared v1; apply +`is_sha256_hex` to the ref; put `deny_unknown_fields` on the block type; decide whether absence is refused after the +switch. + +### Low findings + +| ID | Location | Finding | Direction | +|---|---|---|---| +| L1 | `fingerprint.rs:6-7` | The doc says "unknown keys dropped". The reading is strict (`schema.rs:4`): an unknown key gives `FingerprintError::Shape`. The behaviour is safer than documented. | Correct the doc | +| L2 | `js.rs:42-47`, oracle case 6 | Duplicate member names are accepted with last wins, where RFC 8785 assumes I-JSON. `{"k":1,"k":2}` and `{"k":2}` share a fingerprint. The core and `JSON.parse` read both the same; a first-wins consumer would differ. | Accepted by design; state it in the v1 definition | +| L3 | patch L219-230 (`lines.rs:347-366` after the patch) | The alias branch of `sheet_line` drops the draft/published status that the same-sheet line prints (`lines.rs:351-358`). | Diagnostic only | +| L4 | `fingerprint.rs:112` | `canonical_json` is public and has no validation step. No stamping caller uses it today. | Keep `sheet_fingerprint` the only stamping entry | +| L5 | TODO.md R5.6 prep line; RUST.md §11.19; patch L268 | The evidence conflicts. TODO says "rehearsed (rust:check + check:all 14:32:05 green)"; RUST.md says four suites fail with the generator switched. The rehearsal never regenerated the seed, so the app, N-1 and report-compare suites ran on `27c7…` with the alias paths dormant. The test header cites a non-existent `r5-6-consumers.patch`. | Rerun the gates on a switched seed at the switch | +| L6 | patch `fingerprint_consumers.rs` | No consumer-level test covers a foreign `sheet_id` carrying the registered pair (rebase, archive, export, compare). The four sites are correct by reading; only `equivalence` is unit-tested for it (`sheet_fingerprint.rs`). | Add one case per site | +| L7 | patch L37 | `sheet_fingerprint` parses and validates before the drawings' resource bound (RUST.md §11.19). This is an operator tool on repository input. | Move it after the bound, as planned | +| L8 | `sheet_fingerprint.rs:6`, patch L272 | New `#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]`. All 39 existing test crates carry the same allow, it applies to test targets only, and it is not a security suppression. | Context | +| L9 | `rebase.rs:40` | Pre-existing, kept by the patch: equal stamps skip the rebase without comparing `sheet_id`. The bundle's `document_sha256` is never recomputed at load (wasm has no `fingerprint` feature), so the build is trusted, as with v0. | Context | + +Checklist and tool notes: + +- Semgrep's packs carry little Rust taint coverage; the manual review above carries this scope. +- The guardrails scanner reports 1 WARN (`SB-POLICY-NOT-OWNER`, + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`). It is outside this delta and was filtered. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 21 files (12 diff files incl. the patch file, 7 patch target files at HEAD, js.rs + json.rs as context); semgrep on 18 (journal.md, TODO.md, RUST.md read and grepped only) +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] mixed-stamp envelopes rejected by every pre-switch reader (N-1, rollback, older builds); registry entry becomes permanent — crates/core/src/domain/archive/snapshot_rules.rs:60, patch L122-126 (report/rebase.rs), crates/core/src/pdf/write/input.rs:204-213, packages/core-wasm/tests/n-1/domain/archive/envelope.ts:97-102 + - [MEDIUM] declared-block check opt-in, legacy value under v1 accepted, no hex check, block not strict — patch L148-149 + L170-179 (domain/sheet/loaded.rs), crates/core/src/domain/sheet/fingerprint.rs:90-108 + - [LOW] doc says unknown keys dropped, reading is strict — crates/core/src/domain/sheet/fingerprint.rs:6-7 + - [LOW] duplicate member names accepted (last wins), not I-JSON — crates/core/src/domain/js.rs:42-47 + - [LOW] report-compare alias line drops draft/published status — patch L219-230 (pdf/compare/lines.rs) + - [LOW] canonical_json public without validation (no stamping caller) — crates/core/src/domain/sheet/fingerprint.rs:112 + - [LOW] rehearsal evidence conflicts, seed never switched, header cites missing r5-6-consumers.patch — .claude/tasks/TODO.md, docs/development/RUST.md §11.19, patch L268 + - [LOW] no consumer-level foreign-sheet test of the registered pair — patch tests/fingerprint_consumers.rs + - [LOW] fingerprint computed before the drawings bound — patch L37 (curation/draft/pipeline.rs) + - [LOW] test-crate clippy allow, existing convention, not a security suppression — crates/core/tests/sheet_fingerprint.rs:6, patch L272 + - [LOW] pre-existing: rebase on equal sha ignores sheet_id; bundle sha never recomputed at load — crates/core/src/domain/report/rebase.rs:40 +PROOF: semgrep 157 rules on 18 files → 0 findings (0 errors); checklist 8 checks → 0 findings in scope (guardrails 0 FAIL / 1 WARN out of scope, filtered); targeted review 4 focus areas → 2 MEDIUM, 9 LOW; cargo test sheet_fingerprint 9 passed; git apply --check clean (not applied) +``` diff --git a/.claude/audits/2026-10-24-rust-r5-6-prep-verify.md b/.claude/audits/2026-10-24-rust-r5-6-prep-verify.md new file mode 100644 index 00000000..b91cd839 --- /dev/null +++ b/.claude/audits/2026-10-24-rust-r5-6-prep-verify.md @@ -0,0 +1,15 @@ +# R5.6 preparation — fresh verifier (Opus) on 3b9a395, persisted by the orchestrator (verifier is read-only) + +VERIFY — VERDICT: ECARTS(2) (criteria P1-P7 from the dispatch brief, no contract file on disk) + +- P1 inert: MET (no consumer, seed unchanged, --check 0, 27c7…2660, wasm/app untouched, Cargo.lock unchanged) +- P2 RFC 8785: MET (2 RFC vectors, 44,322 V8 rows, 7 Node cases reproduced; 11 of 24 RFC appendix numbers unpinned) +- P3 validation before hashing, draft = 12d78872…74e2: MET +- P4 registry: MET +- P5 census 147 / 124 / 123: MET (test asserts floors only; non-alias stamp = ffff… in security.snapshot-another-sheet.pdf) +- P6 switch patch: NOT-MET: report-compare build E0063 (BundledRef.fingerprint missing in bin/report_compare.rs); rest checked (five consumers, session.rs through rebase only, alias line in report-compare) +- P7 docs: NOT-MET: "rehearsed green" false with the whole patch (4 curation tests fail, cli build broken); drawings-projection test not fixable by reordering; "four suites" = four tests in two suites +- Outside criteria: switched-seed simulation adds 3 failures (fingerprint_consumers precondition ×2, pdf_import O7 oracle on migrated v2 stamps); alias line drops draft status; patch header cited a missing file; absent block accepted at load +- FLOOR: clean + +Orchestrator after: patch fixed (report-compare, strict block, NotCanonical + test, header); RUST.md §11.19, plan §E, TODO corrected; EVAL-031. diff --git a/.claude/audits/2026-10-25-rust-r5-6-active-security.md b/.claude/audits/2026-10-25-rust-r5-6-active-security.md new file mode 100644 index 00000000..c32d8fdd --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-active-security.md @@ -0,0 +1,167 @@ +# Security audit: R5.6 fingerprint switch, activated (9e87016) + +Mode audit, fresh and blind. Scope: `git diff 59521dc 9e87016` (31 files, all present at HEAD), +branch `feature/rust-r5-pipeline-core`, working tree clean before and after. Contract: +`.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md` (S1-S8 + Clarification 2026-10-25) and the +owner's activation brief. No file modified except this report; no network beyond semgrep's rule +download; no service key, no Supabase, no transfer tool, no `pnpm format`. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 31 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] rebase-exact-equality-no-sheet-id (pre-existing, R2) — crates/core/src/domain/report/rebase.rs:43 + - [LOW] registry-and-declaration-check-public — crates/core/src/domain/sheet/fingerprint.rs:44, :103 + - [LOW] snapshot-assets-outside-fingerprint (pre-existing trust model) — crates/core/src/domain/archive/snapshot_rules.rs:79 + - [LOW] caller-built-export-input-trusted (pre-existing, documented) — crates/core/src/pdf/write/input.rs:205 + - [LOW] new-lint-allow-in-test-file (not a security suppression) — crates/core/tests/r5_6_switch.rs:8 +PROOF: semgrep 129 rules on 31 files → 0 findings; checklist 8 checks → 0 findings in scope (+1 guardrails WARN outside the diff); alias-path review 14 checks → 0 blocking, 5 LOW +``` + +## Tooling + +- semgrep 1.168.0, pinned packs, `--metrics=off`: 129 rules run on the 31 changed files, 0 findings, + 0 errors. +- Guardrails scanner (`~/.claude/skills/guardrails/scripts/scan.py --domain api,supabase`): 0 FAIL, + 1 WARN, 1 MANUAL. The WARN (`SB-POLICY-NOT-OWNER`, + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177`, `species_select_active`) is in a file + outside the diff: out of scope, not counted. MANUAL not reported. +- Hermetic tests run in the main tree (no file written outside `target/`): + - `cargo test -p faunosteo-core --features cli --locked`: `r5_6_switch` 14/14, `sheet_fingerprint` 11/11 + (incl. `nesting_is_bounded_with_a_controlled_error`), `pdf_import` 4/4, `pdf_compare` 16/16; + lib unit `the_registered_pair_holds_one_way_for_its_sheet_only` 1/1. + - vitest `packages/core-wasm/tests/r5-6.n-1.test.ts` 2/2 and `apps/app/tests/unit/r5-6.switch.test.ts` + 2/2 (BUILD_STAMP accepted, module current). + - `bash scripts/import-equine.sh --check` (compare-only, read before running): legacy-import 6 files + 0 differences, draft 12 files 0 differences. + +## Checklist (STEP 3), scoped to the diff + +| Check | Result | +|---|---| +| Hardcoded secret / token / key / auth URL | none (added lines grepped; the hex values are public fingerprints) | +| SQL by concatenation | none (no SQL in the diff) | +| Unsanitised render (innerHTML, eval, raw) | none | +| Sensitive endpoint without authz | N/A: no endpoint, RPC or policy in the diff | +| Stack trace / internal path to the user | none new. `facade.rs:56` maps `LoadError::Fingerprint` to `invalid_sheet` with the refusal's Debug text (a recomputed hex or a serde reason about the page's own bundle), no path, no secret | +| Secret / PII in a log | none (no log call added) | +| Tracked `.env` / credential file | only `.env.example` tracked | +| Guardrails scanner | run, nothing in scope (see above) | + +Anti-gaming (STEP 4): no new `nosemgrep`, `nosec`, `eslint-disable`, `@ts-ignore` in the diff. One new +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` heads the new test file +`crates/core/tests/r5_6_switch.rs:8`. It is the shared header of 20+ integration test files (the core's +no-I/O and no-panic lints, which tests that read fixtures must relax), not a security-rule suppression: +reported LOW, not blocking. + +## Alias paths attacked (the brief) + +1. **`equivalence` crate-private.** `fingerprint.rs:72` is `pub(crate)`. Its one non-test caller is + `LoadedSheet::recognises_historical_stamp` (`loaded.rs:169`). The wasm crate references no + fingerprint item (`crates/wasm/src` grep empty). +2. **One decision point.** Every alias decision goes through `recognises_historical_stamp` + (`loaded.rs:163-171`): `build_sheet_snapshot` (`snapshot_rules.rs:62-64`, behind `archive.snapshot` + `ops.rs:361-363`), `rebase_report_on_sheet` (`rebase.rs:43-46`, reached by `session.rs:89` draft + restore and `session.rs:127` import), `sheet_line` (`compare/lines.rs:350-358`). The only other + reader of `TRUSTED_ALIASES` in `src` is the generator (`pipeline.rs:185`), which writes the + descriptive list into `sheet-ref.json`; that list is never read back for a decision + (`declared.aliases` is only passed to `check_declared`, `loaded.rs:199-204`). +3. **Forging the private verified state.** `verified_fingerprint` (`loaded.rs:75`) is a private field; + `from_bundle` is the only constructor (`loaded.rs:121-151`), `LoadedSheet` derives neither + `Deserialize` nor `Default`, struct-update syntax is impossible outside the module, and + `unsafe_code = "forbid"` applies to core and wasm (workspace lints, `Cargo.toml:55`, both crates + `[lints] workspace = true`). `Clone` copies the state with the document, which the recomputation then + re-proves. The wasm `SheetHandle` keeps its `LoadedSheet` private (`crates/wasm/src/lib.rs:27`), so a + page cannot mutate it. +4. **Recomputation at the decision.** The predicate requires a verified value, `verified == + reference.document_sha256`, the registry pair `(sheet_id, alias → verified)` in one direction, and + `document_fingerprint(&self.document) == verified` now. A mutated pub `document` or `reference`, a + cloned sheet re-pointed to another sheet id, a v0 sheet, or a stamp the registry does not bind all + return false (tests `a_mutated_document_or_reference_never_keeps_the_alias`, + `the_historical_value_on_another_sheet_id_is_not_recognised`). A bundle with another sheet id and + the genuine document verifies but never matches the registry (entry pinned to the equine id); a + bundle with the equine id and other content verifies to another value the registry does not bind. + Granting the alias therefore needs the genuine content (SHA-256 preimage otherwise). +5. **Injectivity of the fingerprinted form.** The value hashes the typed reading serialised back. Checked + for collapses that would let two behaviours share a value: no `#[serde(skip)]` or `flatten` in + `sheet/schema.rs`; `skip_serializing_if = "Option::is_none"` (lines 169, 176) round-trips; the + untagged enums (`SheetView`, `Geometry`) carry distinguishing fields. The app consumes the same + typed document, so text-only differences the reading erases are never behaviour. +6. **v0 / v1 and direction.** No block = v0, unverified, no privilege (`check_reference` returns + `Ok(false)`, `loaded.rs:196-198`); an unverified v0 sheet carrying the canonical value still + rebases an old report and its direct export is refused (`SheetMismatch`, test + `the_direct_export_on_an_unverified_v0_sheet_with_the_canonical_value_is_refused`). The registry is + consulted only as alias → canonical, so a v0 (rollback) sheet never recognises a `v1` stamp. + `check_declared` refuses a declared value that is a registered alias or not 64 lowercase hex + (`fingerprint.rs:112-118`). +7. **`null` and malformed blocks.** `present_block` (`loaded.rs:46-50`) turns an explicit `null` into a + shape error; `DeclaredFingerprint` is `deny_unknown_fields` with required `convention` and + `aliases` (`loaded.rs:52-57`); a string block and an unknown key are refused (tests). A misspelt key + on the non-strict `BundledRef` only downgrades to v0: fail-closed, no privilege. +8. **Aliases never from a report, archive or bundle.** Archives cannot carry one: `SheetSnapshotRef` + and the snapshot are `deny_unknown_fields` (`archive/snapshot.rs:42, 59`); the archive reader keeps + strict equality between snapshot and report stamps (`archive/read.rs:116-119`, unchanged). +9. **Export input strict.** `assert_exportable` (`pdf/write/input.rs:204-210`) is unchanged by the diff: + strict sheet id and stamp equality, no registry. The alias only reaches an archive through the + core-built snapshot of a verified sheet. +10. **`report:compare`.** The alias line prints both raw values truncated to 12 chars through `esc` + (`compare/lines.rs:366-376`); `same_sheet` still requires the sheet id; the bin reads the seed's + block through the same `present_block` and `from_bundle` verification (`bin/report_compare.rs:40-44, + 66`). +11. **`canonical_json` depth.** Bounded at `MAX_CANONICAL_DEPTH = 128` with `CanonicalError::TooDeep` + (`fingerprint.rs:132-154`), above serde_json's parse limit (127 nested containers accepted), so + every parsed bundle fits and a value built in code beyond it errors instead of overflowing the stack. + Tested at 128 / 129, arrays and objects. +12. **Recomputation cost.** In the predicate the recomputation is the last conjunct, after the registry + match: a forged or unknown stamp costs a string compare, only the registered historical stamp + triggers one recomputation (one per export snapshot, rebase or compare line). The load recomputes + once per `SheetHandle` when a block is present (page runtime, `runtime.ts:322`, and each import + worker, `handler.ts:48`), O(document), 302,794 B for the equine draft. Not attacker-amplifiable: + the bundle is build-time, a report triggers at most one recomputation per call. The 14 switch tests + (loads, imports, exports) run in 0.81 s in a debug build. +13. **Seed artifacts.** Only `draft/sheet-ref.json` and `draft/report-migration-map.json` change. + `document.json` (sha256 27c7383c…), `assets/horse.svg` (0ea5202f…) and `equine_draft.sql` + (c5a24312…) hash identically at 59521dc and HEAD. The committed block is consistent: value + `12d78872…`, convention `v1`, alias `27c7383c…`, which is the registry entry and the old file-bytes + hash. The migration map changes only its `documentSha256`. +14. **Oracles, goldens, N-1.** 0 files changed under `crates/core/tests/oracles`, `crates/core/tests/pdf`, + `apps/app/tests/fixtures`, `packages/core-wasm/tests/n-1`. The new + `crates/core/tests/fixtures/r5-6/pre-switch/{sheet-ref,report-migration-map}.json` are byte-identical + to the 59521dc seed files (sha256 2c0716f1…, 4139c51d…), so the redirected historical tests read + the real pre-switch inputs and cannot mask an anatomical change. Exact-equality semantics are + unchanged and documented as no proof of content (`fingerprint.rs:13-18`). + +## Reported findings (LOW, non-blocking) + +**L1. Rebase exact-equality branch has no sheet-id check** — `crates/core/src/domain/report/rebase.rs:43`. +Pre-existing since R2, unchanged in meaning: a report of another sheet id stamped with the current +sheet's value skips the rebase. The new alias branch does check the sheet id. Hint: add +`report.sheet.sheet_id == sheet.reference.sheet_id` to the equality branch in a later step (behaviour +change, owner decision). + +**L2. Registry and declaration check stay public** — `crates/core/src/domain/sheet/fingerprint.rs:44` +(`TRUSTED_ALIASES`), `:103` (`check_declared`). Neither grants anything by itself and no consumer misuses +them today (integration tests and the generator need them), but a future crate consumer could rebuild an +alias decision from the registry without the recomputation. Hint: `#[doc(hidden)]` plus a doc line, or +move the tests in-crate and make both `pub(crate)`. + +**L3. Archived drawings are outside the document fingerprint** — +`crates/core/src/domain/archive/snapshot_rules.rs:79` (`snapshot_assets(sheet)`). A hand-made bundle with +the genuine document but other SVG texts would archive them under the historical (or the canonical) +stamp. Pre-existing trust model (the bundle is trusted for what it declares, `fingerprint.rs:15-18`); the +alias adds no privilege the canonical stamp did not already have. Hint: bind asset hashes into the +document or check `asset_hashes` against the texts at load, if the threat model ever includes +non-build bundles. + +**L4. Caller-built export input trusted for its self-consistent report and snapshot** — +`crates/core/src/pdf/write/input.rs:205`. A page script can hand the export any matching pair; the +registry is never consulted there and every reader decides again on import. Documented residual, +unchanged by the diff. + +**L5. New lint allow in a test file** — `crates/core/tests/r5_6_switch.rs:8`. Shared test-file +convention for the core's I/O and panic lints, not a security suppression. + +SECURITY — VERDICT: PASS diff --git a/.claude/audits/2026-10-25-rust-r5-6-active-verify.md b/.claude/audits/2026-10-25-rust-r5-6-active-verify.md new file mode 100644 index 00000000..26caea79 --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-active-verify.md @@ -0,0 +1,9 @@ +# R5.6 active state — fresh verifier (Opus) on 9e87016, persisted by the orchestrator (verifier is read-only) + +VERIFY — VERDICT: ECARTS(1) + +- S1-S6, S8 MET; A1-A5 MET (applied code = verified patch + 4 declared owner adjustments; only sheet-ref.json 03e7f6ab…623b and report-migration-map.json 0e991bc2…e2db changed, value 12d7…74e2, block = registry; document.json, horse.svg, equine_draft.sql identical; no oracle/golden/n-1 change; --check 0 differences; import:equine = Rust, legacy = TS) +- S7 NOT-MET: contract still required an inactive branch; activation authorised by the owner inline → settled by the 2026-10-25 activation Clarification of the contract +- Probe (direct export API): v0 + canonical → SheetMismatch; mutated document / reference / id → refused; other sheet id → refused; reference set to the alias value after load → strict equality on a caller-declared value (documented trust boundary, no alias privilege); v1 block with aliases [] still recognises (declared list descriptive) +- Notes: dangling citations BDR-070 / RUST.md §11.22 (added after); equine_draft.sql header still names packages/anatomy (frozen bytes); scripts/import-equine.sh:3 line long; CHANGELOG added after +- FLOOR clean diff --git a/.claude/audits/2026-10-25-rust-r5-6-final-security.md b/.claude/audits/2026-10-25-rust-r5-6-final-security.md new file mode 100644 index 00000000..f83218ef --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-final-security.md @@ -0,0 +1,127 @@ +# Security audit: R5.6 final switch state (M1 correction) + +- Date: 2026-10-25. Mode: audit, fresh and blind (no prior verdict used). +- Target: worktree `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56final`, + detached at 8e77e37 + `.claude/tasks/plans/r5-6-switch.patch`. The worktree diff is line-identical to the committed + patch at baff882 (index lines aside). No code under `crates/ packages/ apps/ scripts/ supabase/` differs between + 943a25a, 8e77e37 and baff882, so the patch applies to the official code state. +- Contract: `.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md` S1-S8 and the 2026-10-25 Clarification. +- Scope: the 30 files of the diff (9 Rust sources, Cargo.toml, 7 Rust tests + 2 fixtures, 4 TS tests/helpers, + 2 scripts, package.json, .prettierignore, CLAUDE.md, the 2 switched seed files). + +## Attack on the alias decision + +Every Rust site that decides "same document" was enumerated (grep of `equivalence`, `TRUSTED_ALIASES`, +`TrustedAlias`, `same_document`, `recognises_historical_stamp`, `document_sha256` across `crates/core/src`, +`crates/wasm/src`, `apps/app/src`, `packages/core-wasm/src`). + +| Path | Decision | Result | +|---|---|---| +| `ops.rs:361` `archive.snapshot` → `snapshot_rules.rs:60-68` `build_sheet_snapshot` | alias only through `recognises_historical_stamp` | holds | +| `pdf/write/input.rs:204-210` `assert_exportable` (wasm export session, `export_pdf`, `export_from_envelope`) | strict `sheet_id` + `document_sha256` equality, unchanged from 943a25a | holds | +| `report/rebase.rs:42-46` (reached by `draft.restore`, `archive.import`, `import_pdf`, `restore_copy`) | exact equality (pre-existing) or `recognises_historical_stamp` with same sheet id | holds | +| `archive/read.rs:116-119` `snapshot_matches` | strict equality report vs archived snapshot, unchanged | holds (mixed alias/canonical archive loses its snapshot, tested) | +| `pdf/compare/lines.rs:350-376` report-compare | `recognises_historical_stamp`, both raw values printed through `esc` | holds | +| `session.rs`, `ops.rs`, `facade.rs` (one arm), `crates/wasm` | no own comparison; route to the above | holds | +| app TypeScript | no stamp comparison (only `provider.ts:52` copies the ref) | holds | + +`recognises_historical_stamp` (`loaded.rs:163-171`) requires, in this order: a loader-verified `v1` value, that value +still equal to `reference.document_sha256`, the registry pair (sheet id, stamp as alias, verified value as canonical, +one direction only, `fingerprint.rs:63-75`), and a fresh `document_fingerprint(&self.document)` equal to the verified +value. Because the registry canonical must equal a value recomputed from the current document, the privilege is +granted only when the loaded content hashes to the registered equine canonical (SHA-256 preimage otherwise). A +JS caller building a `SheetHandle` from a hand-made bundle gains nothing unless its document is that content. + +Forging the private state: +- Struct literal and functional update `..base`: impossible outside `loaded.rs` (private `verified_fingerprint`, + `index`, `drawings`; E0451). No other constructor than `from_bundle` (grep: test helpers all go through it). +- `Deserialize`, `Default`, `Serialize`: not derived on `LoadedSheet`. `unsafe_code = "forbid"` workspace-wide + (`Cargo.toml:55`), no transmute. No `Cell`/`RefCell`. +- `Clone`: copies a consistent state; mutating the clone's pub `document` or `reference` is caught by the + recomputation and the `verified == reference` check (tested, `r5_6_switch.rs` `a_mutated_document_or_reference_never_keeps_the_alias`). +- `SheetHandle` (`crates/wasm/src/lib.rs:26-37`) holds the sheet privately; no `&mut` access to it from JS. +- Even a forged `verified_fingerprint` on a v0 sheet would only grant the alias when the content is the canonical + one: a policy deviation from S3, never a content confusion. + +Fingerprint block handling (`loaded.rs:39-57`, `191-210`): absent → v0, unverified, no privilege; explicit `null` → +refused (`present_block`); string, unknown key, missing key → refused (`deny_unknown_fields`, required fields); +convention other than `v1`, non 64-lowercase-hex value, value equal to a registered alias, unregistered alias in the +list, value not recomputed from the document (including a document with integrity errors) → refused at load, +closed `invalid_sheet` kind, detail never rendered (`useSheet.ts:60`). Duplicate JSON key: last wins, a trailing +`null` is refused. A misspelt block key at `ref` level (no `deny_unknown_fields` on `BundledRef`) loads as v0: +fail-closed (less privilege, old reports rebase onto identical content). + +v1 with warnings (`fingerprint.rs:253-256`): errors refuse, warnings do not. This only widens which documents +get a value; it grants no equivalence, and a warning-only document with another content gets another value +(tested, it rebases old reports). + +## Recursion and cost + +- `canonical_json` (`fingerprint.rs:121-193`): containers refused at depth ≥ 128 with `CanonicalError::TooDeep`, + tested at the bound (`sheet_fingerprint.rs:280-292`). Its only non-test caller is `document_fingerprint`, whose + only caller is `loaded.rs` on the loaded sheet's document (the build-time bundle). Attacker data (archives, + drafts, PDFs, rescue copies) never reaches `canonical_json`; archived snapshot finding depth stays capped at 8 + by `assert_snapshot` before shape. The new load-time `validate_sheet_document` + `serde_json::to_value` on the + bundle are bounded by serde_json's parse limit (127 containers). +- Recomputation cost: native release, a test with about 3 fingerprints, 7 loads and 1 import runs in 84-87 ms + against 32 ms for 3 loads with none, so one fingerprint of the 296 KB document is in the low milliseconds. + The recomputation runs only when the stamp already equals the registered alias (short-circuit order, + `loaded.rs:167-170`; identical stamps never pay it), at most once per `archive.snapshot` (once per export, + `export.ts:146`), per import (one candidate, `import.rs:24-30`) or per draft restore, plus one at each v1 + load. Import worker timeout 20 s (`controller.ts:19`). Repeated calls only cost the user's own tab: no DoS. + +## Findings + +No CRITICAL, no HIGH, no new security suppression. + +- [LOW] hardening — `crates/core/src/domain/sheet/fingerprint.rs:63` — `equivalence` is a crate-public function + that answers `TrustedAlias` from the registry alone, with no verified state and no recomputation. Its only + caller today is `recognises_historical_stamp` (`loaded.rs:169`); a future caller (the Supabase sheet provider + of Step 13, a new export path) could reopen the flaw of the previous round. Hint: `pub(crate)` or private to + `loaded`, or a census test that pins its callers. +- [LOW] by design, context — `crates/core/src/pdf/write/input.rs:204-210` — the export session accepts any + self-consistent caller-supplied (report, snapshot) pair: a script in the page can write an archive whose report + and snapshot both carry the alias with a hand-built snapshot. No equivalence is granted there (every reader + re-decides against its loaded sheet), the alias adds nothing a forged canonical stamp could not already do, + and this is the pre-switch behaviour for any stamp. +- [LOW] context, pre-existing — `crates/core/src/domain/report/rebase.rs:43` — the exact-equality branch keeps a + report of another sheet id unrebased when it carries the loaded value; unchanged since R2 (the new alias branch + does check the sheet id). Equal SHA-256 means equal content, so no confusion. +- [LOW] context — `crates/core/tests/r5_6_switch.rs:8` — new `#![allow(clippy::disallowed_methods, + clippy::unwrap_used, clippy::expect_used)]`, test-only, the header 40 existing test files carry; not a + security-tool suppression. +- Out of diff, filtered: guardrails `WARN SB-POLICY-NOT-OWNER` + `supabase/migrations/20261008110000_anatomical_sheets.sql:1177` (`species_select_active`, catalog read + policy), pre-existing. + +Non-security note: `r5_6_switch.rs:133-135` writes `/target/tmp/r5-6/` even when `CARGO_TARGET_DIR` points +elsewhere (git-ignored, `.gitignore:65`). + +## Proof + +- semgrep 1.168.0, `p/security-audit`, `p/secrets`, `p/owasp-top-ten`, `--metrics=off`: 163 rules on the 30 diff + files, 0 results, 0 errors. Caveat: these packs carry few Rust rules; the Rust review above is manual. + `p/*` content is fetched at run time, not frozen by the CLI pin. +- Checklist, 9 checks on the added lines and the tree: hardcoded secret/auth URL (0), SQL by concatenation (0), + unsanitised render/eval (0), sensitive endpoint without authz (n/a, no endpoint in the diff), internal error to + the user (0: `invalid_sheet` detail not rendered), secret/PII in a log (0), tracked `.env` (0, only + `.env.example`), guardrails `--domain api,supabase` (0 FAIL, 1 WARN out of diff, filtered), new suppressions (0 + security; 1 test lint allow, LOW). +- Hermetic tests run in the worktree, `CARGO_TARGET_DIR=/target`, release, `--features cli`: + `r5_6_switch` + `sheet_fingerprint` 25 passed; `pdf_import`, `pdf_compare`, `archive_rules`, `report_rules`, + `sheet_contract` 78 passed. +- Seed check: `draft/document.json` still hashes (bytes) to the registered alias 27c7…, `document.json`, + `horse.svg`, `equine_draft.sql` unchanged; only `sheet-ref.json` and the map's `sheet.documentSha256` changed. +- Nothing edited in either tree except this report; no network beyond the semgrep rule download, no Supabase. + +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 30 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] hardening: crate-public registry-only `equivalence` — crates/core/src/domain/sheet/fingerprint.rs:63 + - [LOW] by design: export accepts caller-supplied consistent snapshot — crates/core/src/pdf/write/input.rs:204 + - [LOW] pre-existing: exact-equality rebase branch without sheet id — crates/core/src/domain/report/rebase.rs:43 + - [LOW] test lint allow (crate convention) — crates/core/tests/r5_6_switch.rs:8 +PROOF: semgrep 163 rules on 30 files → 0 findings; checklist 9 checks → 4 findings (LOW), 1 out-of-diff WARN filtered +SECURITY — VERDICT: PASS diff --git a/.claude/audits/2026-10-25-rust-r5-6-final-verify.md b/.claude/audits/2026-10-25-rust-r5-6-final-verify.md new file mode 100644 index 00000000..c099f4df --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-final-verify.md @@ -0,0 +1,14 @@ +# R5.6 final rehearsal — fresh verifier (Opus), persisted by the orchestrator (verifier is read-only) + +Contract `.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md` (S1-S8 + 2026-10-25 Clarification); final worktree r56final (8e77e37 + patch at baff882). + +VERIFY — VERDICT: CONFORME (8/8) + +- S1 MET: decision in snapshot_rules.rs build_sheet_snapshot via recognises_historical_stamp (private verified value, reference equality, registry one-way, recompute now); 9 scenarios tested (r5_6_switch 14/14, vitest N-1 2/2, app 2/2); rollback: unpatched build's report-compare reads the re-export, snapshot kept +- S2 MET: input.rs, archive/read.rs, session.rs, ops.rs, crates/wasm, n-1 unchanged vs 943a25a; equality strict +- S3 MET: probe through facade::load_sheet: v0 canonical = no privilege; null/string/{}/array/missing/extra/v0/upper/alias/63-hex/other/forged/self-alias/content-changed/foreign-id refused; warnings-only v1 loads verified +- S4 MET: only the two seed files differ; document.json, horse.svg, equine_draft.sql byte-identical; no oracle/golden/ledger/n-1 in patch; original contexts + post-switch twins +- S5 MET (12-hex prefixes, the tool's style); S6 MET; S7 MET (main tree clean, seed 27c7, patch applies); S8 MET (rust:check rc 0, 1475 passed; check:all 01:53:59 cited) +- Direct-API probe: v1 + old report → 27c7/27c7 exported; v0 canonical → SheetMismatch; mutated document / reference value / reference id → refused; other sheet id → refused; forged stamp → refused; canonical_json 128 OK, 129 TooDeep, 5000 TooDeep without overflow +- Observations: stale comments fingerprint.rs (6, 15, 246-247); RUST.md §11.20 superseded mechanism (superseded by §11.21); null block → invalid_shape in facade (refusal either way) +- FLOOR clean diff --git a/.claude/audits/2026-10-25-rust-r5-6-rehearsal-security.md b/.claude/audits/2026-10-25-rust-r5-6-rehearsal-security.md new file mode 100644 index 00000000..4f583468 --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-rehearsal-security.md @@ -0,0 +1,142 @@ +# Security audit: R5.6 fingerprint switch rehearsal (worktree 943a25a + `r5-6-switch.patch`, seed switched) + +- date: 2026-10-25 | mode: audit (delta), fresh run | contract `.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md` (S1-S8) +- scope: `git -C diff HEAD`, 28 files (9 Rust sources, Cargo.toml, 8 Rust test files and 2 fixtures, + 5 TypeScript test files, package.json, rust-check.sh, .prettierignore, the two switched seed files). Worktree: + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56wt`. + `git apply --check -R` of the stored patch is clean there, so the worktree is exactly the patch. +- isolation (S7) checked: main tree at 6ade917, seed `sheet-ref.json` still `27c7…`, `fingerprint.rs` still + "PREPARED, NOT ACTIVE", the main-tree diff since 943a25a touches only `.claude/` and RUST.md. +- untouched, checked file by file: `domain/archive/*` (incl. `read.rs`), `domain/session.rs`, `domain/report/read.rs`, + `pdf/read/*`, `pdf/import.rs`, `pdf/json_js.rs`, `packages/core-wasm/tests/n-1`, `crates/core/tests/oracles`, + `apps/app/tests/fixtures`, `tests/pdf/LEDGER.tsv`, `Cargo.lock`, `deny.toml`. Seed `document.json`, `horse.svg`, + `equine_draft.sql` identical to HEAD; `sha256sum document.json` = `27c7383c…2660` (the registered alias). +- hermetic runs in the worktree (`CARGO_TARGET_DIR=/target`): `--features cli` r5_6_switch 8, + sheet_fingerprint 10, pdf_compare 16, pdf_import 4; `--features curation` curation_draft 20, curation_review 12; + vitest app `r5-6.switch` 2, core-wasm `r5-6.n-1` 1 (resolves the worktree's `packages/core-wasm`). All green. +- not done: no service key, no Supabase, no transfer tool, no delete, no code edited, no `pnpm format`. The only + network access was semgrep fetching its three pinned packs (metrics off). + +## Focus answers + +**Forged, unknown, foreign-sheet or unverified stamp counted as the same document?** Not in the readers. +`equivalence` (`fingerprint.rs:63-75`) admits only the registry pair, one way (alias stamped, canonical current), +bound to the sheet id. A forged 64-hex stamp is `Different` and rebases (`r5_6_switch.rs:169-179`); a case-changed +one is refused by the v3 contract; a foreign sheet id matches no entry and fails the sheet-id checks +(`rebase.rs:43-48`, `input.rs:212`). `check_reference` (`loaded.rs:161-180`) recomputes `v1` from the same typed +document the index is built from, so `fingerprint_verified` implies the loaded content is the registered content. +The pair itself is bound to one content: sha256 of the bytes is the alias, `v1` of the same bytes is the canonical +value (curation_draft `the_document_fingerprint_is_v1_and_its_bytes_keep_the_historical_alias`, plus my sha256sum). +Rebase and report:compare grant the alias only on a verified sheet (`rebase.rs:43-48`, `lines.rs:356`). The export +check is the exception: see M1. + +**Does M1 write a snapshot that is not the trusted document, or loosen archive checks?** Through the application, +no: `export.ts:146` always builds the snapshot with `archive.snapshot` from the loaded sheet, and an old stamp only +survives to export when that sheet was verified (otherwise rebase moved the report first). `archive/read.rs:116-119` +is unchanged and strict; the mixed envelope is still rejected (`r5_6_switch.rs:185-188`). At the core boundary the +binding is not enforced (M1). + +**Can a v0 reference gain alias privilege?** At load, no: no block means `fingerprint_verified = false`, and a v0 +reference carrying the canonical value still rebases an old report (`r5_6_switch.rs:255-263`). At export, yes, +if a caller pairs an old report with a snapshot cut from such a sheet (M1). + +**Do the declared test rules hide a content difference?** No. Each rule is targeted and fails loudly on anything +else. `curation_draft` `r5_6_rule` asserts the pre-switch value is the alias, moves only that value, adds the block, +then compares whole bytes through the generator's formatter; the pre-switch copies are pinned to the frozen R5.1 +ledger (sha and length). `pdf_compare` `r5_6_rule` rewrites only the "matches the bundled sheet" line of +non-migrated blocks into the alias line; a `!!` line or any other drift still mismatches, and the alias count is +pinned (77). O7, O10, the R2 Zod oracle, the R5.1 ledger and `seed.golden` read the pre-switch files; their +post-switch twins (`o7_after_r5_6_…`, `o10_on_the_switched_seed_…`, `the committed migration map after R5.6`) +allow the stamp alone to move. `migratedBeforeR56` changes only `report.sheet.documentSha256`; observations +still go through the switched map, so a mapping change would break the byte goldens. + +**Wasm sha2 and the load-time fingerprint: cost or DoS?** The hasher is reached only from `loaded.rs:175` and the +pipeline (`pipeline.rs:174`). Archive snapshots and imported files are never fingerprinted, and the bundle is +build-time content. The cost is one validation, one JCS and one SHA-256 of a 296 KB document per sheet handle +(page plus each import worker): the 8-test switch suite with its dozen loads runs in 0.46 s in a debug build. +`sha2 0.11.1` was already locked; the worker keeps its own dependency. No attacker-driven DoS. Two LOWs below +(L4, L5). + +## Findings + +### M1 [MEDIUM] The export grants the alias on the snapshot's word, with no verified sheet behind it + +`crates/core/src/pdf/write/input.rs:205-213` (`assert_exportable`) and `:238-248` (`keep_the_report_stamp`) +call `equivalence` with the snapshot's own `reference.document_sha256` as "current". The export never sees a +`LoadedSheet`, so `fingerprint_verified` is not consulted. The snapshot document is a lean cut and cannot be +re-hashed. As a result: + +- `export_from_envelope` (`pdf/write/export.rs:117-136`, cargo only) took a mixed envelope (report `27c7…`, + snapshot `12d7…`, any lean document) as `sheet_mismatch` before the patch. It now accepts it and writes the + snapshot under `27c7…`, a self-consistent envelope that the strict reader keeps. The writer normalises what + the reader rejects. +- A snapshot cut from an unverified v0 reference that carries the canonical value, exported with an old report, + gets the alias that rebase and report:compare deny for the same sheet. +- `packages/core-wasm/tests/r5-6.n-1.test.ts:46-49` feeds a hand-edited snapshot and the core accepts it, which + shows there is no provenance check. +- RUST.md §11.20 (main tree, lines 3538-3545) says M1 "needs the loaded sheet's `fingerprint_verified`". At this + site it does not. Contract S1's "with the loaded sheet's `v1` value recomputed … at load" holds only as an + application-flow precondition. + +Not exploitable today. The only shipped caller builds the snapshot from the verified loaded sheet. Archives are +unsigned, so anyone can already write a `27c7/27c7` envelope around arbitrary content: no capability is gained. +This is a trust-boundary gap, not a vulnerability. +Hint: make the M1 decision where verification is known. `build_sheet_snapshot` / `archive.snapshot` can stamp the +report's value when `sheet.fingerprint_verified` and the pair is `TrustedAlias`, and `assert_exportable` goes back +to strict equality (that also keeps `export_from_envelope` strict). This needs an S2 scope amendment +(`snapshot_rules.rs`). Otherwise, state the precondition at `input.rs:232-237` and correct RUST.md §11.20. + +### L1 [LOW] `"fingerprint": null` reads as no block (v0) +`crates/core/src/domain/sheet/loaded.rs:38-39`: `#[serde(default)] Option<…>` maps `null` to `None`. A present but +null block is not refused, against S3's "a present block is strict". It fails closed: no privilege, old reports +rebase. Hint: refuse an explicit `null`, for example with a custom deserializer. + +### L2 [LOW] `BundledRef` accepts unknown keys, so a misspelt block loads as v0 +`loaded.rs:30-40`: `DeclaredFingerprint` is strict, but its parent is not. A typo such as `fingerprints` silently +yields an unverified sheet. This fails closed, and the struct shape predates the patch. Hint: +`deny_unknown_fields` on `BundledRef`, if every bundle producer (vite plugin, report_compare `SeedRef`, tests) +emits only known keys. + +### L3 [LOW] Verification state and verified value are public mutable fields +`loaded.rs:53` (`reference`) and `:66` (`fingerprint_verified`) are `pub`. Crate code holding `&mut LoadedSheet` +could change one without the other. No such writer exists today. Hint: private fields with getters. + +### L4 [LOW] A warning the drafts allow makes a v1 bundle unloadable and the generator fail +`fingerprint.rs:228-231` refuses any issue, warnings included. `validate.rs:366-380` (`annotation.no_findings`, +documented "allowed in a draft") and `:440-455` (`finding_zone.unreferenced`) are warnings. Since the patch, +`loaded.rs:175-179` turns that into `invalid_sheet` at load, and `pipeline.rs:174-175` refuses to render the draft. +The behaviour fails closed and follows the frozen `v1` rule, but a content-only curation step can now take the +sheet out of the application. Hint: owner decision. Either keep it (and document it next to the curation workflow) +or have `v1` refuse errors only, which would need a new convention version. + +### L5 [LOW] `canonical_json` recursion has no depth bound +`fingerprint.rs:129-170` recurses on the typed document. Only the build-time bundle reaches it today. Hint: bound +the depth, or reuse the import prescan caps, before any user- or database-supplied sheet goes through +`from_bundle` (Step 13). + +### L6 [LOW, context] New test file carries the standard clippy allow +`crates/core/tests/r5_6_switch.rs:8` has `#![allow(clippy::disallowed_methods, clippy::unwrap_used, …)]`, the +same header as all 40 integration tests. It is test-only, not shipped, and not a security-rule suppression (no +`nosemgrep`, `nosec` or `eslint-disable` in the diff). Not blocking. + +Out of scope, filtered: guardrails WARN `SB-POLICY-NOT-OWNER` at `supabase/migrations/20261008110000_anatomical_sheets.sql:1177` +(not in the diff, unchanged). + +## Verdict block + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 28 files +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] M1 export grants the trusted alias on the snapshot's unverified reference; export_from_envelope now normalises a mixed envelope; RUST.md §11.20 claims a fingerprint_verified guard absent at this site — crates/core/src/pdf/write/input.rs:205-248, crates/core/src/pdf/write/export.rs:117-136 + - [LOW] L1 "fingerprint": null read as v0 instead of refused — crates/core/src/domain/sheet/loaded.rs:38-39 + - [LOW] L2 BundledRef accepts unknown keys, misspelt block loads as v0 — crates/core/src/domain/sheet/loaded.rs:30-40 + - [LOW] L3 reference and fingerprint_verified public mutable fields — crates/core/src/domain/sheet/loaded.rs:53,66 + - [LOW] L4 draft-allowed warning makes a v1 bundle unloadable and the generator fail — crates/core/src/domain/sheet/fingerprint.rs:228-231, crates/core/src/domain/sheet/loaded.rs:175-179 + - [LOW] L5 canonical_json recursion unbounded (trusted input only today) — crates/core/src/domain/sheet/fingerprint.rs:129-170 + - [LOW] L6 standard clippy allow in new test file, not a security suppression — crates/core/tests/r5_6_switch.rs:8 +PROOF: semgrep 163 rules on 28 files → 0 findings (0 errors); checklist 9 checks (secrets, SQL concat, unsafe render, authz, error exposure, secret in log, tracked .env, guardrails 0 FAIL / 1 WARN out of diff, new suppressions) → 1 finding (L6); targeted review 5 focus areas → 1 MEDIUM, 5 LOW; worktree runs: cargo r5_6_switch 8, sheet_fingerprint 10, pdf_compare 16, pdf_import 4, curation_draft 20, curation_review 12, vitest r5-6.switch 2, r5-6.n-1 1, all green +``` diff --git a/.claude/audits/2026-10-25-rust-r5-6-rehearsal-verify.md b/.claude/audits/2026-10-25-rust-r5-6-rehearsal-verify.md new file mode 100644 index 00000000..c553bc1d --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-6-rehearsal-verify.md @@ -0,0 +1,13 @@ +# R5.6 rehearsal — fresh verifier (Opus), persisted by the orchestrator (verifier is read-only) + +Contract `.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md`, patch at 82e2e43, worktree switched. + +VERIFY — VERDICT: ECARTS(3) + +- S1 NOT-MET: export path (`pdf/write/input.rs` assert_exportable :205, keep_the_report_stamp :238) grants the pair from the snapshot's claimed value, never reads `fingerprint_verified`. Probe: v0 sheet-ref (no block) + demo report 27c7 + core build_sheet_snapshot → export succeeds 27c7/27c7 (pre-patch: sheet_mismatch). App store flow cannot reach it (rebase checks the flag). Rest of S1 met (one direction, same sheet, registry only, new report canonical, 9 scenarios tested). +- S2 MET (8 Rust files in scope, archive/read.rs and session.rs unchanged, archive check strict, invalid_sheet / sheet_mismatch kept, no n-1 change) +- S3 NOT-MET: load conforms; v0 snapshot gets alias privilege at export (same root cause) +- S4 MET (2 files differ, value + block v1, document/horse.svg/SQL identical, no oracle/golden changed, original contexts + post-switch twins, O10 77 rows pinned) +- S5 MET, S6 MET, S7 MET (main tree inert, patch applies on HEAD) +- S8 NOT-MET: alias-security gate fails for the export consumer; everything else green (rust:check RC 0, suites listed, vitest 41/41, rollback report-compare reads the re-export with snapshot kept) +- FLOOR clean. Notes: stale `pnpm import:equine` comments (scripts/import-equine.sh:8, CLAUDE.md); verifier overwrote its own scratch probe folder (session scratch only). diff --git a/.claude/audits/2026-10-25-rust-r5-7-premerge.md b/.claude/audits/2026-10-25-rust-r5-7-premerge.md new file mode 100644 index 00000000..2c64de16 --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-7-premerge.md @@ -0,0 +1,48 @@ +# R5.7 pre-merge checks (2026-10-25) + +Owner brief « Validation R5.7 et dernière vérification pré-fusion ». State checked: `feature/rust-r5-pipeline-core` at +`27bf59c` (code and tests); the commit that adds this file changes docs and `.claude/` records only (SUPABASE.md layout, +the `.bin/tsx` wording in RUST.md §11.23 and in the contract clarification, TODO, registries). + +## Decision C6 + +Owner accepted `tsx` in `pnpm-lock.yaml` as vite's optional peer only. Contract C6 amended with a Clarification section. +`pnpm why tsx -r`: `tsx` 4.23.15 reached only as `vite` 7.3.6's peer (`peerDependenciesMeta.tsx.optional: true`) through the +devDependencies of `apps/app`, `packages/core-wasm`, `packages/supabase`; no importer, no manifest, no script; snapshot +`optional: true`. No lockfile hand edit, no override. + +## Checks run on 27bf59c + +| Check | Result | +|---|---| +| `pnpm install --frozen-lockfile` | rc 0, "Lockfile is up to date", lockfile sha256 unchanged | +| `pnpm dedupe --check` | rc 0 | +| `pnpm check:all` (starts with `scripts/rust-check.sh` = `pnpm rust:check`) | green 13:37:52 → 13:41:41: fmt, clippy, 177 cargo result lines all ok (1548 passed, 0 failed, 3 ignored, none a ledger target), ts-rs drift none, cargo-deny + advisories ok, wasm, typecheck, vitest app 446 / core-wasm 60 / supabase 40, lint, build, app image, worker sandbox tests, worker runtime image | +| `pnpm import:equine --check` | legacy-import 6 files, draft 12 files, 0 differences (app-main under the declared R3 rule) | +| `pnpm report:compare` on `apps/app/tests/fixtures/*.pdf` and `fixtures/pdf` | rc 0 | +| `pnpm audit` | 57 advisories (2 critical, 33 high, 21 moderate, 1 low), every version identical on `develop`: none introduced by R5. Runtime-reachable: zod 3.25.76 (GHSA-mrhx-c7xc-m3w5, patched only in zod 4). Rest dev tooling (pnpm 10.13.1, tinypool via vitest, vite 7.3.6 dev server, happy-dom, brace-expansion, js-yaml, nanoid, postcss, source-map-js). Separate chore, owner decision (majors excluded by the brief) | +| Suites named by the brief | RFC 8785 and aliases `sheet_fingerprint` 11, `r5_6_switch` 14, app `r5-6.switch`; reports v2/v3 `report_rules` 17, `report_contract` 4, `archive_rules` 38, `characterisation` 4; N-1 `n-1.reader`, `n-1.scanner`; PDF `pdf_*` (import 4, compare 16, session 6, …), app `pdf.roundtrip`, core-wasm `pdf-import`; rebase and history: `archive_rules`, the 612 leaves (`curation_leaves` 8, app `migration.leaves`); seed and sheet `curation_*`, `sheet_rules` 25, `sheet_conformance` 3; census `r4.census` 8, `r5.census` 10 | +| Moved fixtures | sha256 `e96b0882…729c`, `ba79698c…fde7`, equal to 756b7ef | +| Old packages required nowhere | `git grep` over scripts, docker, `.gitea`, Dockerfile, compose, configs, tests, package sources: comments and census bans only | + +## Ledger + +407 rows: 256 ported, 149 replaced, 2 deleted (JS aliasing check with no Rust meaning; TS generator of +`fixtures/horse-slice.json`, read by 4 Rust suites). Replaced rows active: every cargo target a non-ignored `#[test]` +(census now refuses `#[ignore]` after `#[test]`, cd69f0e), every cited oracle read by a test. + +## Gates + +- Fresh verifier: CONFORME, C1 to C10 MET (C6 under the clarification), 14 scratch reintroduction probes all fail the + census. Precisions it raised, fixed in the docs commit: this file did not yet exist; SUPABASE.md §1 still drew + `packages/domain`; `.bin/tsx` is linked under the three packages (not the root). +- Fresh security audit: PASS (`2026-10-25-rust-r5-7-security-final.md`). MEDIUM pre-existing `pnpm audit`; LOW census + regex accepts `#[ignore]` before `#[test]` or `#[cfg_attr(…, ignore)]` (no instance; left for the owner, a fix would + invalidate this `check:all`); LOW clippy allow header; LOW pre-existing SQL policy warning outside the diff. + +## Git + +Branch clean, equal to `origin/feature/rust-r5-pipeline-core`; `develop` = `origin/develop` = `9c0117a`, ancestor of the +branch (76 commits ahead, 0 behind): `git merge-tree` clean, a `--no-ff` merge has no conflict. No secret pattern in the +added lines; no env file, key or binary added; largest added files are the R5.1 oracles `numbers.json` (1.8 MB) and +`pipeline.json` (1.4 MB). `main` 605ee7c and `release/0.2.0` f8d9425 untouched. diff --git a/.claude/audits/2026-10-25-rust-r5-7-security-final.md b/.claude/audits/2026-10-25-rust-r5-7-security-final.md new file mode 100644 index 00000000..318ba15f --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-7-security-final.md @@ -0,0 +1,187 @@ +# Security gate, final: Rust R5.7 (deletion of packages/anatomy and packages/domain) + +Date 2026-10-25. Branch `feature/rust-r5-pipeline-core`. Scope `756b7ef..27bf59c` +(152 paths: 8 added, 32 modified, 2 renamed, 110 deleted; 2 055 insertions, 17 542 deletions, +7 commits `0da7d3a`..`27bf59c`). Fresh auditor; the previous report +`2026-10-25-rust-r5-7-security.md` was read only for the status check the brief asked for. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 42 files (the existing files of the diff; 110 deleted paths inspected through git) +BLOCKING: + (none) +REPORTED (non-blocking): + - [MEDIUM] pnpm-audit (pre-existing, no version touched by the diff) — pnpm-lock.yaml — 57 advisories on unchanged versions: 2 critical (tinypool 1.1.1 via vitest, dev), 33 high (pnpm 10.13.1 itself x17, brace-expansion, js-yaml, nanoid, postcss, source-map-js, happy-dom, zod 3.25.76), 21 moderate, 1 low + - [LOW] census-regex-gap — apps/app/tests/unit/r5.census.test.ts:300 — `#[ignore]` placed before `#[test]`, or `#[cfg_attr(…, ignore)]`, still passes the ledger-target check (no instance in the tree) + - [LOW] new-suppression (clippy allow, not a security-tool suppression) — crates/core/tests/curation_leaves.rs:6 — identical header in all 41 files under crates/core/tests + - [LOW] SB-POLICY-NOT-OWNER (guardrails WARN, pre-existing, file not in the diff) — supabase/migrations/20261008110000_anatomical_sheets.sql:1177 +PROOF: semgrep 158 rules (725 loaded, 3 packs) on 42 files → 0 findings, 0 errors, 0 skipped; checklist 8 checks → 0 findings; guardrails scan.py api,supabase → 0 FAIL, 1 WARN (outside diff), 1 MANUAL (not reported); anti-gaming 1 new clippy allow (LOW), 0 removed; cargo deny check advisories → ok; pnpm audit → 57 advisories, 0 introduced; ledger 407 rows / 566 cargo targets → 566 active #[test], 0 #[ignore] +``` + +## Semgrep + +`semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten +--metrics=off --quiet --json <42 paths>`: 0 results, 0 errors, 0 skipped paths, stderr empty. +The verbose rerun reports 725 rules loaded, 158 applicable to the languages present, 42 files. + +## Checklist (8 checks, 0 findings) + +| Check | Result | +|---|---| +| Hardcoded secret, token, key, auth URL in added lines | None. Hits are variable names in prose (`SUPABASE_SERVICE_ROLE_KEY` in CLAUDE.md and the previous audit), no value. URLs in added lines are all LEDGER.tsv case descriptions (`https://x.test/…`, `http://localhost:5173`, `https://faunosteo.com`, the partner credit, `https://zenquality.fr`): test and product data, no credential. No IP, no `/home/`, no `/Users/`. | +| SQL by concatenation | No new SQL. `seed.rs` keeps `sql_text` quote doubling and the `$equine_doc$` dollar tag with the refusal at line 94 (`DOCUMENT_DOLLAR_TAG`). The diff on that file is a 3-line doc comment. | +| Unsanitized render (innerHTML, eval, raw) | None. | +| Sensitive endpoint without authz | No endpoint, policy or RPC in the diff. | +| Stack trace / internal path to the user | None. | +| Secret or PII to a log | None. | +| Tracked `.env` or credential file | Only `.env.example` is tracked (`git ls-files`); `.gitignore` and `.dockerignore` exclude `.env`, `.env.*`, the gateway htpasswd and the Mailpit password. No binary in the diff (`git diff --numstat` shows no `-` row); the largest added file is `LEDGER.tsv` (173 KB, UTF-8 text). | +| Guardrails scanner (api,supabase, 1219 files) | 0 FAIL. 1 WARN `SB-POLICY-NOT-OWNER` on `species_select_active` (pre-existing, file not in the diff). 1 MANUAL `SB-RLS-LIVE`, not reported here. | + +## Anti-gaming + +One new suppression-like marker in the added lines: +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` at +`crates/core/tests/curation_leaves.rs:6`. It is a clippy allow, not a semgrep, bandit or +ESLint-security suppression, and every one of the 41 files under `crates/core/tests/` carries the +same single header (`disallowed_methods` forbids I/O and clock in the library; integration tests +read fixtures). LOW, not blocking. No `nosemgrep`, `nosec`, `eslint-disable`, `@ts-ignore`, +`@ts-expect-error`, `.skip` or `#[ignore]` added; no suppression removed. + +## Supply chain + +### Lockfile + +`pnpm-lock.yaml`: 1 insertion, 69 deletions. + +- Removed: importers `packages/anatomy` and `packages/domain`; the `packages:` and `snapshots:` + entries of `@xmldom/xmldom@0.9.12`; the `deprecated:` metadata line of `eslint@9.39.4` + (registry metadata, same version). +- Added: the single line `optional: true` on the `tsx@4.23.15` snapshot. `tsx` appears in no + manifest (`git grep '"tsx"' -- '*/package.json'` → none); it stays resolved only as vite's + optional peer, per the owner decision C6 (`27bf59c`). +- No new package, no version change, no `overrides`, `patchedDependencies`, `onlyBuiltDependencies` + change (`pnpm-workspace.yaml` untouched). + +### cargo deny + +`. scripts/rust-env.sh` (read first: appends `~/.cargo/bin` to PATH when no cargo is found, +installs nothing) then `cargo deny check advisories` (cargo-deny 0.20.2, `deny.toml` +`yanked = "deny"`, `ignore = []`): `advisories ok`. No build, no `target/` access. + +### pnpm audit (read-only) + +`pnpm audit --json` with the local pnpm 10.13.1: 57 advisories, `{critical: 2, high: 33, +moderate: 21, low: 1}`. Every advisory sits on a package version the lockfile diff did not +change, so none is introduced by this scope; they are reported, not gated, and belong to a +separate `chore/*`. Breakdown by reachable surface: + +| Package (version) | Advisories | Surface | +|---|---|---| +| pnpm 10.13.1 (root devDependency, `packageManager`, Dockerfile `corepack prepare pnpm@10.13.1`) | 17 high + 8 moderate, patched in 10.26 … 10.34.5 (lifecycle-script bypass, lockfile integrity bypass, env-var command injection, manifest identity spoof running attacker lifecycle, secrets exfiltration through `pnpm-workspace.yaml` proxy placeholders, several path traversals) | developer machine and the Docker builder stage; the Docker build runs `pnpm install --frozen-lockfile` on a repository-controlled lockfile. The CLAUDE.md pin rationale ("10.x line stays pinned") is compatible with 10.34.5. | +| tinypool 1.1.1 (vitest) | 2 critical (prototype-pollution RCE in worker options) | dev only (test runner) | +| brace-expansion 1.1.14 / 5.0.6 (eslint, typescript-eslint) | 8 high + 2 moderate (DoS) | dev only | +| js-yaml 4.3.0 (eslint) | 2 high (CPU DoS) | dev only | +| vitest 3.2.7, @vitest/mocker | 3 moderate | dev only | +| happy-dom 20.10.6 | 1 high | dev only | +| vite 7.3.6 | 1 high, 4 moderate, 1 low (launch-editor, `server.fs.allow`) | dev server and build | +| postcss 8.5.14, nanoid 3.3.12, source-map-js 1.2.1 (vite, tailwind) | 2 high + 1 moderate, 2 high, 1 high | build time | +| zod 3.25.76 (apps/app, core-wasm, supabase runtime dependency) | 1 high "memory exhaustion on oversized constrained collections", patched in zod 4.6.6 only | runtime, browser-side form validation of the user's own input: self-DoS of one's own tab, no server impact | + +## No lost validation + +`crates/core/tests/curation/LEDGER.tsv`: 407 rows (144 anatomy, 263 domain), dispositions +`ported` 256, `replaced` 149, `deleted` 2, `kept` 0. Targets: 566 `cargo …::` parts (154 +distinct functions), 8 `vitest …` parts, 25 `import-equine --check`. + +Independent resolution (script in the auditor's scratchpad, not the census): for each cargo target +every `fn (` under the named binary's files was located and its whole contiguous attribute +block inspected, in any attribute order. Result: 566/566 resolve to a function carrying `#[test]` +with no `ignore` token in the block; 0 unresolved, 0 non-test, 0 ignored. The 8 vitest files +exist. The one `#[ignore]` in the crate (`pdf_serialize.rs:811`, release-only timing) predates +the diff (`babe7b7`, 2026-10-18, present at `756b7ef`) and is not a ledger target. + +| Control named in the brief | Ledger rows | Rust test (active `#[test]`) | Implementation | +|---|---|---|---| +| Sheet integrity rules | 69 (40 ported, 29 replaced) | `sheet_rules::{view_main_count, view_id_duplicate, view_parent_missing, view_parent_cycle_*, view_unreachable, view_asset_missing_*, annotation_id_duplicate_across_views, …}`, `sheet_rules::the_curated_draft_validates_with_no_issue`, `sheet_rules::the_horse_slice_has_no_issue` | `crates/core/src/domain/sheet` | +| Changeset refusals | 174 (120 ported, 53 replaced, 1 deleted: purity, see below) | `curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike` + oracle `oracles/r5/curation-synthetic.json`, plus the per-case ported tests in `curation_draft.rs` | `crates/core/src/curation/draft/{apply,ops,targets,fields}.rs` | +| Reserved ids | 4 (3 ported, 1 replaced) | `curation_draft::a_changeset_reusing_the_reserved_asset_change_id_is_refused`, `report_rules::report_v3_schema_defaults_and_refusals` | `curation/draft`, `domain/report` | +| Seed dollar-quote guard | 1 ported | `curation_draft::a_document_holding_the_dollar_quote_tag_is_refused_by_the_seed` (`curation_draft.rs:1075`, asserts the error names `$equine_doc$`) | `curation/draft/seed.rs:13,94` | +| SVG sanitising | 24 (10 ported, 12 replaced, 2 deleted: not sanitiser cases, matched on wording) | `svg_sanitiser::{every_hostile_case_gives_the_typescript_verdict_or_a_declared_one, every_generated_case_…, the_product_svgs_come_out_untouched, a_rejection_names_a_closed_reason}` iterating the 42 `fixtures/svg/hostile/*.svg` against `oracles/r3/sanitiser.json` (452 KB); `sheet_shape::refuses_what_zod_refuses` for the `javascript:` reference | `crates/core/src/anatomy/svg/{prescan,sanitize,refs}.rs` | + +The two `deleted` rows carry no control: "applyChangeset never mutates its inputs" is a JavaScript +aliasing check with no Rust meaning (`apply_changeset(baseline: &Value, …)`, `apply.rs:210`); +"horse slice JSON fixture equals the TypeScript lean input" was the TS generator of +`fixtures/horse-slice.json`, now the source file, read by `sheet_index`, `sheet_rules` and +`sheet_shape`. + +Declared functional loss, confirmed as not a security loss: the xmldom re-cleaning of a legacy SVG +(`packages/anatomy/src/curation/assets.ts`, FILES.tsv row `replaced`) is not ported; the pipeline +reads the committed `draft/assets/horse.svg` and the application loads every drawing through +`anatomy::svg::read_svg` regardless of origin. + +The four `crates/core/src` changes in the diff (`anatomy/mod.rs`, `curation/mod.rs`, +`domain/mod.rs`, `curation/draft/seed.rs`) are doc comments only (11 insertions, 2 deletions, +no code line). + +## Dockerfile and build + +`Dockerfile`: the two `COPY packages/{domain,anatomy}/package.json` lines are removed; the +builder stage copies exactly the four manifests the lockfile has importers for (`.`, `apps/app`, +`packages/supabase`, `packages/core-wasm`) before `pnpm install --frozen-lockfile`, then +`COPY . .`. The folders `packages/anatomy`, `packages/domain` and `packages/pdf` still exist on +disk with a git-ignored `node_modules/` only (0 tracked files each) and `.dockerignore` excludes +`**/node_modules/`, so nothing of them enters the image. `crates/worker/Dockerfile`, +`docker/rust-builder.Dockerfile`, `scripts/`, `.gitea/workflows`, tsconfig, vite and vitest +configs: no reference to the deleted paths (`git grep` over tracked non-doc files returns only the +ESLint ban list, the two census tests and Rust `//!` provenance comments). + +`package.json`: `import:equine:legacy` removed; `packages/supabase/package.json`: +`assets:upload:legacy` removed with its script `scripts/upload-sheet-assets.ts` (the Rust +`upload-sheet-assets` binary remains the operator path). `apps/app/eslint.config.js` adds +`@faunosteo/anatomy` and `@xmldom/xmldom` to the `no-restricted-imports` ban. + +## Census tests cannot pass vacuously + +`r5.census.test.ts` asserts positives before negatives: the manifest list must contain the four +remaining packages; the lockfile importer set must equal the manifest set exactly; +`packages.length > 100` and a `zod@` key; more than 100 scanned sources containing the +`@faunosteo/core-wasm` specifier; the Dockerfile `COPY` list must contain the two package +manifests and each must exist; FILES.tsv > 80 rows with every counterpart present (112 rows: +55 ported, 48 replaced, 9 deleted, all package tooling or test helpers); LEDGER.tsv exactly 407 +rows (144 + 263); every oracle path present; every cargo target resolved to a `#[test]` fn; the +two moved fixtures pinned by SHA-256 (verified: `e96b0882…b729c` and `ba79698c…fde7` match +`sha256sum`). `r4.census.test.ts` extends the bans and checks the importer split finds +`['.', 'apps/app', 'packages/core-wasm']` before asserting absences. + +Residual gap (LOW): the ledger regex at `r5.census.test.ts:300-302` anchors on `#[test]` and +then refuses attributes starting with `ignore`. Probed with Node against the exact regex: + +| Input | Census | +|---|---| +| `#[test]` / `fn foo(` | accepted | +| `#[test]` / `#[ignore]` / `fn foo(` | refused (correct) | +| `#[test]` / `#[ignore = "r"]` / `fn foo(` | refused (correct) | +| `#[ignore]` / `#[test]` / `fn foo(` | accepted (bypass: rustc accepts both orders, `cargo test` skips it) | +| `#[test]` / `#[cfg_attr(debug_assertions, ignore)]` / `fn foo(` | accepted (bypass) | +| `fn foo(` alone, or `#[test] fn bar` then `fn foo` | refused (correct) | + +No ledger target is in either shape today (independent order-agnostic check above). Hint: scan the +whole attribute block above `fn (` and refuse any `ignore` token in it, or assert +`cargo test -- --list` output in `check-all.sh`. + +## Status of the previous audit's two LOW findings + +| Previous finding | Status at 27bf59c | +|---|---| +| LOW clippy allow header, `curation_leaves.rs:6` | Unchanged. Same header as the 41 sibling test files; still LOW, still not a security-tool suppression. | +| LOW census accepted any `fn (` | Fixed. `475a41d` requires `#[test]` with only attributes or doc lines between (`#\[test\]\s*(?:(?:#\[[^\]]*\]\|///[^\n]*)\s*)*fn`), `cd69f0e` adds `(?!ignore)` on those attributes. Residual gap above (attribute order, `cfg_attr`), LOW, no instance in the tree. | + +## Not done (out of scope or forbidden) + +No command executed from the repository other than semgrep, the guardrails scanner, `pnpm audit` +(read-only, registry query), `cargo deny check advisories` (no build) and read-only git, grep, +sha256sum. No `cargo clean`, `pnpm install`, `pnpm format`, no test suite run (a `pnpm check:all` +ran concurrently in the tree). The runtime behaviour of the ported Rust tests is attested by that +gate, not by this audit; this audit attests they exist, carry `#[test]`, are not ignored, and map +each ledger row. diff --git a/.claude/audits/2026-10-25-rust-r5-7-security.md b/.claude/audits/2026-10-25-rust-r5-7-security.md new file mode 100644 index 00000000..cae27850 --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-7-security.md @@ -0,0 +1,149 @@ +# Security gate: Rust R5.7 (deletion of packages/anatomy and packages/domain) + +Date 2026-10-25. Branch `feature/rust-r5-pipeline-core`. Scope `756b7ef..4e0a6c0` +(149 paths in the diff: 110 deletions, 2 renames, 37 modified or added files). +Fresh auditor, no prior verdict consulted. + +``` +SECURITY — VERDICT: PASS +TOOL: semgrep 1.168.0 — p/security-audit, p/secrets, p/owasp-top-ten +SCOPE: 39 files (the existing files of the diff; 110 deleted paths inspected through git) +BLOCKING: + (none) +REPORTED (non-blocking): + - [LOW] new-suppression (clippy allow, not a security-tool suppression) — crates/core/tests/curation_leaves.rs:6 + - [LOW] census-weakness (ledger target resolved by `fn (` presence, not `#[test]`) — apps/app/tests/unit/r5.census.test.ts:103 +PROOF: semgrep 158 rules (725 loaded, 3 packs) on 39 files → 0 findings; checklist 8 checks → 0 findings; guardrails scan.py api,supabase → 0 FAIL, 1 WARN outside the diff (filtered), 1 MANUAL (not reported); anti-gaming 1 new allow (LOW) +``` + +## Semgrep + +`semgrep scan --config p/security-audit --config p/secrets --config p/owasp-top-ten +--metrics=off --quiet --json <39 paths>`: 0 results, 0 errors, 0 skipped. The verbose +rerun confirms 725 rules loaded from the 3 packs, 158 applicable to the languages present +(TypeScript, Rust, Dockerfile, JSON, YAML, Markdown, shell), 39 files scanned. + +## Checklist (8 checks, 0 findings) + +| Check | Result | +|---|---| +| Hardcoded secret, token, key, auth URL in added lines | None. The only hit is the variable name `SUPABASE_SERVICE_ROLE_KEY` in a CLAUDE.md command description, no value. | +| SQL by concatenation | No new SQL. `crates/core/src/curation/draft/seed.rs` (doc comment only in this diff) keeps `sql_text` quote doubling and `$equine_doc$` dollar quoting; the deleted `importer.guards.test.ts` case "refuses a document that contains the dollar-quote tag" is ported as `a_document_holding_the_dollar_quote_tag_is_refused_by_the_seed` (curation_draft.rs). | +| Unsanitized render (innerHTML, eval, raw) | None in the diff. | +| Sensitive endpoint without authz | No endpoint, policy or RPC in the diff. | +| Stack trace / internal path to the user | None. | +| Secret or PII to a log | None. | +| Tracked `.env` or credential file | Only `.env.example` is tracked; `.dockerignore` excludes `.env`, `.env.*`, the gateway htpasswd and Mailpit password. | +| Guardrails scanner (`~/.claude/skills/guardrails/scripts/scan.py`, domains api,supabase) | 0 FAIL. 1 WARN `SB-POLICY-NOT-OWNER` on `supabase/migrations/20261008110000_anatomical_sheets.sql:1177` (`species_select_active`): pre-existing, file not in the diff, filtered per gate rule. 1 MANUAL `SB-RLS-LIVE`, not reported here. | + +Local paths (`/home/`, `/Users/`), user names, e-mail addresses and private IP ranges: +none in the added lines. The URL `https://www.instagram.com/paws.iin.harmony` present in the +moved fixtures is the product's existing partner credit (`apps/app/src/pdf/branding.ts`, +`components/brand/Footer.tsx`), product data, not personal data introduced by this change. + +## Anti-gaming + +One new suppression-like marker in the added lines: +`#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)]` at +`crates/core/tests/curation_leaves.rs:6`. It is a clippy allow, not a semgrep, bandit or +ESLint-security suppression, and it is the identical header the 40 sibling integration tests +under `crates/core/tests/` already carry (`disallowed_methods` forbids I/O and clock in the +core library; integration tests read fixtures from disk). Reported LOW, not blocking. No +removed suppression, no `nosemgrep`, `nosec`, `eslint-disable`, `@ts-ignore`, `.skip` or +`#[ignore]` added. + +## Focus (1): controls still needed by active paths + +Pre-state references to the deleted code in production paths (`apps/app/src`, +`packages/core-wasm/src`, `packages/supabase/src`, `Dockerfile`, `docker/`, vite and tsconfig +files, `scripts/`, `.gitea/`): exactly two, both removed by the diff. + +- `Dockerfile:39-40`: `COPY packages/domain/package.json` and `COPY packages/anatomy/package.json`. +- `packages/supabase/package.json:21`: script `assets:upload:legacy` → `node scripts/upload-sheet-assets.ts`. + +Post-state: zero references in those paths (the `scripts/r4-ledger.mjs` hits are `.tsx` +file names). `pnpm-workspace.yaml` globs `packages/*`; the lockfile importers are now exactly +`.`, `apps/app`, `packages/core-wasm`, `packages/supabase`, and the Dockerfile builder stage +copies exactly those four manifests before `pnpm install --frozen-lockfile`, then `COPY . .`. +The image build is coherent with the lockfile. + +Each control the brief names lives in the Rust core and is untouched (the four `crates/core/src` +changes are doc comments only): + +| Control | Where it runs now | Present at 4e0a6c0 | +|---|---|---| +| PDF import (byte scan, capped inflation, layered read) | `crates/core/src/pdf/{read,import.rs}` | yes | +| SVG sanitising (caps, allowlist, reference graph) | `crates/core/src/anatomy/svg/{prescan,sanitize}.rs` | yes | +| Sheet integrity rules | `crates/core/src/domain/sheet` | yes | +| Seed SQL generation (quoting, dollar-tag refusal) | `crates/core/src/curation/draft/seed.rs` | yes | +| Upload tool (local-only URL, private-bucket handshake, no overwrite, key never printed) | `crates/core/src/curation/upload.rs`, `crates/core/src/bin/upload_sheet_assets`, `scripts/upload-sheet-assets.sh` (`env -u SUPABASE_SERVICE_ROLE_KEY cargo build`, then exec) | yes | +| Archive readers | `crates/core/src/domain/archive` | yes | +| N-1 Zod reader (frozen copy of the deleted domain) | `packages/core-wasm/tests/n-1/domain` | yes | + +Declared functional loss, not a security loss: the xmldom-based re-cleaning of a legacy SVG +(`packages/anatomy/src/curation/assets.ts`) is not ported; the pipeline reads the committed +cleaned `draft/assets/horse.svg` bytes and verifies them through the core reader +(`FILES.tsv` row, BDR-068). Every drawing the application loads still goes through +`anatomy::svg::read_svg` at sheet load regardless of its origin. + +## Focus (2): lockfile and supply chain + +`pnpm-lock.yaml`: 1 insertion, 69 deletions. + +- Removed: importers `packages/anatomy` and `packages/domain`; package and snapshot entries of + `@xmldom/xmldom@0.9.12`; the `deprecated:` metadata line of `eslint@9.39.4` (registry + metadata refreshed at install, same version). +- Added: `optional: true` on the `tsx@4.23.15` snapshot. `tsx` is declared in no manifest + (`git grep tsx -- '*/package.json'` → none) and stays resolved only as the optional peer of + vite/vitest. +- No new package, no version change on any package. + +## Focus (3): secrets, local paths, personal data + +See the checklist rows above: none in the 20,666-line diff's added lines. The `.claude/tasks` +contract and plan files added by the diff were in the semgrep scope and the grep; clean. + +## Focus (4): the new tests + +New or extended Rust tests (`curation_leaves.rs` new, 263 lines; additions in `curation_draft`, +`curation_format`, `curation_review`, `anatomy_compose`, `report_contract`, `archive_rules`, +`archive_support`, `report_rules`): fixture access is read-only through `common::repo_path` / +`repo_file` (`CARGO_MANIFEST_DIR/../../`) and the frozen oracles; `files_under` walks +the two seed folders with `read_dir` only. No network, no `std::process`, no `std::env` +read, no write, no delete in the added code. + +The one test in these files that spawns a process and writes (`import_equine`, `out_fixtures`, +`out_refuses_every_unsafe_destination_and_writes_nothing`, `curation_draft.rs` ~768-816) is +pre-existing (before the diff's second hunk at line 963): it writes fixed fixtures under +`CARGO_TARGET_TMPDIR/import-equine-out` only and asserts the binary refuses every unsafe +`--out` destination (symlink, file, non-empty folder, `..`, absent parent) with exit code 2 +and writes nothing. Not changed by this diff. + +`archive_rules.rs` and `archive_support/mod.rs` only repoint the two moved fixtures +(`crates/core/tests/fixtures/report-v2.{full,minimal}.json`, R100 renames) and a doc comment. + +## Focus (5): census tests not vacuous + +`apps/app/tests/unit/r5.census.test.ts` (new) asserts positive facts before the negatives: +the manifest list must contain the four remaining packages; the lockfile importer set must +equal the manifest set exactly; `packages.length > 100` and a `zod@` key must be found; the +scanned source set must exceed 100 files and must contain the `@faunosteo/core-wasm` +specifier; the Dockerfile `COPY ` list must contain the two package manifests and +each copied manifest must exist; `FILES.tsv` must hold more than 80 rows with each counterpart +present; `LEDGER.tsv` must hold exactly 407 rows (144 anatomy, 263 domain), each oracle path +present and each `cargo ::` target resolved to a `fn (` in the right file; +the two moved fixtures are pinned by SHA-256; ten oracle and N-1 paths must exist. +`r4.census.test.ts` gains `@faunosteo/anatomy` and `@xmldom/xmldom` in the bans and replaces +the "xmldom only under packages/anatomy" assertion by an importer-list assertion with its own +non-vacuity check (`arrayContaining(['.', 'apps/app', 'packages/core-wasm'])`). + +Weakness reported LOW: `cargoTargetFile('faunosteo_core')` accepts a `fn (` anywhere +under `crates/core/src`, so a ledger row pointing at a non-test function would pass. The ban +regexes and the specifier scanner cover `from`, `import()` and `require()` forms and relative +`anatomy/src` / `domain/src` paths. + +## Not done (out of scope or forbidden) + +No command executed from the repository other than semgrep, the guardrails scanner and +read-only git / grep. No test suite run, no `cargo` invocation, no Supabase access. The +runtime behaviour of the ported tests is attested by the dev's own gate, not by this audit. diff --git a/.claude/audits/2026-10-25-rust-r5-7-verify.md b/.claude/audits/2026-10-25-rust-r5-7-verify.md new file mode 100644 index 00000000..46900554 --- /dev/null +++ b/.claude/audits/2026-10-25-rust-r5-7-verify.md @@ -0,0 +1,20 @@ +# R5.7 fresh verifier, 2026-10-25 (diff 756b7ef..4e0a6c0, contract `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`) + +VERDICT: ECARTS(2). C1-C5, C7, C9, C10 MET; C6 NOT-MET; C8 NOT-MET. + +- C6: `tsx@4.23.15` still in pnpm-lock.yaml (`packages:`, `snapshots:` with the diff's one added line `optional: true`, + peer suffix of vite@7.3.6 / vitest@3.2.7), installed under node_modules/.pnpm; declared by no manifest; documented + (RUST.md §11.23, CHANGELOG, r5.census asserts `optional: true`); `pnpm dedupe --check` clean. Contract says "tsx gone", + no Clarification → owner decision (accept residue, or a lockfile change). +- C8: RUST.md §11.23 abbreviated report-v2.minimal.json digest as `ba79698c…dfe7` (actual `…7399c33cfde7`). Fixed after + the pass (RUST.md, FILES.tsv note): `…fde7`. +- Evidence of the pass: cargo test core cli,upload 382 passed 1 ignored (pre-existing release-only timing); 154/154 ledger + targets in `--list`; vitest app 446, core-wasm 60, supabase 40, census 18/18; typecheck, lint rc 0; fmt, clippy ×2, deny + ok; `pnpm import:equine --check` 0 differences; fixtures sha256 equal before/after; no diff under oracles, goldens, + conformance, pdf ledger, app fixtures, supabase/seed, migrations, n-1, types; 18 seed hashes equal the §11.23 table; + every "ported at R5.7" ledger row checked TS-vs-Rust; random sample of other rows consistent. +- FLOOR: 42 `DELETED_TEST` hits, all files of the two deleted packages; covered by the contract's deletion clause and + LEDGER.tsv (verifier reading; orchestrator may require an explicit Clarification). +- Notes: leftover scratch worktrees (ts-repro, prev-59521dc, r56final, r56wt) and git-ignored + `packages/{anatomy,domain}/node_modules` = owner housekeeping. +- After the pass (not re-verified): security LOW "census accepts any `fn`" fixed, ledger cargo targets must be `#[test]` fns. diff --git a/.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md b/.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md new file mode 100644 index 00000000..36bbbf28 --- /dev/null +++ b/.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md @@ -0,0 +1,204 @@ +# R5 census: sheet fingerprint `documentSha256` + +Date 2026-10-22, branch feature/rust-r5-pipeline-core (cut at 9c0117a). Read-only census by an analyzer agent, saved by the orchestrator. Facts only, no recommendation. +Names covered: `documentSha256` (camelCase contracts), `document_sha256` (sheet-ref.json, bundle payload, Rust fields), `SheetRef` / `SheetSnapshotRef` / `BundledRef`, `sheet-ref.json`. + +## Summary + +1. There is exactly one producer: `sheetRef()` in packages/anatomy/src/curation/pipeline.ts:159-165. It computes sha256 over `formatJson(document)`, which is the Prettier 3.8.3 json printer run over `JSON.stringify(v,null,2)`. +2. Nothing in Rust, SQL, apps/app, packages/supabase or scripts computes a document fingerprint. In crates/core, `sha2` is a dev-dependency only. +3. SQL has no fingerprint column, CHECK, trigger or RPC. Measured on PGlite (PG 17.5), `jsonb::text` of the draft hashes to eaf891f4…, not 27c7383c…. jsonb reorders keys (length, then bytes) and keeps numeric scale (`1.50`, `1.0`). +4. One real value exists: 27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660. It equals sha256(draft/document.json, 302,794 B), has been unchanged since 0a17e39 (2026-10-10), and belongs to sheetId 503dc301-… (uuid derived from `faunosteo:sheet:equine:v1`) with versionId null. +5. That value sits in sheet-ref.json, in report-migration-map.json, in 8 app JSON fixtures, in 6 Rust oracle files, and inside the attachments of 99 of the 216 committed PDFs. +6. The rebase decides on the fingerprint alone (rebase.rs:40). The envelope invariant (read.rs:116-119) and the export (input.rs:206-207) compare sheetId and fingerprint. versionId is never compared anywhere. +7. Mismatch on import or draft restore: the report is rebased. `report.sheet` takes the loaded ref, unknown zones and findings get `unresolved: true`, labels are filled only where absent, nothing is deleted. Messages: `home.import.rebased`, `editor.draft_rebased`. +8. Same fingerprint with a different sheetId: no rebase, so the report keeps the foreign sheetId and a later export is refused with `sheet_mismatch`, shown as the generic `editor.export_failed`. +9. Both v2 imports and new reports get their stamp from the copies the pipeline writes (map.sheet, sheet-ref.json). No runtime check verifies that those copies agree or match document.json. +10. `BundledRef.document_sha256` is loaded without any format check (loaded.rs:29-36). Report and snapshot refs are checked against `^[0-9a-f]{64}$`. +11. The hashed bytes depend on Prettier's layout. The file differs from `JSON.stringify(v,null,2)+LF` from line 17 on, because Prettier collapses short arrays. It also differs from the parsed form: Zod or serde fill defaults, 173,136 vs 245,636 UTF-16 units compact. +12. Draft data: 208 numbers (29 non-integer, none negative, no exponent, no `-0`, all already in ECMAScript `Number#toString` form). No escape of any kind, no astral character, no empty container. Every key is ASCII, and key order is schema order, not sorted. +13. The docs disagree with each other. BDR-045 / Annex C says "existing fingerprints untouched". RUST.md:2092 and TODO:307 still say "will change once". +14. Doc errors: RUST_ARCHITECTURE_REVIEW.md:145 says "lean document" (the fingerprint covers the full document) and cites the deleted `packages/pdf export.ts:88`. STEP6:89 says "every run changes" the fingerprint, but the pipeline is deterministic and the golden test pins it. +15. Open: which form gets canonicalised (input file or parsed), what "compatibility" with 27c7… means concretely, who computes the fingerprint for database-served sheets (Step 13), and whether versionId or sheetId should take part in the rebase decision. + +## 1. Producers (who computes a fingerprint) + +| Layer | Site | What it does | +|---|---|---| +| TS pipeline | packages/anatomy/src/curation/pipeline.ts:158-165 `sheetRef()` | `documentSha256: sha256Hex(documentJson)`, with `sheetId: draft.sheetId` and `versionId: null` | +| | pipeline.ts:185-186 | `documentJson = await formatJson(draft.document)`. The same text is written as `document.json` (:203) and embedded verbatim in the seed SQL (:216-221, seed.ts:21-25 and :73-80 dollar-quoted `::jsonb`) | +| | pipeline.ts:205-211 | writes `sheet-ref.json` `{sheet_id, version_id, document_sha256, schema_version, species_id}` | +| | pipeline.ts:187-194 → curation/migration-map.ts:24 | the same `ref` object becomes `report-migration-map.json` `.sheet` | +| | packages/anatomy/src/legacy/ids.ts:15-17 | `sha256Hex = createHash('sha256').update(data).digest('hex')` (node:crypto, UTF-8 of the string) | +| | packages/anatomy/src/format.ts:9-26 | `formatJson(v) = prettier.format(JSON.stringify(v,null,2), {parser:'json', printWidth:80, …})`. Prettier `^3.4.2` (packages/anatomy/package.json:31), locked 3.8.3 (pnpm-lock.yaml:1894) | +| TS legacy importer | legacy/artifacts.ts:17 | writes legacy-import/document.json through `formatJson`. It produces no fingerprint and no sheet-ref | +| TS app | none | apps/app/vite/sheet-bundle.ts:44-75 `JSON.parse`s document.json and re-serialises the payload (`JSON.stringify(payload)`, :99). The browser never holds the hashed bytes. provider.ts:46-57 copies `ref` | +| TS packages | none | packages/domain, packages/supabase and packages/core-wasm/src have no document hash | +| Rust | none | crates/core: `sha2` is a `[dev-dependencies]` entry (Cargo.toml:41-44, oracle digests). crates/worker: sha2 hashes WebP output only (job.rs:8, :210, :264). crates/wasm: nothing | +| SQL | none | no column, CHECK, trigger or RPC hashes `content`. sha256 columns exist only for assets: `anatomical_sheet_assets.sha256` (20261008110000_anatomical_sheets.sql:154-164) and `public.assets.sha256` (20261013100000_files_foundation.sql:74-75) | +| Scripts | none | scripts/browser/lib/core-module.mjs:45 and scripts/r4-j2-kit.mjs:51 pass `sheet-ref.json` through. wasm-stamp.mjs and r4-afm-data.mjs hash other inputs | + +On the SQL side, `anatomical_sheet_versions.content` is `jsonb` (anatomical_sheets.sql:105-108, 2 MiB cap). Its schema version is pinned by CHECK (`document_schema_version = 2`, 20261010100000_sheet_document_schema_v2.sql:11-12). Measured on PGlite 0.3.16 (PostgreSQL 17.5, in-memory), one run: + +``` +jsonb_text_sha: eaf891f46d3149ecc8734c51ccca57a5459c9c1e5d81776445b25bba351d5d54 (file: 27c7383c…) +jsonb_text_bytes: 184105 stable re-cast: true +head: {"name": {"en": "Horse", "fr": "Cheval"}, "views": [{"id": "main", "kind": "main", ... +numeric samples [1.50, 1e2, -0, 743.0451049804688, 1.0] -> [1.50, 100, 0, 743.0451049804688, 1.0] +key order {"fr","en","schema_version","id"} -> {"en","fr","id","schema_version"} duplicate key -> last wins +``` + +jsonb::text orders keys by length then bytes and uses `", "` / `": "` separators. It keeps numeric scale (`1.50`, `1.0`), unlike JS and JCS. `1e2` becomes `100` and `-0` becomes `0`. + +## 2. Consumers (read / compare) + +| Site | file:line | Behaviour | +|---|---|---| +| Contract `SheetRef` | crates/core/src/domain/report/v3.rs:51-71 | `{sheetId, versionId\|null, documentSha256}`. `deserialize_with = "sha256"` → `js::is_sha256_hex` (js.rs:186-188, `^[0-9a-f]{64}$`). No `deny_unknown_fields` | +| Contract `SheetSnapshotRef` | archive/snapshot.rs:39-55 | adds schemaVersion and speciesId, `deny_unknown_fields`, same sha256 check | +| Bundle load | domain/sheet/loaded.rs:29-36, :104-111 | `BundledRef.document_sha256: String` copied into `LoadedSheet.reference` without format check or recomputation | +| Index to TS | sheet/index_data.rs:25, :112 | exposes `ref` (`SheetIndexData.ref`) → apps/app/src/services/sheetIndex.ts:28, :63-66 | +| New report | ops.rs:53-60, :117-125 → editor/report_ops.rs:56 | stamps the `SheetRef` it receives (validated). App: NewReportRoute.tsx:77 `sheet.sheet.ref` (from provider.ts `availabilityOf`, raw bundle) → reportStore.ts:354-366 → reportOps.ts:21-29 `report.new` | +| v2 migration | domain/report/read.rs:91 | `sheet: map.sheet.clone()`: a migrated v2 report takes the migration map's ref | +| Rebase | domain/report/rebase.rs:40-47 | only `report.sheet.document_sha256 == sheet.reference.document_sha256`: equal → report returned untouched, `rebased:false` | +| | rebase.rs:48-62 | otherwise `rebased.sheet = sheet.reference.clone()` (sheetId, versionId and sha all replaced), observations rebased, `reparse` through the v3 schema | +| Envelope invariant | domain/archive/read.rs:94-119 | `snapshot.ref.sheet_id == report.sheet.sheet_id && snapshot.ref.document_sha256 == report.sheet.document_sha256`. If false: `SnapshotRejection::SheetMismatch`, envelope dropped, report kept (:86-89) | +| Session entries | domain/session.rs:76-101 (draft), :111-135 (import) | read, then rebase with the archived snapshot. A rebase failure becomes `RestoreFailure::Rebase` → `rebase_failed` (ops.rs:327) or `ImportFailure::Invalid` → `invalid` (ops.rs:351-357) | +| Snapshot build | archive/snapshot_rules.rs:54-66 | copies the loaded ref into `sheetSnapshot.ref`. The snapshot `document` is the lean document, so the ref names the full document, not the archived one | +| Export check | pdf/write/input.rs:204-210 | `sheet_id !=` or `document_sha256 !=` → `ExportErrorKind::SheetMismatch` (`sheet_mismatch`, :50, :66) | +| Export envelope | pdf/write/export.rs:26-37 | writes `report` (with its `sheet`) and `sheetSnapshot` (with `ref`) as given, `JSON.stringify(…,null,2)` form. `export_from_envelope` (:116-137) re-exports from the envelope's own report and snapshot. The PDF layout draws no ref | +| PDF import | pdf/import.rs:22-30, facade.rs:66-77 | byte scan → `import_archive` (same rebase) | +| Rescue copy | facade.rs:80-100 | `restore_draft` semantics with no archive | +| `sheet_ref` op | facade.rs:43 | echo of the contract (tests) | +| report-compare | bin/report_compare.rs:32-66 | loads `sheet-ref.json` as-is. compare/mod.rs:133 reads the archive with no rebase. compare/lines.rs:347-367: sheetId and sha equal → `sheet … (draft, matches the bundled sheet)`, else `sheet … !! written on another sheet document (sha <12 hex>…)`. Exit code unaffected (exit 2 only on unreadable entries, run.rs:252) | +| App, import messages | apps/app/src/app/routes/HomeRoute.tsx:41-100, :205-229 | see §4 | +| App, draft restore | state/reportStore.ts:262-293; EditorRoute.tsx:58-67, :104-139 | see §4 | +| App, error mapping | core/worker/outcome.ts:65-67 | `invalid` (rebase refused) → `ImportError('generic')`. EditorRoute.tsx:262: every export failure, `sheet_mismatch` included → `editor.export_failed` | +| packages/domain (frozen; only packages/anatomy imports it, type-only for SheetRef) | report/v3.ts:31-38; rebase.ts:114-135; archive/envelope.ts:96-101; archive/snapshot.ts:24, :60-68, :262-276; report/migration-map.ts:17; report/migrate.ts:121; anatomical-sheet/sheet-index.ts:23 | same semantics as the Rust (rebase on sha only, invariant on sheetId+sha) | +| N-1 reader | packages/core-wasm/tests/n-1/domain/** | byte-identical to packages/domain/src (`diff -r` empty). Used by pdf-export.test.ts:16, :192 and measure.test.ts:14 | +| packages/supabase | none | publish gate anatomical-sheets.ts:74-98 checks shape and integrity only. scripts/upload-sheet-assets.ts:58-59 hashes asset bytes | +| SQL RPCs | anatomical_sheets.sql:735-762 `create_sheet_draft` copies `content` verbatim from a non-draft version (same document, new `gen_random_uuid` id). :764-805 `publish_sheet_version` runs `sheet_document_issues` and `unknown_assets`, no hash. No reports table exists | + +## 3. Stored values + +Only one non-synthetic fingerprint has ever been committed. `git log` on sheet-ref.json shows one commit, 0a17e39 (2026-10-10), and document.json has not changed since that commit. + +| Value | Where (file:line) | Identifies | +|---|---|---| +| `27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660` | supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json:4; draft/report-migration-map.json:6 | sha256 of the committed draft/document.json bytes (302,794 B, verified with `sha256sum`). sheetId `503dc301-a8b1-50d4-9e44-0919b2fc2916` = `deterministicUuid('faunosteo:sheet:equine:v1')` (verified; importer.ts:329), versionId null, curated draft schema v2 | +| same | apps/app/tests/fixtures/report-v3.demo.json:24; r4/reports/L.json:24; r4/reports/CAP.json:24; pdf/r3/store-path.report.json:22 | Report v3 fixtures stamped on the bundled draft | +| same | apps/app/tests/fixtures/goldens/r2/envelope.demo.fr.nologos.json:29,279; envelope.v2full…:29,160; envelope.v2unresolved…:24,763 | report.sheet + sheetSnapshot.ref of frozen envelopes | +| same | crates/core/tests/oracles/editor.json (18 lines, 1669…2475); migration-map.draft.json:1; report-v3.demo.json:1 | R2 oracles frozen from the TS | +| same | oracles/r4/compare/compare.json:9; oracles/r4/tolerance.json:6 | sheet pins, asserted equal to the loaded ref (pdf_compare.rs:266-270) | +| same | oracles/r4/text.json:17807-17808 | an AFM width sample string, not a fingerprint use | +| same | attachments of 99 committed PDFs (pdf/r3 13, r3/real 1, r4/read 21, r4/tolerance 50, step6 3, fixtures root 1, compare scenarios 10). Visible uncompressed in r4/read/scan.{crlf-unspaced-type-params,indirect-length,wrong-direct-length}.pdf | exported archives of the draft | +| `fff…f` (64) | 1 PDF in r4/read; archive_rules.rs:777; domain archive.envelope.test.ts:189; r2-characterisation.test.ts:676; anatomy curation.migration-map.test.ts:15 | synthetic: snapshot of another sheet | +| `bbb…b` | 1 PDF in compare scenarios; report_rules.rs:397; reportStore.test.ts:201; HomeRoute.archive.test.tsx:69; domain tests | synthetic "other sheet" | +| `aaa…a`, `ccc…c`, `eee…e`, `000…0` | oracles/characterisation.json, oracles/verdicts.json (≈600 `a`), Rust tests (`"0".repeat(64)` in sheet_index.rs:120, editor_rules.rs:43, sheet_contract.rs:35, anatomy_canvas_op.rs:21, pdf_layout.rs:295), app tests (`'c'.repeat(64)` in heldSession/quarantine/rescueCopy, `'0'` in EditorRoute.test.tsx:223) | synthetic. Part of the `c` values are asset hashes | +| `91e459f4c0ac8043831242c9fccde01f75f1023464db909f1c29571aa8a414c2` | not stored: sha256 of legacy-import/document.json, computed for this census | legacy baseline has no sheet-ref | +| `eaf891f4…5d54` | not stored: sha256 of the draft's `jsonb::text` (PGlite) | §1 | + +The other 64-hex values in the repo (89 files) are unrelated to the fingerprint: asset hashes (draft horse.svg `0ea5202f…` in draft/assets.json and equine_draft.sql:18, two legacy-import asset hashes), PDF and PNG digests in oracles, R4 golden digests, wasm and build digests under scripts/browser/results, and AFM data headers. + +The PDF scan was a regex over raw bytes plus zlib inflation of every `stream`. 116 PDFs carry no fingerprint: r4/read hostile and v2 cases (110), 3 compare scenarios, 2 legacy v2 PDFs and 1 tolerance case. + +## 4. Semantics on mismatch + +Import (PDF or attachment JSON), session.rs:111-135, in this order. + +1. The report is read first. A v3 report is kept as written. A v2 report is migrated and stamped with `map.sheet` (read.rs:91), which is 27c7…/503dc301 today. +2. Envelope v1: the snapshot passes the strict gate, then the invariant. The snapshot ref and the report ref of the same file must agree on sheetId and fingerprint (read.rs:116-119). If they don't, the envelope is dropped (`snapshotRejected: 'sheet_mismatch'`) and the report is kept. Message: `home.import.snapshot_rejected` (fr.ts:46-47, en.ts:44-45) with `home.import.snapshot_reason.sheet_mismatch` ("fiche différente de celle du bilan", fr.ts:53-54; "sheet differs from the report's", en.ts:51-52). Headline `home.import.degraded`. +3. Rebase onto the loaded sheet (rebase.rs). If the fingerprint is equal, nothing changes. If it differs, `report.sheet` becomes the loaded ref. + - A zone becomes `unresolved: true` when its `annotationId` or `viewId` is unknown (:85-101). Its label snapshots are filled from the archived snapshot only when absent (`??=`, :103-112). + - A finding becomes `unresolved: true` when `(findingZoneId, path)` is unknown (:137-153). + - Already-flagged items are left alone and not re-counted. Ids, paths, severity, comments and labels are all kept. "unresolved" means "the loaded sheet cannot place this item", not "deleted". + - The app shows `home.import.rebased` with the count: "Bilan ouvert sur la fiche actuelle, différente de celle de l'archive. Éléments non retrouvés : {count} (conservés avec leurs libellés)." (fr.ts:55-56, en.ts:53-54). + - The headline is `home.import.complete` (fr.ts:39, en.ts:37) when 0 items are lost, else `home.import.degraded` (fr.ts:40-41, en.ts:38-39) (HomeRoute.tsx:70-84). An accepted envelope adds `home.import.archive_ok` (fr.ts:44-45). + - The imported envelope is kept unchanged (`osteo:archive`) with its original refs. Only the working report is rebased. +4. A sheetId that differs while the fingerprint is equal triggers no rebase, because rebase.rs:40 ignores sheetId. The foreign sheetId stays, and a later export is refused (`sheet_mismatch`, input.rs:206) as the generic `editor.export_failed` (EditorRoute.tsx:262). A different sheetId with a different fingerprint is rebased and the sheetId replaced. + +Draft restore (reportStore.ts:262-293 → core `draft.restore`) uses the same rebase. When the draft was rebased, items were flagged and the practitioner has not confirmed replacement, the raw draft goes to `osteo:quarantine:draft-pre-rebase`, or is held if that slot cannot be written. The editor then shows `editor.draft_rebased` (fr.ts:89-90; en.ts:83-84). A rescue copy (HomeRoute.tsx:222-229) gets the same message. If the rebased report fails the schema (a defect of the loaded ref, such as a malformed bundle sha), the result is `rebase_failed`: the draft stays where it is and the app answers `core_unavailable` (reportStore.ts:266-271). + +Export: the snapshot ref and the report ref must agree on sheetId and fingerprint. After any rebase both equal the loaded ref. The envelope carries the fingerprint twice (`report.sheet` and `sheetSnapshot.ref`, docs/PDF-FORMAT.md:60-70, :121-122), and the visible PDF text carries none. report-compare prints a header line only (§2) and never rebases. + +## 5. Document data shape (script output) + +``` +== draft/document.json bytes 302794 sha256 27c7383c…2660 BOM False CR False tabs False trailing LF True lines 8284 +top-level keys: schema_version species_id name description scope_disclaimer attribution vertebral_config references categories views annotations finding_zones +numbers: {'int': 179, 'float': 29} (no negative, no exponent, no -0) float paths: geometry.points 28, geometry.cx 1 +float examples 743.0451049804688 1418.5 556.2 … max 16 significant digits; ending .0: 0; int range 2..1780 +raw escapes in file: \u 0 \n 0 \" 0 \\ 0 \/ 0 \t 0 +non-ASCII code points 1831, distinct 18: é 1354, è 139, à 106, ï 58, ° 45, ê 37, ç 22, â 19, « 15, » 15, – U+2013 6, ô 5 …; astral 0 +strings 3724, non-ASCII 788, control chars 0; max string length 521 code points ($.scope_disclaimer.fr) +non-ASCII keys 0; duplicate-key objects 0; objects 1951, arrays 370 +objects with >=2 keys: sorted (UTF-16) 560, not sorted 1390 (e.g. $ top level; every {fr, en}); single-key 1 +empty objects 0; empty arrays 0; nulls 66 (doi 27, vertebral_region_code 22, url 13, license, view_box, svg_asset_id, name); booleans true 55, false 0 +max depth 10 at $.finding_zones[0].categories[0].children[0].children[0].name.fr +== legacy-import/document.json bytes 224109 sha256 91e459f4…14c2 same top-level keys, LF, no BOM +numbers int 159, float 36 (max 17 significant digits, 1424.2662353515625); no negative/exponent/-0; escapes 0; astral 0 +non-ASCII 1164 code points, 11 distinct (adds — U+2014 ×4, É ×2); strings 2889 (650 non-ASCII); max length 253 +objects 1808 (586 sorted, 1158 not, 64 single-key); empty arrays 1 ($.references); nulls 30; max depth 10 +``` + +Node checks: + +``` +draft: file === JSON.stringify(v,null,2)+LF: false; first diff line 17 '"authors": ["Faunosteo"],' (Prettier collapses short arrays, e.g. "[1655, 545]"); 8284 vs 8695 lines +draft: number tokens 208, not in ECMAScript Number#toString form 0, unsafe integers 0 (legacy: 195 / 0 / 0) +draft: compact UTF-8 bytes 174,974; JSON.stringify(raw) 173,136 UTF-16 units vs JSON.stringify(Zod.parse(raw)) 245,636 (first diff: count_range:null default added) +legacy: same pattern, 110,854 vs 190,448 +``` + +What these checks show: + +- The hashed bytes are the input form: defaults are omitted (no empty arrays, no `count_range`). The parsed form adds those defaults, so its bytes differ. +- Key order is construction or schema order, not sorted. +- Numbers already print as ECMAScript does, and no string needs escaping. +- The layout comes from Prettier's line fitting (printWidth 80), which is not `JSON.stringify` layout. + +## 6. Documentation statements + +| file:line | Statement (quoted or condensed) | +|---|---| +| docs/development/RUST_ARCHITECTURE_REVIEW.md:55-60 | "`documentSha256` is today the sha256 of the Prettier-formatted document text. It is computed once by the pipeline and only compared at runtime; a different hash sends an old archive through the rebase path … The study therefore does not chain the pipeline to Prettier (D-R5)" | +| …REVIEW.md:145 | "sha256 of the Prettier-formatted lean document text … (`rebase.ts:119`, `envelope.ts:100`, pdf `export.ts:88`)". "lean" is inaccurate (the full curated document is hashed), and `packages/pdf` was deleted at R4.8 | +| …REVIEW.md:584 | `serde_jcs` listed under "Rejected" (Part V) | +| …REVIEW.md:636, :655 | R5 row: "seed golden regenerated once (decided)". Compatibility: "regenerated seed (new `documentSha256`) … rebase tests both ways on the two seeds" | +| …REVIEW.md:837 (Part X), :873 (Annex A) | D-R5 rev 2: "`documentSha256` = sha256 of the bytes the Rust pipeline emits; generated dirs leave Prettier's scope; the one-time hash change makes older archives … rebase … 0 unresolved items". Alternatives named: keep Prettier, or canonical JSON (RFC 8785, `serde_jcs`) | +| …REVIEW.md:974 (Annex C, owner amendment) | "Preference for a deterministic fingerprint over a canonical JSON representation independent of the formatter … study RFC 8785 (JCS) or a strictly defined alternative … Explicit compatibility with the fingerprints and archives already produced. Existing fingerprints are not changed now: the decision is prepared for R5" | +| docs/development/RUST.md:2092-2094 | "`documentSha256` will change once (D-R5) and every older archive will rebase on import" | +| RUST.md:1902 | report-compare loads `sheet-ref.json` | +| docs/PDF-FORMAT.md:66, :106 | snapshot `ref.documentSha256`; "sha256 of the full catalog document (provenance pointer)" | +| PDF-FORMAT.md:121-122 | "Invariant: `report.sheet.documentSha256 === sheetSnapshot.ref.documentSha256` (and the sheet ids match). The export refuses to write a file that breaks it." | +| PDF-FORMAT.md:175, :195-200 | closed reason `sheet_mismatch`; "When the archive's sheet differs from the loaded one, the report is rebased …" | +| docs/development/ANATOMICAL_SHEET_MODEL.md:317 | `sheet-ref.json` "(sheet id, null version id, sha256 of the document)" | +| docs/development/STEP5_MIGRATION_ANALYSIS.md:74, :94-95, :137 | "`documentSha256` the hash of `draft/document.json`" | +| docs/development/STEP6_PDF_ARCHIVE_ANALYSIS.md:88-89 | pre-Step-6 state: "Nothing compares `report.sheet` with the loaded sheet … Every `pnpm import:equine` run changes the draft's `documentSha256`" (the second sentence conflicts with the deterministic golden) | +| STEP6:124, :160-161, :290-293, :775-776 | ref = "full catalog document's hash, kept as a pointer, not as a hash of the snapshot"; invariant; rebase trigger; export `sheet_mismatch` | +| .claude/memory/decisions.md:327 (BDR-038) | Report v3 `sheet {sheetId, versionId\|null, documentSha256}` | +| decisions.md:336 (BDR-039) | the snapshot hash check was rejected as "self-referential; sha copied … as provenance pointer" (about assets) | +| decisions.md:361 (BDR-043) | alternative rejected: "Prettier-chained sheet identity (hash only compared at runtime → one-time rebase accepted)" | +| decisions.md:371 (BDR-045) | "D-R5 fingerprint → canonical JSON (RFC 8785 JCS or strictly defined alternative) independent of formatter, explicit compat with old fingerprints/archives, existing fingerprints untouched, decision prepared for R5" | +| .claude/memory/learnings.md:363 (LRN-048) | "`documentSha256` = sha256 of Prettier-formatted text (only compared at runtime → mismatch = rebase, not loss)" | +| .claude/tasks/TODO.md:307 | "seed golden regenerated once (new `documentSha256`, D-R5)" | +| CLAUDE.md:277 | `draft/` holds `sheet-ref` | + +## 7. Risks and open questions (analyzer) + +Risks: + +- Any change to the emitted bytes with identical content (Rust emitter, Prettier bump, printWidth) changes the value. Every archive and draft carrying 27c7… then rebases with a visible message, normally with 0 unresolved items. That covers 99 committed PDFs, 8 JSON fixtures and 6 Rust oracle files, which would need decisions. +- map.sheet and sheet-ref.json are two copies with no runtime equality check. If they diverge, every v2 import is stamped with one and rebased onto the other (low: one pipeline value plus the golden). +- The bundle fingerprint is not format-checked at load. A malformed value surfaces later as `rebase_failed`, generic `invalid` or a refused `report.new` (low). +- versionId is never compared, and create_sheet_draft copies content verbatim. Once sheets come from the database (Step 13), versions with identical content would share a fingerprint and skip the rebase (medium). +- If a fingerprint has to be computed from database `content`, the jsonb text differs from the file (key order, numeric scale). The current value cannot be reproduced from jsonb (medium at Step 13). +- Stale or contradictory docs (REVIEW:145 "lean" and deleted citation, RUST.md:2092 and TODO:307 vs BDR-045, STEP6:89) could steer the R5 plan. + +Open questions: + +- Which statement is in force for R5? BDR-045 / Annex C ("existing fingerprints untouched, explicit compatibility") or RUST.md:2092 / TODO:307 ("will change once")? +- What does "compatibility with fingerprints already produced" mean concretely: keep 27c7… for the current draft, an old→new equivalence, or a one-time rebase with a message? +- Which form gets canonicalised: the input file form (defaults omitted) or the parsed form (defaults filled)? They differ by about 72k UTF-16 units. +- For database-served sheets, who computes and stores the fingerprint (pipeline or operator, Rust service, SQL)? No column exists. +- Should sheetId or versionId join the rebase decision (today it uses the fingerprint only), given that the export and the envelope check sheetId too? diff --git a/.claude/audits/R5_PIPELINE_INVENTORY.md b/.claude/audits/R5_PIPELINE_INVENTORY.md new file mode 100644 index 00000000..497426f4 --- /dev/null +++ b/.claude/audits/R5_PIPELINE_INVENTORY.md @@ -0,0 +1,297 @@ +# R5 inventory: the TypeScript anatomy pipeline (`packages/anatomy`) + +Root: `/home/bchanot/Documents/faunosteo` (paths repo-relative). Branch `feature/rust-r5-pipeline-core` cut at 9c0117a. Read-only analysis by an analyzer agent (one in-memory probe of the pipeline functions for §4.3), saved by the orchestrator. Runtime: Node 24.21.0, ICU 78.3, Unicode 17.0. + +## Summary + +1. `packages/anatomy` has 43 source files and 4,897 lines: legacy 1,842, curation 2,329, render 553, cli 119, root 54. Tests are 2,553 lines; the upload script is 99. +2. The runtime libraries are Prettier 3.8.3, @xmldom/xmldom 0.9.12 and Zod 3.25.76, plus node:crypto, node:fs and node:util. Prettier and xmldom are declared as devDependencies but used at runtime. +3. There are 18 generated files. Ten go through Prettier: 7 JSON and 3 Markdown. Five go through the xmldom XMLSerializer (horse.svg and 4 review SVGs). One is a raw SQL template, and two are byte copies of the legacy SVGs. +4. `documentSha256` is the sha256 of the UTF-8 bytes of the Prettier-formatted `draft/document.json`, trailing newline included (`pipeline.ts:159-165,185`, `ids.ts:15-17`). Checked equal to the sha256 of the committed file. `equine_draft.sql` does not carry it; it embeds the document text instead. +5. That hash is pinned in 18 tracked files (seed, crate oracles, app goldens, R4 PDFs). Any byte change in the draft document cascades to all of them. +6. Measured on today's data, Prettier changes only Markdown table padding (134, 863 and 52 lines in the three reports). For JSON it changes layout only: short arrays collapsed onto one line and a trailing newline. The data is identical after re-parsing. +7. The JSON key order is JS insertion order of the working document, which is never re-parsed by Zod. For example, `review_status` is appended last on annotations by the B/C review rule. +8. UUIDs are built from the first 16 bytes of sha256(name), with the version nibble set to 5 and variant bits 10. Names are `faunosteo:asset:` and `faunosteo:sheet:equine:v1` (gives 503dc301…). Both checked. +9. JS-specific hazards: number printing, `Math.round`, `Number('') = 0`; Unicode `\s`, `split(':', 2)`, NFD plus `toLowerCase`; UTF-16 sorting and slicing; xmldom's `/>`, escaping and namespace rules; Prettier's printNumber and its string-width function. None uses dates or randomness, and nothing calls localeCompare. +10. Tests: 111 declarations, 131 cases once `it.each` rows are expanded. The golden test compares the exact text of every generated file; no comparison works on parsed trees. +11. Five tests depend on the TS `render/` code. Three use it directly (render.layer, render.compose, r3.layer-oracles). Two use it through `renderDraftArtifacts` → `app-review` → `composeViewSvg` (seed.golden, curation.pipeline). +12. 22 source files import `@faunosteo/domain`. Only 5 runtime symbols are used: the document schema, `validateSheetDocument`, the schema version, the stable-id pattern and `ReferenceSchema`. All already have Rust counterparts from R2. +13. `@faunosteo/anatomy` has no code consumer outside itself, only the root `import:equine` script. `@faunosteo/domain` is imported only by `packages/anatomy`. +14. Deleting the packages breaks things beyond imports: Rust tests read `packages/domain/tests/fixtures/report-v2.{full,minimal}.json`, and `apps/app/tests/unit/r4.census.test.ts:80-90` asserts xmldom sits under `packages/anatomy`. +15. Open decision: the D-R5 hash rule as written (hash the bytes Rust emits) versus the owner's amendment in BDR-045 (a canonical-JSON fingerprint, decision "prepared for R5"). + +## 1. Package and tooling + +- `packages/anatomy/package.json`: exports `.` → `src/index.ts` and `./render` → `src/render/index.ts` (:10-13); script `import:equine` = `tsx src/cli/import-equine.ts` (:20); dependencies `@faunosteo/domain` workspace and `zod` ^3.24.1 (:22-25); `@xmldom/xmldom` ^0.9.8 and `prettier` ^3.4.2 are devDependencies (:28, :31), yet `src/format.ts` and `src/legacy/svg.ts` import them at runtime, as do `curation/{assets,overlay,app-review}.ts`. +- Lockfile (importer `packages/anatomy`): zod 3.25.76, @xmldom/xmldom 0.9.12, prettier 3.8.3, tsx 4.23.15, typescript 5.9.3, vitest 3.2.7, @types/node 20.19.41. Each of prettier and xmldom has a single version in the whole lockfile. +- `vitest.config.ts`: environment node, globals, include `tests/**/*.test.ts`. `tsconfig.json`: ES2022, bundler resolution, strict, noEmit, covers src and tests. `eslint.config.js`: typescript-eslint recommended. +- Root wiring: `package.json:28` `import:equine` = `pnpm --filter @faunosteo/anatomy import:equine`; `package.json:36` `assets:upload` → `packages/supabase/package.json:21` `node scripts/upload-sheet-assets.ts` (Node's native type stripping, not tsx). +- Prettier options (`src/format.ts:9-19`) are identical to the root `.prettierrc.json`. Root `format` = `prettier --write .` (`package.json:24`). `.prettierignore` does not exclude `supabase/seed/**`, so a root format run also rewrites the generated `.json` and `.md` files. + +## 2. Lines of code (wc -l) + +| Area | Files | Lines | +|---|---|---| +| src/legacy | 15 | 1,842 | +| src/curation | 19 | 2,329 | +| src/render | 5 | 553 | +| src/{index,format,markdown}.ts | 3 | 54 | +| src/cli/import-equine.ts | 1 | 119 | +| src total | 43 | 4,897 | +| tests (16 suites + helpers.ts + fixtures/mini-sheet.ts) | 18 | 2,553 | +| packages/supabase/scripts/upload-sheet-assets.ts | 1 | 99 | + +## 3. Modules (path (lines): exports with line, inputs → outputs, external deps) + +### 3.1 Shared and entry + +| Module | Exports | In → Out | Deps | +|---|---|---|---| +| index.ts (3) | re-exports legacy, curation, render | | | +| format.ts (30) | formatJson:21, formatMarkdown:28 | value → Prettier(`JSON.stringify(v,null,2)`, parser json); text → Prettier markdown | prettier | +| markdown.ts (21) | cell:6, table:11, code:19 | null → `-`; escapes `\|` and LF only; tables unpadded (Prettier pads them) | | +| cli/import-equine.ts (119) | none (main) | repo → writes legacy-import/ and draft/; prints 2 summary lines | node:fs/promises, node:path, node:url | + +CLI behaviour: REPO_ROOT is 4 levels up (:32). Strings are written with `writeFile(…,'utf8')`, otherwise `copyFile` (:37-44). `removeStale` deletes every file in the two folders that the run did not produce (:47-55). The legacy folder gets `renderArtifacts` output plus the two SVG copies (:104-107). The draft folder gets `renderDraftArtifacts` output plus `assets/` = cleanedSvg (:108-111). + +### 3.2 legacy/ (importer, Step 4b) + +| Module | Exports | In → Out | Deps | +|---|---|---|---| +| sources.ts (54) | EQUINE_SOURCE_PATHS:10, EQUINE_{LEGACY_IMPORT,CURATION,DRAFT}_DIR:20,23,26, readEquineSources:32 | root → SVG bytes, catalog text, vertebrae text | node:fs, node:path | +| types.ts (115) | Anomaly, AssetRecord, LegacyIdMap, ImportResult, … | types | domain (types) | +| ids.ts (54) | sha256Hex:15, deterministicUuid:19, assetIdFromSha256:33, sheetIdFor:37, slugify:42, isStableId:52 | | node:crypto, domain STABLE_ID_PATTERN | +| svg.ts (116) | parseAnnotatedSvg:94 | SVG text → viewBox, one record per data-anno-id (first element wins, elementCount), anomalies | xmldom DOMParser | +| vertebrae.ts (51) | parseVertebralFormula:16, vertebralRegions:45 | vertebrae.ts text, parsed with regexes (not imported) → counts, "varies A–B" | | +| regions.ts (46) | inferRegionCode:36 | FR then EN label → code/root; root table :8-14 | | +| categories.ts (98) | normaliseCategoryId:37, mapCategories:82 | annotations → categories in first-seen order; 2 slug fixes :14-17; authored labels :20-29 | | +| catalog.ts (249) | parseLegacyCatalog:73, categoryKind:81, countTree:169, assertNothingDropped:206, mapCatalog:233 | pathologies.json → lean finding zones (optional keys only when present); throws if output count ≠ input | | +| catalog-checks.ts (102) | catalogAnomalies:96 | foreign prefix, anamnesis variants, cross-zone duplicates | | +| annotations.ts (207) | zoneNameKey:37, mapAnnotation:184 | annotation + map `fr\nen` → zone → input annotation, row, region, anomalies | | +| authored-labels.ts (41) | authoredLabelAnomalies:30 | document → label.authored anomalies | | +| importer.ts (343) | importEquineLegacy:313, MAIN/HEAD_VIEW_ID:50-51 | EquineLegacyInput → ImportResult | domain schema and validate | +| report.ts (325) | renderImportReport:310 | ImportResult → French markdown, 9 sections, trailing `\n` | | +| artifacts.ts (22) | renderArtifacts:13 | ImportResult → 4 formatted texts | format.ts | + +Facts about the importer: the document written is the unparsed input form (`importer.ts:322`); the Zod parse (:317) only feeds `validateSheetDocument` (:341). Two guards throw: annotations read ≠ written (:223-228), and inline sources present (:234-239). The trigger id is `${opensDetail}-trigger` (`annotations.ts:117`); an observable annotation's id is the zone id, or `slugify(name.en)` as a fallback (:171). The slugify fallbacks never fire on today's data: `legacy-id-map.json` has `finding_nodes: {}`, and all 26 observables resolve to a zone. + +### 3.3 curation/ (Steps 4c and 5) + +| Module | Exports | In → Out | Deps | +|---|---|---|---| +| schema.ts (172) | OpSchema:101, ChangeSchema:110, ChangesetSchema:132, ReferencesFileSchema:141, needsConfirmation:164, changeSummary:168, ASSET_CHANGE_ID:29 | strict Zod; priority default `medium` (:119); level C needs a question (:123-126); duplicate ids refused (:128-148) | zod, domain ReferenceSchema | +| sources.ts (38) | readEquineCuration:26 | curation/{references,changes}.json → parsed | node:fs | +| targets.ts (195) | parseTarget:58, formatTarget:73, locate:131, zoneFindings:151, allFindings:158, findingScope:167, childList:185, childPrefix:192 | target grammar (:2-5) over plain JSON | | +| fields.ts (80) | SETTABLE table (:9-43), splitField:45, readField:62, writeField:72 | dot paths; missing intermediate objects created | | +| ops.ts (225) | applyOp:209, assertDeclared:184 | set, rename, add, remove, move, cite → in-place edits plus records | node:util isDeepStrictEqual | +| rename.ts (57) | propagateRename:54 | link table (:14-23) and citations | | +| types.ts (49) | ChangeRecord, record:35 | `structuredClone` of before/after; undefined → null | | +| apply.ts (134) | applyChangeset:122, curatedIssues:103 | baseline + references + changeset → document + records; B/C changes → `to_confirm` (:46-73) | domain schema and validate | +| assets.ts (59) | stripLegacyAnnotations:24, cleanedAsset:38, parseViewBox:49 | removes every `[data-anno-id]` element, and the root `style` when it equals the legacy value exactly (:17, :31-33) | xmldom parse and serialise | +| migration-map.ts (178) | buildReportMigrationMap:127 | baseline, final, legacyIdMap, records, sheet ref → map + stats | | +| stats.ts (133) | documentStats:77, statRows:113 | document → counts and French rows | | +| changelog.ts (132) | renderChangelog:119, compactValue:29, recordSubject:38 | records + stats → markdown | | +| review-report.ts (206) | renderReviewReport:201 | 10 fixed sections | | +| labels.ts (29) | KIND/LEVEL/PRIORITY_LABELS, LEVELS | French labels | | +| overlay.ts (214) | overlayMarkers:49, renderReviewOverlay:185 | cleaned SVG + before/after documents + view → review SVG | xmldom, node:util | +| app-review.ts (26) | renderAppReviewDrawing:20 | cleaned SVG + document + view → `composeViewSvg` → text | xmldom, render/compose | +| seed.ts (125) | renderDraftSeedSql:114, DOCUMENT_DOLLAR_TAG:13, DRAFT_CHANGE_NOTE:19 | sheetId, assets, documentJson → SQL | | +| pipeline.ts (224) | buildEquineDraft:112, renderDraftArtifacts:181, file-name constants (:41, :155-156) | see §4 | | +| index.ts (53) | re-exports | | | + +Facts about the curation pipeline: CHG-000 (the asset step: 3 `set` ops, `pipeline.ts:68-104`) is prepended, and an authored CHG-000 is refused (:106-110). The references file replaces the document registry before any change (`apply.ts:128`). `curatedIssues` runs twice (`apply.ts:132`, `pipeline.ts:135`). The real changeset has 45 changes, CHG-001 to CHG-045: 14 A, 22 B, 9 C; 11 carry a question; 34 set an explicit priority. It holds 687 ops: 587 set, 45 cite, 33 rename, 18 add, 4 remove, 0 move. It cites 48 references. `move` is exercised only by tests. + +### 3.4 render/ (frozen TS renderer; R3 counterpart in `crates/core/src/anatomy/{layer,compose}.rs`) + +| Module | Exports | Role | +|---|---|---| +| layer.ts (261) | renderAnnotationLayer:232, styleForView:75, viewBoxOf:258, MAIN/DETAIL_VIEW_STYLE:49,53, FALLBACK_COLOR:59 | document + view (+ states) → LayerElement tree | +| dom.ts (38) | createLayerElement:24, SVG_NS:9 | tree → DOM via createElementNS/setAttribute | +| serialize.ts (25) | serializeLayer:13 | escapes `& < > "` only; called only by tests | +| compose.ts (196) | composeViewSvg:54, highlightLayer:82, HALO_FILTER_ID:20 | sets viewBox, removes width/height, appends the layer last; the halo `` is created as the first child | +| index.ts (33) | re-exports | | + +The pipeline's only consumer of `render/` is `curation/app-review.ts:3`. + +## 4. Generated artifacts + +### 4.1 Producers + +Text is written by `import-equine.ts:41` (utf8). + +| File | Bytes | Producer | Inputs | Formatting | +|---|---|---|---|---| +| legacy-import/document.json | 224,109 | artifacts.ts:17 | result.document | JSON.stringify(v,null,2) → Prettier json | +| legacy-import/legacy-id-map.json | 1,323 | artifacts.ts:18 | result.legacyIdMap | same | +| legacy-import/assets.json | 408 | artifacts.ts:19 | result.assets | same | +| legacy-import/IMPORT-REPORT.md | 22,402 | artifacts.ts:20 → report.ts:310 | ImportResult | Prettier markdown | +| legacy-import/assets/Horse.svg, Horse_head.svg | 145,770 / 139,079 | import-equine.ts:63-74 | legacy-sources | copyFile (byte copy) | +| draft/document.json | 302,794 | pipeline.ts:185, :203 | draft.document | formatJson | +| draft/assets.json | 203 | pipeline.ts:204 | draft.assets | formatJson | +| draft/sheet-ref.json | 217 | pipeline.ts:205-211 | ref, schema_version, species_id | formatJson | +| draft/report-migration-map.json | 85,627 | pipeline.ts:187-194, :212 → migration-map.ts:127 | baseline, final, legacyIdMap, records, ref, `main` | formatJson | +| draft/CHANGELOG.md | 1,114,533 | pipeline.ts:195-200, :215 → changelog.ts:119 | records, statsBefore/After, migration stats | Prettier markdown | +| draft/REVIEW-REPORT.md | 108,015 | pipeline.ts:201, :216 → review-report.ts:201 | changes, records, document, statsBefore, legacy anomalies | Prettier markdown | +| draft/review/annotations-{main,head}.svg | 141,278 / 137,275 | pipeline.ts:141-153 → overlay.ts:185 | cleanedSvg, baseline, draft, view | xmldom XMLSerializer, raw | +| draft/review/app-{main,head}.svg | 146,232 / 139,462 | pipeline.ts:168-178 → app-review.ts:20 → compose.ts:54 | cleanedSvg, draft, view | xmldom XMLSerializer, raw | +| draft/equine_draft.sql | 607,446 | pipeline.ts:217-222 → seed.ts:114 | sheetId, assets, documentJson, change note | string template, raw, ends `\n` | +| draft/assets/horse.svg | 132,997 | import-equine.ts:110 ← assets.ts:24 | Horse.svg, decoded as fatal UTF-8 | xmldom XMLSerializer, raw | + +Authored inputs (never generated): `legacy-sources/`: Horse.svg 145,770, Horse_head.svg 139,079, pathologies.json 174,156, vertebrae.ts 303; `curation/`: changes.json 226,769, references.json 17,766. + +### 4.2 JSON shapes + +- pathologies.json: `{schema_version:"2.0", scope_disclaimer, species{3}, zones{26}}`. +- changes.json: `{changes[45]}`. Each change has id, level, kind, title, rationale, reference_ids, [question], [priority], ops. +- references.json: `{references[48]}`; keys id, type, citation, url, doi. +- document.json: `{schema_version, species_id, name, description, scope_disclaimer, attribution, vertebral_config, references, categories[5], views[2], annotations, finding_zones}`; legacy-import: 27 annotations, 26 finding zones; draft: 28 annotations, 27 finding zones. +- legacy-id-map.json: `{views{1}, annotations{27}, categories{5}, finding_nodes{0}, assets{2}}`. +- assets.json: `[{file, sha256, byte_size, svg_asset_id}]` (2 legacy, 1 draft). +- sheet-ref.json: `{sheet_id, version_id:null, document_sha256, schema_version:2, species_id}`, snake_case. +- report-migration-map.json: `{schema_version:1, sheet{sheetId, versionId, documentSha256}, main_view_id, views{head:"head"}, annotations{27×{id, name{fr,en}}}, finding_paths{792, 34 null}}`; `sheet` is camelCase. + +### 4.3 What Prettier changes (measured in memory by the probe) + +Markdown: only table cell padding and separator widths change: IMPORT-REPORT 134 lines, CHANGELOG 863, REVIEW-REPORT 52. No other line changes, and the line counts are identical. Column widths come from Prettier's string-width function (prettier 3.8.3 `plugins/markdown.js`): an all-ASCII string counts its length; otherwise, per code point, C0/C1 controls, U+0300–036F and U+FE00–FE0F count 0, East Asian Wide/Fullwidth characters and emoji count 2, everything else counts 1. + +JSON: the data is identical after re-parsing; only layout changes: arrays of primitives collapse onto one line when they fit in 80 columns (`"authors": ["Faunosteo"]`, `[1655, 545]`); objects stay expanded, because JSON.stringify put a newline after `{`; a trailing `\n` is added. + +Numbers: Prettier prints JSON numbers through printNumber (lowercase, `e+21` becomes `e21`, leading zeros of the exponent and trailing zeros stripped). There are 0 exponent-form numbers in the JSON today, 29 fractional values in draft/document.json. + +### 4.4 xmldom 0.9.12 serialisation facts + +- The XML declaration and whitespace text nodes round-trip: horse.svg keeps 703 lines and starts with ``. +- Attributes keep document order. Values are escaped on `<>&"\t\n\r` (`< > & " `). Text nodes are escaped on `<&>`. +- A childless element is self-closed as `/>` with no space. Observed: `` became `` once its children were stripped. +- A namespace declaration is written only when not already in scope, so layer children carry no xmlns. +- Nothing follows the root: the files end with ``. Nodes added for the layer and overlay are appended with no whitespace between them. +- The inputs contain no NBSP, tab, CR or BOM, and no comment in horse.svg. + +## 5. Identities and hashes + +- documentSha256: `documentJson = await formatJson(draft.document)` (`pipeline.ts:185`), then `sha256Hex(documentJson)` (`pipeline.ts:159-165`); `sha256Hex` hashes the string as UTF-8 (`ids.ts:15-17`); the same string is written as draft/document.json (`pipeline.ts:203`). Verified: 27c7383c…2660 matches both the committed file and the probe's recomputation. +- Carried in sheet-ref.json `document_sha256` (`pipeline.ts:208`) and report-migration-map.json `sheet.documentSha256` (`pipeline.ts:192` → `migration-map.ts:162`). +- equine_draft.sql does not carry it. It embeds `$equine_doc$` + `documentJson.trimEnd()` + `$equine_doc$::jsonb` (`seed.ts:79`) twice, in the insert (:82-95) and the converge statement (:101-112). It also embeds the cleaned asset sha256 (`seed.ts:61`). +- The hash is pinned in 18 tracked files: draft/{sheet-ref,report-migration-map}.json; crates/core/tests/oracles/{editor,migration-map.draft,report-v3.demo}.json; crates/core/tests/oracles/r4/{compare/compare,text,tolerance}.json; apps/app/tests/fixtures/report-v3.demo.json; apps/app/tests/fixtures/goldens/r2/envelope.{demo,v2full,v2unresolved}.fr.nologos.json; apps/app/tests/fixtures/pdf/r3/store-path.report.json; apps/app/tests/fixtures/pdf/r4/read/scan.{crlf-unspaced-type-params,indirect-length,wrong-direct-length}.pdf; apps/app/tests/fixtures/r4/reports/{CAP,L}.json. (The fingerprint census counts 99 PDFs once the compressed attachments are inflated.) +- UUIDs (`ids.ts:19-31`): first 16 bytes of sha256(UTF-8 name); byte 6 = (b & 0x0f) | 0x50; byte 8 = (b & 0x3f) | 0x80; lowercase 8-4-4-4-12. Names `faunosteo:asset:` (:33-35) and `faunosteo:sheet::v` (:37-39). Verified: sheet 503dc301-a8b1-50d4-9e44-0919b2fc2916, horse.svg 7f767f74-3b36-51a7-8465-52dd7e2ead4a. +- Other hashes: legacy asset sha = raw file bytes (`importer.ts:67-75`); cleaned asset sha = `TextEncoder().encode(cleanedSvg)` (`pipeline.ts:118`); source digests (pathologies.json, vertebrae.ts) = sha256 of the decoded then re-encoded text (`importer.ts:77-80`). + +## 6. JavaScript-specific behaviours (a Rust port could reproduce these differently) + +Object key insertion order drives every JSON artifact. The draft document is the working form and is never re-parsed. An edited key stays in place and a new key is appended (`fields.ts:76-79`). `review_status` is appended last by the B/C rule (`apply.ts:57`): the draft's annotation keys end `…, vertebral_region_code, review_status`. Added items keep the key order authored in changes.json (`ops.ts:150`). References follow the Zod schema order, with url/doi defaulting to null (`packages/domain/src/anatomical-sheet/schema.ts:200-207`). ChangeSummary follows Zod output order: `priority` sits at its schema position, and `question` is omitted when absent. + +JSON.parse rules: integer-like keys iterate first (`catalog.ts:240`; `catalog-checks.ts:14-16,42,72`; `migration-map.ts:137-138,150`); today there are 0 integer-like zone keys and 0 integer-like legacy ids. A duplicate key keeps the last value. + +Map/Set insertion order: `svg.ts:97` first element per id, in document order; `categories.ts:71-79` first seen, the name filled later without moving the entry; also `catalog-checks.ts:41,71`, `overlay.ts:54,72`, `migration-map.ts:152`. + +Object identity: `apply.ts:36-43,53` key a Map/Set by item object; `ops.ts:38` (`!== self`) and `ops.ts:159,176` (`indexOf(item)`) compare identity. + +Sorting: `catalog-checks.ts:78` count descending, then `<` on strings (UTF-16 code-unit order; the helper at :64-67 is misnamed byCodePoint); `review-report.ts:153-164` priority rank, then id compared with `<`. The sort is stable; there is no localeCompare in src. + +Number to string (ECMAScript rules): `format.ts:22` and `changelog.ts:33` (JSON.stringify); `annotations.ts:61` and the report.ts tables; `layer.ts:99-107,171-175,260`; `overlay.ts:82-84,91,105,113,131,139-143,168,193`; `seed.ts:62`. Rust has `crates/core/src/json.rs` `js_number:18`, `to_js_pretty:171`, `to_js_compact:200`; serde_json is built with `preserve_order` and `float_roundtrip`. There is no equivalent of Prettier's layout. + +Floating-point arithmetic: `layer.ts:171` max(2, r − 12); `overlay.ts:105` cy − r − 4; `:109-113` centroid = sum ÷ n; `:131` fontSize/8; `:168` y + (i+1)·fontSize·1.3 left to right; `:201` Math.round(width/90), where a −x.5 value rounds toward +∞, unlike Rust's f64::round. + +Number() parsing: `svg.ts:54-56` `Number(null)` and `Number('')` give 0, whitespace trimmed, hex and exponents accepted; `svg.ts:37-47` and `assets.ts:50-53` `.trim().split(/[\s,]+/).map(Number)` (a leading comma yields a 0 entry, an odd point count drops the last number); `overlay.ts:197-199` splits without trim. + +Regex classes: `\s` is Unicode whitespace, NBSP and U+FEFF included (`svg.ts:40`, `assets.ts:52`, `overlay.ts:198`, `vertebrae.ts:17,20,27`); `\w` and `\d` are ASCII-only, no `u` flag (`vertebrae.ts:20`; `schema.ts:112` `^CHG-\d{3,}$`); `STABLE_ID_PATTERN` is `/^[a-z0-9][a-z0-9_-]{0,63}$/`; the combining range is written as literal characters U+0300–U+036F (`ids.ts:45`, `regions.ts:23`). + +Normalisation and case: `normalize('NFD')`, strip U+0300–036F, `toLowerCase()` (`ids.ts:42-50`, `regions.ts:22-24`), ICU 78.3 tables; slugify ends with `.slice(0,64)`; no toUpperCase. + +UTF-16 lengths: `compactValue` caps text at 120 units and cuts with `slice(0,119) + '…'` (`changelog.ts:34-35`), which can split a surrogate pair. Zod `.min(1)` also counts UTF-16 units. + +Splitting and trimming: `trim` and `trimEnd` use the JS whitespace set (`svg.ts:39`, `assets.ts:51`, `seed.ts:79`); `split(':', 2)` discards the remainder (`migration-map.ts:82`), whereas Rust's splitn keeps it. + +Decoding: TextDecoder fatal mode for the SVGs (`importer.ts:83`, `pipeline.ts:114`), which strips a leading BOM; `Buffer.toString('utf8')` is non-fatal (U+FFFD, BOM kept) for pathologies.json and vertebrae.ts (`sources.ts:51-52`); `readFile(…,'utf8')` reads the curation files (`curation/sources.ts:23`). + +Deep equality and copies: `isDeepStrictEqual` ignores key order, NaN equals NaN, +0 differs from −0 (`ops.ts:91`, `overlay.ts:63`); `structuredClone` deep copies (`types.ts:46-47`, `fields.ts:79`, `ops.ts:109,150`, `apply.ts:127-128`). + +Zod semantics: curation schemas are strict objects, discriminated by `op`; `.int()` accepts 2.0; defaults apply. Reference url = `z.string().url()` + `/^https?:\/\//i` (domain `schema.ts:189-192`); Rust has `domain/sheet/schema.rs:100-107` with `js::is_url`. + +Markdown escaping: `cell()` escapes `|` and LF only, not CR (`markdown.ts:6-9`). No clock, no randomness: no Date, no Math.random, no randomUUID in src. + +## 7. Dependency on packages/domain + +22 source files import it, 17 of them type-only. + +| Runtime symbol | Used in | Domain source | +|---|---|---| +| AnatomicalSheetDocumentSchema | legacy/importer.ts:2, curation/apply.ts:2 | anatomical-sheet/schema.ts:295 | +| validateSheetDocument | importer.ts:4, apply.ts:3 | anatomical-sheet/validate.ts:465 | +| SHEET_DOCUMENT_SCHEMA_VERSION (=2) | importer.ts:3, legacy/report.ts:1 | schema.ts:18 | +| STABLE_ID_PATTERN | legacy/ids.ts:2 | schema.ts:21 | +| ReferenceSchema | curation/schema.ts:1 | schema.ts:200 | + +Type-only symbols (schema.ts unless noted): AnatomicalSheetDocumentInput (:315) in 13 files; Geometry (:322); SheetView (:321); SheetIssue (validate.ts:20); Reference (:210); ViewBox (:320); Laterality (:323); FindingCategoryKind (:325), FindingNodeInput (:227), LocalizedOptionalText (:213); AnnotationCategory (:319); ReportMigrationMap (report/migration-map.ts:33) and SheetRef (report/v3.ts:38). + +Test runtime symbols: AnatomicalSheetDocumentSchema, validateSheetDocument, ReportMigrationMapSchema (report/migration-map.ts:15); curation.migration-leaves only: ReportV2Schema (report/v2.ts:59), findingPathKey (report/migration-map.ts:35), migrateReportV2ToV3 (report/migrate.ts:106), readReportDocument (report/migrate.ts:156). + +Rust counterparts from R2: `crates/core/src/domain/sheet/{schema,validate}.rs` and `domain/report/{migration_map,v2,v3,read}.rs`. + +## 8. Tests + +Declarations counted by grep; `it.each` rows expanded by hand. (The orchestrator ran the suites: anatomy 131/131 in 16 files, domain 262/262.) + +| Suite (lines) | Decl | Cases | What it asserts | Files read | Render dep | +|---|---|---|---|---|---| +| curation.apply (529) | 29 | 41 | each op and its records; error messages carry `CHG-001 op 0`; determinism (:425); purity (:429); B/C rule | fixtures/mini-sheet.ts | no | +| curation.assets (79) | 5 | 5 | 30 annotated elements + titles removed, 270 paths kept, declaration kept, style removed, deterministic + XML re-parse, sha, parseViewBox | legacy-sources/Horse.svg | no | +| curation.migration-leaves (271) | 8 | 8 | 612 leaves: 442 identical, 141 moved (134 + 7), 29 removed; 26 observable annotations; spine regions | committed legacy-import/document.json, draft/document.json, draft/report-migration-map.json + domain migrate | no | +| curation.migration-map (183) | 5 | 5 | schema-valid map, fates, every target exists; synthetic rename/move/remove/re-home | runDraft, mini-sheet | no | +| curation.overlay (83) | 4 | 4 | moved/removed markers, legend, detail framing | mini-sheet | no | +| curation.pipeline (110) | 6 | 6 | 0 integrity error, 1 asset, head view_box 60 100 500 380, Cd 15–21, carpus, 811 nodes, CHANGELOG rows, 10 headings, SQL never publishes, CHG-000 refused | runDraft + renderDraftArtifacts | indirect | +| curation.schema (85) | 5 | 9 | committed curation files parse; rejections; duplicates | curation/*.json | no | +| document (23) | 2 | 2 | 0 issue; determinism | real sources | no | +| importer.counts (103) | 8 | 8 | 27/26, 2 views 1 trigger, 5 spine codes, 9 bilateral, 792/612/41 on both sides | sources + regex over the SVGs | no | +| importer.guards (47) | 3 | 3 | guard messages; dollar-quote tag | inline SVG, real import | no | +| importer.special-cases (128) | 10 | 10 | region, laterality, trigger, ssb, anamnesis, lean form, authored labels | real import, pathologies.json | no | +| legacy.regions (43) | 4 | 4 | inferRegionCode | none | no | +| r3.layer-oracles (162) | 1 | 1 | 8 layer trees equal the frozen JSON | crates/core/tests/oracles/sheet.draft.json and r3/layer.json | direct | +| render.compose (230) | 10 | 11 | highlight, halo ``, framing; app-{main,head}.svg string-equal | runDraft, draft/assets/horse.svg, draft/review/app-*.svg | direct + xmldom | +| render.layer (158) | 5 | 5 | pair/zone/trigger, styles, states, DOM + serializeLayer | runDraft, mini-sheet | direct | +| seed.golden (87) | 6 | 9 | see below | both generated folders | indirect | +| Total | 111 | 131 | | | | + +Golden test (`seed.golden.test.ts`): `beforeAll` re-runs the import and the draft in memory (:29-34); legacy-import: 4 files compared as `readFile(…,'utf8')` string === fresh render (:37-44); no SQL file in legacy-import (:46-50); the SVG copies compared with Buffer.equals against the sources, plus sha and size (:52-62); draft: one `it` loops over every file `renderDraftArtifacts` returns, comparing strings (:66-70); the draft folder must hold exactly the produced files plus `assets/` (:72-78); horse.svg text === cleanedSvg, plus sha and size (:80-86). No comparison is done on parsed data. + +Determinism tests: `document.test.ts:16-22` (two imports, toEqual, plus `renderArtifacts`), `curation.apply.test.ts:425`, `curation.assets.test.ts:46`. No test rendered the draft folder twice before R5.1 (the golden pins it against the committed bytes); `r5.pipeline-oracles.test.ts` now does. + +## 9. Consumers + +`@faunosteo/anatomy` outside the package: `package.json:28` (script filter) and `packages/README.md:12` only. No import in apps/, packages/*, scripts/, crates/, docker/, the Dockerfile, the vite configs or the eslint configs. Rust cites it in comments only (`crates/core/src/anatomy/{layer,compose}.rs`, `tests/anatomy_layer.rs`). + +`@faunosteo/domain` outside its package: imported by `packages/anatomy` only (package.json, 22 source files, 8 test files). `apps/app/eslint.config.js:68-72` bans it in the app. `apps/app/tests/unit/r4.census.test.ts` :41-57 and :59-78 assert that apps/app and packages/core-wasm neither import nor depend on it; :80-90 asserts the lockfile lists `@xmldom/xmldom` under exactly `['packages/anatomy']`. `packages/core-wasm/tests/n-1` is a verbatim copy, not an import. + +Path-level dependents: `crates/core/tests/report_rules.rs:141-143` reads report-v2.full.json (5 times) and report-v2.minimal.json (4 times); `archive_rules.rs:204,603,801,820,911` reads `packages/domain/tests/fixtures`; `archive_support/mod.rs:81` documents horse-slice.ts as its source. + +Consumers of the generated artifacts: the app (`apps/app/vite.config.ts:13` + `vite/sheet-bundle.ts:46-63` bundle document, sheet-ref, migration map, assets.json and the assets; `apps/app/tests/helpers/legacyLeaves.ts:17` reads legacy-import/document.json); the core-wasm test suites (runtime, anatomy, measure, serialisation, pdf-import, pdf-import.budget, pdf-export, pdf-export.session); `scripts/browser/lib/core-module.mjs:25`; the crate tests (anatomy_canvas_op, anatomy_compose, sheet_index, sheet_rules, sheet_contract, editor_rules, fixtures_round_trip, the pdf_* suites, archive_support); the database (`supabase/config.toml:44` lists equine_draft.sql in sql_paths; `supabase/tests/007_equine_seed.sql` plans 19 pgTAP checks; the PGlite harness `packages/supabase/tests/db/harness.ts:21`, `seeds.test.ts`); the crate oracles `sheet.{draft,legacy-import}.json` and `migration-map.draft.json` carry the seed path as `source`. + +## 10. Upload tool + +`packages/supabase/scripts/upload-sheet-assets.ts` (99 lines): reads `/assets.json` (:48-53); validates each entry (plain file name, sha `/^[0-9a-f]{64}$/`, id `/^[0-9a-f-]{36}$/`, :28-40); re-hashes each file and compares sha and size (:56-63); uploads `.svg` to bucket `anatomical-sheet-assets` as image/svg+xml with upsert false, an "already exists" error tolerated (:77-84); calls RPC `confirm_sheet_asset_upload(asset_id)` (:86-89). Needs `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY` (:42-46, :71-75), resolves the directory from INIT_CWD (:67-70), imports @supabase/supabase-js plus node:crypto, node:fs and node:path. It imports nothing from packages/anatomy; it depends only on the assets.json contract. + +## 11. ANATOMICAL_SHEET_MODEL.md (docs/development) + +§6 starts at :304; the folder table at :313-317; changeset fields, ops and target grammar :319-331; asset cleaning and CHG-000 :333-337; review drawings :339-344; Step 4c content (:346) says "44 changes + CHG-000, 48 references" while the file now holds 45 authored changes (CHG-045, colours, documented at :401-404); head view :368-375; status semantics :377-384; migration map (:393-399): 792 = 571 identical + 180 renamed or moved + 7 re-homed + 34 removed, matching CHANGELOG.md:35-43 and the committed map; seed SQL :406-410; import rules :412-429; validation tiers §2.1 at :108. + +## 12. Risks (analyzer) + +- Any byte change in draft/document.json changes documentSha256: formatter, key order, number text or the trailing newline. That rewrites 18 pinned files and makes every older archive rebase once (certain for a Rust emitter under D-R5 as written). +- Typed serde round-trips emit schema key order, not the working form's insertion order (e.g. `review_status` last), which produces a byte diff (high). +- Prettier's JSON layout and its Markdown padding (string-width function) are not reproduced by serde_json or a plain padder (high if bytes must be preserved, none if the files are regenerated by decision). +- Re-cleaning Horse.svg with the Rust reader (roxmltree plus its own serialiser, BDR-053) instead of xmldom changes the horse.svg bytes. That cascades into a new asset sha and svg_asset_id, a document change, new SQL, a new Storage object to upload, and changes to the anatomy_compose and pdf oracles that read horse.svg (medium to high). +- Deleting packages/domain breaks the crate tests that read its fixtures (certain unless the fixtures move). +- `r4.census.test.ts:80-90` fails once xmldom leaves the lockfile (certain). +- Edge-input differences (Unicode `\s`, `Number('')`, `split` limit, `Math.round` sign, UTF-16 slice) are not triggered by today's inputs (no NBSP, tab, CR, BOM, astral character or exponent found) (low). +- NFD and lowercase table differences between ICU 78.3 and a Rust crate: slugify never fires on today's data (low). +- Prettier Markdown escaping could alter more than padding on future content (today: padding only) (low to medium). + +## 13. Open questions (analyzer) + +- Which fingerprint rule binds R5: D-R5 as written, or the BDR-045 amendment? +- Byte-preserving port or one-time regeneration? Either the 18 files are reproduced byte for byte (Prettier JSON layout, Markdown padding, xmldom serialiser, insertion order), or they are regenerated once and checked by parsed-tree comparison. +- horse.svg: keep the xmldom-cleaned bytes (asset 7f767f74…) as a frozen input, or re-derive them through the Rust reader (new sha, operator upload)? +- Where do `packages/domain/tests/fixtures/report-v2.*.json` live after `packages/domain` is deleted? +- Upload tool HTTP crate: the review (:300) names reqwest, the worker uses ureq. Which one? +- Prettier on the seed: should `supabase/seed/**` join `.prettierignore` (today a root `pnpm format` rewrites the generated JSON and Markdown)? +- Stale comment: `vertebrae.ts:3` points to `apps/app/src/domain/species/equine/vertebrae.ts`; the source is `legacy-sources/vertebrae.ts`. diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index 1183172e..2bf556d1 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -509,3 +509,18 @@ Decision: J1 + J2 declared PASS as a whole on iPhone Safari iOS (no per-check sp Alternatives: wait for per-check iPhone measures (rejected by owner: device-level declaration suffices for merge, measures = follow-up); regenerate goldens on any gap (forbidden). Recorded: RUST.md §10.15 (risk table + checks), PDF_IMPORT_HARDENING.md §7, R4_J1/J2_RESULTS + MINI_RECETTE, CHANGELOG headers, TODO R4.13. Status: active; limits stay: no release 0.2.0, no deploy, no DNS/server change, no R5 before next owner signal, D2/D4/D5 deferred. + +## BDR-068 | 2026-10-22 | R5 owner decisions: D-R5 = RFC 8785 of validated doc, aliases, F1 fix, byte-exact port, frozen SVG bytes + +Context: owner validated R5.1 (« Validation R5.1, décision D-R5 et lancement du portage Rust »). +Decision: D-R5 = option B, convention `sha256-rfc8785-validated-v1` = sha256 of RFC 8785 canonical JSON of the validated document (defaults filled, canonical model), real RFC 8785 (UTF-16 key sort, ES number print, UTF-8, no Unicode normalisation, I-JSON refusals, Rust/JS deterministic) proven by official vectors + edge cases + independent differential; `v1` freezes the construction and validation rules (later defaults/schema never change v1 identity retroactively). Alias mechanism approved: Report v3 `sheet.documentSha256` stays 64 hex; new reports stamp current convention; old reports open with no rebase on identical document; aliases only from trusted frozen historical documents, never from an archive or bundle; unknown fingerprint ≠ official sheet; real anatomical change still migrates; no archive/fixture/oracle rewritten. F1 fix authorised first. Port byte-exact by default, differences declared one by one; fingerprint-bearing artifacts regenerated once at R5.6 only. Historical SVG bytes (horse.svg) kept, never re-serialised. `.prettierignore` on Rust-written generated paths, narrow, with a reproducible check. Upload tool reuses `ureq` (no reqwest by default) at R5.5. Slicing R5.1b to R5.7 validated; stop after R5.2. +Alternatives: A (Rust emitted bytes, re-ties identity to a serialiser), C (Rust reproduces Prettier bytes, keeps formatter chain); one-time visible rebase of every old archive (rejected: transparent alias possible). +Status: active. R5.1b + R5.2 done 2026-10-22; documentSha256, seed, report contracts untouched until R5.6; no merge, no package deletion, no 0.2.0, no deploy. + +## BDR-069 | 2026-10-24 | Refuse three non-canonical v3 report shapes at reader entry + +Decision (owner go): `check_v3_shape` on raw value before `Report::deserialize`: `sheet`, `practitioner` must be objects, `severity` string. At `read_report_document` v3 + `parse_envelope`. Rationale: serde derives accepted positional arrays / one-key enum maps Zod refused → crafted file could swap same-typed fields silently. Alternatives: generic shape guard (draft/shape.rs style) on whole contract (wider, not authorised); `deserialize_with` in contract structs (touches contract). Status: applied d502dfa; v2 + other contracts keep serde leniency (not in go). Owner confirmed fingerprint convention `sha256-rfc8785-validated-v1`, one alias `27c7383c…2660`; R5.6 scope files approved, switch not authorised. + +## BDR-070 | 2026-10-25 | D-R5.6 active: fingerprint `sha256-rfc8785-validated-v1`, registry alias, M1 option 1 + +Decision (owner, activation 9e87016): sheet fingerprint = SHA-256(JCS RFC 8785 of R2 typed reading, no integrity error, warnings allowed, depth 128). Equine canonical 12d78872…74e2; old 27c7383c…2660 = sole TRUSTED_ALIASES entry, bound to sheet 503dc301 + content. Alias honoured only via LoadedSheet::recognises_historical_stamp (loader-verified v1 private state + document recomputed at decision + one-way registry pair + same sheet id); equivalence pub(crate). M1 option 1: snapshot of old report keeps its stamp (build_sheet_snapshot); export, archive reader strict. v0 refs (no block) load unverified, no privilege; null/malformed block refused. Rust = sole seed writer, TS legacy until R5.7. Alternatives rejected: A file-bytes (Prettier-bound), C Prettier reproduction; re-stamp at rebase (rewrites reports); export-side alias (M1 defect, no proof). Status: active on feature branch; rollback not transparent for post-switch reports (rebased, nothing lost) → settle before user release. diff --git a/.claude/memory/evals.md b/.claude/memory/evals.md index 561afe46..884b48d2 100644 --- a/.claude/memory/evals.md +++ b/.claude/memory/evals.md @@ -192,3 +192,52 @@ Method: memory bench 3 engines × demo/L × 6 exports + Chromium L 16 + raster c Result: verifier pass 1 ECARTS(1): core with no feature did not compile (`restore_copy` used gated `pdf::read` const; workspace feature unification via crates/wasm hid it in rust-check/check:all) → gated + no-feature clippy in rust-check; pass 2 ECARTS(1): §6 lacked J2 merge-gate row → added. Security pass 1 BLOCK(1): `.gitleaks.toml` allowlist (R4.1, owner-approved in journal) lacks owner `[gated]` marker → owner action; MEDIUM serve.mjs `--host ""` bound every interface. Anomalies: my first host fix = exact-string denylist → bypassed by `0`, `0::`, `::ffff:0.0.0.0`, scoped `::` (re-gate 1); rebuilt resolve-then-BlockList; re-gate 2 found post-bind check dead for IPv6 (`family` 'IPv6' vs 6) and my fstat-first CLI read opened FIFOs before the type check (regression). Each fix of a gate finding introduced the next finding: 3 re-gates for 2 small fixes. Contract CHECKs used root vitest path (absent): oracle defect. Action: owner checkpoint; floor 21 DELETED_TEST (R4.8 deletions, approved in brief §1) need owner `[gated]` clarification line to clear formally. + +## EVAL-026 | 2026-10-22 | R5.1 freeze + D-R5 study — analyzers ×2, oracle generator, cross-stack digests + +Method: 2 analyzer agents (pipeline inventory 43 files, fingerprint census: producers, consumers, 99 PDFs, docs), both refused to write files (role rule) → orchestrator saved reports; generator test (`MAKE_R5_ORACLES=1`) + freeze re-run green 6/6, anatomy 137, domain 262; Node scripts (matrix, PGlite jsonb) + scratchpad Rust binary on core crate: digests compared value by value; tie census 200k values. +Anomalies: R2 oracle test self-referential on number printing (LRN-070) → F1 undetected since R2; docs contradict (BDR-045 vs RUST.md §10.10 / TODO "will change once") → cross-reference added; analyzer inventory counted "10 anomalies" wrong in orchestrator draft (actual 27, records 825 not 690, 16 ledger artifacts) → corrected from oracle counts before commit. +Action: F1 fix proposed, owner go; D-R5 recommendation B + aliases; checkpoint delivered, STOP. + +## EVAL-027 | 2026-10-22 | R5.1b + R5.2 gates: check:all, security, verifier + +Method: check:all green 21:16:39 (app 434, core-wasm 58, domain 262, anatomy 141, supabase 40, curation suites, worker + images); security-auditor semgrep 129 rules / 36 files → PASS, 0 HIGH, 5 LOW; fresh verifier on contract `2026-10-22-rust-r5-f1-importer.md` → CONFORME 12/12 (ran cargo workspace + curation suites + import-equine --check itself, red-before proven by rustc probe). +Anomalies: LOW report.rs `Map` index panics on hand-built ImportResult → fixed (get chain) after verdict, importer suite + --check rerun green; LOW quadratic vertebrae scan, symlink-following `listed()` in --check, lint allows (accepted, operator inputs). check:all ran on pre-commit tree (code identical to 03bdb5e). Verifier floor note: plan B.3.5 "(proposal, not implemented)" heading from R5.1, intended. +Action: checkpoint R5.2 delivered, STOP before R5.3. + + +## EVAL-028 | 2026-10-23 | R5.3 gates: fresh verifier ×4 + security; successive passes found real defects + +Method: check:all after each fix round; security-auditor (semgrep 725 rules, checklist) → PASS, 6 LOW (3 fixed: Map index, destination claimed + canonicalised, INIT_CWD absolute only); fresh verifier each round, no history. Pass 1 ECARTS(1) (floor on a plan heading) + 2 unreachable divergences aligned; pass 2 null-on-optional (LRN-072); pass 3 (first attempt died on API credit error, rerun on Opus) repeated keys refused by serde derive, NUL touch-mark silent drop (LRN-073), `--out symlink/` trailing slash followed the link; pass 4 C1-C12 met, C13 docs gaps (lossy UTF-8 read, 2 contrived splits undeclared, stale counts). +Anomalies: green byte parity on real data hid every finding: all were hostile-input or file-protection defects. A verdict reported after post-pass edits was not re-verified → owner required a fresh pass on the final state. +Action: refusal tests now compare reasons by stage; Object.prototype characterised + tested; migration-map debt characterised; final fresh verifier + security on the final R5.3 state before R5.4. Next ports: budget ≥3 verifier passes, probe hostile inputs (null, duplicates, reserved names, symlinks, encodings) in the oracle from the start. + +## EVAL-029 | 2026-10-23 | R5.4 gates: 14 rounds (verifier + security + check:all) to converge + +Method: each round fresh verifier (opus, contract from disk, own TS-vs-Rust differential) + fresh security-auditor (semgrep + checklist + memory probes) + `pnpm check:all`; superseded runs stopped. Rounds 1-5: Markdown guard families (denylist → allowlist at round 3); rounds 6-11: resource bounds (table amplification, records per op, string headers, drawings per annotation, fixed parts); 12-14: doc precision only. Final: c4e717d security PASS (LOW only), check:all green 16:41:34; eb667ad (docs/comments only over c4e717d) verifier all 9 clauses MET, ECARTS(13) = floor-guard hits on audit prose quoting suppression keywords (product paths clean). +Anomalies: docs repeatedly claimed bounds "before any row is built" / "tens of MB" that the next audit disproved; counts drifted after each fix; FLOOR family needs a contract Clarification (human gate), never an audit edit. +Action: LRN-074, LRN-075; checkpoint R5.4 to owner with decisions (FLOOR clarification, curation input cap vs 65× parse, bare URLs autolinked, 2 declared quadratic scans), STOP before R5.5. + +## EVAL-030 | 2026-10-23/24 | R5.5 gates: 2 rounds + owner real-stack recette + +Method: fresh verifier + security-auditor (opus; pinned Fable agents died on usage credits, re-dispatched), check:all per round; owner ran real-stack e2e by hand. +Anomalies: round 1 verifier ECARTS(4) all real (oversize body → Network+retry, "retried 3×" = 3 attempts, runbook exit codes, FLOOR script never OK); security M1 key on argv in e2e script. Round 2 security 5 LOW (Protocol retried, broadcast DEV addr accepted). Census doc claim "earlier revisions" wrong → corrected before checkpoint. +Action: fixes + negative tests; owner closed R5.5 2026-10-24 (e2e PASS 11/11, owner's run). LRN-076. + +## EVAL-031 | 2026-10-24 | R5.6 prep: claimed rehearsal green after extending the patch + +Method: fresh verifier applied patch in scratch copy, ran every feature set + switched-seed simulation; security read patch. +Anomalies: docs/TODO said "rehearsed green"; green run covered 5-consumer wiring only, then generator + loaded.rs added without rerun → report-compare E0063, 4 curation tests failing unreported; switched seed never simulated (+3 failures incl. frozen R4 O7). Security M1: alias-path export writes report 27c7 + snapshot 12d7 → pre-switch/N-1 readers drop snapshot. +Action: rerun gate after every patch extension, claim only measured state; patch fixed (build, strict block, NotCanonical); docs corrected; M1 to owner. + +## EVAL-032 | 2026-10-25 | R5.6 rehearsal: docs claimed export guarded by fingerprint_verified + +Method: isolated worktree (patch + switched seed), rust:check + check:all green, fresh security + verifier (opus), verifier probe on core export API. +Anomalies: RUST.md said M1 "needs fingerprint_verified" for every consumer; export path (input.rs) never sees LoadedSheet → v0 sheet snapshot gets alias at export (app unreachable, API reachable). Fix needs snapshot_rules.rs, outside owner's 8-file scope → stopped. Also `pnpm format` rewrote append-only audits in worktree (reverted). +Action: claim a guard per call site, not per design; owner decision on snapshot_rules.rs; never run format over .claude/. + +## EVAL-033 | 2026-10-25 | R5.7 closure: deletion gates + pre-merge rerun + +Method: ledger 407 TS cases case by case before `git rm`; fresh verifier + security (opus) twice; check:all on R5.7 state, then rerun on 27bf59c after post-check edits; verifier ran 14 scratch reintroduction probes against census. +Anomalies: round 1 verifier ECARTS(2): contract C6 "tsx gone" false vs pnpm optional peer (owner Clarification), digest typo `…dfe7` in docs. Two edits landed after first check:all → owner required full rerun. Census regex accepted `#[ignore]` targets (fixed) and still accepts ignore-before-test (LOW). Docs pointed to premerge record before it existed; `.bin/tsx` wording root-only; SUPABASE.md layout stale since R2. `pnpm audit` never run before this round (cargo advisories only): 57 pre-existing. +Action: LRN-078, LRN-079; rerun gate after any post-check edit; run `pnpm audit` in every pre-merge round; checkpoint to owner, STOP before merge. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index f3b049fa..0d0def19 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -318,3 +318,65 @@ Owner verdict: J1.7 PASS w/ reserve, M3 complementary, J2.3 option 1 final, logo ## 2026-10-21 (R4 closed and merged) Owner: J1 + J2 PASS on computer, Android, real iPhone Safari iOS (declared as a whole; model/versions/timings/memory not given → marked missing, not invented); R4.12 validated; merge authorized → BDR-067. Consolidation 3a7937e: R4_J1/J2_RESULTS + MINI_RECETTE, RUST.md §10.15 (risk table, deadlines, final checks), PDF_IMPORT_HARDENING §7 (items 3/19 unblocked, 5/6/7/9/20 open), CHANGELOG headers, TODO R4.13. Final checks on 22bbfb4 (code identical through 3a7937e): check:all green 22:15:50 (app 434, domain 262, core-wasm 58, anatomy 131, supabase 40, worker TLS + debian13 digest), audit --prod clean, gitleaks 111 commits clean (tree: ignored `.env.worker` only), no local path/personal id, merge-tree clean, goldens 8b86b92 / oracles 4439fd2 / digests d492bf7 untouched, 51 deletions all 0dc1ba2. `gitflow finish feature rust-r4-pdf-core` → merge 96ae75e (parents 66909b6 + 3a7937e, 113 commits), develop pushed = origin, branch deleted local + origin, main 605ee7c untouched, release/0.2.0 untouched. Not done: release 0.2.0, deploy, DNS, R5, D2/D4/D5. Next: owner signal for R5 (entry: plan D-R5, `packages/anatomy` pipeline → `crates/core`, seed golden regenerated once). + +## 2026-10-22 (R5.1 freeze + D-R5 study) + +Owner: R4 bilan validated, R5.1 authorised (freeze TS pipeline, study D-R5, stop before Rust pipeline + fingerprint change). Branch `feature/rust-r5-pipeline-core` from 9c0117a. Two analyzers (inventory, documentSha256 census) → `.claude/audits/R5_*.md`. Oracles `oracles/r5/{pipeline,ids,fingerprints}.json` via `r5.pipeline-oracles.test.ts` (MAKE_R5_ORACLES=1; 6 cases, determinism two runs, ledger vs committed). Study scripts `scripts/r5-fingerprints.mjs`, `packages/supabase/scripts/r5-jsonb-fingerprint.mjs`; throwaway Rust experiment (scratchpad) reproduced every draft digest byte-for-byte, JCS 40 lines no crate, RFC vectors pass; jsonb round trip keeps B only. Found F1: `js_number` tie rounding (Grisu up vs ES6 even; `840.1692504882812`, 7.4 % of float32 values; `zmij` matches) hidden by self-referential R2 oracle test → LRN-070, EVAL-026, not fixed (owner go). Plan `2026-10-22-rust-r5-pipeline-core.md`, RUST.md §11, TODO R5.1 ticked. Recommendation: B on validated form + alias mechanism (old `27c7…` stays valid, no visible migration). STOP at checkpoint. No Rust pipeline, no fingerprint change, no merge. + +## 2026-10-22 (R5.1b F1 fix, R5.2 legacy importer in Rust) + +Owner validated R5.1, decided D-R5 = B `sha256-rfc8785-validated-v1` + aliases, F1 go, byte-exact port, frozen SVG bytes, ureq at R5.5 → BDR-068. R5.1b aed6b1e: `js_number` digits from `zmij` (edge only, no new crate), V8 oracle 44,322 rows (1,552 mismatches before → 0), `zod_oracle` now checks oracle bytes (red on old printer), rust:check + wasm + check green, no oracle/golden/digest moved. R5.2 03bdb5e: `crates/core/src/curation` (feature `curation`, 3,187 lines: Prettier string width table transcribed, JSON layout rules, table alignment, slugify via icu_normalizer NFD, uuids, legacy importer, IMPORT-REPORT) + `import-equine --check|--out`; legacy-import/ byte-exact (6 files), pipeline.json legacy parts equal, 10 synthetic TS cases, 968 Prettier probes; declared refusals: emoji width, malformed SVG, wrong-typed catalog nodes. Docs 82f1664 (RUST.md §11.9-11.11, CHANGELOG), contract `2026-10-22-rust-r5-f1-importer.md`. Gates: check:all green 21:16:39, security PASS (5 LOW, report Map-index panic fixed), verifier CONFORME 12/12 → EVAL-027. STOP after R5.2 checkpoint. + +## 2026-10-22/23 (R5.3 curated draft in Rust) + +Owner validated R5.1b/R5.2, go R5.3, named `pnpm r5:import-equine`. e0f149b: `crates/core/src/curation/draft` (2,718 lines: schema, targets, fields, records, ops, rename, apply, migration_map, stats, seed, pipeline) + `import-equine` both folders + `scripts/import-equine.sh`; draft 5 texts + frozen horse.svg byte-exact (`--check` 12/0), 825 records, 46 changes, stats, migration stats 792/571/180/7/34, 612 leaves 442/141/29, 58 synthetic TS cases (`oracles/r5/curation-synthetic.json`, 9 byte-exact, 49 refused alike). Security PASS (6 LOW, 3 fixed). Verifier 4 passes: found null-on-optional, repeated keys, NUL touch-mark drop, symlink trailing slash, lossy UTF-8; all fixed or declared (RUST.md §11.12); pass 4 C1-C12 met, C13 doc gaps fixed after, not re-verified. check:all green 00:10:03. documentSha256 unchanged. STOP at R5.3 checkpoint; R5.4 on owner go. + +## 2026-10-23 (R5.3 closed after 6 final gate rounds) + +Owner validated R5.3 functionally, asked a fresh verifier on the final state, Object.prototype characterisation, migration-map debt kept + characterised, LRN/EVAL. 9901106/8654905: Object.prototype member = plain key, safe, test; debt test from TS-frozen cases; refusal reasons compared by stage; LRN-072, LRN-073, EVAL-028. Then 6 rounds (verifier + security + check:all each) on the final state, each finding real edge families via TS-vs-Rust fuzzing (up to 150,000 changesets): NUL field segment silent drop, stack overflow (8 segments, 64 levels, 200,000 values), non-exclusive --out, serde struct-as-array / enum-as-map (draft/shape.rs; R2 derives raised to owner, gated readers), non-list/non-object children, JSON.parse key order + big ints, __proto__ segments, seed identity guard, reads confined to seed. Sixth round c6e0d85: CONFORME 13/13, security PASS LOW only, check:all green. LOW leftovers carried into R5.4. Next: R5.4 (owner go conditional on these checks: met). + +## 2026-10-23 (R5.4 review files in Rust, 14 gate rounds) + +R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_compare}.rs` + `curation/report_guard.rs` (allowlist guard); CHANGELOG 1,114,533 B, REVIEW-REPORT, 3 drawings byte-exact, app-main.svg = R3 trigger-name rule only; `--check` 6/0 + 12/0, 1 declared. Gates: rounds 1-5 Markdown families → allowlist + 798-probe TS sweep; rounds 6-11 bounds (records 16 Mi weight charged per record, report tables 32 Mi summed, drawings 64 MiB projected per annotation + fixed parts); 12-14 docs. Final c4e717d security PASS, check:all green; eb667ad verifier 9/9 MET, only audit-prose FLOOR. LRN-074, LRN-075, EVAL-029. STOP at R5.4 checkpoint; R5.5 on owner go. + +## 2026-10-23 (R5.5) +- R5.4 adjustments: FLOOR clarification + negative-proof script (21 audit prose requalified, evals.md:205 STUB declared), 4 MiB cap changes/references (+39 MB parse at 3.98 MB), serde tolerance characterised, no reader changed. +- R5.5: `upload-sheet-assets` Rust (core rules pure, bin ureq), local-only destination, plan before write, no overwrite, confirm after verify; 12 stub tests + 7 unit. +- Blocked: own run vs real local stack refused by permission layer, not retried; owner runs `pnpm e2e:sheet-assets`. Fable gate agents out of credits → re-dispatched on opus. +- Gates: verifier ECARTS(4)→fixed→C1-C13 MET; security PASS ×2; check:all green 21:47:11. STOP at checkpoint. + +## 2026-10-24 (R5.5 close) +- Owner closed R5.5: real-stack e2e PASS 11/11 (owner's manual run). LOW fixes: Protocol final, broadcast DEV addr refused. +- BDR-069 serde: 3 v3 shapes refused at reader entry; all R2-R4/PDF/N-1 suites green unchanged. +- Found: DEV stack on CLI default JWT secret + 54321 LAN-open → LAN service_role (ENVIRONMENTS §3.6, owner decision). SQL confirm characterised, unchanged. +- R5.6 plan written, 4 decisions open. STOP. + +## 2026-10-24 (R5.6 prep) +- Owner: R5.5 validated, D-R5.6 decided (compiled registry authority, 5 consumers, Rust sole generator at switch). DEV key risk accepted temporarily, separate hardening task. +- Fingerprint module inert + 9 tests; Rust draft value = frozen 12d7…74e2 first try. Switch as rehearsed patch (green), tree restored, --check 0 diff. +- Rehearsal found: fingerprint before drawings bound (order), loaded.rs/facade.rs outside approved files. STOP before switch. +- Correction: "patch rehearsed green" was false (green run predated generator/load parts; patch broke report-compare build). Verifier caught it; patch fixed, docs corrected. Lesson → EVAL-031. + +## 2026-10-25 (R5.6 rehearsal) +- Owner: M1 option 1, 8-file scope, v0 kept without alias privilege. Rehearsed in detached worktree, seed switched there only (copy approved by owner at prompt). +- M1 in input.rs; equivalence one-way + fingerprint_verified (v1 recomputed at load, sha2 in wasm). Goldens reproduced byte-exact on switched sheet. +- Original contexts via pre-switch fixtures (O7, O10, R2, ledger, TS + app goldens); check:all 00:56:22 green switched. +- Slip: `pnpm format` rewrote append-only audits in worktree → reverted. Never format over .claude/. + +## 2026-10-25 (R5.6 M1 fix) +- Cause M1: export sees only snapshot. Fix in build_sheet_snapshot via recognises_historical_stamp (private verified + recompute at use); input.rs strict, unchanged. +- null block refused, warnings allowed (is_publishable), canonical depth 128. Fresh worktree final: all gates green, security PASS, verifier CONFORME 8/8. STOP before activation. + +## 2026-10-25 (R5.6 active) +- Owner authorised switch. Patch applied (sha = verified worktree), equivalence pub(crate), comments + trust boundary. Seed: fresh --out, 2 files copied (03e7f6ab, 0e991bc2), --check 0 diff. +- Switch commit 9e87016: rust:check + check:all green; security PASS LOW; verifier 13/14, ECARTS(1)=S7 pre-activation wording → Clarification. +- Rollback measured: new v1 report on pre-switch build → rebased, 0 unresolved, notice shown. BDR-070, LRN-077. STOP, no merge, no R5.7. + +## 2026-10-25 (R5.7) +- Owner validated R5.6, authorised R5.7. Census: anatomy 144 + domain 263 TS cases mapped; 15 anatomy contracts + 1 domain oracle only TS checked → ported to Rust first (+19 tests, curation_leaves.rs). +- Deleted anatomy, domain, TS upload script, legacy scripts; LEDGER.tsv 407 (256/149/2), FILES.tsv 112; fixtures moved sha kept; xmldom out; tsx left as vite optional peer. +- TS replay rehearsed at 59521dc + 756b7ef. check:all green 03:58:13; security PASS 2 LOW; verifier ECARTS(2): tsx residue (owner), digest typo fixed. STOP before merge. + +## 2026-10-25 (R5.7 pre-merge) +- Owner validated R5.7, accepted tsx as vite optional peer → C6 Clarification. Census now refuses `#[ignore]` ledger targets (cd69f0e). 149 replaced rows checked active, 2 deletions checked. +- Rerun on 27bf59c: frozen install, dedupe, check:all green 13:41:41, --check 0 diff, report:compare ok; security PASS (pnpm audit 57 pre-existing, MEDIUM); verifier CONFORME 10/10. LRN-078, LRN-079, EVAL-033. STOP before merge. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 051c4bfa..a4c4a8f4 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -519,3 +519,57 @@ Apply: when an implementation is swapped under a test that spied the old one, re - Context7 said nginx `listen ... http2` deprecated → `http2 on;`, but live VPS sends `Server: nginx/1.24.0` and 1.24 rejects `http2 on` (`unknown directive`). Apply: before changing a runbook directive, read the target's version (Server header, `nginx -v`) and `nginx -t` both forms in throwaway containers of each version; document both when the fleet straddles. - WHATWG URL normalisation can create the escape it was meant to catch (`/..//host` → pathname `//host`, same origin for the probe). Apply: sanitiser re-validates the value it returns (not only the input), plus an idempotence test; fuzz with dot segments, `%2e`, tabs inside `..`. + +## LRN-070 | 2026-10-22 | Rust `{:e}` shortest digits ≠ ECMAScript on exact decimal ties; oracle that re-prints expected through the port cannot see it + +Found by R5.1 study. `js_number` (core json.rs) takes shortest digits from `format!("{:e}")` (Grisu): exact tie between two shortest candidates → Grisu picks upper, ECMAScript/Python/`zmij` pick even. `840.1692504882812` (= 840.16925048828125, float32-exact, Horse.svg legacy cx) → Rust `…813`. Rate: 7,401 / 100,000 float32-exact values in 0..2000, 769 / 100,000 random doubles, `zmij` (serde_json 1.0.154 formatter, locked) 0. Draft seed has no tie → every R2/R3/R4 suite green, but `sheet_contract.rs` `zod_oracle` computes expected = `to_js_pretty(oracle.output)` → same function both sides → blind. 134 JSON fixtures Node vs Rust pretty: 2 differ (legacy baseline, that value). +Apply: shortest-float port → take digits from `zmij`/ryu-class crate, never `{:e}`; tie vectors (float32-exact values) in unit tests; oracle expected must be the recorded JS text, never re-printed by the port under test. Any R5 importer emitting legacy coordinates needs the fix first. + +## LRN-071 | 2026-10-22 | Prettier byte parity for generated JSON/Markdown is cheap: four layout rules + one width table, oracle-probed + +R5.2 reproduced Prettier 3.8.3 `parser: json` over `JSON.stringify(v, null, 2)` and markdown table alignment in ~350 lines Rust, byte-exact on 968 synthetic probes + 7 seed files + 3 reports. Rules that mattered: objects always expanded (stringify newline after `{`), array breaks when >1 element and all elements arrays >1, or child breaks, or flat form + trailing comma > 80 cols; broken all-number arrays use `fill`, others one per line; `printNumber` drops `e+`; width = length if all bytes 0x20..0x7F else per code point (controls/combining/VS16 = 0, East Asian wide/fullwidth = 2) after RGI emoji replaced by spaces. Emoji table not reproduced → refuse (`UnsupportedWidth`), declared. Probe generator in TS (vitest, `MAKE_R5_ORACLES=1`) sweeping depth × key width × count × digits around the 80-col boundary found both bugs (`e+21` form, width fast path) before any real file did. +Apply: any port that must match a formatter's bytes: sweep the boundary with synthetic probes written by the formatter itself; transcribe tables from the installed package (same table lives in `index.mjs` and plugin), never from memory; refuse unreproduced classes loudly instead of approximating. + +## LRN-072 | 2026-10-23 | serde `Option` reads JSON `null` as absent; Zod `.optional()` refuses it + +Found by R5.3 verifier pass 2: changeset `scope` / `position` / `field` declared `Option` + `#[serde(default)]` → `"scope": null` parsed as absent, Zod refused (`expected 'self' | 'subtree', received null`). Committed data had none → every parity test green, only a hostile input shows it. Core already had `js::present` (R2) for exactly this; port forgot it. Complement of LRN-048 (serializer side: `.optional()` absent vs nullable `null`). +Apply: porting a Zod schema to serde: `.optional()` → `default, deserialize_with = "js::present"`; `.nullable()` → `js::nullable`; add one `null` refusal case per optional key to the differential oracle. + +## LRN-073 | 2026-10-23 | In-band markers replacing object identity must be reserved keys refused at input + +R5.3 applier replaced TS object identity (touched items) with a transient key `"\0touched"`, stripped after each change. Verifier pass 3: an authored value holding that key was taken for a mark and the cleanup deleted it silently, where TS refused it at the strict gate → silent author-data loss. Fix: refuse any NUL-prefixed key in the changeset at parse (`reserved key`), test it. +Apply: any in-band sentinel (key, id prefix, magic value) gets a reserved namespace, a refusal at the input boundary and a test; never rely on "no author would write that". Prefer out-of-band state (side table by path) when the cost is similar. + +## LRN-074 | 2026-10-23 | Formatter-parity guard: allowlist + generator sweep, never denylist + +R5.4 ported CHANGELOG/REVIEW-REPORT without a Markdown printer: reproduce Prettier's table alignment only, refuse text Prettier would rewrite. Denylist guard leaked every gate round (emphasis, links, autolinks, entities, strong pairs, URL underscores, image refs, nested padded wiki links, underscore paired across code spans, wiki opened in one field closed in another, field segment closing author `[` from a code span). Allowlist (letters, digits, single spaces, fixed punctuation, few ruled forms; code spans only the generator alphabet `[A-Za-z0-9_:/. -]`; list-item fields refuse `[[ ]] {% %}` whole) + TS-written sweep (798 probes, 400 seeded random, cross-field pairs) converged: rounds 11-14 found 0 silent over ~400,000 TS-vs-Rust cases. +Apply: byte parity with a formatter you do not port → allowlist of what the real data uses, refuse rest loudly, sweep frozen by the formatter itself incl. random strings and constructs split across fields/lines; state guarantee as empirical; add each gate-found family to sweep. + +## LRN-075 | 2026-10-23 | Resource bounds: charge at the allocation site, projection must be a tested upper bound + +R5.4 security rounds 6-11 each broke a bound that looked done: table bound checked after raw rows built; records bound checked after a whole op (one op records once per item, each record cloning change texts); weight counted 1/byte while each cloned String costs header + alloc (~56 B for 1-char id); drawings projected from cleaned SVG only, unnamed triggers copy opened view names ×4; projection 477 B under written for a draft with no annotations (fixed parts uncharged). Each time docs claimed "refused before built". +Apply: bound = check before the clone/allocation, at every producer (record push, marking, subtree loop); weight ≈ real bytes (64 per node/String + bytes); output projection = upper bound per element + fixed part per file, with a test asserting projected ≥ written on real and degenerate inputs (empty, max-copy); measure hostile inputs at 1/10 of the read cap before claiming a bound in docs. + +## LRN-076 | 2026-10-24 | Stub suite ≠ real-service recette; record both apart + +Context: R5.5 upload tool. 12 loopback-stub tests green; Claude's run vs real local stack refused by permission layer (transfer tool + service key). Owner ran `pnpm e2e:sheet-assets` by hand → PASS 11/11. +Pattern: stub proves tool logic (plan, refusals, retries, no overwrite); only real service proves endpoints, status codes, grants (anon key refused at Storage, not stub). Ship a hand-run e2e script beside stub suite; record each result with its author (simulated by Claude / real by owner), never merge into one "tested". +Apply: any tool touching a real service with a privileged key: stub tests in `cargo test`, owner-run e2e script, both results in RUST.md + TODO separately. Owner validated 2026-10-24. + +## LRN-077 | 2026-10-25 | Privilege decision needs proof at the call site holding the evidence + +Context: R5.6 M1. Alias granted at export from snapshot's claimed value; export never saw the loaded sheet. Load-time flag alone also insufficient (pub mutable document/reference). +Pattern: put the decision where the evidence object lives (build_sheet_snapshot holds LoadedSheet), keep private verified state set only by the trusted constructor, and recompute the proof at decision time; every other site stays strict equality. Make the raw comparison crate-private so no caller can skip the proof. +Apply: any equivalence/allowlist privilege (aliases, migrations, trust marks): one decision method on the verified object, recompute, strict elsewhere, negative tests on the direct API not just app paths. + +## LRN-078 | 2026-10-25 | Before deleting old engine, census contracts only its test code checks + +Context: R5.7. Oracles + Rust parity looked full; case-by-case map of 407 TS cases found 15 anatomy + 1 domain contracts no Rust test checked (612-leaf fates, 26 legacy ids, region inference, R5.1 ledger rows, overlay removal, halo, CHG-000, dollar tag, viewBox, cite of added ref, move via renamed path, folder file list, map vs oracle per entry). Oracle generators' own asserts carried them. +Pattern: ledger row per old case (contract, disposition, live target, oracle); census test checks target is non-ignored `#[test]` fn and oracle file exists; port gaps before `git rm`. +Apply: any engine deletion (R-phases): map every case first, "oracle covers it" is a claim to prove per case. Owner validated 2026-10-25. + +## LRN-079 | 2026-10-25 | Optional peer in lockfile ≠ live use of deleted engine + +Context: R5.7 C6. After removing anatomy, `tsx` stayed in pnpm-lock.yaml as vite's optional peer (`optional: true`, no importer, no bin); `pnpm install` keeps it, `dedupe --check` clean; only hand edit/override would drop name. Contract said "tsx gone" → false NOT-MET. +Pattern: prove use by `pnpm why -r` path + importer blocks + manifest/script/source census, not lockfile name grep. Never hand-edit lockfile or add override just to drop a name. +Apply: dependency-removal clauses state objective (no declared dep, no script, no import), allow transitive/optional peers; census guards declared deps and `optional: true`. Owner validated 2026-10-25. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index ebc6623a..7665c1ec 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -304,7 +304,65 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo - [x] owner actions: J1 + J2 on the OD-6 devices (done 2026-10-21, iPhone included); still owner-side: delete the UFW 4173 rule after the recette sessions (`sudo ufw status numbered`, `sudo ufw delete `) - [ ] owner action (non-blocking): `packages/pdf/node_modules` leftover (13 pnpm symlinks, 6 bin shims, 1 vitest cache file, 0 tracked or useful files) → `rm -rf packages/pdf/node_modules && rmdir packages/pdf` (the recursive delete was refused to Claude by the permission layer) - [ ] outside R4 (owner 2026-10-17, non-blocking): worker container ignores SIGTERM (Docker kill after 10 s; chore, e.g. `init: true`); README test counter stale (367 vs 1,015) - - [ ] R5 curation pipeline + importer + upload tool: seed golden regenerated once (new `documentSha256`, D-R5), `packages/anatomy` + `packages/domain` deleted, docs map; all before Step 13 + - [ ] R5 curation pipeline + importer + upload tool (plan `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md`, branch `feature/rust-r5-pipeline-core` from 9c0117a; owner 2026-10-22: R5.1 authorised, stop before any Rust pipeline code and before any `documentSha256` change; no merge without validation, no deletion of packages/anatomy or domain, no golden or historical change, no 0.2.0, no deploy, no SaaS feature): `packages/anatomy` + `packages/domain` deleted at the end, docs map; all before Step 13 + - [x] R5.1 freeze + D-R5 study (2026-10-22): inventory `.claude/audits/R5_PIPELINE_INVENTORY.md`, census `.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md`, oracles `crates/core/tests/oracles/r5/{pipeline,ids,fingerprints}.json` (generator `packages/anatomy/tests/r5.pipeline-oracles.test.ts`, `MAKE_R5_ORACLES=1`), study scripts `scripts/r5-fingerprints.mjs` + `packages/supabase/scripts/r5-jsonb-fingerprint.mjs`, RUST.md §11, anatomy 137/137, domain 262; F1 found: core `js_number` rounds exact ties upward (JS: to even; `zmij` matches), 1 legacy value, invisible on the draft, R2 contract test self-referential → checkpoint, STOP + - [x] owner decisions (2026-10-22, BDR-068): D-R5 = B `sha256-rfc8785-validated-v1` (applied at R5.6 only), aliases from trusted frozen documents only, F1 go, byte-exact by default + declared differences, historical SVG bytes kept, `.prettierignore` on Rust-written paths + reproducible check, `ureq` preferred at R5.5; stop after R5.2 + - [x] R5.1b F1 fix (aed6b1e): `zmij` digits; V8 oracle `oracles/r5/numbers.json` 44,322 rows (1,552 mismatches before, 0 after); 840.1692504882812 test; `zod_oracle` checks oracle bytes vs core compact print (red on old printer); consumers audited R2-R4: rust:check + wasm + check green, no oracle/golden/digest moved + - [x] R5.2 legacy importer in Rust (feature `curation`, `crates/core/src/curation/**`, 3,187 lines) + `import-equine --check | --out`: legacy-import/ 4 texts + 2 SVG byte-exact, pipeline.json legacy parts equal, raw report = pre-Prettier digest, determinism, 10 synthetic TS cases (2 byte-exact, 8 refused alike), format probes (968 JSON, 10 tables, slugs, uuids, Number, Math.round, key order); declared differences RUST.md §11.10; contract `.claude/tasks/contracts/2026-10-22-rust-r5-f1-importer.md` → checkpoint, STOP before R5.3 + - [x] R5.3 changeset applier, migration map, stats, seed SQL (CLOSED 2026-10-23 on c6e0d85: fresh verifier CONFORME 13/13 after 6 final rounds, security PASS LOW only, check:all green; owner go 2026-10-22 « Validation R5.1b / R5.2 et autorisation R5.3 »: `pnpm r5:import-equine --check | --out ` names the Rust binary, `pnpm import:equine` kept; no fingerprint switch; `horse.svg` frozen bytes read, never re-cleaned; R5.4 files (review SVGs, CHANGELOG, REVIEW-REPORT) out of scope; stop at the checkpoint) + - [x] R5.3a `crates/core/src/curation/draft/{schema,targets,fields,ops,rename,apply}.rs`: changeset + references files parsed strictly (Zod shape order on re-emit, `priority` default, level C question, duplicate ids), target grammar, settable fields, the six ops on the plain JSON document (`serde_json::Value`, insertion order), rename propagation, review rule (touched items → `to_confirm`, identity through a transient marker key), shape + integrity gate through the R2 core (`AnatomicalSheetDocument` + `validate_sheet_document`) + - [x] R5.3b `draft/{migration_map,stats,seed,pipeline}.rs`: replay of rename/remove/move records over the 792 legacy paths, re-homing, stats; `documentStats` (17 fields, JS key order); `renderDraftSeedSql` byte-exact; `build_equine_draft` (CHG-000 from the frozen `horse.svg` bytes and the head view box) + `render_draft_artifacts` (document, assets, sheet-ref with sha256 of the document bytes, migration map, seed SQL) + - [x] R5.3c `import-equine`: both folders (`/legacy-import`, `/draft`), `--check` compares the produced files and lists the R5.4 files as pending (not counted), `--out` refuses a non-empty folder, a symlink, a file, an empty path; `scripts/import-equine.sh` + root script `r5:import-equine` + - [x] R5.3d proofs (draft 5 files byte-exact, 12/12 `--check`, 46 changes + 825 records + stats equal, 612 leaves 442/141/29, 58 synthetic cases: 9 byte-exact + 49 refused alike + 5 references files, rust:check green): `tests/curation_draft.rs` (draft files byte-exact vs committed, `pipeline.json` draft section: 46 changes, 825 records, stats, migration stats, assets, issues; determinism; 612-leaf walk through the core's migration on the produced map); TS generator `r5.curation-synthetic-oracles.test.ts` → `oracles/r5/curation-synthetic.json` (mini sheet: every op kind, positions, subtree scopes, review rule B/C, renames with cascades, re-homing, refusals) run by the Rust suite; `pnpm rust:check`, `pnpm check:all` + - [x] R5.3e (security PASS 6 LOW / 3 fixed; verifier 4 passes, last C1-C12 met + C13 docs fixed after; check:all green 00:10:03) gates: security auditor (diff), independent verifier on the contract `.claude/tasks/contracts/2026-10-22-rust-r5-draft.md`; docs RUST.md §11.12-11.13, CHANGELOG, CLAUDE.md commands; memory → checkpoint report, STOP before R5.4 + - [x] R5.3g final rounds 1-6 (verifier + security + check:all each): NUL field segments, depth/segment/value bounds, exclusive --out writes, shape family, JSON.parse normalisation, non-list/non-object children, __proto__ segments, seed identity guard, reads confined to the seed; all fixed or declared (RUST.md §11.12-11.13) + - [x] R5.3f owner 2026-10-23: Object.prototype member characterised (safe, accepted, test), migration-map debt kept + characterisation test, refusal reasons compared by stage; final fresh verifier + security on the R5.3 state + - [ ] debt (owner 2026-10-23, after R5): migration map replays cascade records by their op (`applyRecord` / `apply_record`): a view, zone, region, category or cited-reference rename corrupts the map; fix both sides as a declared change before any changeset uses such a rename (RUST.md §11.12) + - [ ] OWNER DECISION (found 2026-10-23 by the R5.3 final verifier): serde derives of the R2 contracts read a struct from an array and a unit enum from a one-key map, where Zod refused; likely reachable by the gated readers of imported PDFs (`archive/read.rs`, `report/read.rs`, `pdf/import.rs`); probe the readers, then a per-file go for a strict deserialisation (RUST.md §11.13) + - [ ] chore (pre-existing, security gates R5.3): `clippy.toml` disallowed list misses `fs::create_dir*`, `OpenOptions::open`, `read_dir`, `canonicalize`, `remove_*`, `env::current_dir`, `env::args_os`, `process::Command`; extend so the core's no-I/O rule is enforced, not only observed + - [ ] R5.4 review overlays + app drawings, CHANGELOG + REVIEW-REPORT, --check over the whole draft (owner go 2026-10-23, conditional on the R5.3 final checks: met on c6e0d85; contract `.claude/tasks/contracts/2026-10-23-rust-r5-review.md`; stop at the checkpoint, no R5.5) + - [x] R5.4a `draft/{labels,changelog,review_report}.rs` + `stats::stat_rows`: CHANGELOG and REVIEW-REPORT raw text = ledger pre-Prettier digests, formatted text byte-exact (`report_guard::format_report`: allowlist guard + `markdown::format_markdown` alignment); compactValue on UTF-16 units + - [x] R5.4b `draft/{overlay,app_review}.rs` on the core tree (`read_svg`, frozen horse.svg, prolog kept verbatim): review overlays and app drawings; bytes vs xmldom where reproducible, parsed trees otherwise; the R3 trigger-name decision declared for app-main + - [x] R5.4c `render_draft_artifacts` complete (TS order); `import-equine --check` covers the 12 draft files with explicit criteria (bytes; declared tree rule), PENDING list and `shortcut:` removed; fails on any missing or unauthorised difference + - [x] R5.4d proofs: `tests/curation_review.rs` (the 6 files, ledger digests, determinism); TS generator `r5.review-synthetic-oracles.test.ts` → `oracles/r5/review-synthetic.json` (changelog raw + formatted, review report, overlays, app drawings on mini-sheet cases: Unicode, pipes, newlines, long values, emoji refused, every status); R5.3 LOW carry-over (destination identity, cite membership, unreadable-seed message, stale comment, doc nits) + - [x] R5.4e gates: 14 rounds; c4e717d security PASS (LOW only) + check:all green 16:41:34; eb667ad (docs only over it) fresh verifier 9/9 clauses MET, ECARTS = 13 FLOOR hits on audit prose (owner Clarification); docs RUST.md §11.14-11.15, CHANGELOG, CLAUDE.md; memory LRN-074, LRN-075, EVAL-029 → checkpoint delivered, STOP before R5.5 (R5.4 closes on owner validation) + - [x] R5.5 `upload-sheet-assets` bin + runbook (CLOSED 2026-10-24 by the owner: real local stack `pnpm e2e:sheet-assets` PASS 11/11, run by the owner by hand; owner go 2026-10-23 « Validation R5.4 et autorisation conditionnelle R5.5 »; local stack only; no production, no deploy; stop at the checkpoint, no R5.6) + - [x] R5.5-0 R5.4 closing adjustments: FLOOR clarification (contract + `scripts/floor-clarification-check.sh`, 19 audit-prose hits requalified, 1 STUB in evals.md:205 outside scope, reported), 4 MiB cap on `changes.json` / `references.json` (core `MAX_CURATION_FILE_BYTES`, bin bounded read; 222 KB + 17 KB committed, parse of a 3.98 MB changeset peaks +39 MB), `tests/curation_caps.rs` (cap, margin, stable ids of any species), serde R2 tolerance probe (characterisation only, nothing changed) + - [x] R5.5-1 core module `curation::upload` (pure, no I/O): manifest parse + entry rules, destination rule, key derivation, per-entry plan from observed states, closed error kinds + - [x] R5.5-2 bin `upload-sheet-assets` (feature `upload`, ureq): `--check` read-only and write mode, destination verified (loopback or the DEV host, http, explicit port) then handshake (private bucket) before any transfer, existing objects verified by sha256 never overwritten, confirm only after the object is verified, bounded retries, secrets never printed + - [x] R5.5-3 scripts: `assets:upload` points at the Rust bin (`scripts/upload-sheet-assets.sh`), TS script kept until R5.7 census; runbook SUPABASE.md §3.1, RUST.md §11.16 + - [x] R5.5-4 tests (real-stack e2e NOT run by Claude: permission layer refused; owner runs `pnpm e2e:sheet-assets`): unit (core), bin tests against a stub HTTP server (refusals, partial failure, resume, network errors), local Supabase run (upload, rerun, anon refused, wrong key, tamper); `pnpm rust:check`, `pnpm check:all`, `r5:import-equine --check` + - [x] R5.5-5 gates (round 1: verifier ECARTS(4) + security PASS 1 MEDIUM 9 LOW, fixed; round 2 fad85c0: verifier C1-C13 MET, check:all green 21:47:11, security PASS 5 LOW declared RUST.md §11.16): fresh security audit, fresh verifier on the contract `.claude/tasks/contracts/2026-10-23-rust-r5-upload.md`; memory; checkpoint report (9 points), STOP + - [ ] R5.5 closing corrections (owner 2026-10-24 « Clôture R5.5, corrections ciblées et préparation R5.6 »; contract `.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md`) + - [x] LOW: `Protocol` final, DEV address own unicast (broadcast refused), tests + - [x] serde: `check_v3_shape` at `read_report_document` v3 + `parse_envelope` (sheet, practitioner, severity), test turned around + - [x] `confirm_sheet_asset_upload` characterised (no SQL change), DEV keys + 54321 documented (ENVIRONMENTS.md §3.6) + - [x] R5.6 plan `.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md` (4 decisions open) + - [x] gates: round 1 check:all 03:39:24, security PASS (2 MEDIUM, 6 LOW), verifier ECARTS(2) → positional-parent bypass fixed (1ec9e1b); round 2 check:all 03:51:55, verifier K3/K4 behaviour MET, 2 formal gaps → contract Clarification (owner to confirm) → checkpoint, STOP (no R5.6 without signal) + - [ ] R5.6 preparation (owner 2026-10-24 « arbitrage D-R5.6 »; nothing active) + - [x] `domain/sheet/fingerprint.rs` + `sheet_fingerprint` tests (RFC, V8, Node differential, draft 12d7…, registry, census 123/124 alias) + - [x] switch patch `.claude/tasks/plans/r5-6-switch.patch` (5-consumer wiring rehearsed green rust:check + check:all 14:32:05; whole patch: 4 curation tests fail on current seed, +3 on switched seed, RUST.md §11.19), files restored + - [x] gates on 3b9a395: check:all 14:41:00, security PASS (M1 snapshot stamp → owner, M2 block strictness partly fixed), verifier ECARTS(2) (report-compare build in patch fixed, false "rehearsed green" corrected) → checkpoint, STOP (switch on signal) + - [ ] R5.6 rehearsal (owner 2026-10-24 « corrections préalables à la bascule »; contract `.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md`; isolated worktree, branch inactive) + - [x] M1 option 1 (input.rs), directional equivalence + fingerprint_verified, v0/v1 load rules, report-compare status, generator order + - [x] original contexts (O7, O10, R2 Zod, R5.1 ledger, TS golden, app goldens) + separate post-switch tests; rust:check + check:all 00:56:22 green on switched state + - [x] gates: security PASS (1 MEDIUM, 6 LOW), verifier ECARTS(3) = export grants alias without fingerprint_verified (fix needs snapshot_rules.rs, outside scope) → checkpoint, STOP, owner decision + - [x] R5.6 M1 correction + full rehearsal (owner 2026-10-25; snapshot_rules.rs authorised): recognises_historical_stamp, null block refused, warnings allowed, depth 128; fresh worktree r56final: rust:check + check:all 01:53:59 green; security PASS (LOW); verifier CONFORME 8/8 → checkpoint, STOP (activation on signal) + - [x] R5.6 D-R5 switch ACTIVE (owner go 2026-10-25, commit 9e87016): seed sheet-ref 03e7f6ab + migration map 0e991bc2 only, --check 0 diff, rust:check + check:all green, security PASS LOW, verifier ECARTS(1)=S7 wording → Clarification; BDR-070; rollback not transparent for post-switch reports (settle before user release) → checkpoint, STOP, no merge, no R5.7 + - [ ] R5.7 consumer census, domain fixtures moved, packages deleted, xmldom + prettier out of the lockfile, docs, ledger; `pnpm check:all`; merge only on the owner's signal (owner go 2026-10-25 « Validation R5.6 et autorisation R5.7 »: rollback limit accepted on the branch, no intermediate release; plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md`, contract `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`; stop at the checkpoint, no merge) + - [x] R5.7a census + matrices (LEDGER 407: 256 ported, 149 replaced, 2 deleted, 0 gap; FILES 112), 15 anatomy + 1 domain uncovered contracts ported first (+19 Rust tests, curation_leaves.rs new) + - [x] R5.7b `report-v2.*.json` → `crates/core/tests/fixtures/` (sha256 kept), Rust readers repointed + - [x] R5.7c deletion (anatomy, domain, TS upload script, legacy scripts, Dockerfile lines, lockfile by `pnpm install`) + - [x] R5.7d census tests (r4 xmldom inverted + non-vacuity, R5 census, ESLint ban) + - [x] R5.7e historical reproducibility documented and rehearsed (59521dc: git status clean, 144+262; 756b7ef: 2 files, 144+263) in a detached worktree + - [x] R5.7f docs (CLAUDE.md, WORKSPACE, packages/README, README, RUST.md §11.23, CHANGELOG, sheet model, SUPABASE, TEST_STRATEGY, PDF-FORMAT) + - [x] R5.7g checks (frozen install, rust:check, check:all green 03:58:13, --check 0 diff, TS 943→546, Rust 364→383) + fresh security + fresh verifier → checkpoint, STOP + - [x] R5.7h owner validated R5.7 2026-10-25 (« dernière vérification pré-fusion »); C6 Clarification (tsx = vite optional peer, accepted); census refuses `#[ignore]` targets (cd69f0e); pre-merge rerun on 27bf59c: frozen install + dedupe ok, check:all green 13:41:41, --check 0 diff, report:compare ok, security PASS, verifier CONFORME 10/10 (`.claude/audits/2026-10-25-rust-r5-7-premerge.md`) → STOP, merge `--no-ff` into develop only on the owner's signal + - [ ] later maintenance (owner accepted temporarily 2026-10-25, LOW, security final): census regex still accepts `#[ignore]` before `#[test]` or `#[cfg_attr(…, ignore)]` (no mandatory target affected); fix = inspect the whole attribute block above `fn (` + - [ ] before any release or public exposure (owner 2026-10-25, not blocking develop): `pnpm audit` 57 advisories, all pre-existing on develop; treat or qualify each one, keeping its published severity apart from Faunosteo's actual exposure. Priority: zod 3.25.76 GHSA-mrhx-c7xc-m3w5 (oversized constrained collections; fixed 4.6.6 = major): first map every path that feeds untrusted data to Zod and its size guards, then plan the zod 4 migration as its own chore. Others: tinypool/vitest, vite 7.3.6 dev server (LAN), happy-dom, pnpm 10.13.1, brace-expansion, js-yaml, nanoid, postcss, source-map-js + - [ ] if a new anatomical changeset lands: owner decision on a new baseline for the Rust tests pinning the real draft (46 changes, 825 records, 612 fates, fingerprints); oracles never regenerated to hide a divergence + - [ ] owner action (non-blocking): `packages/{anatomy,domain}/node_modules` leftovers (git-ignored pnpm symlinks; recursive delete refused to Claude) → `rm -r packages/anatomy/node_modules packages/domain/node_modules && rmdir packages/anatomy packages/domain` + - [ ] DEV hardening (owner 2026-10-24, risk accepted temporarily, not scheduled): Supabase on CLI demo keys + 54321 LAN-open (rootless, UFW allow incoming, no 54321 rule) → own JWT secret/signing keys via env() or narrower 54321 rule before any untrusted device or user (ENVIRONMENTS.md §3.6); never these keys in production; `confirm_sheet_asset_upload` object check before public exposure - [ ] separate chore (D-R7): form constraints module + PGlite `pg_constraint`/config.toml parity test - [ ] Release 0.2.0 (branch release/0.2.0 = Steps 3–6, version.txt + package versions 0.2.0, CHANGELOG [0.2.0] 2026-10-11): deploy-trigger check done 2026-10-12 (CI = branches main/develop only, no tag trigger, no deploy job, docker job builds `faunosteo:ci` locally; hooks push only; DEPLOY.md deploy = manual on the VPS). Default 0.2.0 build carries NO sheet (SHEET_BUNDLE=none) → the live local tool must not be redeployed from main without `--build-arg SHEET_BUNDLE=draft`. Finish via /release-candidate (finish + tag span, tag push on explicit go); CHANGELOG back-merge conflict expected (Unreleased Step 7 above [0.2.0]). Awaiting the user's go. --- diff --git a/.claude/tasks/contracts/2026-10-22-rust-r5-draft.md b/.claude/tasks/contracts/2026-10-22-rust-r5-draft.md new file mode 100644 index 00000000..3b9c06a4 --- /dev/null +++ b/.claude/tasks/contracts/2026-10-22-rust-r5-draft.md @@ -0,0 +1,99 @@ +# CONTRACT: Rust R5.3, the draft side of the anatomical pipeline (changeset applier, migration map, stats, seed SQL) + +- date: 2026-10-22 | branch `feature/rust-r5-pipeline-core` | plan `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` §B.5 row R5.3 +- brief: owner 2026-10-22 « Validation R5.1b / R5.2 et autorisation R5.3 » (applied as written; its §1 to §9 are the clauses below) +- predecessor: R5.2 contract `.claude/tasks/contracts/2026-10-22-rust-r5-f1-importer.md` (the legacy importer, `import-equine --check | --out`) + +## Scope + +Port `packages/anatomy/src/curation/{schema,targets,fields,ops,rename,apply,types,migration-map,stats,seed,pipeline}.ts` +(the draft side without the review drawings and the two Markdown reports, which are R5.4) into +`crates/core/src/curation/draft/**` behind the existing `curation` feature, and extend the +`import-equine` binary to the `draft/` folder. Out of scope: `overlay.ts`, `app-review.ts`, +`changelog.ts`, `review-report.ts`, `assets.ts` (`stripLegacyAnnotations`: the cleaned `horse.svg` +is frozen, read as bytes), the fingerprint convention (R5.6), the upload tool (R5.5), any deletion +under `packages/`. + +## Clauses (each one checkable) + +C1. **Inputs.** The core reads the legacy `ImportResult` (R5.2), the bytes of the frozen +`draft/assets/horse.svg`, the head view box text, `curation/references.json` and +`curation/changes.json` as texts. No `std::fs`, no clock in `crates/core/src/curation/**` +(the binary `crates/core/src/bin/import_equine.rs` is the only file allowed the file system). + +C2. **Strict schemas.** `changes.json` and `references.json` are refused on: an unknown key in any +object, a wrong type, an `id` not matching `^CHG-\d{3,}$`, an empty `title.fr` / `title.en` / +`rationale` / target / field / rename id / cited reference id / `question`, an empty `ops`, an +empty `cite.reference_ids`, a level C change without a `question`, a duplicate change id, a +duplicate reference id, a position that is not a non-negative integer or a strict +`{after}` / `{before}` object, a reference failing the R2 `Reference` contract. `priority` +defaults to `medium`. Declared difference: a `set` without `value` is refused (TypeScript +wrote `undefined`, i.e. dropped the key). + +C3. **Applier semantics** (`apply.rs`, `ops.rs`, `rename.rs`, `targets.rs`, `fields.rs`): the +six ops behave as `ops.ts` on the plain JSON document (insertion order of keys, `review_status` +appended last when created), with the settable table of `fields.ts`, the target grammar of +`targets.ts`, the rename cascade of `rename.ts` (one record per rewrite), `assertDeclared`, +`assertNotReviewed`, and the review rule of `apply.ts` (every touched finding or annotation of a +B or C change set `to_confirm` with a record, first-touch order, items removed from the document +skipped). Any op that cannot apply exactly refuses with the change id and op index; the result +then passes the R2 shape (`AnatomicalSheetDocument`) and integrity (`validate_sheet_document`) +gate, errors refuse, warnings are returned. + +C4. **Records.** Every record is `{change, op, target, field, before, after}` with `change` in +the Zod shape order (`id, level, kind, title, rationale, reference_ids, question?, priority`), +`op` in the Zod shape order of its kind, absent values as `null`. + +C5. **Migration map** (`migration_map.rs`): `buildReportMigrationMap` as `migration-map.ts` +(replay of rename / remove / move records, zone renames, annotation and view renames, the +finalPaths check, unique re-homing, stats `nodes / identical / remapped / rehomed / removed`). + +C6. **Stats** (`stats.rs`): `documentStats` with its 17 fields in the TypeScript key order, +the fixed-key counters (`point, zone, detail_trigger`; `inherited, reviewed, to_confirm`) +extended by unlisted values as JavaScript does. + +C7. **Seed SQL** (`seed.rs`): `renderDraftSeedSql` byte for byte (header, sheet insert, asset +inserts, `insert_sheet_draft`, converging update, the dollar tag refusal, `trimEnd`). + +C8. **Draft artifacts** (`pipeline.rs`): `build_equine_draft` runs CHG-000 (asset record of the +frozen bytes: sha256, byte size, uuid; `view:main.svg_asset_id`, `view:head.svg_asset_id = null`, +`view:head.view_box` from the head SVG's viewBox) then the authored changes, refuses a changeset +reusing `CHG-000`; `render_draft_artifacts` returns `document.json`, `assets.json`, +`sheet-ref.json` (`document_sha256` = sha256 of the `document.json` bytes, the historical rule), +`report-migration-map.json`, `equine_draft.sql`, in the TypeScript order, plus the byte copy +`assets/horse.svg`. + +C9. **Parity proofs** (`crates/core/tests/curation_draft.rs`): the six R5.3 files of the +committed `draft/` byte for byte; the `pipeline.json` draft section (sheetId, 46 changes, 1 +asset, statsBefore, statsAfter, issues, migrationStats, 825 records) equal under the JS compact +print; two runs byte-equal; the 612 legacy leaves migrated through the core's `read_report_document` +on the produced map: 442 identical, 141 moved, 29 removed, every resolved leaf a leaf of the +produced document, the 29 flagged paths exactly those the map sends to null. + +C10. **Synthetic differential** (`oracles/r5/curation-synthetic.json`, generator +`packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts`, `MAKE_R5_ORACLES=1`): changesets +on the mini sheet covering every op kind, numeric and anchored positions, subtree scopes, the +review rule on levels A / B / C, the five rename cascades, a reference rename, re-homing, and the +refusal classes of `curation.apply.test.ts` and `curation.schema.test.ts`; each accepted case +freezes the formatted document, the records, the stats, the migration map and the seed SQL, each +refused case the refusal; the Rust suite reproduces every accepted case byte for byte and refuses +every refused case. + +C11. **Binary and script.** `import-equine --check` compares `legacy-import/` and `draft/` with +the committed folders and writes nothing; the R5.4 files (`review/*.svg`, `CHANGELOG.md`, +`REVIEW-REPORT.md`) are listed as pending and not counted (marked `shortcut:` for R5.4). +`import-equine --out ` writes `/legacy-import/**` and `/draft/**`, refuses an +empty path, a path that exists and is not a directory, a symlink, a folder holding any file; +never deletes. `scripts/import-equine.sh` + root script `r5:import-equine` forward the +arguments; `pnpm import:equine` (TypeScript) unchanged. + +C12. **Frozen references untouched.** No file under `supabase/seed/**`, `crates/core/tests/oracles/**` +(except the new `curation-synthetic.json`), `apps/app/tests/fixtures/**`, +`packages/core-wasm/tests/n-1/**` changes; `documentSha256` stays `27c7383c…2660`; no gated +reader (`domain/{archive/read,report/rebase,report/read,session}.rs`, `pdf/{read,json_js,import}.rs`) +changes; `packages/anatomy` and `packages/domain` keep every test (anatomy gains the generator). + +C13. **Gates.** `pnpm rust:check` green, `pnpm check:all` green, security auditor PASS on the +diff, this contract verified CONFORME by a fresh verifier; RUST.md §11.12 (R5.3) and §11.13 +(checkpoint) written, CHANGELOG Unreleased, CLAUDE.md command list; differences declared one by +one. No merge, no R5.4, no fingerprint switch, no release, no deploy. diff --git a/.claude/tasks/contracts/2026-10-22-rust-r5-f1-importer.md b/.claude/tasks/contracts/2026-10-22-rust-r5-f1-importer.md new file mode 100644 index 00000000..97b8247a --- /dev/null +++ b/.claude/tasks/contracts/2026-10-22-rust-r5-f1-importer.md @@ -0,0 +1,43 @@ +# Contract: R5.1b (F1 fix) and R5.2 (legacy importer in Rust, `import-equine`) + +Base: 64d4595 on `feature/rust-r5-pipeline-core` (« chore(memory): R5 plan, pipeline inventory and documentSha256 census audits, TODO R5.1, journal, LRN-070, EVAL-026 »). Range: `64d4595..HEAD`; `` below is 64d4595. Date: 2026-10-22. + +## REQUEST (verbatim excerpts, owner, « Validation R5.1, décision D-R5 et lancement du portage Rust ») + +« Je valide la correction du défaut d'arrondi de `js_number` dans le cœur Rust. La nouvelle implémentation doit reproduire les règles ECMAScript, notamment les égalités décimales exactes et les cas limites identifiés. Utiliser une implémentation éprouvée déjà présente dans l'écosystème du projet lorsque c'est approprié […]. Ajouter : un test caractérisant précisément le cas 840.1692504882812 ; des vecteurs couvrant les égalités d'arrondi ; des tests différentiels Rust / ECMAScript et des cas limites ; une référence indépendante pour éviter qu'une implémentation calcule elle-même son attendu. Auditer les consommateurs de `js_number` dans R2, R3 et R4. Conserver les oracles et goldens gelés. Si une divergence apparaît sur les corpus historiques, […] arrêter le portage avant toute modification de golden ou de contrat. » + +« Par défaut, chaque fichier produit par Rust doit correspondre à l'ancien pipeline octet pour octet. Les différences éventuellement nécessaires doivent être déclarées individuellement […]. Ne pas modifier silencieusement les données métier pour satisfaire un oracle. » + +« Je décide de conserver les octets de `horse.svg` et des autres assets historiques […]. » « Ne pas ajouter `reqwest` par défaut […]. Ce choix sera implémenté à R5.5, pas pendant R5.2. » + +« Vérifier les cas limites de deterministicUuid, slugify, UTF-16, Math.round et Number(''). Ne pas se contenter de tests sur les données équines actuelles lorsque le contrat est générique et multi-espèces. » + +« Conserver les tests TypeScript et les oracles gelés durant le portage. Ne pas modifier `documentSha256`, le seed officiel ou les contrats des bilans avant R5.6 […]. Ne supprime pas encore packages/anatomy ou packages/domain. » + +## FILE SCOPE + +- R5.1b: `crates/core/src/json.rs`, `Cargo.toml` and `crates/core/Cargo.toml` (`zmij`), `Cargo.lock` (one dependency edge), `crates/core/tests/json_numbers.rs`, `crates/core/tests/common/mod.rs` (`zod_oracle` raw-text check, `repo_path`), `crates/core/tests/oracles/r5/numbers.json`, `scripts/r5-number-oracle.mjs` +- R5.2: `crates/core/src/curation/**` (new), `crates/core/src/lib.rs` (module behind `curation`), `crates/core/src/bin/import_equine.rs` (new), `Cargo.toml` and `crates/core/Cargo.toml` (feature `curation`, `icu_normalizer`, optional `sha2`, bin, two test targets), `Cargo.lock` (one dependency edge), `crates/core/tests/{curation_format,curation_legacy}.rs`, `crates/core/tests/oracles/r5/{prettier-json,markdown-tables,js-semantics,legacy-synthetic}.json`, `packages/anatomy/tests/{r5.format-oracles,r5.legacy-synthetic-oracles}.test.ts`, `scripts/rust-check.sh` (the `curation` lines) +- Docs and memory: `docs/development/RUST.md` §11.9 to §11.11, `CHANGELOG.md` (Unreleased), this contract, `.claude/tasks/TODO.md`, `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` (owner decisions), `.claude/memory/{decisions,journal,learnings,evals}.md` + +Out of scope: `supabase/seed/**` (no generated or authored file changes), `apps/**`, `packages/**/src`, `packages/core-wasm/**`, the existing oracles (`crates/core/tests/oracles/*.json`, `oracles/r3/**`, `oracles/r4/**`, and the R5.1 files `oracles/r5/{pipeline,ids,fingerprints}.json`), `apps/app/tests/fixtures/**` (goldens, R4 digests), the gated readers (`crates/core/src/domain/{archive/read,report/rebase,report/read,session}.rs`, `crates/core/src/pdf/{read,json_js,import}.rs`), `crates/worker/**`, `pnpm-lock.yaml`; any deletion. + +## ACCEPTANCE CRITERIA + +1. F1 fixed with an existing implementation: `js_number`'s digits come from `zmij` (already in `Cargo.lock` through serde_json 1.0.154 before the base: `git show :Cargo.lock | grep -A2 'name = "zmij"'`); `git diff -- Cargo.lock` adds dependency edges only (`"zmij"` and `"icu_normalizer"` under `faunosteo-core`), no new `[[package]]`. +2. Independent reference: `crates/core/tests/oracles/r5/numbers.json` was written by Node (`scripts/r5-number-oracle.mjs`, `String(value)`, values as IEEE bits) and holds ≥ 40,000 rows including the bits `408a415aa0000000` → `840.1692504882812`; `crates/core/tests/json_numbers.rs` compares `js_number(f64::from_bits(..))` to every row and has a dedicated test for 840.1692504882812 (both signs) and the two other tie values of the study. +3. Red before, green after: on the base's `json.rs` the number suite fails (orchestrator run: « 1552 mismatches, first: 408a415aa0000000: 840.1692504882813 vs V8 840.1692504882812 ») and the strengthened `zod_oracle` fails `the_legacy_import_baseline_prints_as_zod_outputs_it`; after the fix both pass. The verifier checks by reading that `zod_oracle` compares the oracle's raw bytes with `to_js_compact(oracle) + "\n"` before using `to_js_pretty`. +4. R2 to R4 preserved: `git diff --stat -- crates/core/tests/oracles/*.json crates/core/tests/oracles/r3 crates/core/tests/oracles/r4 apps/app/tests/fixtures crates/core/tests/conformance crates/core/tests/fixtures` is empty; the check:all log (path in the brief) shows the cargo suites (pdf_serialize, pdf_layout, anatomy_*, sheet_*, report_*, archive_*) and the app 434 / core-wasm 58 / domain 262 cases green. +5. Formatting parity, generic: `crates/core/tests/curation_format.rs` passes: the 968 Prettier JSON probes match except case 19 (emoji, refused with `UnsupportedWidth`), the 10 table probes match except case 5 (emoji, refused), the 7 generated JSON files of the seed print byte for byte, slugs (ids.json 801 rows + 22 edges) and uuids (6 + 7) match, `Number()` (39 texts), points (12), `Math.round` (18, bits kept), `trim` (8) and `Object.keys` order (3) match. The probes were written by Prettier and Node (`r5.format-oracles.test.ts`), not by Rust. +6. Importer parity: `crates/core/tests/curation_legacy.rs` passes: the 4 text files of `legacy-import/` byte for byte and the 2 SVG copies; every key of `pipeline.json`'s `legacy` section (sheetId, viewBoxes, stats, sourceDigests, assets, anomalies, issues, regionInferences, zoneStats, annotationRows) equal in the JavaScript compact form; the raw report's sha256 equals the ledger's `before_prettier_sha256`; two runs byte-equal; the 10 synthetic cases of `legacy-synthetic.json` (2 accepted: files byte for byte and every result part; 8 refused by the TypeScript: refused by Rust too). +7. Binary: `cargo run -p faunosteo-core --features curation --bin import-equine -- --check` prints `legacy-import: 6 files, 0 differences` and exits 0; `--out` refuses a non-empty folder (exit 2, nothing written); the binary never deletes a file (read `crates/core/src/bin/import_equine.rs`: no `remove_*` call). +8. Declared differences only: every behaviour where the port refuses what JavaScript accepted is listed in RUST.md §11.10 (emoji widths; malformed SVG, DTD or caps; non-string ids, non-array `children` / `categories` / `sources`; prototype-named keys) and none of them is reachable by the committed sources (criterion 6 proves the equine folder). +9. Gating: the curation code compiles only with feature `curation` (`#[cfg(feature = "curation")]` on the module; the bin and the two suites `required-features`); `crates/wasm/Cargo.toml` and `crates/worker/Cargo.toml` do not enable it; `scripts/rust-check.sh` runs clippy and tests with `--features curation`. +10. Scope held: `git diff --stat -- supabase apps packages/core-wasm packages/domain packages/anatomy/src packages/supabase crates/worker pnpm-lock.yaml` is empty; `packages/anatomy` and `packages/domain` still exist; no `reqwest` anywhere in `Cargo.lock`; no deletion (`git diff --diff-filter=D --name-only ` empty); `documentSha256` and `sheet-ref.json` unchanged. +11. Suites: `pnpm check:all` exit 0 on the final code state (log ending `== all checks passed`); `pnpm rust:check` exit 0 with the curation lines; `git status --short` empty at the end. +12. Docs: RUST.md §11.9 (F1: fix, oracle, consumers audited with the result on R2 to R4), §11.10 (R5.2: modules, parity proofs, declared differences, binary), §11.11 (checkpoint R5.2, conditions for R5.3); CHANGELOG Unreleased lines for F1 and the importer; the owner's decisions recorded (BDR) with D-R5 = `sha256-rfc8785-validated-v1` not yet applied. + +## CLARIFICATIONS + +Q: emoji in a table cell or a JSON string: reproduce Prettier's RGI emoji table? / A: no: the table is not reproduced; a text holding an emoji candidate is refused (`UnsupportedWidth`), declared, and absent from every committed source (the only emoji of the sources, in `Horse.svg`, never reaches a generated text). [owner brief « Les différences éventuellement nécessaires doivent être déclarées individuellement »] +Q: the binary's command name and a pnpm script? / A: no new pnpm script at R5.2 (a public name is the owner's to choose); the bin is reached through cargo. [CLAUDE.md « a name that becomes public → ask »] diff --git a/.claude/tasks/contracts/2026-10-23-rust-r5-review.md b/.claude/tasks/contracts/2026-10-23-rust-r5-review.md new file mode 100644 index 00000000..9cbb4a08 --- /dev/null +++ b/.claude/tasks/contracts/2026-10-23-rust-r5-review.md @@ -0,0 +1,70 @@ +# CONTRACT: Rust R5.4, the review files of the draft (review drawings, CHANGELOG, REVIEW-REPORT) and the whole-draft `--check` + +- date: 2026-10-23 | branch `feature/rust-r5-pipeline-core` | plan `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` §B.5 row R5.4 +- brief: owner 2026-10-23 « Validation R5.3 et autorisation conditionnelle R5.4 » §4 to §9 (conditions §1 met: R5.3 verifier CONFORME 13/13 on c6e0d85) +- predecessor: `.claude/tasks/contracts/2026-10-22-rust-r5-draft.md` (R5.3) + +## Scope + +Port `packages/anatomy/src/curation/{labels,changelog,review-report,overlay,app-review}.ts` and `stats.ts` `statRows` into +`crates/core/src/curation/draft/**` (feature `curation`), complete `render_draft_artifacts`, and make `import-equine --check` +compare the whole generated draft. Out of scope: the fingerprint convention (R5.6), the upload tool (R5.5), any change to +the seed, to `horse.svg`, to an oracle or golden, to a gated reader, to `packages/anatomy` or `packages/domain` sources. + +## Clauses + +C1. **No I/O in the core.** The new modules take values and texts; only `bin/import_equine.rs` touches the file system. + +C2. **Markdown byte parity.** `CHANGELOG.md` and `REVIEW-REPORT.md` produced by the core equal the committed files byte for +byte; the raw texts (before the table alignment) equal the ledger's pre-Prettier digests of `oracles/r5/pipeline.json`. +Changes, categories, references, statistics, line order, Unicode, escapes (`\|`, newlines in cells) and the 120-unit +`compactValue` cut (UTF-16 units, `…`) as the TypeScript. + +C3. **SVG drawings.** `review/annotations-{main,head}.svg` and `review/app-{main,head}.svg` are built on the core's tree from +the frozen `draft/assets/horse.svg` read by the core's one SVG reader (nothing removed), never re-cleaned; the prolog of +the source is kept verbatim. Each file is compared with the committed xmldom file byte for byte; where bytes differ, the +parsed trees are compared (element names, namespaces, attributes and values, text, element order) and every difference is +declared. The R3 owner decision (2026-10-15, a trigger without its own name carries the opened view's name per language) +is the one expected difference, on `app-main.svg`; any graphic difference is listed for the owner's validation. + +C4. **Whole-draft `--check`.** `import-equine --check` compares every file of `draft/` (12) and `legacy-import/` (6) with +explicit criteria: byte identity; for a file with a declared tree rule, tree equality after that rule; it exits non-zero +when a file is missing, not produced, or differs without an authorised rule. The `PENDING_R5_4` list and its `shortcut:` +comment are gone. `--out` writes the 18 files (6 + 12) with the R5.3 protections. + +C5. **Differential.** A TypeScript generator (`packages/anatomy/tests/r5.review-synthetic-oracles.test.ts`, +`MAKE_R5_ORACLES=1` → `crates/core/tests/oracles/r5/review-synthetic.json`) freezes, on mini-sheet cases, the raw and +formatted CHANGELOG, the raw and formatted REVIEW-REPORT, the review overlays and the app drawings; the Rust suite +reproduces each one (Markdown byte for byte; SVG as C3) or refuses as the declared refusal (emoji width). + +C6. **Determinism.** Two runs give the same bytes for every file. + +C7. **Frozen references untouched.** No change under `supabase/seed/**`, `apps/app/tests/fixtures/**`, +`packages/core-wasm/tests/n-1/**`, `crates/core/src/domain/**`, `crates/core/src/pdf/**`, `crates/core/tests/oracles/**` +(except the new `review-synthetic.json`); `documentSha256` stays `27c7383c…2660`; `horse.svg` bytes unchanged. + +C8. **R5.3 protections kept and LOW carry-over.** Strict changesets, path and symlink protections, no overwrite or delete, +depth and resource bounds, R2 integrity gate unchanged; carried from the R5.3 final gate: the destination folder itself +identity-checked, cite membership hashed, a failed seed walk named as such, the stale test comment, the R5.3 doc nits. + +C9. **Gates.** `pnpm rust:check` and `pnpm check:all` green; security auditor PASS on the diff; this contract CONFORME by a +fresh verifier; RUST.md §11.14 (R5.4) and §11.15 (checkpoint), CHANGELOG, CLAUDE.md. No merge, no R5.5, no fingerprint +switch, no release, no deploy. + +## Clarifications + +- 2026-10-23 (gate round 2, C7): `crates/core/tests/oracles/r5/markdown-sweep.json` is a second new oracle of this slice, + written by the TypeScript generator `packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts` (`MAKE_R5_ORACLES=1`). It + freezes what Prettier does to authored Markdown, from which the port's `UnsupportedMarkdown` guard is derived (C2 read as + "byte for byte with the TypeScript, or a loud refusal declared in RUST.md §11.14"). It is added, never a frozen file + changed; C7 excepts it with `review-synthetic.json`. + +- 2026-10-23 (owner « Validation R5.4 et autorisation conditionnelle R5.5 » §2, FLOOR): the `floor-guard.sh` hits on a + Markdown line under `.claude/audits/**` that only quote one of the guard's suppression keywords in prose (the audits + state that none was added) are requalified as descriptive mentions. + The clarification does not reach executable code, active contracts, production scripts, generated artefacts or a real + removal: those findings keep failing. Past audit reports are not edited. Proof: `scripts/floor-clarification-check.sh` + (requalifies by path and kind, then runs a throwaway repo where a real keyword in `src/*.ts`, `src/*.rs` and in an + active contract is still reported). Result on this branch vs develop: 20 findings, 19 requalified (audit prose), 1 kept: + a STUB marker in `.claude/memory/evals.md:205` (a quoted stub-marker phrase in a heading, append-only registry), outside the + owner's clarification, reported to the owner and not requalified. diff --git a/.claude/tasks/contracts/2026-10-23-rust-r5-upload.md b/.claude/tasks/contracts/2026-10-23-rust-r5-upload.md new file mode 100644 index 00000000..09b35bec --- /dev/null +++ b/.claude/tasks/contracts/2026-10-23-rust-r5-upload.md @@ -0,0 +1,71 @@ +# CONTRACT: Rust R5.5, the sheet-asset upload tool (`upload-sheet-assets`) and the R5.4 closing adjustments + +- date: 2026-10-23 | branch `feature/rust-r5-pipeline-core` | plan `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` §B.5 row R5.5 +- brief: owner 2026-10-23 « Validation R5.4 et autorisation conditionnelle R5.5 » §1 to §10 and §12 +- predecessor: `.claude/tasks/contracts/2026-10-23-rust-r5-review.md` (R5.4) + +## Scope + +Port `packages/supabase/scripts/upload-sheet-assets.ts` into the core crate (`crates/core`, feature `upload`): rules in +`src/curation/upload.rs`, binary in `src/bin/upload_sheet_assets/{main,storage}.rs`; scripts `scripts/upload-sheet-assets.sh`, +`scripts/sheet-assets-e2e.sh`; pnpm `assets:upload` (Rust), `e2e:sheet-assets`, TypeScript kept as `assets:upload:legacy` +until the R5.7 census. Plus the R5.4 closing adjustments (owner §2, §3, §6, §7). Out of scope: the fingerprint convention +(R5.6), any seed or `documentSha256` change, a gated reader change, deleting `packages/anatomy` or `packages/domain`, any +deploy, any production or managed-Supabase access. + +## Clauses + +C1. **Core free of I/O.** `curation::upload` takes values and returns values or `UploadError`; no `std::fs`, `std::env`, +network or clock. `ureq` is an optional dependency enabled only by feature `upload` (never by the wasm facade or the +worker); only the binary reads files, the environment and the network. + +C2. **Local destination only, verified first.** There is no default destination. `SUPABASE_URL` must be `http`, carry an +explicit port, no credentials, path, query or fragment, and a host that is `localhost`, a loopback address, or the private +IPv4 address equal to `FAUNOSTEO_DEV_HOST`; anything else is refused (kind `Destination`) before any request. The key is +never sent to a refused destination. + +C3. **Inputs verified before the first request.** The folder lies under `supabase/seed/anatomical-sheets` (canonical path, +symlinks resolved). `assets.json` is size-capped before parsing, strict on keys, plain `.svg` file names, lowercase sha256 +and uuid, size range, no repeated file, hash or asset id, 1 to 64 entries. Each drawing is read under a cap and equals its +entry (size, sha256) and is accepted by the core's SVG reader with nothing removed. A failure stops the run with no request. + +C4. **Handshake.** Before any object read or write: the bucket `anatomical-sheet-assets` exists, is private, and the key is +accepted (401/403 are `Access`). + +C5. **No overwrite, delete or visibility change.** Objects are created with `x-upsert: false`; an object under the key is +read back and hashed: other bytes refuse the run (`State`), never replaced. A missing asset row, or a row recording another +hash, refuses the run. The tool issues no DELETE, no PUT, no bucket or policy change. The plan of every entry is computed +(read-only) before the first write; a run that cannot complete writes nothing. + +C6. **Confirm after verify; safe resume.** The row is confirmed only after the object is read back and hashes to its key. After +any failure a rerun resumes: a verified object is kept, a confirmed row is left alone. Transport errors and 5xx are retried +three times, refusals are final. + +C7. **Secrets.** The service key comes from the environment only, is held in a type whose `Debug` is redacted, travels in two +request headers, never in a URL, a message or a log; the agent uses no proxy and no redirect; server error text is not echoed. + +C8. **Closed errors and exit codes.** Failures fall in `Manifest | Destination | Content | Handshake | State | Access | +Network`; exit 0 done, 1 refused, 2 usage (argument not UTF-8), 3 network. No failure silently drops an entry. + +C9. **Identity and bytes preserved.** The object key is `.svg` with the manifest hash, the row is addressed by the +manifest `svg_asset_id`, the bytes uploaded are the file's bytes (no re-cleaning, no re-serialisation). + +C10. **Tests.** `tests/curation_upload.rs` (manifest, bytes, destination, plan), `tests/upload_tool.rs` (the binary against a +loopback stub: check writes nothing, run then rerun, different bytes, missing and foreign row, 401/403, resume after a failed +confirm, unreachable port, refused destinations, folder outside the seed, usage), `tests/curation_caps.rs`; +`scripts/sheet-assets-e2e.sh` for the real local stack (run by the owner; the assistant's own run was refused by the permission +layer and is reported as such). `scripts/rust-check.sh` runs clippy and the tests with `--features upload`. + +C11. **Runbook.** `docs/development/SUPABASE.md` §3.1, `docs/development/RUST.md` §11.16, CHANGELOG, CLAUDE.md commands. + +C12. **Frozen references untouched.** No change under `supabase/seed/**`, `apps/app/tests/fixtures/**`, +`packages/core-wasm/tests/n-1/**`, `crates/core/src/domain/**`, `crates/core/src/pdf/**`, `crates/core/tests/oracles/**`; +`documentSha256` stays `27c7383c…2660`; `pnpm r5:import-equine --check` still reports 0 differences on 18 files. + +C13. **R5.4 closing adjustments.** (a) `changes.json` and `references.json` are refused above 4 MiB before any parse allocation +with an explicit message, in the core (`MAX_CURATION_FILE_BYTES`) and in the binary read; other budgets unchanged; (b) the FLOOR +clarification of the R5.4 contract holds with its negative proof (`scripts/floor-clarification-check.sh`); (c) no gated reader +and no serde tolerance is changed (characterisation only, RUST.md §11.16). + +C14. **Gates and limits.** `pnpm rust:check` and `pnpm check:all` green; security auditor PASS on the diff; this contract +CONFORME by a fresh verifier. No merge, no R5.6, no release, no deploy, nothing outside the local stack. diff --git a/.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md b/.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md new file mode 100644 index 00000000..7f0a538f --- /dev/null +++ b/.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md @@ -0,0 +1,43 @@ +# CONTRACT: R5.5 closing corrections and R5.6 preparation + +- date: 2026-10-24 | branch `feature/rust-r5-pipeline-core` | base dead546..13db553 (R5.5 checkpoint) +- brief: owner 2026-10-24 « Clôture R5.5, corrections ciblées et préparation R5.6 » §1 to §9 + +## Clauses + +K1. **Owner result recorded.** RUST.md §11.18, TODO, journal and registries record `pnpm e2e:sheet-assets` PASS (11 checks) as +the owner's manual run, distinct from the simulated suite; no new measurement invented, no rerun with the service key, no secret +in any file or commit. + +K2. **Retry.** `Protocol` errors are final (no retry); only `Io`, `Timeout`, `HostNotFound`, `ConnectionFailed` and 5xx are +retried; negative test proves one request on a malformed answer. + +K3. **DEV address.** The DEV address counts only if it is an own unicast address; a subnet broadcast is refused; tests cover +loopback, the host's unicast and broadcast addresses, a public and a malformed value. + +K4. **Serde hardening, three shapes only.** `sheet` and `practitioner` as non-objects and `severity` as a non-string are refused +with `ReadFailure::Invalid` (field named) at the v3 entries `read_report_document` and `parse_envelope`; no other contract, +version or field narrowed or widened; frozen N-1 copies, goldens, fixtures and oracles untouched; every R2-R4, PDF import, +rebase and envelope suite green unchanged. + +K5. **SQL characterised, not changed.** No file under `supabase/migrations` or `supabase/tests` changes; RUST.md §11.18 states the +grants, the missing hash/existence check and why it is not exploitable from an API role. + +K6. **DEV stack documented, not changed.** ENVIRONMENTS.md §3.6 lists the 54321 checks and the default-key finding; no firewall, +network or Supabase configuration changed. + +K7. **R5.6 plan only.** `.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md` covers the owner's 12 points and lists the +open decisions; no fingerprint code, no seed or `sheet-ref.json` change, `documentSha256` stays `27c7383c…2660`. + +K8. **Gates.** `pnpm rust:check` and `pnpm check:all` green; security PASS on the diff; fresh verifier on this contract. No merge, +no release, no deploy, no R5.6. + +## Clarifications + +- 2026-10-24 (closing gates round 2, K4, orchestrator, submitted to the owner at the checkpoint): at `parse_envelope` the + refusal is a `serde_json::Error` naming the field (the function's existing signature), not `ReadFailure::Invalid`; its one + caller (`session.rs`, gated) drops the archive copy as before. Changing the signature would touch `session.rs`, outside this + go. Refusing a positional report, observation or envelope is part of K4: without it the three named shapes pass unseen + under a positional parent (Zod refused those containers too). +- 2026-10-24 (FLOOR): the R5.4 clarification (`.claude/audits/**` Markdown prose quoting a suppression keyword is a + descriptive mention) applies to this contract's audit reports; nothing else is requalified. diff --git a/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md b/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md new file mode 100644 index 00000000..cb23f119 --- /dev/null +++ b/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md @@ -0,0 +1,58 @@ +# CONTRACT: R5.6 switch rehearsal (isolated), owner brief 2026-10-24 « Validation de la préparation R5.6 et corrections préalables à la bascule » + +- branch `feature/rust-r5-pipeline-core` at 943a25a (official state, inactive); patch `.claude/tasks/plans/r5-6-switch.patch` +- rehearsal: detached worktree `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56wt` = 943a25a + the patch, seed switched there only + +## Clauses + +S1. **M1 option 1.** On export, an old report whose stamp is the registered historical value of the same sheet, against the +sheet's verified canonical value, archives a snapshot carrying the report's own stamp; only for the registered pair of the +same sheet id, with the loaded sheet's `v1` value recomputed from its document at load; never from an archive's alias list; a +new report keeps the canonical value. Tests cover the owner's 9 scenarios (old PDF import, no rebase, re-export coherent, +current reader, frozen N-1 reader, labels/views/annotations/branding preserved, rollback reader, forged/unknown refused, real +change rebases), not only hash equality. + +S2. **Scope.** Rust changes only in `report/rebase.rs`, `archive/read.rs` (unchanged allowed), `session.rs`, +`pdf/write/input.rs`, `pdf/compare/lines.rs`, `sheet/loaded.rs`, `facade.rs`, `bin/report_compare.rs`, plus the +`sheet/fingerprint.rs` module, the generator (`curation/draft/pipeline.rs`), Cargo/tests/scripts; archive and envelope checks not +loosened; public errors kept where possible; N-1 readers untouched. + +S3. **v0/v1 loading.** A reference without a block is historical (v0): loads as before, unverified, no alias privilege, never +`v1`. A present block is strict (known keys, `v1` convention, 64 lowercase hex, not an alias value, aliases only from the +registry for this sheet and value, value recomputed from the document); any contradiction refused. + +S4. **Artifacts and oracles.** In the switched seed only `sheet-ref.json` and `report-migration-map.json` differ; their value +and block are consistent with `v1`; `document.json`, `horse.svg`, `equine_draft.sql` byte-identical; no R2-R5 oracle or golden +changed; O7, O10, the R2 Zod oracle, the R5.1 ledger and the app goldens run in their original (pre-switch) context, with a +separate test of the post-switch behaviour; every declared difference targeted, tested, unable to hide an anatomical change. + +S5. **report:compare.** The alias line keeps the draft/published status and prints both raw values; other differences still +reported. + +S6. **Generators.** `pnpm import:equine` → the Rust pipeline; `import:equine:legacy` → the TypeScript one; historical tests use +the generator they refer to. + +S7. **Isolation.** The official branch state stays inactive (seed `27c7…`, no new convention active), no DB/Supabase mutation, +no oracle regenerated, nothing deleted. + +S8. **Gates on the switched state.** `pnpm rust:check`, `pnpm check:all`, RFC 8785, Node differential, alias security, the five +consumers + load checks, authentic archive parity, N-1 on re-exported archives, snapshot-bearing reports, real-change rebase, +the two generated artifacts; security audit; fresh verifier. + +## Clarifications + +- 2026-10-25 (owner « autorisation de correction M1, nouvelle répétition obligatoire »): scope extended by + `domain/archive/snapshot_rules.rs`; the M1 decision moves into `build_sheet_snapshot` and `assert_exportable` + (`pdf/write/input.rs`) returns to strict equality (unchanged from 943a25a). Rules added: an alias is granted only by + `LoadedSheet::recognises_historical_stamp` (loader-verified `v1` value, private state, recomputed from the current + document at the decision, registry pair, same sheet id); `"fingerprint": null` and malformed blocks refused; warnings + never block a `v1` fingerprint (`is_publishable`), errors do; `canonical_json` bounded at 128 levels with a controlled + error; the direct export API is tested, not only the application paths. Final state: worktree + `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56final` + (detached at 8e77e37 + the patch, seed switched by the patch). + +- 2026-10-25 (owner « Autorisation officielle de la bascule R5.6 »): S7 (isolation) is superseded for the activation: the + owner authorised the official switch on `feature/rust-r5-pipeline-core` (commit 9e87016) with `equivalence` crate-private, + stale comments fixed, the trust boundary documented, and the regeneration of exactly `draft/sheet-ref.json` and + `draft/report-migration-map.json` (procedure: fresh temporary `--out`, comparison, the two files only, `--check`). The other + S7 parts still hold: no database or Supabase mutation, no oracle regenerated, nothing deleted, no merge. diff --git a/.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md b/.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md new file mode 100644 index 00000000..d1c270b2 --- /dev/null +++ b/.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md @@ -0,0 +1,71 @@ +# CONTRACT: R5.7 consumer census and deletion of `packages/anatomy` and `packages/domain`, owner brief 2026-10-25 « Validation R5.6 et autorisation R5.7 » + +- branch `feature/rust-r5-pipeline-core`, base 756b7ef (R5.6 active since 9e87016) +- plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md` + +## Clauses + +C1. **Census.** Every consumer of `packages/anatomy` and `packages/domain` outside them is listed (runtime and type +imports, fixtures read by Rust, TS tests, oracles and goldens, pnpm scripts, build dependencies, seed scripts, docs, +dev and check tools, historical references). Nothing still required by an active feature is deleted. + +C2. **Matrices.** `crates/core/tests/curation/FILES.tsv` names every deleted tracked file with its Rust counterpart or the +reason it goes; `crates/core/tests/curation/LEDGER.tsv` has one row per TS case of both packages at 756b7ef (407), with the +case's contract, old location, equivalent after the deletion, status ported / replaced / kept / deleted (with the +justification), and the historical reference kept. No row is a gap: a contract still relevant and uncovered is ported first. + +C3. **Fixtures.** `report-v2.full.json` and `report-v2.minimal.json` move under `crates/core/tests/fixtures/` with their bytes +unchanged (sha256 before = after, recorded); the Rust readers use the new place. No oracle, golden, frozen digest, migration +data, N-1 reader or reference PDF is changed, regenerated or removed; a moved reference file keeps its sha256. + +C4. **Active checks preserved.** The contracts the brief §5 lists stay covered by tests that run in `pnpm rust:check` or +`pnpm check:all` (sheet model validation, reference integrity, deterministic UUIDs, legacy catalog conversion, changeset +application, migration map, statistics, seed SQL, SVG rendering, RFC 8785, historical aliases, PDF import and export, old +archive compatibility); the application and interface suites keep passing; test counts before and after are measured and +documented. + +C5. **Historical reproducibility.** The documentation names the reference commits of the TypeScript pipeline, the versions +(Node, pnpm, dependencies), the historical generation and comparison commands, the isolated-worktree procedure and the expected +sha256 of the artifacts; the procedure is rehearsed once; the old engine is not reintroduced in the current tree. + +C6. **Dependencies and scripts.** The two packages' own dependencies leave the lockfile through `pnpm install`; `@xmldom/xmldom` +is gone; no workspace manifest declares `tsx`, no script runs it, and the lockfile may keep it only as a transitive optional peer +the package manager resolves itself (Clarification C6 below); root `prettier` stays (used by `pnpm format` and `db:types`); `pnpm import:equine` stays the Rust pipeline; +`import:equine:legacy` and `assets:upload:legacy` are removed; no other dependency changes major version; the lockfile installs +with `--frozen-lockfile`. + +C7. **Census tests.** `r4.census.test.ts` proves xmldom and the TS engines are no active dependency, and cannot pass on a +lockfile or tree that reintroduces them (a non-vacuity check); a census proves no production path (app, glue, supabase package, +Dockerfile, Vite/TS config) imports a deleted engine, and that the two matrices agree with the tree. + +C8. **Docs.** CLAUDE.md, WORKSPACE.md, packages/README.md, RUST.md §11, CHANGELOG, TODO, the curation commands and the test +registers are updated; the seed SQL header is kept (frozen bytes) and explained beside it; audits are append-only; the brief §10 +follow-ups stay tracked (rollback limit, DEV hardening, migration-map cascade debt, direct export API trust boundary, SQL checks +before public exposure, accepted LOW items). + +C9. **Checks.** `pnpm install --frozen-lockfile`, `pnpm rust:check`, `pnpm check:all`, `pnpm import:equine --check` (0 +difference), the RFC 8785, alias and archive suites, PDF and `report:compare`, the N-1 reader, the moved fixtures, the sheet and +seed integrity suites, and the absence of any import of the deleted packages, all green on the final state. + +C10. **Limits.** Branch only; no merge, no release, no deploy, no Supabase DEV data change, no migration, no new feature; no +seed byte changed. + +## Clarification C6 (owner, 2026-10-25, brief « Validation R5.7 et dernière vérification pré-fusion » §1) + +The first wording read « `@xmldom/xmldom` and `tsx` are gone ». The owner accepts explicitly that `tsx` stays named in +`pnpm-lock.yaml` when it is only an optional peer dependency of Vite. The objective C6 checks is: no old TypeScript pipeline +active; no functional import from `packages/anatomy` or `packages/domain`; no script kept that requires them; no direct `tsx` +dependency left without use; legitimate transitive or optional references of the package manager may stay. The lockfile is +not edited by hand and no override or exclusion is added to drop the name. + +Measured path (`pnpm why tsx -r`, 2026-10-25): `tsx` 4.23.15 is reached only as the `peer` of `vite` 7.3.6 (vite declares +`tsx: ^4.8.1` under `peerDependencies` with `peerDependenciesMeta.tsx.optional: true`), through `vite`, `vitest`, +`@vitest/mocker`, `vite-node`, `@tailwindcss/vite` and `@vitejs/plugin-react-swc` in the devDependencies of `apps/app`, +`packages/core-wasm` and `packages/supabase`; its snapshot block carries `optional: true`; no importer lists it; no +root `node_modules/.bin/tsx` is linked (pnpm links the peer's bin under the +`node_modules/.bin` of `apps/app`, `packages/core-wasm` and `packages/supabase`; no script calls it; verifier precision 2026-10-25). + +The exception does not hide a consumer: `r5.census.test.ts` still fails if a manifest declares `tsx` (any dependency field), +if a manifest script names `tsx`, `@faunosteo/{anatomy,domain}` or `packages/{anatomy,domain}` or ends in `:legacy`, if an importer block lists `tsx`, if the +`tsx` snapshot loses `optional: true`, or if any app, Vite, glue or Supabase-package source imports a deleted package; the +verifier checks these probes, not the lockfile name. diff --git a/.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md b/.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md new file mode 100644 index 00000000..3493f3b3 --- /dev/null +++ b/.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md @@ -0,0 +1,147 @@ +# PLAN: Rust R5, the anatomical pipeline (legacy importer, curation, migration map, seed, upload tool), `packages/anatomy` and `packages/domain` deleted + +- date: 2026-10-22 | rev 1 (R5.1 only; the later slices are a proposal for the R5.1 checkpoint) | branch: `feature/rust-r5-pipeline-core` (cut from develop 9c0117a, R4 merged) +- spec: owner brief 2026-10-22 « Clôture R4 validée et autorisation R5.1 » (§A.0); `docs/development/RUST_ARCHITECTURE_REVIEW.md` II.2 rows "anatomy curation pipeline" and "upload-sheet-assets" (lines 299, 300), VI.1 row R5 (636), VI.3 (655), VI.4 (662 to 668), D-R5 (837, 873), Annex C D-R5 amendment (974); BDR-043, BDR-045; CLAUDE.md "Anatomical sheet model", "Schemas", archive-reader gate +- facts: `.claude/audits/R5_PIPELINE_INVENTORY.md` (the TypeScript pipeline), `.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md` (the fingerprint), the oracles under `crates/core/tests/oracles/r5/`, the study scripts `scripts/r5-fingerprints.mjs` and `packages/supabase/scripts/r5-jsonb-fingerprint.mjs` +- status: R5.1 validated 2026-10-22; D-R5 decided (A.5); R5.1b and R5.2 validated 2026-10-22; R5.3 done (contract `.claude/tasks/contracts/2026-10-22-rust-r5-draft.md`, RUST.md §11.12), checkpoint R5.3 pending; R5.4 on the owner's go. +- not in scope of R5.1: any Rust implementation of the pipeline, any change to `documentSha256` or to the readers, the deletion of `packages/anatomy` or `packages/domain`, any golden or historical reference regeneration, release 0.2.0, deployment, SaaS features. + +# Part A. For the owner + +## A.0 Your brief (2026-10-22), applied as written + +Branch from develop by gitflow (done). Existing plan and decisions read, no new architecture study. R5.1 = characterise the TypeScript pipeline and freeze its results (legacy import, draft, changesets, migration maps, CHANGELOG and REVIEW-REPORT, review drawings and overlays, SVG assets and upload, seed SQL, current fingerprints, determinism, compatibility with older versions and archives); reuse the existing oracles, fixtures and goldens where they suffice; keep the N-1 readers; never bend a historical reference to a new implementation. D-R5: a targeted, reproducible study of option A (sha256 of the bytes the Rust pipeline emits) against option B (sha256 of RFC 8785 canonical JSON) on the project's real data, a matrix of old and new fingerprints, an encoding change told apart from a content change, a versioned convention and a compatibility mechanism for the old fingerprints, no silent loss, no visible migration just to hide an algorithm change when a transparent and safe compatibility exists. Business invariants of §4 preserved by every later migration; no sheet declared validated by a technical migration. Stop before any Rust pipeline code and before any fingerprint change. + +## A.1 What R5 delivers (the whole phase, for orientation) + +The curation pipeline (legacy import, changeset application, migration map, CHANGELOG, REVIEW-REPORT, review drawings, cleaned asset, seed SQL) and the asset upload tool run in Rust (`crates/core` curation modules behind a feature, `cli` binaries `import-equine` and `upload-sheet-assets`), with the same inputs (legacy sources, `curation/changes.json`, `curation/references.json`) and the same semantics (ids, counts, 612-leaf migration, integrity rules). `packages/anatomy` and `packages/domain` leave the repository once nothing imports them; the N-1 Zod reader under `packages/core-wasm/tests/n-1` stays. The sheet fingerprint follows the D-R5 decision. + +## A.2 R5.1 deliverables (this slice) + +1. Inventory of the TypeScript pipeline: `.claude/audits/R5_PIPELINE_INVENTORY.md`. +2. Oracles frozen with the TypeScript code (§B.2), generated by `MAKE_R5_ORACLES=1` from `packages/anatomy/tests/r5.pipeline-oracles.test.ts`, which otherwise checks the pipeline still matches its freeze. +3. The D-R5 study (§B.3): facts, the fingerprint matrix, the compatibility mechanism, the versioned convention, costs, platform determinism, I-JSON and Unicode checks, the incidence on the archives already exported. +4. The checkpoint report (the owner's §5 list), written in RUST.md §11 and delivered in the conversation. + +## A.3 Findings that need your decision at the checkpoint + +- D-R5 itself (§B.3.6): A, B or C (reproduce Prettier's bytes), the canonical form (input or validated), the compatibility mechanism, the convention's name. +- F1, `js_number` tie rounding (§B.3.4): the core prints an exact decimal tie upward (`840.1692504882813`) where JavaScript, Python and `zmij` print to even (`…812`); 1 value of the legacy sources, 7.4 % of float32-exact coordinates, 0.8 % of random doubles. Invisible today (the curated draft holds no tie; the R2 contract test re-prints its expected text through the same function). The fix is small (digits from `zmij`, already locked through serde_json) and changes core bytes only for tie values; it precedes any Rust importer. Your go is needed because it touches a core serialiser (D-R11). +- The documentation contradiction: BDR-045 and Annex C say "existing fingerprints untouched", RUST.md §10 and the TODO still say "will change once". The plan follows BDR-045 (the later amendment) until you say otherwise. +- Byte-preserving port or one-time regeneration of the generated files (§B.5): the Rust pipeline can reproduce the JSON bytes only by emitting insertion order and Prettier's short-array rule, and the Markdown bytes by padding tables (the only Prettier effect measured); the review SVGs cannot match xmldom's serialiser and are compared as parsed trees. The recommendation is: JSON files byte-exact where cheap (`to_js_pretty` plus the one array rule) or regenerated once with a JCS-equality proof, Markdown byte-exact by padding, SVGs regenerated once with a tree proof, and `supabase/seed/**` added to `.prettierignore` at the switch (today a root `pnpm format` would reformat Rust-written files). +- `draft/assets/horse.svg`: keep the xmldom-cleaned bytes as the frozen asset (sha `0ea5202f…`, id `7f767f74…`, already the Storage object) and have the Rust tool verify rather than regenerate it, or re-clean it with the R3 reader and accept a new asset sha, id, document, SQL and Storage upload. Recommendation: keep the frozen bytes (the cleaning was a one-time legacy transformation; the R3 reader already proves the file). + +## A.4 Stop rules of R5.1 + +Stop and report when: a generated file does not reproduce from a fresh run (the golden test fails); an oracle generator would have to alter a committed generated file or golden; a study step needs a change to a gated reader; the branch would need a develop merge. + +## A.5 Owner decisions (2026-10-22, BDR-068) + +R5.1 validated. D-R5 = option B, convention `sha256-rfc8785-validated-v1`, applied at R5.6 only, proven by the RFC vectors, edge cases and an independent differential; `v1` freezes the construction and validation rules. Aliases of the historical fingerprints from trusted frozen documents only (never from an archive or a bundle); Report v3 `sheet.documentSha256` keeps 64 hex; an unknown fingerprint is never an official sheet; a real anatomical change still migrates. F1 fixed first (R5.1b), with an independent reference. Byte-exact reproduction by default, every difference declared. Historical SVG bytes kept (never re-serialised). `.prettierignore` on the Rust-written paths, narrow, with a reproducible check. `ureq` preferred for the upload tool (R5.5). Slicing B.5 validated; stop after R5.2 (checkpoint: F1 result and impact on R2-R4, importer parity, byte differences, tests and audits, residual risks, conditions for R5.3). + +# Part B. The plan + +## B.1 Inventory + +See `.claude/audits/R5_PIPELINE_INVENTORY.md`: 43 source files, 4,897 lines (legacy 1,842, curation 2,329, render 553, cli 119), 2,553 lines of tests (131 cases, 16 files), runtime libraries Prettier 3.8.3, @xmldom/xmldom 0.9.12, Zod 3.25.76 (the first two declared as devDependencies). 18 generated files: 7 JSON and 3 Markdown through Prettier, 5 SVGs through xmldom's XMLSerializer, 1 raw SQL template, 2 byte copies. The real changeset: 45 changes (14 A, 22 B, 9 C), 687 ops (587 set, 45 cite, 33 rename, 18 add, 4 remove, 0 move), 48 references. Measured Prettier effect on today's data: Markdown table padding only (134, 863 and 52 lines), JSON short scalar arrays collapsed plus a trailing LF; the data is identical after re-parsing. The JSON key order is the working form's insertion order (`review_status` appended last), not the schema order a typed serde struct would emit. `@faunosteo/anatomy` has no consumer outside itself; `@faunosteo/domain` is imported by `packages/anatomy` only (5 runtime symbols, all with R2 counterparts); the crate tests read `packages/domain/tests/fixtures/report-v2.*.json` and `r4.census.test.ts` pins xmldom under `packages/anatomy`. Entry points: `importEquineLegacy` (legacy sources → ImportResult), `buildEquineDraft` (ImportResult + curation → DraftResult), `renderArtifacts` (4 legacy files), `renderDraftArtifacts` (document, assets, sheet-ref, migration map, 4 review SVGs, CHANGELOG, REVIEW-REPORT, seed SQL), `cli/import-equine.ts` (writes both folders, removes stale files), `packages/supabase/scripts/upload-sheet-assets.ts` (bucket `anatomical-sheet-assets`, key `.svg`, `upsert: false`, bytes verified against `assets.json`, RPC `confirm_sheet_asset_upload`). JavaScript semantics to pin: `deterministicUuid` (sha256 of the name, version nibble 5, variant 10xx), `slugify` (NFD, combining marks U+0300 to U+036F stripped, `toLowerCase`, `[^a-z0-9]+` → `-`, trimmed, 64 chars), `sha256Hex` over UTF-8, `JSON.stringify(v, null, 2)` then Prettier json (short scalar arrays collapsed when they fit in 80 columns, objects always expanded), Prettier markdown, xmldom `XMLSerializer` for the review SVGs, `TextDecoder('utf-8', { fatal: true })`. + +## B.2 Oracles frozen at R5.1 (`crates/core/tests/oracles/r5/`, generator `MAKE_R5_ORACLES=1`, never regenerated without the owner) + +| Id | Content | Location | Used by | +|---|---|---|---| +| P1 | the committed generated folders `legacy-import/` (5 files) and `draft/` (14 files): the byte oracle, already pinned to a fresh run by `seed.golden.test.ts` | `supabase/seed/anatomical-sheets/equine/{legacy-import,draft}` | every R5 slice | +| P2 | `pipeline.json`: legacy ImportResult without the document (sheetId, viewBoxes, stats, source digests, assets, 27 anomalies, issues, region inferences, zone stats, annotation rows); DraftResult without the documents (46 changes, assets, stats before and after, issues, migration stats, 825 change records with before and after); the ledger of the 16 text artifacts (folder, file, bytes, sha256; for the 3 markdown files the sha256 before Prettier and whether Prettier changed the text) | `oracles/r5/pipeline.json` (1.3 MB) | R5.2 to R5.5 | +| P3 | `ids.json`: `deterministicUuid` over the 3 names the pipeline derives ids from plus 3 edges; `slugify` over 17 edge labels and every `name.fr` / `name.en` of both documents | `oracles/r5/ids.json` | R5.2 | +| P4 | `fingerprints.json`: for the 7 JSON artifacts the fingerprint under each rule (today's file bytes, A pretty with and without LF, A compact, B RFC 8785; for the two documents also the validated form under A and B); the ES6 text of the 65 non-integer numbers of the two documents; the two RFC 8785 vectors | `oracles/r5/fingerprints.json` | D-R5, R5.2 | +| P5 | migration semantics: `draft/report-migration-map.json` (P1) and the 612-leaf suite `curation.migration-leaves.test.ts`, plus the R2 oracle `oracles/migration-map.draft.json` and the Rust `archive_support` walk | existing | R5.3 | +| P6 | the review drawings `draft/review/{annotations,app}-{main,head}.svg` (P1, xmldom bytes) and the R3 layer and highlight oracles | existing | R5.4 (parsed-tree comparison) | +| P7 | the upload tool's contract (B.1) and the operator check SUPABASE.md §3.1 | documented | R5.5 | +| P8 | determinism: two in-process runs byte-equal (test in the generator file); `pnpm import:equine` not run (it rewrites the folders; the golden proves the same bytes) | test | every slice | + +## B.3 D-R5 study + +### B.3.1 Today's rule + +`documentSha256 = sha256Hex(formatJson(document))`: the Prettier-formatted JSON text of the curated document in its input form (defaults omitted), the exact bytes of `draft/document.json`, embedded verbatim in `equine_draft.sql` and copied into `sheet-ref.json` and `report-migration-map.json`. One value has ever existed: `27c7383c…2660`, unchanged since 0a17e39 (2026-10-10), inside 99 committed PDFs, 8 JSON fixtures and 6 Rust oracle files. Compared, never recomputed, by the rebase (fingerprint only), the envelope invariant and the export (sheetId and fingerprint). The database stores the document as `jsonb` and no fingerprint. Full census: `R5_DOCUMENT_SHA256_CENSUS.md`. + +### B.3.2 The matrix (real data, `node scripts/r5-fingerprints.mjs`, cross-checked in Rust) + +| Artifact | Today (file bytes) | A: `to_js_pretty` + LF | A without LF | B: RFC 8785 | B validated form | +|---|---|---|---|---|---| +| draft/document.json | 27c7383c…2660 | 90f668a3…aa1d | 79f143c0…eb51 | a56e4a24…88a1 | 12d78872…74e2 | +| legacy-import/document.json | 91e459f4…14c2 | 8c94a464…adc2 (Node) | 6fb31371…7f66 (Node) | d8b5f2cf…81eb (Node) | 1217637e…c024 (Node) | +| draft/report-migration-map.json | 4139c51d…fce9 | 4139c51d…fce9 (same) | 01fac788…3471 | f082b66f…2ca6 | n/a | +| draft/assets.json, sheet-ref.json, legacy-id-map.json, legacy assets.json | file = A with LF (no short array to collapse) | | | | | + +Rust reproduction (throwaway experiment on the core crate, `to_js_pretty`, `to_js_compact`, a 40-line JCS on `js_number`): every draft digest identical to Node, byte for byte; the legacy-import digests differ through the single tie value (F1, §B.3.4); the RFC vectors pass; JCS idempotent. Node vs Rust `JSON.stringify(v, null, 2)` over the 134 JSON fixtures of the repository: 2 differ, both the legacy baseline, both on that value; `oracles/characterisation.json` is not parseable by serde (lone surrogates, R2 L1 rule). + +Encoding change vs content change: the today / A / B columns of one row are three encodings of one value (parse → deep equal; `validated_equals_input` is false only because the validated form fills defaults, not because content differs). A change of the draft content changes every column. + +### B.3.3 Facts the brief asked for + +- UTF-16 key order: every key of every artifact is ASCII; UTF-16 order equals code-point and byte order on this data. The Rust canonicaliser sorts by `encode_utf16()` anyway (the RFC vector with U+0080, ö, €, 😀 and U+FB33 passes). +- Numbers: 208 (draft) and 195 (legacy) tokens, 29 and 36 non-integer, none negative, no exponent, no `-0`, no integer beyond 2^53; all already in ECMAScript `Number::toString` form. JCS mandates exactly that form; the core's `js_number` implements it with one tie defect (F1). +- Unicode: 788 non-ASCII strings (precomposed French accents, « », –, °, —), all NFC, no control character, no escape, no astral character, no lone surrogate. JCS does not normalise; a lone surrogate (I-JSON forbids it) is refused by the core (L1) and never produced by the pipeline. +- I-JSON: satisfied by both documents (no duplicate key, numbers within f64, valid Unicode). +- Cost and dependencies: option A costs nothing (the core already has `to_js_pretty`, D-R11); option B costs about 40 lines in `crates/core/src/json.rs` over `js_number` and serde_json's escaper, no new crate (`serde_jcs`, listed as rejected in the review, is not needed; `zmij` 1.0.23 is already locked through serde_json 1.0.154); a 15-line Node twin for tests and tooling. Hashing: `sha2` becomes a normal dependency of the core (today dev-only) or the hash stays outside the library (the tool computes it); the wasm bundle grows by the sha256 code only if the browser must verify fingerprints, which no current path does. +- Platform determinism: B is a pure function of the parsed value (sort, ES6 numbers, fixed escapes); Node 24 and Rust 1.99 agree on every draft artifact. A depends on the writer's layout rules; today's value depends on Prettier 3.8.3's line fitting. +- Database: a PostgreSQL 17 `jsonb` round trip (PGlite, `packages/supabase/scripts/r5-jsonb-fingerprint.mjs`) keeps B for both documents and breaks today's value and A (keys reordered, scale kept). B is the only candidate a service could recompute from `anatomical_sheet_versions.content` at Step 13. + +### B.3.4 F1: `js_number` prints exact ties upward + +`crates/core/src/json.rs` takes the shortest digits from `format!("{:e}")` (Grisu); on an exact decimal tie between two shortest candidates ECMAScript picks the even one, Grisu the upper one. Measured: `840.1692504882812` (legacy annotation `cx`, from Horse.svg) prints `…813`; 7,401 of 100,000 float32-exact values in 0..2000 and 769 of 100,000 random doubles differ; `zmij` (serde_json's formatter) differs on none. Reached by the canvas layer (R3), the PDF writer, the archive attachment, the R2 contract tests. Invisible today: the curated draft carries no tie value, and `sheet_contract.rs` re-prints its expected text through `to_js_pretty`, so the oracle cannot see it. Proposed fix (after your go, before R5.2): digits from `zmij` (or `serde_json::to_string(&f64)`), the two tie values and the 8 long decimals of the legacy SVG as unit tests, `zod_oracle` comparing against the JS text recorded in the oracle rather than a re-print. + +### B.3.5 Compatibility mechanism (approved at A.5, applied at R5.6) + +The sheet side carries the convention and the aliases; the report contract does not change. + +- `sheet-ref.json` (and the bundle payload `ref`, and `anatomical_sheet_versions` when Step 13 stores a fingerprint): `document_sha256` holds the current convention's value; a new `fingerprint` block names the convention (`"algorithm": "rfc8785-sha256"` for B, `"js-pretty-sha256"` for A) and lists `aliases`: the fingerprints of the same content under earlier conventions, computed once at the switch from the frozen P4 oracle (`27c7383c…2660` for the current draft). The alias is bound to identical content by construction (the oracle records old and new over the same bytes), so a report stamped `27c7…` is the same sheet, not a rebase. +- The rebase and the envelope invariant treat a fingerprint equal to the current value or to an alias as "same document". Gated readers: `report/rebase.rs`, `archive/read.rs`, `session.rs`, `pdf/write/input.rs` (your ask-before-touch rule; the change is one membership test). +- A new report is stamped with the current value; an old archive opens with no message and no rebase; an archive on an older content revision rebases as today. No archive is rewritten; the exported envelope keeps what it holds. +- Report v3 keeps `sheet.documentSha256` (64 hex) so the N-1 reader and every fixture stay valid; the convention's name lives with the sheet, which is the one place that knows which rule produced its value. +- Fixtures: 99 PDFs, 8 JSON fixtures and 6 oracles keep `27c7…` untouched (they remain valid archives of the same content through the alias). + +### B.3.6 Options compared + +| | A: bytes the Rust pipeline emits (`to_js_pretty` + LF) | B: RFC 8785 of the validated document | C: Rust reproduces Prettier's bytes | +|---|---|---|---| +| Value at the switch | 90f668a3… (changes once) | 12d78872… (changes once) | 27c7383c… (unchanged) | +| Needs the alias mechanism to avoid a visible migration | yes | yes | no | +| Survives a reformat, a writer change, a jsonb round trip | no | yes | no | +| Code | 0 lines (exists) | ~40 lines Rust + 15 Node, no crate | a Prettier-json subset printer (fill rule for scalar arrays, 80 columns), bound forever to a formatter's layout | +| Risk | identity re-tied to a serialiser (the Prettier problem moved to Rust) | one more concept; the canonical form must be named (input or validated) | fragile: any Prettier rule the data exercises later changes the value | +| Review's row | D-R5 rev 2 | Annex C preference, BDR-045 | rejected rev 1 (in Node form) | + +Recommendation: B over the validated form (what every reader holds, recomputable from the database after validation), the alias mechanism of §B.3.5, the convention named in `sheet-ref.json`, F1 fixed first. The old value `27c7…` stays valid forever as an alias; no archive sees a message for the switch. If you prefer no new concept at all, C is possible on this data (the only Prettier effect measured is the collapse of short scalar arrays), but it keeps the fingerprint chained to a formatter's layout, which Annex C refused. + +## B.4 Business invariants (brief §4) and where they are proven + +| Invariant | Oracle or test | +|---|---| +| stable ids | P3 (uuid, slug), P1 documents, `legacy-id-map.json` | +| zones and anatomical points, main and detail views | P1 documents (annotations, views), P2 annotation rows and records | +| annotation ↔ observation relations (`finding_zone_id`, `opens_view_id`) | P1, integrity rules (R2 core, 21 codes) | +| vertebral configurations | P1 `vertebral_config`, P2 region inferences | +| bilingual data | P1, P3 slug over every `name.fr` / `name.en` | +| historical references | `curation/references.json` (authored, never generated), P1 | +| existing reports and bilans | P5 (migration map, 612 leaves), the R2 rebase oracles, the R4 PDF fixtures, the alias mechanism | +| no sheet validated by a migration | the seed inserts a draft (`insert_sheet_draft`, status draft); publication stays a platform-admin action | + +## B.5 Slices after R5.1 (proposal for the checkpoint; nothing started) + +| Slice | Deliverable | Proof | +|---|---|---| +| R5.1 | this freeze and study | oracles committed, generator test green, checkpoint report | +| R5.1b | F1 fix in `json.rs`; `zod_oracle` compares the recorded JS text | tie unit tests; every R2/R3/R4 suite unchanged (no tie in the draft) | +| R5.2 | legacy importer in Rust (`crates/core/src/curation/legacy`): SVG sources through the R3 reader, catalog, regions, ids, anomalies, stats; `import-equine` emits `legacy-import/` | P1 bytes of document.json, legacy-id-map.json, assets.json reproduced exactly; IMPORT-REPORT compared as parsed tables (P2 pre-Prettier digest) or byte-exact if the Prettier markdown effect is nil | +| R5.3 | changeset schema, targets, ops, applier, migration map, stats, seed SQL | P1 document.json, sheet-ref.json, report-migration-map.json, equine_draft.sql byte-exact under the decided fingerprint; P2 825 records equal; 612-leaf suite ported | +| R5.4 | review overlays and app drawings on the R3 layer and compose; CHANGELOG and REVIEW-REPORT | parsed-tree comparison against the xmldom files (declaration, prefixes, whitespace declared); markdown as parsed tables | +| R5.5 | `upload-sheet-assets` binary (reqwest or ureq, service key from the environment), operator runbook | local stack run, SUPABASE.md §3.1 | +| R5.6 | D-R5 switch: fingerprint convention, aliases, the one membership test in the gated readers (your go per file), seed regenerated once by the Rust tool, CHANGELOG | old archives open with no message; a report on an older content revision still rebases; N-1 reader green | +| R5.7 | consumer census, `packages/anatomy` and `packages/domain` deleted (`packages/domain/tests/fixtures/report-v2.*.json` moved under `crates/core/tests/fixtures` first, `r4.census.test.ts` xmldom assertion inverted), `@xmldom/xmldom` and `prettier` leave the anatomy lockfile, docs (CLAUDE.md map, WORKSPACE, packages/README, RUST.md §11), ledger of the deleted tests | grep census, `pnpm check:all`, test counts reconciled | + +Order constraint: R5.6 needs the owner's D-R5 decision; R5.2 needs R5.1b. + +## B.6 Test ledger + +`crates/core/tests/curation/LEDGER.tsv` at R5.7: one row per TS case of `packages/anatomy/tests` and `packages/domain/tests` at the freeze commit (file, title, disposition ported / replaced / kept / deleted, target). Counts at the freeze: anatomy 131 cases in 16 files (the R5.1 generator adds 6), domain 262 in 13 files. diff --git a/.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md b/.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md new file mode 100644 index 00000000..5c5f10f4 --- /dev/null +++ b/.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md @@ -0,0 +1,108 @@ +# PLAN: Rust R5.6, the sheet fingerprint switch to `sha256-rfc8785-validated-v1` (prepared, NOT started) + +- date: 2026-10-24 | branch `feature/rust-r5-pipeline-core` | parent plan `2026-10-22-rust-r5-pipeline-core.md` §B.3.5, §B.5 row R5.6 +- brief: owner 2026-10-24 « Clôture R5.5, corrections ciblées et préparation R5.6 » §6 (convention confirmed, file scope + approved: `report/rebase.rs`, `archive/read.rs`, `session.rs`, `pdf/write/input.rs`; switch NOT authorised yet) +- decisions on record: BDR-068 (D-R5 = B), owner 2026-10-24 (one alias, `27c7383c…2660`; Report v3 unchanged) + +## A. What changes, what does not + +The value: `sha256(JCS(validated document))`, where the validated document is the R2 typed reading +(`AnatomicalSheetDocument` + `validate_sheet_document`, no issue) serialised back, and JCS is RFC 8785. Frozen study value for +the current draft: `12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2` (`oracles/r5/fingerprints.json`, +`b_rfc8785_validated`). `27c7383c…2660` (sha256 of the Prettier file bytes) becomes the one alias of that content. + +Unchanged: Report v3 shape (`sheet.documentSha256`, 64 hex), the N-1 reader, every PDF fixture, golden and R2-R4 oracle (they +keep `27c7…`, valid through the alias), `horse.svg` bytes and asset ids (no re-upload), the document content, the integrity +rules, the migration behaviour for a real content change. No view, zone, region, category or reference is renamed. + +## B. Steps (one subtask = one commit, gates at the end) + +1. **Canonicaliser.** `crates/core/src/domain/sheet/fingerprint.rs` (no feature: the core and the tools share it): JCS over + `serde_json::Value` (keys sorted by UTF-16 code units, ES number printing through the core's `js_number` (F1-fixed `zmij`), + string escaping of RFC 8785 §3.2.2.2, no whitespace), then sha256. Refuses non-finite numbers and lone surrogates (the core's + parser already does). Tests: every vector of `oracles/r5/fingerprints.json` `rfc8785_vectors` (RFC appendix inputs) and the + 44,322-row V8 number oracle `oracles/r5/numbers.json` through the canonical number printer; UTF-16 key order cases + (astral vs BMP, `é` vs `é`). +2. **Independent differential.** `scripts/r5-fingerprints.mjs` (its own Node JCS, RFC vectors first) is the reference, never + the Rust: a new `--json` field per document, then a Rust test reads a frozen output + `oracles/r5/fingerprint-differential.json` written once by `MAKE_R5_ORACLES=1` over the draft, the legacy document and + N synthetic documents (numbers at the ES formatting edges, Unicode keys, deep nesting). Added, never an existing oracle + rewritten. +3. **Validation before hashing.** `sheet_fingerprint(document_text) -> Result`: strict parse, + R2 shape, `validate_sheet_document` with zero issues, then JCS of the typed reading. A document with an issue has no + fingerprint (closed error), so an invalid sheet can never be stamped official. +4. **Versioned convention.** `const FINGERPRINT_CONVENTION: &str = "sha256-rfc8785-validated-v1"`; `v1` freezes steps 1 and 3. + No default anywhere: a sheet reference without a known convention name is refused at sheet load (`invalid_sheet`), and the + pre-switch reference (no convention field) is read as the legacy convention only for the frozen registry of step 5. +5. **Trusted alias registry.** A compiled-in table in the core, the only authority: + `(sheet_id 503dc301-…, convention "prettier-file-bytes-v0", alias 27c7383c…2660, canonical 12d78872…74e2)`, built from the + frozen oracle (P4) and the committed pre-switch `sheet-ref.json`, never from an archive, a PDF, a bundle or the database. + `sheet-ref.json` gains an additive `fingerprint` block (`convention`, `aliases: [...]`) for visibility; at sheet load the + core checks that every listed alias is in the registry for that `sheet_id` and canonical value, else the sheet is refused. +6. **Old archives.** An archive stamped `27c7…` on sheet `503dc301…` is "same document" as the loaded sheet whose canonical + value is `12d7…`: no rebase, no message, labels and snapshots kept. The exported envelope is never rewritten. +7. **The four gated readers** (owner approved scope; one membership test each, `same_document(report_sha, loaded_ref)`): + `report/rebase.rs:40` (skip the rebase on current value or registered alias), `session.rs` (draft restore and import go + through the rebase: no own comparison expected, verified), `archive/read.rs:118` (`snapshot_matches`: report vs archived + snapshot, both archived; equality kept, alias accepted only when the pair is the registered one), `pdf/write/input.rs:207` + (the export's sheet match: a report stamped with an alias exports against the current sheet). Nothing else in them moves. +8. **Seed and sheet-ref.** Regenerated once by `import-equine --out` into an empty folder, copied over `draft/` by the owner's + go after review of the diff: `sheet-ref.json` (value + block), `report-migration-map.json` (`sheet.documentSha256`, so a + migrated v2 report is stamped with the canonical value), nothing else (`equine_draft.sql` carries no fingerprint; checked). + `--check` then compares with the regenerated folder; the R5 oracles (TypeScript output) stay as frozen, and the two files' + difference from them is a declared rule (fingerprint field and block only), never an oracle regeneration. +9. **`.prettierignore`.** `supabase/seed/anatomical-sheets/equine/{legacy-import,draft}/` (the Rust-written paths, narrow), + with a reproducible check: `prettier --check` on the repo passes and `git diff` after `pnpm format` is empty on those paths. +10. **Non-regression.** Every R2-R4 suite, the 99 PDF fixtures (import, compare), the envelope goldens, the N-1 reader, the + 612-leaf migration, the app suite on the bundled sheet (wasm rebuilt), `report-compare` on the fixtures, `check:all`. +11. **Refusals.** A sheet-ref alias absent from the registry, an alias bound to another `sheet_id`, an alias whose canonical + value is not the loaded one, a malformed hex value, an unknown convention: each a closed refusal with a test; a report + stamped with an unknown fingerprint rebases as today (never treated as the official sheet). +12. **Rollback before merge.** Everything stays on the branch: revert the R5.6 commits (`git revert`, never a reset of pushed + history); the seed returns to `27c7…` from git; no database, Storage or asset change exists to undo; an archive exported + during the R5.6 tests with `12d7…` would rebase after a rollback (DEV only, labels kept). Rollback trigger: any authentic + archive (fixtures, goldens, owner devices) opening with a message or a rebase it did not have before. + +## C. Decisions still needed before the switch + +1. **The fifth comparison.** `crates/core/src/pdf/compare/lines.rs:350` (`report-compare`, the archive check tool) compares + fingerprints too and is not in the approved list. Without the membership test, it reports alias-stamped archives as "other + sheet". Recommendation: include it (same one-line test). +2. **The TypeScript writer.** `pnpm import:equine` and its golden test in `packages/anatomy` would write and expect `27c7…` + after the switch. Recommendation: the Rust tool becomes the only writer of the seed at R5.6, `pnpm import:equine` refuses to + write (message pointing at `r5:import-equine`) and its golden test is pinned to the pre-switch commit as historical evidence, + both deleted at R5.7. +3. **Where the alias authority lives.** Recommendation as step 5 (core registry authoritative, `sheet-ref.json` block for + visibility, mismatch refused). Alternative: `sheet-ref.json` alone (simpler, but then the bundle is the authority, which the + owner excluded). +4. **The app side.** `apps/app/src/sheets/provider.ts` reads `ref.document_sha256` only; the additive block needs no TS change. + Confirm no TS display of the fingerprint should show the convention. + +## D. Out of scope + +The migration-map cascade debt (§11.12) stays open: no rename in this switch. Step 13 (`anatomical_sheet_versions` storing a +fingerprint) is later. No merge, no release, no deploy. + +## E. Owner arbitration 2026-10-24 and preparation state + +Decided: convention confirmed; compiled registry the only authority, bound to sheet + content; five consumers +(adds `pdf/compare/lines.rs`); Rust the only generator, `pnpm import:equine` → Rust, TypeScript kept as +`import:equine:legacy` until R5.7; no visible change, no migration message. Prepared (RUST.md §11.19): +module + tests committed inert; the switch as `.claude/tasks/plans/r5-6-switch.patch` (applies cleanly; on the current seed 4 `curation` tests fail as expected, with the seed switched 3 more: RUST.md §11.19; the earlier "rehearsed green" covered the five consumers only). + +Still to decide at the switch signal: +1. `loaded.rs` + `facade.rs` (sheet load refuses a contradicting block): outside the five approved files, + not in CLAUDE.md's gated list (bundled sheet, not user data). Needed for "a contradiction is refused". +2. The two `curation_draft` cases move to a declared rule for `sheet-ref.json` and `report-migration-map.json` + (fingerprint field and block only), the R5.1 oracles untouched. + +3. M1 (security): the export's snapshot reference on an alias match: the report's own stamp (recommended), re-stamp at rebase, or accept with an N-1 test. +4. M2 remainder: refuse a `sheet-ref.json` without a fingerprint block after the switch (every test sheet then needs one). + +Switch procedure (on the signal): apply the patch; move the fingerprint after the drawings bound and keep the drawings-bound fixture valid; declared rules for the O7 oracle and the switched-seed preconditions; declared +rule in `curation_draft`; `pnpm import:equine` → `scripts/import-equine.sh`, TS as `import:equine:legacy`; +`import-equine --out` into an empty folder, diff reviewed (only the two files of §11.19), copied over `draft/`; +`--check` 0 differences; `pnpm rust:check`, `pnpm check:all`, security, fresh verifier; owner device check +(an old PDF opens with no message). Rollback: `git revert` of the switch commits (seed back to `27c7…`, nothing +outside git to undo); an archive exported meanwhile with `12d7…` would then rebase (DEV only). diff --git a/.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md b/.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md new file mode 100644 index 00000000..aba6c16c --- /dev/null +++ b/.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md @@ -0,0 +1,43 @@ +# PLAN: Rust R5.7, consumer census, `packages/anatomy` and `packages/domain` deleted, guarantees kept + +- date: 2026-10-25 | branch `feature/rust-r5-pipeline-core` at 756b7ef (R5.6 active, 9e87016) +- spec: owner brief 2026-10-25 « Validation R5.6 et autorisation R5.7 » (§1 to §13); plan R5 §B.5 row R5.7 and §B.6 + (`.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md`); RUST.md §11; BDR-068, BDR-070 +- contract: `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md` +- limits: no merge, no 0.2.0, no deploy, no Supabase DEV data, no migration, no SaaS feature, no oracle regenerated, + no seed byte changed, no major version bump; stop at the checkpoint (brief §12) + +## Facts at the start (756b7ef) + +- TS cases to retire: anatomy 144 in 22 files, domain 263 in 13 files (vitest JSON, all green). +- Consumers outside the two packages: anatomy → root script `import:equine:legacy`, Dockerfile COPY, docs, Rust + module comments; domain → anatomy, Dockerfile COPY, the Rust suites reading + `packages/domain/tests/fixtures/report-v2.{full,minimal}.json` (`report_rules`, `archive_rules`), the app ESLint ban, + `r4.census.test.ts` (xmldom pinned under anatomy), docs, SQL migration comments (frozen, never edited). +- `packages/supabase/scripts/upload-sheet-assets.ts` (`assets:upload:legacy`): TS upload tool, replaced by the Rust bin + at R5.5 (owner e2e PASS 11/11). +- Root `prettier` stays (`pnpm format`, `db:types`, `db:types:check`); `tsx` only under anatomy; `@xmldom/xmldom` + only under anatomy. +- The `report-v2.*.json` fixtures of domain are byte-identical to the app's copies (sha256 e96b0882…, ba79698c…). +- Seed SQL header names `packages/anatomy`: frozen bytes (sha c5a24312…), kept, documented beside. + +## Subtasks + +1. Census + matrices: tests ledger `crates/core/tests/curation/LEDGER.tsv` (407 rows: ported / replaced / kept / + deleted, target, oracle, note), files matrix `crates/core/tests/curation/FILES.tsv` (every deleted file → its Rust + counterpart or reason). GAPs found by the mapping are ported before any deletion. +2. Fixtures: `report-v2.{full,minimal}.json` → `crates/core/tests/fixtures/`, `git mv`, sha256 before = after; Rust + readers repointed. +3. Ports of uncovered contracts (from the mapping), on frozen oracles, in Rust or durable vitest. +4. Deletion: `packages/anatomy`, `packages/domain`, TS upload script + `assets:upload:legacy`, + `import:equine:legacy`, Dockerfile COPY lines, lockfile by `pnpm install`; Rust module comments that cite deleted + paths point at the reference commit. +5. Census tests: `r4.census` xmldom assertion turned into "no importer, no package resolves xmldom", with a non-vacuity + check; new R5 census (packages gone, no production path imports a TS engine, ledger and files matrix consistent with + the tree); app ESLint ban extended to `@faunosteo/anatomy` and xmldom. +6. Historical reproducibility: reference commits, versions, commands, isolated-worktree procedure, expected sha256 of the + 18 files; rehearsed once in a detached worktree. +7. Docs: CLAUDE.md, WORKSPACE.md, packages/README.md, README.md, RUST.md §11.23, CHANGELOG, ANATOMICAL_SHEET_MODEL.md, + SUPABASE.md, TEST_STRATEGY.md, PDF-FORMAT.md (xmldom line stale), ANNOTATION-RENDERING.md; follow-ups kept (brief §10). +8. Checks: frozen-lockfile install, rust:check, check:all, `import:equine --check`, targeted suites, census, counts. +9. Gates: fresh security audit, fresh verifier on the contract; memory; checkpoint, STOP. diff --git a/.claude/tasks/plans/r5-6-switch.patch b/.claude/tasks/plans/r5-6-switch.patch new file mode 100644 index 00000000..ba38ed9e --- /dev/null +++ b/.claude/tasks/plans/r5-6-switch.patch @@ -0,0 +1,3002 @@ +diff --git a/.prettierignore b/.prettierignore +index a9140e4..aaeef54 100644 +--- a/.prettierignore ++++ b/.prettierignore +@@ -7,3 +7,6 @@ packages/core-wasm/types/ + packages/core-wasm/pkg/ + packages/core-wasm/pkg-proofs/ + packages/core-wasm/tests/n-1/ ++# Written by the Rust pipeline (`pnpm r5:import-equine`, R5.6): byte-exact, never reformatted. ++supabase/seed/anatomical-sheets/equine/legacy-import/ ++supabase/seed/anatomical-sheets/equine/draft/ +diff --git a/CLAUDE.md b/CLAUDE.md +index e664250..7773db9 100644 +--- a/CLAUDE.md ++++ b/CLAUDE.md +@@ -118,7 +118,7 @@ pnpm db:types:check # CI diff + # Reference sheet in the app: the dev server bundles the curated draft; a build does not + pnpm build:preview # SHEET_BUNDLE=draft build (manual validation, preview deployments) + pnpm preview:draft # same, then serves it +-pnpm import:equine # regenerate legacy-import/ and draft/ (document, migration map, review drawings): the TypeScript writer of the seed until the R5 switch ++pnpm import:equine --check | --out # since R5.6 the official seed writer: the Rust pipeline (same as `pnpm r5:import-equine`), fingerprint `sha256-rfc8785-validated-v1`; `pnpm import:equine:legacy` = the TypeScript generator (pre-switch convention) until R5.7 + pnpm r5:import-equine --check | --out # the Rust pipeline (R5.2 importer, R5.3 draft, R5.4 review files): compare the 18 generated files with the committed folders (bytes; app drawings under the declared R3 rule), or write /{legacy-import,draft} into an empty folder; never deletes (scripts/import-equine.sh, first run compiles) + pnpm assets:upload [--check] # R5.5: uploads the sheet drawings of a generated seed folder to the LOCAL stack's private bucket (Rust `upload-sheet-assets`, feature `upload`; SUPABASE_URL local with a port, SUPABASE_SERVICE_ROLE_KEY typed, never printed; no overwrite, confirm after verify; run by hand, scripts/upload-sheet-assets.sh); the TypeScript one is `assets:upload:legacy` until R5.7 + pnpm e2e:sheet-assets # scripts/sheet-assets-e2e.sh: that tool against the local stack (upload, rerun, anon and wrong key, refused destinations); run by hand +@@ -502,7 +502,7 @@ Database (Supabase) + `publish_sheet_version`. Integrity rule codes are shared by `validateSheetDocument` (TS) and + `private.sheet_document_issues` (SQL); add a rule on both sides and in the spec table. + - Document schema change → bump `SHEET_DOCUMENT_SCHEMA_VERSION`, extend the SQL CHECK on `document_schema_version`. +-- Official equine sheet = generated seed `draft/` (`pnpm import:equine`, never edit `legacy-import/` or `draft/` by hand; ++- Official equine sheet = generated seed `draft/` (`pnpm import:equine --out` into an empty folder, then reviewed and copied; never edit `legacy-import/` or `draft/` by hand; + the golden test fails on drift). Every content change goes through `curation/changes.json` (traced in CHANGELOG.md). + It is a DRAFT until a platform admin publishes it after business review of `REVIEW-REPORT.md`. + - Sheet SVG bytes live in Storage bucket `anatomical-sheet-assets` as `.svg`; uploads are an operator task +diff --git a/apps/app/tests/helpers/goldenReports.ts b/apps/app/tests/helpers/goldenReports.ts +index ef46bce..d66fb68 100644 +--- a/apps/app/tests/helpers/goldenReports.ts ++++ b/apps/app/tests/helpers/goldenReports.ts +@@ -43,15 +43,34 @@ function buildV2Unresolved(sheet: SheetIndex) { + ).read + } + ++/** ++ * The goldens were frozen before R5.6, when a v2 migration stamped the historical fingerprint ++ * (the pre-switch migration map). Since R5.6 the map stamps the canonical `v1` value and ++ * nothing else of the migrated report changes (Rust `pdf_import` ++ * `o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves`): the ++ * golden v2 reports are taken in that original context, as reports migrated before the switch ++ * and exported now. Their export keeps the stamp in the snapshot (M1), so the frozen bytes hold. ++ */ ++export const HISTORICAL_FINGERPRINT = ++ '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++ ++export function migratedBeforeR56(report: Report): Report { ++ return { ++ ...report, ++ sheet: { ...report.sheet, documentSha256: HISTORICAL_FINGERPRINT }, ++ } ++} ++ + export function buildGoldenReports(sheet: SheetIndex): GoldenReports { + const v2unresolved = buildV2Unresolved(sheet) + return { + reports: { +- v2full: importAttachment(readJson('report-v2.full.json'), sheet).read +- .report, ++ v2full: migratedBeforeR56( ++ importAttachment(readJson('report-v2.full.json'), sheet).read.report, ++ ), + demo: importAttachment(readJson('report-v3.demo.json'), sheet).read + .report, +- v2unresolved: v2unresolved.report, ++ v2unresolved: migratedBeforeR56(v2unresolved.report), + }, + unresolvedOfV2Unresolved: v2unresolved.unresolvedFindings, + } +diff --git a/apps/app/tests/unit/r5-6.switch.test.ts b/apps/app/tests/unit/r5-6.switch.test.ts +new file mode 100644 +index 0000000..00c80fc +--- /dev/null ++++ b/apps/app/tests/unit/r5-6.switch.test.ts +@@ -0,0 +1,87 @@ ++/** ++ * R5.6 in the application, on the switched bundled sheet (`sha256-rfc8785-validated-v1`): ++ * a v2 report migrated now carries the canonical value and exports one consistent envelope ++ * that the N-1 readers accept; an old report on the historical value opens with no rebase and ++ * re-exports with its own stamp in the snapshot (the goldens prove the bytes); no visible ++ * change. The historical goldens run in their original context (`helpers/goldenReports.ts`). ++ */ ++import { readFileSync } from 'node:fs' ++import { resolve } from 'node:path' ++import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' ++import { ++ readArchiveDocument, ++ readAttachmentBytes, ++ ReportArchiveEnvelopeSchema, ++} from '@faunosteo/core-wasm/n-1' ++import { exportReportToPdf } from '@/pdf/export' ++import type { SheetIndex } from '@/services/sheetIndex' ++import { bundledMigrationMap, loadTestSheet } from '../helpers/sheet' ++import { FIXTURES_DIR, ONE_PX_PNG } from '../helpers/goldens' ++import { HISTORICAL_FINGERPRINT } from '../helpers/goldenReports' ++import { importAttachment } from '../helpers/pdfImport' ++ ++vi.mock('@/pdf/browserRasterizer', () => ({ ++ browserRasterizer: vi.fn(async () => ONE_PX_PNG), ++})) ++vi.mock('@/pdf/branding', async () => { ++ const { brandingOf } = await import('../helpers/goldens') ++ return { loadBranding: vi.fn(() => brandingOf('nologos')) } ++}) ++ ++const CANONICAL = ++ '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++let sheet: SheetIndex ++ ++beforeAll(async () => { ++ sheet = await loadTestSheet() ++ vi.spyOn(console, 'warn').mockImplementation(() => undefined) ++}) ++afterAll(() => vi.restoreAllMocks()) ++ ++interface Stamped { ++ report: { sheet: { documentSha256: string } } ++ sheetSnapshot: { ref: { documentSha256: string } } ++} ++ ++async function exported( ++ report: Parameters[0], ++): Promise { ++ const { pdf } = await exportReportToPdf(report, sheet, { locale: 'fr' }) ++ const bytes = new Uint8Array(await pdf.arrayBuffer()) ++ return JSON.parse( ++ new TextDecoder().decode(await readAttachmentBytes(bytes)), ++ ) as Stamped ++} ++ ++describe('R5.6 on the switched sheet', () => { ++ it('stamps a new or newly migrated report with the canonical value', async () => { ++ expect(sheet.sheet.ref.documentSha256).toBe(CANONICAL) ++ const v2 = JSON.parse( ++ readFileSync(resolve(FIXTURES_DIR, 'report-v2.full.json'), 'utf8'), ++ ) ++ const migrated = importAttachment(v2, sheet).read.report ++ expect(migrated.sheet.documentSha256).toBe(CANONICAL) ++ const envelope = await exported(migrated) ++ expect(envelope.report.sheet.documentSha256).toBe(CANONICAL) ++ expect(envelope.sheetSnapshot.ref.documentSha256).toBe(CANONICAL) ++ expect(ReportArchiveEnvelopeSchema.safeParse(envelope).success).toBe(true) ++ const outcome = readArchiveDocument(envelope, await bundledMigrationMap()) ++ expect(outcome.snapshotRejected).toBeUndefined() ++ }, 30_000) ++ ++ it('opens an old report with no rebase and re-exports it with one stamp', async () => { ++ const demo = JSON.parse( ++ readFileSync(resolve(FIXTURES_DIR, 'report-v3.demo.json'), 'utf8'), ++ ) ++ const imported = importAttachment(demo, sheet) ++ expect(imported.rebase.rebased).toBe(false) ++ expect(imported.rebase.report.sheet.documentSha256).toBe( ++ HISTORICAL_FINGERPRINT, ++ ) ++ const envelope = await exported(imported.rebase.report) ++ expect(envelope.report.sheet.documentSha256).toBe(HISTORICAL_FINGERPRINT) ++ expect(envelope.sheetSnapshot.ref.documentSha256).toBe( ++ HISTORICAL_FINGERPRINT, ++ ) ++ }, 30_000) ++}) +diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml +index ce5a2fd..7c15f76 100644 +--- a/crates/core/Cargo.toml ++++ b/crates/core/Cargo.toml +@@ -24,10 +24,7 @@ pdf-write = ["pdf-read"] + cli = ["pdf-read", "pdf-write"] + # The anatomical pipeline (R5): legacy importer, curation, generated files and their + # formatting, the `import-equine` tool. Never enabled by the wasm facade or the worker. +-curation = ["fingerprint", "dep:icu_normalizer"] +-# The sheet fingerprint `sha256-rfc8785-validated-v1` (R5.6, prepared, not active): the hashing +-# half of `domain::sheet::fingerprint`; the registry and the comparison compile without it. +-fingerprint = ["dep:sha2"] ++curation = ["dep:icu_normalizer"] + # The sheet-asset upload tool (R5.5): the `upload-sheet-assets` binary, a local-stack operator + # tool. The rules are in `curation::upload`; only the binary reaches the network. + upload = ["curation", "dep:ureq"] +@@ -40,7 +37,8 @@ roxmltree.workspace = true + zmij.workspace = true + ts-rs = { workspace = true, optional = true } + miniz_oxide = { workspace = true, optional = true } +-sha2 = { workspace = true, optional = true } ++# The sheet fingerprint (`sha256-rfc8785-validated-v1`, R5.6): recomputed at sheet load too. ++sha2.workspace = true + icu_normalizer = { workspace = true, optional = true } + ureq = { workspace = true, optional = true } + +@@ -157,4 +155,8 @@ required-features = ["upload"] + + [[test]] + name = "sheet_fingerprint" +-required-features = ["fingerprint", "pdf-read"] ++required-features = ["pdf-read"] ++ ++[[test]] ++name = "r5_6_switch" ++required-features = ["pdf-read", "pdf-write"] +diff --git a/crates/core/src/bin/report_compare.rs b/crates/core/src/bin/report_compare.rs +index 59cf060..0748403 100644 +--- a/crates/core/src/bin/report_compare.rs ++++ b/crates/core/src/bin/report_compare.rs +@@ -37,6 +37,11 @@ struct SeedRef { + document_sha256: String, + schema_version: f64, + species_id: String, ++ #[serde( ++ default, ++ deserialize_with = "faunosteo_core::domain::sheet::loaded::present_block" ++ )] ++ fingerprint: Option, + } + + fn seed_json Deserialize<'de>>(name: &str) -> Result { +@@ -58,6 +63,7 @@ fn load_sheet() -> Result { + document_sha256: reference.document_sha256, + schema_version, + species_id: reference.species_id, ++ fingerprint: reference.fingerprint, + }, + document: seed_json("document.json")?, + migration_map: seed_json("report-migration-map.json")?, +diff --git a/crates/core/src/curation/draft/pipeline.rs b/crates/core/src/curation/draft/pipeline.rs +index 19126aa..dcc19b6 100644 +--- a/crates/core/src/curation/draft/pipeline.rs ++++ b/crates/core/src/curation/draft/pipeline.rs +@@ -8,6 +8,9 @@ + //! asset id) and copies them, and never re-cleans the legacy drawing. The review drawings and + //! the two Markdown reports are R5.4. + ++use crate::domain::sheet::fingerprint::{ ++ FINGERPRINT_CONVENTION, TRUSTED_ALIASES, sheet_fingerprint, ++}; + use serde_json::{Map, Value, json}; + + use crate::json::to_js_compact; +@@ -165,14 +168,25 @@ pub fn build_equine_draft(input: &DraftInput<'_>) -> Result SheetRef { +- SheetRef { ++/// What a report references: the sheet and its `sha256-rfc8785-validated-v1` fingerprint ++/// (R5.6; the pre-switch rule hashed the formatted bytes, kept as a registered alias). ++fn sheet_ref(draft: &DraftResult, document_json: &str) -> Result { ++ let fingerprint = sheet_fingerprint(document_json) ++ .map_err(|error| fail(format!("document fingerprint: {error:?}")))?; ++ Ok(SheetRef { + sheet_id: draft.sheet_id.clone(), + version_id: None, +- document_sha256: sha256_hex(document_json.as_bytes()), +- } ++ document_sha256: fingerprint, ++ }) ++} ++ ++/// The registered aliases of this sheet's canonical value (descriptive in `sheet-ref.json`). ++fn registered_aliases(reference: &SheetRef) -> Vec<&'static str> { ++ TRUSTED_ALIASES ++ .iter() ++ .filter(|e| e.sheet_id == reference.sheet_id && e.canonical == reference.document_sha256) ++ .map(|e| e.alias) ++ .collect() + } + + /// The migration map (`report-migration-map.json` value) and its stats. +@@ -268,7 +282,7 @@ pub fn review_drawings_bytes(draft: &DraftResult) -> Result.svg`), then the application's + /// drawing of each view (`review/app-.svg`). +-fn review_drawings(draft: &DraftResult) -> Result, PipelineError> { ++pub fn review_drawings(draft: &DraftResult) -> Result, PipelineError> { + let projected = review_drawings_bytes(draft)?; + if projected > MAX_REVIEW_DRAWINGS_BYTES { + return Err(fail(format!( +@@ -307,7 +321,9 @@ pub fn render_draft_artifacts( + legacy_anomalies: &[Anomaly], + ) -> Result, PipelineError> { + let document_json = format_json(&draft.document)?; +- let reference = sheet_ref(draft, &document_json); ++ // The drawings' resource bound applies before the fingerprint validates the document. ++ let drawings = review_drawings(draft)?; ++ let reference = sheet_ref(draft, &document_json)?; + let (map, migration_stats) = draft_migration_map(draft, &reference)?; + let assets = serde_json::to_value(&draft.assets) + .map_err(|error| fail(format!("assets.json: {error}")))?; +@@ -317,6 +333,10 @@ pub fn render_draft_artifacts( + "document_sha256": reference.document_sha256, + "schema_version": draft.document.get("schema_version"), + "species_id": draft.document.get("species_id"), ++ "fingerprint": { ++ "convention": FINGERPRINT_CONVENTION, ++ "aliases": registered_aliases(&reference), ++ }, + }); + let changelog = render_changelog( + &draft.records, +@@ -343,7 +363,7 @@ pub fn render_draft_artifacts( + (SHEET_REF_FILE.to_owned(), format_json(&sheet_ref_json)?), + (MIGRATION_MAP_FILE.to_owned(), format_json(&map)?), + ]; +- files.extend(review_drawings(draft)?); ++ files.extend(drawings); + files.push(("CHANGELOG.md".to_owned(), format_report(&changelog)?)); + files.push(("REVIEW-REPORT.md".to_owned(), format_report(&review)?)); + files.push((DRAFT_SEED_SQL_FILE.to_owned(), seed)); +diff --git a/crates/core/src/domain/archive/snapshot_rules.rs b/crates/core/src/domain/archive/snapshot_rules.rs +index 6e00fb4..ebdcb00 100644 +--- a/crates/core/src/domain/archive/snapshot_rules.rs ++++ b/crates/core/src/domain/archive/snapshot_rules.rs +@@ -51,13 +51,27 @@ impl SnapshotRejection { + + /// The snapshot of `sheet` that `report` needs: pure, deterministic (document order + /// everywhere). A missing asset is left out and caught by `assert_snapshot`. ++/// ++/// M1 (owner 2026-10-25, R5.6): a report of this sheet stamped with the registered historical ++/// value of its verified, recomputed content gets a snapshot carrying that same stamp, so its ++/// archive holds one value and every reader (the frozen N-1 one, a rollback build) keeps it. ++/// In every other case the snapshot carries the sheet's own value, and the export's strict ++/// equality refuses a report that differs. + pub fn build_sheet_snapshot(sheet: &LoadedSheet, report: &Report) -> SheetSnapshot { ++ let stamp = &report.sheet.document_sha256; ++ let document_sha256 = if report.sheet.sheet_id == sheet.reference.sheet_id ++ && sheet.recognises_historical_stamp(&report.sheet.sheet_id, stamp) ++ { ++ stamp.clone() ++ } else { ++ sheet.reference.document_sha256.clone() ++ }; + SheetSnapshot { + status: sheet.status, + reference: SheetSnapshotRef { + sheet_id: sheet.reference.sheet_id.clone(), + version_id: sheet.reference.version_id.clone(), +- document_sha256: sheet.reference.document_sha256.clone(), ++ document_sha256, + schema_version: sheet.schema_version, + species_id: sheet.species_id.clone(), + }, +diff --git a/crates/core/src/domain/report/rebase.rs b/crates/core/src/domain/report/rebase.rs +index 9281642..9df79ed 100644 +--- a/crates/core/src/domain/report/rebase.rs ++++ b/crates/core/src/domain/report/rebase.rs +@@ -37,7 +37,13 @@ pub fn rebase_report_on_sheet( + sheet: &LoadedSheet, + archived: Option<&SheetSnapshot>, + ) -> Result { +- if report.sheet.document_sha256 == sheet.reference.document_sha256 { ++ // Same document: equal fingerprints, or the registered historical value of this very sheet, ++ // proven against its verified, recomputed `v1` value (R5.6). ++ let stamped = &report.sheet.document_sha256; ++ if *stamped == sheet.reference.document_sha256 ++ || (report.sheet.sheet_id == sheet.reference.sheet_id ++ && sheet.recognises_historical_stamp(&report.sheet.sheet_id, stamped)) ++ { + return Ok(RebaseOutcome { + report: report.clone(), + unresolved_zones: 0, +diff --git a/crates/core/src/domain/sheet/fingerprint.rs b/crates/core/src/domain/sheet/fingerprint.rs +index 0fca332..81f25f6 100644 +--- a/crates/core/src/domain/sheet/fingerprint.rs ++++ b/crates/core/src/domain/sheet/fingerprint.rs +@@ -1,6 +1,5 @@ + //! The sheet fingerprint convention `sha256-rfc8785-validated-v1` (D-R5.6, owner 2026-10-24, +-//! BDR-068) and the trusted alias registry. PREPARED, NOT ACTIVE: no reader, writer or +-//! generated file uses this module until the owner's switch signal (RUST.md §11.19). ++//! BDR-068) and the trusted alias registry (RUST.md §11.19, §11.20). + //! + //! The value is the SHA-256 of the RFC 8785 (JCS) text of the validated document: the strict + //! typed reading of the R2 contract (`AnatomicalSheetDocument`, Zod's defaults filled, the +@@ -56,17 +55,17 @@ impl Equivalence { + } + } + +-/// `a` and `b`, two fingerprints stamped for `sheet_id`: equal, a registered pair of that sheet +-/// (either way round), or different. A real content change is never registered, so it stays +-/// `Different` and rebases as before. +-pub fn equivalence(sheet_id: &str, a: &str, b: &str) -> Equivalence { +- if a == b { ++/// `stamped` (what a report or an archive carries) against `current` (the loaded sheet's ++/// verified value), both for `sheet_id`: equal; the registered pair of that sheet in this one ++/// direction (an old stamp against the canonical value, never the reverse, so a sheet that ++/// declares no `v1` value recognises no `v1` stamp); or different. A real content change is ++/// never registered, so it stays `Different` and rebases as before. ++pub fn equivalence(sheet_id: &str, stamped: &str, current: &str) -> Equivalence { ++ if stamped == current { + return Equivalence::Identical; + } + let paired = TRUSTED_ALIASES.iter().any(|entry| { +- entry.sheet_id == sheet_id +- && ((entry.canonical == a && entry.alias == b) +- || (entry.canonical == b && entry.alias == a)) ++ entry.sheet_id == sheet_id && entry.alias == stamped && entry.canonical == current + }); + if paired { + Equivalence::TrustedAlias +@@ -84,6 +83,9 @@ pub enum AliasRefusal { + Untrusted(String), + /// The value declared under `v1` is not a 64-hex value, or is itself a historical alias. + NotCanonical(String), ++ /// The declared `v1` value is not the document's (the value recomputed, or why it could ++ /// not be). ++ ContentMismatch(String), + } + + /// Checks what a `sheet-ref.json` declares (descriptive only): the convention must be `v1` and +@@ -116,20 +118,39 @@ pub fn check_declared( + Ok(()) + } + +-/// RFC 8785 text of a JSON value. `None` for a number with no I-JSON form (never produced by +-/// the core's parser, which refuses non-finite values). +-pub fn canonical_json(value: &Value) -> Option { ++/// The deepest nesting `canonical_json` writes: serde_json's own parse limit, so every value the ++/// core parsed fits; a value built in code beyond it is refused, never a stack overflow. ++pub const MAX_CANONICAL_DEPTH: usize = 128; ++ ++/// Why a value has no RFC 8785 text. ++#[derive(Debug, Clone, Copy, PartialEq, Eq)] ++pub enum CanonicalError { ++ /// A number with no I-JSON form (never produced by the core's parser). ++ NonFinite, ++ /// Containers nested deeper than `MAX_CANONICAL_DEPTH`. ++ TooDeep, ++} ++ ++/// RFC 8785 text of a JSON value. ++pub fn canonical_json(value: &Value) -> Result { + let mut out = String::new(); +- write_value(value, &mut out)?; +- Some(out) ++ write_value(value, 0, &mut out)?; ++ Ok(out) + } + +-fn write_value(value: &Value, out: &mut String) -> Option<()> { ++fn write_value(value: &Value, depth: usize, out: &mut String) -> Result<(), CanonicalError> { ++ let nested = matches!(value, Value::Array(_) | Value::Object(_)); ++ if nested && depth >= MAX_CANONICAL_DEPTH { ++ return Err(CanonicalError::TooDeep); ++ } + match value { + Value::Null => out.push_str("null"), + Value::Bool(flag) => out.push_str(if *flag { "true" } else { "false" }), + Value::Number(number) => { +- let float = number.as_f64().filter(|f| f.is_finite())?; ++ let float = number ++ .as_f64() ++ .filter(|f| f.is_finite()) ++ .ok_or(CanonicalError::NonFinite)?; + out.push_str(&js_number(float)); + } + Value::String(text) => write_string(text, out), +@@ -139,16 +160,20 @@ fn write_value(value: &Value, out: &mut String) -> Option<()> { + if index > 0 { + out.push(','); + } +- write_value(item, out)?; ++ write_value(item, depth + 1, out)?; + } + out.push(']'); + } +- Value::Object(map) => write_object(map, out)?, ++ Value::Object(map) => write_object(map, depth, out)?, + } +- Some(()) ++ Ok(()) + } + +-fn write_object(map: &serde_json::Map, out: &mut String) -> Option<()> { ++fn write_object( ++ map: &serde_json::Map, ++ depth: usize, ++ out: &mut String, ++) -> Result<(), CanonicalError> { + let mut entries: Vec<(Vec, &String, &Value)> = map + .iter() + .map(|(key, item)| (key.encode_utf16().collect(), key, item)) +@@ -161,10 +186,10 @@ fn write_object(map: &serde_json::Map, out: &mut String) -> Optio + } + write_string(key, out); + out.push(':'); +- write_value(item, out)?; ++ write_value(item, depth + 1, out)?; + } + out.push('}'); +- Some(()) ++ Ok(()) + } + + /// `JSON.stringify` of a string: `"` `\` and the controls escaped (short forms where JSON has +@@ -189,41 +214,49 @@ fn write_string(text: &str, out: &mut String) { + out.push('"'); + } + +-#[cfg(feature = "fingerprint")] +-pub use hashing::{FingerprintError, sheet_fingerprint}; ++pub use hashing::{FingerprintError, document_fingerprint, sheet_fingerprint}; + +-#[cfg(feature = "fingerprint")] + mod hashing { + use sha2::{Digest, Sha256}; + + use super::canonical_json; + use crate::domain::js::parse_json; + use crate::domain::sheet::schema::AnatomicalSheetDocument; +- use crate::domain::sheet::validate::validate_sheet_document; ++ use crate::domain::sheet::validate::{is_publishable, validate_sheet_document}; + + /// Why a document has no fingerprint: an invalid sheet is never stamped. + #[derive(Debug, Clone, PartialEq, Eq)] + pub enum FingerprintError { + Parse(String), + Shape(String), +- /// The integrity rules found issues (their count). ++ /// The integrity rules found errors (the count of every issue found). + Invalid(usize), + Canonical, + } + +- /// `sha256-rfc8785-validated-v1` of a document text: strict parse, R2 shape, zero +- /// integrity issue, then JCS of the typed reading serialised back. ++ /// `sha256-rfc8785-validated-v1` of a document text: strict parse, R2 shape, then ++ /// `document_fingerprint`. + pub fn sheet_fingerprint(text: &str) -> Result { + let value = parse_json(text).map_err(|e| FingerprintError::Parse(e.to_string()))?; + let document: AnatomicalSheetDocument = + serde_json::from_value(value).map_err(|e| FingerprintError::Shape(e.to_string()))?; +- let issues = validate_sheet_document(&document); +- if !issues.is_empty() { ++ document_fingerprint(&document) ++ } ++ ++ /// The fingerprint of a typed document: zero integrity issue, then JCS of its reading ++ /// serialised back, then SHA-256 (the sheet load recomputes it, R5.6). ++ pub fn document_fingerprint( ++ document: &AnatomicalSheetDocument, ++ ) -> Result { ++ // Integrity errors refuse a fingerprint; warnings do not (`is_publishable`: a draft may ++ // hold an annotation with no finding zone or an unreferenced zone, R5.6 rehearsal). ++ let issues = validate_sheet_document(document); ++ if !is_publishable(&issues) { + return Err(FingerprintError::Invalid(issues.len())); + } + let validated = +- serde_json::to_value(&document).map_err(|e| FingerprintError::Shape(e.to_string()))?; +- let canonical = canonical_json(&validated).ok_or(FingerprintError::Canonical)?; ++ serde_json::to_value(document).map_err(|e| FingerprintError::Shape(e.to_string()))?; ++ let canonical = canonical_json(&validated).map_err(|_| FingerprintError::Canonical)?; + Ok(Sha256::digest(canonical.as_bytes()) + .iter() + .map(|byte| format!("{byte:02x}")) +diff --git a/crates/core/src/domain/sheet/loaded.rs b/crates/core/src/domain/sheet/loaded.rs +index 4065978..afc7f33 100644 +--- a/crates/core/src/domain/sheet/loaded.rs ++++ b/crates/core/src/domain/sheet/loaded.rs +@@ -6,6 +6,9 @@ use std::collections::HashMap; + + use serde::Deserialize; + ++use super::fingerprint::{ ++ AliasRefusal, Equivalence, check_declared, document_fingerprint, equivalence, ++}; + use super::index::{IndexedDocument, NoMainView, SheetIndex}; + use super::schema::AnatomicalSheetDocument; + use crate::anatomy::svg::{Element, read_svg}; +@@ -33,6 +36,24 @@ pub struct BundledRef { + pub document_sha256: String, + pub schema_version: JsInt, + pub species_id: String, ++ /// Descriptive (R5.6): checked against the core's registry at load, never trusted alone. ++ /// Absent: a historical (v0) reference; present, it must be a valid block (`null` refused). ++ #[serde(default, deserialize_with = "present_block")] ++ pub fingerprint: Option, ++} ++ ++/// `fingerprint` present means a block: an explicit `null` is refused, not read as absent. ++pub fn present_block<'de, D: serde::Deserializer<'de>>( ++ deserializer: D, ++) -> Result, D::Error> { ++ DeclaredFingerprint::deserialize(deserializer).map(Some) ++} ++ ++#[derive(Debug, Clone, Deserialize)] ++#[serde(deny_unknown_fields)] ++pub struct DeclaredFingerprint { ++ pub convention: String, ++ pub aliases: Vec, + } + + /// A loaded, indexed sheet. +@@ -49,6 +70,9 @@ pub struct LoadedSheet { + /// sha256 by `svg_asset_id`; carried into an archive as provenance. + pub asset_hashes: HashMap, + pub migration_map: ReportMigrationMap, ++ /// The `v1` value the loader recomputed from the document and found declared (R5.6); `None` ++ /// for a historical reference (no block). Private: only `from_bundle` sets it. ++ verified_fingerprint: Option, + index: SheetIndex, + /// Each asset read once at load (R3): the sanitised tree, or why it cannot be drawn. A + /// rejection only affects the views on that asset; `assets` keeps the raw texts (the +@@ -76,6 +100,8 @@ pub enum LoadError { + Shape(serde_json::Error), + /// The document has no main view. + NoMainView, ++ /// The declared fingerprint block contradicts the core's registry (R5.6). ++ Fingerprint(AliasRefusal), + } + + impl From for LoadError { +@@ -102,6 +128,9 @@ impl LoadedSheet { + .map(|(id, text)| (id.clone(), read_drawing(text))) + .collect(); + let r = data.reference; ++ let verified_fingerprint = check_reference(&r, &document) ++ .map_err(LoadError::Fingerprint)? ++ .then(|| r.document_sha256.clone()); + Ok(Self { + status: data.status, + reference: SheetRef { +@@ -115,11 +144,32 @@ impl LoadedSheet { + assets: data.assets, + asset_hashes: data.asset_hashes, + migration_map, ++ verified_fingerprint, + index, + drawings, + }) + } + ++ /// Whether the loader verified a `v1` reference (no alias privilege otherwise). ++ pub fn is_fingerprint_verified(&self) -> bool { ++ self.verified_fingerprint.is_some() ++ } ++ ++ /// Whether `stamp`, carried by a report of this sheet, is the registered historical value of ++ /// this sheet's current content (R5.6, owner M1 rules): the loader verified a `v1` reference, ++ /// the document as it stands now recomputes to that same value, and the registry binds `stamp` ++ /// to it for this sheet. No declared or stored value stands in for the recomputation, so a ++ /// mutated document or reference, a v0 sheet, another sheet or a forged stamp never qualify. ++ pub fn recognises_historical_stamp(&self, sheet_id: &str, stamp: &str) -> bool { ++ let Some(verified) = &self.verified_fingerprint else { ++ return false; ++ }; ++ sheet_id == self.reference.sheet_id ++ && *verified == self.reference.document_sha256 ++ && equivalence(sheet_id, stamp, verified) == Equivalence::TrustedAlias ++ && document_fingerprint(&self.document).is_ok_and(|now| now == *verified) ++ } ++ + pub fn indexed(&self) -> IndexedDocument<'_> { + self.index.over(&self.document) + } +@@ -133,3 +183,28 @@ impl LoadedSheet { + self.drawings.get(asset_id) + } + } ++ ++/// The reference against the document (R5.6): `true` when a `v1` block, checked against the ++/// registry, declares the value recomputed from the document. With no block the reference is a ++/// historical one (v0): read as before, unverified (`false`), so an absent block never stands ++/// for `v1` and never brings an alias. ++fn check_reference( ++ reference: &BundledRef, ++ document: &AnatomicalSheetDocument, ++) -> Result { ++ let value = &reference.document_sha256; ++ let Some(declared) = &reference.fingerprint else { ++ return Ok(false); ++ }; ++ check_declared( ++ &reference.sheet_id, ++ value, ++ &declared.convention, ++ &declared.aliases, ++ )?; ++ match document_fingerprint(document) { ++ Ok(computed) if computed == *value => Ok(true), ++ Ok(computed) => Err(AliasRefusal::ContentMismatch(computed)), ++ Err(error) => Err(AliasRefusal::ContentMismatch(format!("{error:?}"))), ++ } ++} +diff --git a/crates/core/src/facade.rs b/crates/core/src/facade.rs +index f0c6997..7f73cff 100644 +--- a/crates/core/src/facade.rs ++++ b/crates/core/src/facade.rs +@@ -53,6 +53,7 @@ pub fn load_sheet(bundle: &str) -> Result { + LoadedSheet::from_bundle(data).map_err(|error| match error { + LoadError::Shape(error) => Failure::new("invalid_sheet", error), + LoadError::NoMainView => Failure::new("invalid_sheet", "the sheet has no main view"), ++ LoadError::Fingerprint(refusal) => Failure::new("invalid_sheet", format!("{refusal:?}")), + }) + } + +diff --git a/crates/core/src/pdf/compare/lines.rs b/crates/core/src/pdf/compare/lines.rs +index 35e8dd2..7a33db6 100644 +--- a/crates/core/src/pdf/compare/lines.rs ++++ b/crates/core/src/pdf/compare/lines.rs +@@ -2,6 +2,7 @@ + //! current label next to the archived one, `!! UNRESOLVED` with the reason where the sheet + //! cannot place an item. Every untrusted string goes through [`esc`]. + ++use crate::domain::sheet::fingerprint::Equivalence; + use serde::Deserialize; + use serde_json::Value; + +@@ -346,13 +347,33 @@ fn archive_line(outcome: &ArchiveReadOutcome) -> Vec { + + fn sheet_line(report: &Report, sheet: &LoadedSheet) -> String { + let reference = &sheet.reference; +- let same_sheet = report.sheet.sheet_id == reference.sheet_id +- && report.sheet.document_sha256 == reference.document_sha256; ++ let same = if report.sheet.document_sha256 == reference.document_sha256 { ++ Equivalence::Identical ++ } else if sheet ++ .recognises_historical_stamp(&report.sheet.sheet_id, &report.sheet.document_sha256) ++ { ++ // The registered historical value of this sheet's verified, recomputed content (R5.6). ++ Equivalence::TrustedAlias ++ } else { ++ Equivalence::Different ++ }; ++ let same_sheet = report.sheet.sheet_id == reference.sheet_id && same.same_document(); + if same_sheet { + let status = match sheet.status { + SheetStatus::Draft => "draft", + SheetStatus::Published => "published", + }; ++ if same == Equivalence::TrustedAlias { ++ // Same content under the registered historical fingerprint: both raw values shown. ++ let stamped: String = report.sheet.document_sha256.chars().take(12).collect(); ++ let current: String = reference.document_sha256.chars().take(12).collect(); ++ return format!( ++ "sheet {} ({status}, matches the bundled sheet through the trusted alias: report sha {}…, sheet sha {}…)", ++ esc(&reference.sheet_id), ++ esc(&stamped), ++ esc(¤t) ++ ); ++ } + return format!( + "sheet {} ({status}, matches the bundled sheet)", + esc(&reference.sheet_id) +diff --git a/crates/core/tests/curation_draft.rs b/crates/core/tests/curation_draft.rs +index 31c9ffc..ba3b2c1 100644 +--- a/crates/core/tests/curation_draft.rs ++++ b/crates/core/tests/curation_draft.rs +@@ -29,6 +29,9 @@ use faunosteo_core::curation::prettier_json::format_json; + use faunosteo_core::domain::report::ReportMigrationMap; + use faunosteo_core::domain::report::read::read_report_document; + use faunosteo_core::domain::sheet::AnatomicalSheetDocument; ++use faunosteo_core::domain::sheet::fingerprint::{ ++ FINGERPRINT_CONVENTION, TRUSTED_ALIASES, sheet_fingerprint, ++}; + use faunosteo_core::json::to_js_compact; + use serde_json::{Map, Value, json}; + +@@ -139,18 +142,85 @@ fn the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte() { + assert_eq!(frozen.len(), asset.byte_size); + } + ++/// The declared difference of the R5.6 switch, `R5.6-fingerprint-v1` (owner 2026-10-24): from the ++/// pre-switch file the TypeScript wrote, only the fingerprint moves from the registered alias to ++/// its canonical value, and `sheet-ref.json` gains the descriptive block. Applied to a parsed ++/// value, then printed by the generator's own formatter: anything else that differs fails. ++fn r5_6_rule(name: &str, mut value: Value) -> Value { ++ let pair = &TRUSTED_ALIASES[0]; ++ let stamp = match name { ++ "sheet-ref.json" => &mut value["document_sha256"], ++ "report-migration-map.json" => &mut value["sheet"]["documentSha256"], ++ other => panic!("{other}: no declared rule"), ++ }; ++ assert_eq!( ++ *stamp, pair.alias, ++ "{name}: the pre-switch value is the alias" ++ ); ++ *stamp = Value::from(pair.canonical); ++ if name == "sheet-ref.json" { ++ value.as_object_mut().unwrap().insert( ++ "fingerprint".into(), ++ serde_json::json!({ "convention": FINGERPRINT_CONVENTION, "aliases": [pair.alias] }), ++ ); ++ } ++ value ++} ++ ++fn pre_switch(name: &str) -> String { ++ common::repo_file(&format!( ++ "crates/core/tests/fixtures/r5-6/pre-switch/{name}" ++ )) ++} ++ + #[test] +-fn the_document_fingerprint_is_the_historical_value() { ++fn the_pre_switch_copies_are_the_files_the_typescript_wrote() { ++ let artifacts = oracle("pipeline.json")["artifacts"].clone(); ++ for name in ["sheet-ref.json", "report-migration-map.json"] { ++ let row = artifacts ++ .as_array() ++ .unwrap() ++ .iter() ++ .find(|a| a["file"] == name && a["folder"].as_str().unwrap().ends_with("draft")) ++ .unwrap() ++ .clone(); ++ let text = pre_switch(name); ++ assert_eq!(row["sha256"], sha256_hex(text.as_bytes()), "{name}"); ++ assert_eq!(row["bytes"], text.len(), "{name}"); ++ } ++} ++ ++#[test] ++fn the_switch_changes_only_the_fingerprint_of_the_two_files() { ++ for name in ["sheet-ref.json", "report-migration-map.json"] { ++ let before: Value = serde_json::from_str(&pre_switch(name)).unwrap(); ++ let expected = format_json(&r5_6_rule(name, before)).unwrap(); ++ assert!( ++ expected == common::repo_file(&format!("{DRAFT}/{name}")), ++ "{name}: the committed file is not the pre-switch one under R5.6-fingerprint-v1" ++ ); ++ } ++} ++ ++#[test] ++fn the_document_fingerprint_is_v1_and_its_bytes_keep_the_historical_alias() { + let files = render_draft_artifacts(&equine_draft(), &[]).unwrap(); + let document = &files[0].1; + let reference: Value = serde_json::from_str(&files[2].1).unwrap(); ++ let pair = &TRUSTED_ALIASES[0]; ++ assert_eq!(sha256_hex(document.as_bytes()), pair.alias); + assert_eq!( + reference["document_sha256"], +- sha256_hex(document.as_bytes()) ++ sheet_fingerprint(document).unwrap() + ); ++ assert_eq!(reference["document_sha256"], pair.canonical); + assert_eq!( +- reference["document_sha256"], +- "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ reference["fingerprint"]["convention"], ++ FINGERPRINT_CONVENTION ++ ); ++ assert_eq!( ++ reference["fingerprint"]["aliases"], ++ serde_json::json!([pair.alias]) + ); + } + +diff --git a/crates/core/tests/curation_review.rs b/crates/core/tests/curation_review.rs +index aecf855..4b17621 100644 +--- a/crates/core/tests/curation_review.rs ++++ b/crates/core/tests/curation_review.rs +@@ -553,11 +553,12 @@ fn unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering() { + #[test] + fn the_drawings_projection_bounds_what_is_written() { + use faunosteo_core::curation::draft::pipeline::review_drawings_bytes; +- let written = |draft: &DraftResult, anomalies: &[Anomaly]| -> usize { +- render_draft_artifacts(draft, anomalies) ++ // The drawings alone (`render_draft_artifacts` writes exactly these): a draft with no ++ // annotation is no valid sheet, so since R5.6 it has no fingerprint and no full render. ++ let written = |draft: &DraftResult, _anomalies: &[Anomaly]| -> usize { ++ faunosteo_core::curation::draft::pipeline::review_drawings(draft) + .unwrap() + .iter() +- .filter(|(name, _)| name.starts_with("review/")) + .map(|(_, text)| text.len()) + .sum() + }; +diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json +new file mode 100644 +index 0000000..c199d71 +--- /dev/null ++++ b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json +@@ -0,0 +1,997 @@ ++{ ++ "schema_version": 1, ++ "sheet": { ++ "sheetId": "503dc301-a8b1-50d4-9e44-0919b2fc2916", ++ "versionId": null, ++ "documentSha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ }, ++ "main_view_id": "main", ++ "views": { ++ "head": "head" ++ }, ++ "annotations": { ++ "point-mpbwrkp0": { ++ "id": "hind-fetlock", ++ "name": { ++ "fr": "Boulet post. (métatarso-phalangien)", ++ "en": "Hind fetlock" ++ } ++ }, ++ "point-mpbwsi9q": { ++ "id": "hock", ++ "name": { ++ "fr": "Jarret (tarsien)", ++ "en": "Hock" ++ } ++ }, ++ "point-mpbwt4fa": { ++ "id": "stifle", ++ "name": { ++ "fr": "Grasset (fémoro-tibial)", ++ "en": "Stifle" ++ } ++ }, ++ "point-mpbwtst0": { ++ "id": "hip", ++ "name": { ++ "fr": "Hanche (coxo-fémorale)", ++ "en": "Hip joint" ++ } ++ }, ++ "point-mpbwugty": { ++ "id": "sacroiliac", ++ "name": { ++ "fr": "Articulation Sacro-Iliaque", ++ "en": "Sacroiliac Joint" ++ } ++ }, ++ "point-mpbwv4xy": { ++ "id": "shoulder", ++ "name": { ++ "fr": "Épaule (scapulo-humérale)", ++ "en": "Shoulder joint" ++ } ++ }, ++ "point-mpbwvpvt": { ++ "id": "elbow", ++ "name": { ++ "fr": "Coude (huméro-radial)", ++ "en": "Elbow joint" ++ } ++ }, ++ "point-mpbwwaru": { ++ "id": "fore-fetlock", ++ "name": { ++ "fr": "Boulet ant. (métacarpo-phalangien)", ++ "en": "Fore fetlock" ++ } ++ }, ++ "point-mpbwwxvn": { ++ "id": "fore-sesamoids", ++ "name": { ++ "fr": "Sésamoïdes ant. (boulet)", ++ "en": "Forelimb Sesamoids" ++ } ++ }, ++ "point-mpbwxnb4": { ++ "id": "l6-s1", ++ "name": { ++ "fr": "Charnière L6-S1 (lombo-sacrée)", ++ "en": "L6-S1 (Lumbosacral)" ++ } ++ }, ++ "point-mpbwyd9i": { ++ "id": "t18-l1", ++ "name": { ++ "fr": "Charnière T18-L1 (dorso-lombaire)", ++ "en": "T18-L1 (Thoracolumbar)" ++ } ++ }, ++ "point-mpbwyyc9": { ++ "id": "c7-t1", ++ "name": { ++ "fr": "Charnière C7-T1 (cervico-thoracique)", ++ "en": "C7-T1 (Cervicothoracic)" ++ } ++ }, ++ "zone-mpbx00jq": { ++ "id": "caudal", ++ "name": { ++ "fr": "Vertèbres caudales", ++ "en": "Coccygeal Vertebrae" ++ } ++ }, ++ "zone-mpbx0xnp": { ++ "id": "sacral", ++ "name": { ++ "fr": "Vertèbres sacrales", ++ "en": "Sacral Vertebrae" ++ } ++ }, ++ "zone-mpbx1rm9": { ++ "id": "lumbar", ++ "name": { ++ "fr": "Vertèbres lombaires", ++ "en": "Lumbar Vertebrae" ++ } ++ }, ++ "zone-mpbx2rpe": { ++ "id": "thoracic", ++ "name": { ++ "fr": "Vertèbres thoraciques", ++ "en": "Thoracic Vertebrae" ++ } ++ }, ++ "zone-mpbx5hx2": { ++ "id": "cervical", ++ "name": { ++ "fr": "Vertèbres cervicales", ++ "en": "Cervical Vertebrae" ++ } ++ }, ++ "zone-mpby55kd": { ++ "id": "head-trigger", ++ "name": { ++ "fr": "", ++ "en": "" ++ } ++ }, ++ "point-mpbykomv": { ++ "id": "parietal", ++ "name": { ++ "fr": "Pariétal", ++ "en": "Parietal bone" ++ } ++ }, ++ "point-mpbylh35": { ++ "id": "frontal", ++ "name": { ++ "fr": "Frontal", ++ "en": "Frontal bone" ++ } ++ }, ++ "point-mpbymcln": { ++ "id": "sphenoid", ++ "name": { ++ "fr": "Sphénoïde", ++ "en": "Sphenoid" ++ } ++ }, ++ "point-mpbyn2k3": { ++ "id": "temporal", ++ "name": { ++ "fr": "Temporel", ++ "en": "Temporal" ++ } ++ }, ++ "point-mpbynls5": { ++ "id": "occipital", ++ "name": { ++ "fr": "Occipital", ++ "en": "Occipital" ++ } ++ }, ++ "point-mpbyo7zq": { ++ "id": "atm", ++ "name": { ++ "fr": "Articulation Temporo-Mandibulaire (ATM)", ++ "en": "Temporomandibular Joint (TMJ)" ++ } ++ }, ++ "point-mpbyphay": { ++ "id": "ssb", ++ "name": { ++ "fr": "Synchondrose Sphéno-Basilaire (SSB)", ++ "en": "Spheno-Basilar Synchondrosis (SBS)" ++ } ++ }, ++ "point-mpbyq841": { ++ "id": "hyoid", ++ "name": { ++ "fr": "Hyoïde", ++ "en": "Hyoid" ++ } ++ }, ++ "point-mpbyqxbg": { ++ "id": "c0-c1", ++ "name": { ++ "fr": "Charnière C0-C1 (occipito-atloïdienne)", ++ "en": "C0-C1 (Occipito-atlantal)" ++ } ++ } ++ }, ++ "finding_paths": { ++ "parietal/parietal-dysfunctions": "parietal/parietal-dysfunctions", ++ "parietal/parietal-dysfunctions/mobility": "parietal/parietal-dysfunctions/mobility", ++ "parietal/parietal-dysfunctions/mobility/flexion-external-rotation": "parietal/parietal-dysfunctions/mobility/flexion-external-rotation", ++ "parietal/parietal-dysfunctions/mobility/extension-internal-rotation": "parietal/parietal-dysfunctions/mobility/extension-internal-rotation", ++ "parietal/parietal-dysfunctions/mobility/global-restriction": "parietal/parietal-dysfunctions/mobility/global-restriction", ++ "parietal/parietal-dysfunctions/intraosseous": "parietal/parietal-dysfunctions/intraosseous", ++ "parietal/parietal-dysfunctions/intraosseous/squama-deformation": "parietal/parietal-dysfunctions/intraosseous/squama-deformation", ++ "parietal/parietal-dysfunctions/intraosseous/interparietal-compression": "parietal/parietal-dysfunctions/intraosseous/interparietal-compression", ++ "parietal/parietal-dysfunctions/sutures": "parietal/parietal-dysfunctions/sutures", ++ "parietal/parietal-dysfunctions/sutures/frontoparietal": "parietal/parietal-dysfunctions/sutures/frontoparietal", ++ "parietal/parietal-dysfunctions/sutures/parieto-occipital": "parietal/parietal-dysfunctions/sutures/parieto-occipital", ++ "parietal/parietal-dysfunctions/sutures/parieto-temporal": "parietal/parietal-dysfunctions/sutures/parieto-temporal", ++ "parietal/parietal-dysfunctions/sutures/sphenoparietal": "parietal/parietal-dysfunctions/sutures/sphenoparietal", ++ "parietal/parietal-dysfunctions/sutures/interparietal": "parietal/parietal-dysfunctions/sutures/sagittal", ++ "parietal/parietal-observations": "parietal/parietal-consultation-reasons", ++ "parietal/parietal-observations/behavior-change": "parietal/parietal-consultation-reasons/behavior-change", ++ "parietal/parietal-observations/behavior-change/head-touch-hypersensitivity": "parietal/parietal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "parietal/parietal-observations/behavior-change/new-irritability": "parietal/parietal-consultation-reasons/behavior-change/new-irritability", ++ "parietal/parietal-observations/post-trauma-head": "parietal/parietal-consultation-reasons/post-trauma-head", ++ "parietal/anamnesis": "parietal/anamnesis", ++ "parietal/anamnesis/trauma-direct": "parietal/anamnesis/trauma-direct", ++ "parietal/anamnesis/stress-context": "parietal/anamnesis/stress-context", ++ "parietal/anamnesis/posture-context": "parietal/anamnesis/posture-context", ++ "parietal/anamnesis/dental-context": "parietal/anamnesis/dental-context", ++ "parietal/anamnesis/post-veterinary": "parietal/anamnesis/post-veterinary", ++ "parietal/anamnesis/no-identified-cause": "parietal/anamnesis/no-identified-cause", ++ "frontal/frontal-dysfunctions": "frontal/frontal-dysfunctions", ++ "frontal/frontal-dysfunctions/mobility": "frontal/frontal-dysfunctions/mobility", ++ "frontal/frontal-dysfunctions/mobility/flexion-external-rotation": "frontal/frontal-dysfunctions/mobility/flexion-external-rotation", ++ "frontal/frontal-dysfunctions/mobility/extension-internal-rotation": "frontal/frontal-dysfunctions/mobility/extension-internal-rotation", ++ "frontal/frontal-dysfunctions/mobility/global-restriction": "frontal/frontal-dysfunctions/mobility/global-restriction", ++ "frontal/frontal-dysfunctions/intraosseous": "frontal/frontal-dysfunctions/intraosseous", ++ "frontal/frontal-dysfunctions/intraosseous/metopic-compression": "frontal/frontal-dysfunctions/intraosseous/interfrontal-compression", ++ "frontal/frontal-dysfunctions/intraosseous/squama-deformation": "frontal/frontal-dysfunctions/intraosseous/squama-deformation", ++ "frontal/frontal-dysfunctions/sutures": "frontal/frontal-dysfunctions/sutures", ++ "frontal/frontal-dysfunctions/sutures/frontoparietal": "frontal/frontal-dysfunctions/sutures/frontoparietal", ++ "frontal/frontal-dysfunctions/sutures/frontosphenoidal": "frontal/frontal-dysfunctions/sutures/frontosphenoidal", ++ "frontal/frontal-dysfunctions/sutures/frontonasal": "frontal/frontal-dysfunctions/sutures/frontonasal", ++ "frontal/frontal-dysfunctions/sutures/frontolacrimal": "frontal/frontal-dysfunctions/sutures/frontolacrimal", ++ "frontal/frontal-dysfunctions/sutures/frontozygomatic": null, ++ "frontal/frontal-dysfunctions/sutures/interfrontal": "frontal/frontal-dysfunctions/sutures/interfrontal", ++ "frontal/frontal-observations": "frontal/frontal-consultation-reasons", ++ "frontal/frontal-observations/behavior-change": "frontal/frontal-consultation-reasons/behavior-change", ++ "frontal/frontal-observations/behavior-change/head-touch-hypersensitivity": "frontal/frontal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "frontal/frontal-observations/behavior-change/new-irritability": "frontal/frontal-consultation-reasons/behavior-change/new-irritability", ++ "frontal/frontal-observations/head-rubbing": "frontal/frontal-consultation-reasons/head-rubbing", ++ "frontal/frontal-observations/frontal-relief-asymmetry": "frontal/frontal-consultation-reasons/frontal-relief-asymmetry", ++ "frontal/frontal-observations/post-trauma-head": "frontal/frontal-consultation-reasons/post-trauma-head", ++ "frontal/anamnesis": "frontal/anamnesis", ++ "frontal/anamnesis/trauma-direct": "frontal/anamnesis/trauma-direct", ++ "frontal/anamnesis/stress-context": "frontal/anamnesis/stress-context", ++ "frontal/anamnesis/posture-context": "frontal/anamnesis/posture-context", ++ "frontal/anamnesis/dental-context": "frontal/anamnesis/dental-context", ++ "frontal/anamnesis/post-veterinary": "frontal/anamnesis/post-veterinary", ++ "frontal/anamnesis/no-identified-cause": "frontal/anamnesis/no-identified-cause", ++ "sphenoid/ssb-dysfunctions": null, ++ "sphenoid/ssb-dysfunctions/physiological": null, ++ "sphenoid/ssb-dysfunctions/physiological/flexion": null, ++ "sphenoid/ssb-dysfunctions/physiological/extension": null, ++ "sphenoid/ssb-dysfunctions/physiological/torsion-right": null, ++ "sphenoid/ssb-dysfunctions/physiological/torsion-left": null, ++ "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-right": null, ++ "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-left": null, ++ "sphenoid/ssb-dysfunctions/traumatic": null, ++ "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-superior": null, ++ "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-inferior": null, ++ "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-right": null, ++ "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-left": null, ++ "sphenoid/ssb-dysfunctions/traumatic/compression": null, ++ "sphenoid/ssb-dysfunctions/intraosseous": "sphenoid/sphenoid-dysfunctions/intraosseous", ++ "sphenoid/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, ++ "sphenoid/ssb-dysfunctions/intraosseous/lesser-wings": null, ++ "sphenoid/ssb-dysfunctions/intraosseous/greater-wings": null, ++ "sphenoid/ssb-dysfunctions/sutures": "sphenoid/sphenoid-dysfunctions/sutures", ++ "sphenoid/ssb-dysfunctions/sutures/sphenopetrosal": "sphenoid/sphenoid-dysfunctions/sutures/sphenopetrosal", ++ "sphenoid/ssb-dysfunctions/sutures/sphenosquamous": "sphenoid/sphenoid-dysfunctions/sutures/sphenosquamous", ++ "sphenoid/ssb-dysfunctions/sutures/sphenoparietal": "sphenoid/sphenoid-dysfunctions/sutures/sphenoparietal", ++ "sphenoid/ssb-dysfunctions/sutures/frontosphenoidal": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenozygomatic": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenomaxillary": "sphenoid/sphenoid-dysfunctions/sutures/sphenomaxillary", ++ "sphenoid/ssb-dysfunctions/sutures/sphenovomerian": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenopalatine": "sphenoid/sphenoid-dysfunctions/sutures/sphenopalatine", ++ "sphenoid/sphenoid-observations": "sphenoid/sphenoid-consultation-reasons", ++ "sphenoid/sphenoid-observations/behavior-change": "sphenoid/sphenoid-consultation-reasons/behavior-change", ++ "sphenoid/sphenoid-observations/behavior-change/irritability": "sphenoid/sphenoid-consultation-reasons/behavior-change/irritability", ++ "sphenoid/sphenoid-observations/behavior-change/withdrawal": "sphenoid/sphenoid-consultation-reasons/behavior-change/withdrawal", ++ "sphenoid/sphenoid-observations/behavior-change/hypersensitivity": "sphenoid/sphenoid-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "sphenoid/sphenoid-observations/performance-drop": "sphenoid/sphenoid-consultation-reasons/performance-drop", ++ "sphenoid/sphenoid-observations/cycle-irregularity": "sphenoid/sphenoid-consultation-reasons/cycle-irregularity", ++ "sphenoid/sphenoid-observations/post-trauma-head": "sphenoid/sphenoid-consultation-reasons/post-trauma-head", ++ "sphenoid/anamnesis": "sphenoid/anamnesis", ++ "sphenoid/anamnesis/trauma-direct": "sphenoid/anamnesis/trauma-direct", ++ "sphenoid/anamnesis/stress-context": "sphenoid/anamnesis/stress-context", ++ "sphenoid/anamnesis/posture-context": "sphenoid/anamnesis/posture-context", ++ "sphenoid/anamnesis/dental-context": "sphenoid/anamnesis/dental-context", ++ "sphenoid/anamnesis/post-veterinary": "sphenoid/anamnesis/post-veterinary", ++ "sphenoid/anamnesis/no-identified-cause": "sphenoid/anamnesis/no-identified-cause", ++ "temporal/temporal-dysfunctions": "temporal/temporal-dysfunctions", ++ "temporal/temporal-dysfunctions/mobility": "temporal/temporal-dysfunctions/mobility", ++ "temporal/temporal-dysfunctions/mobility/temporal-anteriority": "temporal/temporal-dysfunctions/mobility/temporal-anteriority", ++ "temporal/temporal-dysfunctions/mobility/flexion-external-rotation": "temporal/temporal-dysfunctions/mobility/flexion-external-rotation", ++ "temporal/temporal-dysfunctions/mobility/extension-internal-rotation": "temporal/temporal-dysfunctions/mobility/extension-internal-rotation", ++ "temporal/temporal-dysfunctions/mobility/global-restriction": "temporal/temporal-dysfunctions/mobility/global-restriction", ++ "temporal/temporal-dysfunctions/intraosseous": "temporal/temporal-dysfunctions/intraosseous", ++ "temporal/temporal-dysfunctions/intraosseous/petrosquamous": "temporal/temporal-dysfunctions/intraosseous/petrosquamous", ++ "temporal/temporal-dysfunctions/intraosseous/tympanic-part": "temporal/temporal-dysfunctions/intraosseous/tympanic-part", ++ "temporal/temporal-dysfunctions/sutures": "temporal/temporal-dysfunctions/sutures", ++ "temporal/temporal-dysfunctions/sutures/parieto-temporal": "temporal/temporal-dysfunctions/sutures/parieto-temporal", ++ "temporal/temporal-dysfunctions/sutures/sphenosquamous": "temporal/temporal-dysfunctions/sutures/sphenosquamous", ++ "temporal/temporal-dysfunctions/sutures/occipitomastoid": "temporal/temporal-dysfunctions/sutures/occipitomastoid", ++ "temporal/temporal-dysfunctions/sutures/temporozygomatic": "temporal/temporal-dysfunctions/sutures/temporozygomatic", ++ "temporal/temporal-dysfunctions/sutures/petro-occipital": "temporal/temporal-dysfunctions/sutures/petro-occipital", ++ "temporal/temporal-observations": "temporal/temporal-consultation-reasons", ++ "temporal/temporal-observations/behavior-change": "temporal/temporal-consultation-reasons/behavior-change", ++ "temporal/temporal-observations/behavior-change/head-touch-hypersensitivity": "temporal/temporal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "temporal/temporal-observations/behavior-change/new-irritability": "temporal/temporal-consultation-reasons/behavior-change/new-irritability", ++ "temporal/temporal-observations/post-trauma-head": "temporal/temporal-consultation-reasons/post-trauma-head", ++ "temporal/anamnesis": "temporal/anamnesis", ++ "temporal/anamnesis/trauma-direct": "temporal/anamnesis/trauma-direct", ++ "temporal/anamnesis/stress-context": "temporal/anamnesis/stress-context", ++ "temporal/anamnesis/posture-context": "temporal/anamnesis/posture-context", ++ "temporal/anamnesis/dental-context": "temporal/anamnesis/dental-context", ++ "temporal/anamnesis/post-veterinary": "temporal/anamnesis/post-veterinary", ++ "temporal/anamnesis/no-identified-cause": "temporal/anamnesis/no-identified-cause", ++ "occipital/occipital-dysfunctions": "occipital/occipital-dysfunctions", ++ "occipital/occipital-dysfunctions/mobility": "occipital/occipital-dysfunctions/mobility", ++ "occipital/occipital-dysfunctions/mobility/condylar-compression": "occipital/occipital-dysfunctions/mobility/condylar-compression", ++ "occipital/occipital-dysfunctions/mobility/flexion-external-rotation": "occipital/occipital-dysfunctions/mobility/flexion-external-rotation", ++ "occipital/occipital-dysfunctions/mobility/extension-internal-rotation": "occipital/occipital-dysfunctions/mobility/extension-internal-rotation", ++ "occipital/occipital-dysfunctions/mobility/global-restriction": "occipital/occipital-dysfunctions/mobility/global-restriction", ++ "occipital/occipital-dysfunctions/intraosseous": "occipital/occipital-dysfunctions/intraosseous", ++ "occipital/occipital-dysfunctions/intraosseous/squama-part": "occipital/occipital-dysfunctions/intraosseous/squama-part", ++ "occipital/occipital-dysfunctions/intraosseous/condylar-parts": "occipital/occipital-dysfunctions/intraosseous/condylar-parts", ++ "occipital/occipital-dysfunctions/intraosseous/basilar-part": "occipital/occipital-dysfunctions/intraosseous/basilar-part", ++ "occipital/occipital-dysfunctions/sutures": "occipital/occipital-dysfunctions/sutures", ++ "occipital/occipital-dysfunctions/sutures/parieto-occipital": "occipital/occipital-dysfunctions/sutures/parieto-occipital", ++ "occipital/occipital-dysfunctions/sutures/occipitomastoid": "occipital/occipital-dysfunctions/sutures/occipitomastoid", ++ "occipital/occipital-dysfunctions/sutures/petro-occipital": "occipital/occipital-dysfunctions/sutures/petro-occipital", ++ "occipital/occipital-observations": "occipital/occipital-consultation-reasons", ++ "occipital/occipital-observations/behavior-change": "occipital/occipital-consultation-reasons/behavior-change", ++ "occipital/occipital-observations/behavior-change/head-touch-hypersensitivity": "occipital/occipital-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "occipital/occipital-observations/behavior-change/new-irritability": "occipital/occipital-consultation-reasons/behavior-change/new-irritability", ++ "occipital/occipital-observations/post-trauma-head": "occipital/occipital-consultation-reasons/post-trauma-head", ++ "occipital/anamnesis": "occipital/anamnesis", ++ "occipital/anamnesis/trauma-direct": "occipital/anamnesis/trauma-direct", ++ "occipital/anamnesis/stress-context": "occipital/anamnesis/stress-context", ++ "occipital/anamnesis/posture-context": "occipital/anamnesis/posture-context", ++ "occipital/anamnesis/dental-context": "occipital/anamnesis/dental-context", ++ "occipital/anamnesis/post-veterinary": "occipital/anamnesis/post-veterinary", ++ "occipital/anamnesis/no-identified-cause": "occipital/anamnesis/no-identified-cause", ++ "ssb/ssb-dysfunctions": "ssb/ssb-dysfunctions", ++ "ssb/ssb-dysfunctions/physiological": "ssb/ssb-dysfunctions/physiological", ++ "ssb/ssb-dysfunctions/physiological/flexion": "ssb/ssb-dysfunctions/physiological/flexion", ++ "ssb/ssb-dysfunctions/physiological/extension": "ssb/ssb-dysfunctions/physiological/extension", ++ "ssb/ssb-dysfunctions/physiological/torsion-right": "ssb/ssb-dysfunctions/physiological/torsion-right", ++ "ssb/ssb-dysfunctions/physiological/torsion-left": "ssb/ssb-dysfunctions/physiological/torsion-left", ++ "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right", ++ "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left", ++ "ssb/ssb-dysfunctions/traumatic": "ssb/ssb-dysfunctions/traumatic", ++ "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior", ++ "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior", ++ "ssb/ssb-dysfunctions/traumatic/lateral-strain-right": "ssb/ssb-dysfunctions/traumatic/lateral-strain-right", ++ "ssb/ssb-dysfunctions/traumatic/lateral-strain-left": "ssb/ssb-dysfunctions/traumatic/lateral-strain-left", ++ "ssb/ssb-dysfunctions/traumatic/compression": "ssb/ssb-dysfunctions/traumatic/compression", ++ "ssb/ssb-dysfunctions/intraosseous": null, ++ "ssb/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, ++ "ssb/ssb-dysfunctions/intraosseous/lesser-wings": null, ++ "ssb/ssb-dysfunctions/intraosseous/greater-wings": null, ++ "ssb/ssb-dysfunctions/sutures": null, ++ "ssb/ssb-dysfunctions/sutures/sphenopetrosal": null, ++ "ssb/ssb-dysfunctions/sutures/sphenosquamous": null, ++ "ssb/ssb-dysfunctions/sutures/sphenoparietal": null, ++ "ssb/ssb-dysfunctions/sutures/frontosphenoidal": null, ++ "ssb/ssb-dysfunctions/sutures/sphenozygomatic": null, ++ "ssb/ssb-dysfunctions/sutures/sphenomaxillary": null, ++ "ssb/ssb-dysfunctions/sutures/sphenovomerian": null, ++ "ssb/ssb-dysfunctions/sutures/sphenopalatine": null, ++ "ssb/ssb-observations": "ssb/ssb-consultation-reasons", ++ "ssb/ssb-observations/behavior-change": "ssb/ssb-consultation-reasons/behavior-change", ++ "ssb/ssb-observations/behavior-change/irritability": "ssb/ssb-consultation-reasons/behavior-change/irritability", ++ "ssb/ssb-observations/behavior-change/withdrawal": "ssb/ssb-consultation-reasons/behavior-change/withdrawal", ++ "ssb/ssb-observations/behavior-change/hypersensitivity": "ssb/ssb-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "ssb/ssb-observations/performance-drop": "ssb/ssb-consultation-reasons/performance-drop", ++ "ssb/ssb-observations/cycle-irregularity": "ssb/ssb-consultation-reasons/cycle-irregularity", ++ "ssb/ssb-observations/post-trauma-head": "ssb/ssb-consultation-reasons/post-trauma-head", ++ "ssb/anamnesis": "ssb/anamnesis", ++ "ssb/anamnesis/trauma-direct": "ssb/anamnesis/trauma-direct", ++ "ssb/anamnesis/stress-context": "ssb/anamnesis/stress-context", ++ "ssb/anamnesis/posture-context": "ssb/anamnesis/posture-context", ++ "ssb/anamnesis/dental-context": "ssb/anamnesis/dental-context", ++ "ssb/anamnesis/post-veterinary": "ssb/anamnesis/post-veterinary", ++ "ssb/anamnesis/no-identified-cause": "ssb/anamnesis/no-identified-cause", ++ "atm/atm-dysfunctions": "atm/atm-dysfunctions", ++ "atm/atm-dysfunctions/articular": "atm/atm-dysfunctions/articular", ++ "atm/atm-dysfunctions/articular/restriction-opening": "atm/atm-dysfunctions/articular/restriction-opening", ++ "atm/atm-dysfunctions/articular/restriction-closing": "atm/atm-dysfunctions/articular/restriction-closing", ++ "atm/atm-dysfunctions/articular/restriction-lateral": "atm/atm-dysfunctions/articular/restriction-lateral", ++ "atm/atm-dysfunctions/articular/restriction-protrusion": "atm/atm-dysfunctions/articular/restriction-protrusion", ++ "atm/atm-dysfunctions/articular/hypomobility": "atm/atm-dysfunctions/articular/hypomobility", ++ "atm/atm-dysfunctions/articular/hypermobility": "atm/atm-dysfunctions/articular/hypermobility", ++ "atm/atm-dysfunctions/muscular": "atm/atm-dysfunctions/muscular", ++ "atm/atm-dysfunctions/muscular/masseter-tension": "atm/atm-dysfunctions/muscular/masseter-tension", ++ "atm/atm-dysfunctions/muscular/temporalis-tension": "atm/atm-dysfunctions/muscular/temporalis-tension", ++ "atm/atm-dysfunctions/muscular/pterygoid-tension": "atm/atm-dysfunctions/muscular/pterygoid-tension", ++ "atm/atm-dysfunctions/muscular/trigger-points": "atm/atm-dysfunctions/muscular/trigger-points", ++ "atm/atm-dysfunctions/mechanical": "atm/atm-dysfunctions/mechanical", ++ "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw": "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw", ++ "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear": "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear", ++ "atm/atm-dysfunctions/mechanical/opening-deviation": "atm/atm-dysfunctions/mechanical/opening-deviation", ++ "atm/atm-dysfunctions/mechanical/asymmetric-amplitude": "atm/atm-dysfunctions/mechanical/asymmetric-amplitude", ++ "atm/atm-observations": "atm/atm-consultation-reasons", ++ "atm/atm-observations/bit-defense": "atm/atm-consultation-reasons/bit-defense", ++ "atm/atm-observations/headshaking": "atm/atm-consultation-reasons/headshaking", ++ "atm/atm-observations/head-tilt-saddle": "atm/atm-consultation-reasons/head-tilt-saddle", ++ "atm/atm-observations/slow-eating": "atm/atm-consultation-reasons/slow-eating", ++ "atm/atm-observations/drops-food": "atm/atm-consultation-reasons/drops-food", ++ "atm/atm-observations/hand-contact-refusal": "atm/atm-consultation-reasons/hand-contact-refusal", ++ "atm/atm-observations/false-bend": "atm/atm-consultation-reasons/false-bend", ++ "atm/atm-observations/post-dental-care": "atm/atm-consultation-reasons/post-dental-care", ++ "atm/anamnesis": "atm/anamnesis", ++ "atm/anamnesis/trauma-direct": "atm/anamnesis/trauma-direct", ++ "atm/anamnesis/stress-context": "atm/anamnesis/stress-context", ++ "atm/anamnesis/posture-context": "atm/anamnesis/posture-context", ++ "atm/anamnesis/dental-context": "atm/anamnesis/dental-context", ++ "atm/anamnesis/post-veterinary": "atm/anamnesis/post-veterinary", ++ "atm/anamnesis/no-identified-cause": "atm/anamnesis/no-identified-cause", ++ "hyoid/hyoid-dysfunctions": "hyoid/hyoid-dysfunctions", ++ "hyoid/hyoid-dysfunctions/mobility": "hyoid/hyoid-dysfunctions/mobility", ++ "hyoid/hyoid-dysfunctions/mobility/global-restriction": "hyoid/hyoid-dysfunctions/mobility/global-restriction", ++ "hyoid/hyoid-dysfunctions/mobility/lateral-deviation": "hyoid/hyoid-dysfunctions/mobility/lateral-deviation", ++ "hyoid/hyoid-dysfunctions/mobility/swing-restriction": "hyoid/hyoid-dysfunctions/mobility/retraction-protraction-restriction", ++ "hyoid/hyoid-dysfunctions/muscular": "hyoid/hyoid-dysfunctions/muscular", ++ "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension": "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension": "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension", ++ "hyoid/hyoid-dysfunctions/intraosseous": "hyoid/hyoid-dysfunctions/intraosseous", ++ "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone": "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone", ++ "hyoid/hyoid-dysfunctions/intraosseous/basihyoid": "hyoid/hyoid-dysfunctions/intraosseous/basihyoid", ++ "hyoid/hyoid-observations": "hyoid/hyoid-consultation-reasons", ++ "hyoid/hyoid-observations/bit-defense": "hyoid/hyoid-consultation-reasons/bit-defense", ++ "hyoid/hyoid-observations/tongue-over-bit": "hyoid/hyoid-consultation-reasons/tongue-over-bit", ++ "hyoid/hyoid-observations/swallowing-difficulty": "hyoid/hyoid-consultation-reasons/swallowing-difficulty", ++ "hyoid/hyoid-observations/head-carriage-resistance": "hyoid/hyoid-consultation-reasons/head-carriage-resistance", ++ "hyoid/hyoid-observations/post-dental-care": "hyoid/hyoid-consultation-reasons/post-dental-care", ++ "hyoid/anamnesis": "hyoid/anamnesis", ++ "hyoid/anamnesis/trauma-direct": "hyoid/anamnesis/trauma-direct", ++ "hyoid/anamnesis/stress-context": "hyoid/anamnesis/stress-context", ++ "hyoid/anamnesis/posture-context": "hyoid/anamnesis/posture-context", ++ "hyoid/anamnesis/dental-context": "hyoid/anamnesis/dental-context", ++ "hyoid/anamnesis/post-veterinary": "hyoid/anamnesis/post-veterinary", ++ "hyoid/anamnesis/no-identified-cause": "hyoid/anamnesis/no-identified-cause", ++ "c0-c1/c0-c1-dysfunctions": "c0-c1/c0-c1-dysfunctions", ++ "c0-c1/c0-c1-dysfunctions/segmental": "c0-c1/c0-c1-dysfunctions/segmental", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension": "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation": "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation", ++ "c0-c1/c0-c1-dysfunctions/segmental/fixation": "c0-c1/c0-c1-dysfunctions/segmental/fixation", ++ "c0-c1/c0-c1-dysfunctions/muscular": "c0-c1/c0-c1-dysfunctions/muscular", ++ "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension": "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/trigger-points": "c0-c1/c0-c1-dysfunctions/muscular/trigger-points", ++ "c0-c1/c0-c1-dysfunctions/mechanical": "c0-c1/c0-c1-dysfunctions/mechanical", ++ "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry", ++ "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry", ++ "c0-c1/c0-c1-observations": "c0-c1/c0-c1-consultation-reasons", ++ "c0-c1/c0-c1-observations/poll-sensitivity": "c0-c1/c0-c1-consultation-reasons/poll-sensitivity", ++ "c0-c1/c0-c1-observations/head-carriage": "c0-c1/c0-c1-consultation-reasons/head-carriage", ++ "c0-c1/c0-c1-observations/headshaking": "c0-c1/c0-c1-consultation-reasons/headshaking", ++ "c0-c1/c0-c1-observations/bridle-resistance": "c0-c1/c0-c1-consultation-reasons/bridle-resistance", ++ "c0-c1/c0-c1-observations/palpation-sensitivity": "c0-c1/c0-c1-consultation-reasons/palpation-sensitivity", ++ "c0-c1/anamnesis": "c0-c1/anamnesis", ++ "c0-c1/anamnesis/trauma-direct": "c0-c1/anamnesis/trauma-direct", ++ "c0-c1/anamnesis/saddle-context": "c0-c1/anamnesis/saddle-context", ++ "c0-c1/anamnesis/posture-context": "c0-c1/anamnesis/posture-context", ++ "c0-c1/anamnesis/stress-context": "c0-c1/anamnesis/stress-context", ++ "c0-c1/anamnesis/post-veterinary": "c0-c1/anamnesis/post-veterinary", ++ "c0-c1/anamnesis/no-identified-cause": "c0-c1/anamnesis/no-identified-cause", ++ "cervical/cervical-dysfunctions": "cervical/cervical-dysfunctions", ++ "cervical/cervical-dysfunctions/segmental": "cervical/cervical-dysfunctions/segmental", ++ "cervical/cervical-dysfunctions/segmental/restriction-flexion": "cervical/cervical-dysfunctions/segmental/restriction-flexion", ++ "cervical/cervical-dysfunctions/segmental/restriction-extension": "cervical/cervical-dysfunctions/segmental/restriction-extension", ++ "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion": "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion", ++ "cervical/cervical-dysfunctions/segmental/restriction-rotation": "cervical/cervical-dysfunctions/segmental/restriction-rotation", ++ "cervical/cervical-dysfunctions/segmental/localized-fixation": "cervical/cervical-dysfunctions/segmental/localized-fixation", ++ "cervical/cervical-dysfunctions/group": "cervical/cervical-dysfunctions/group", ++ "cervical/cervical-dysfunctions/group/nsr-group": "cervical/cervical-dysfunctions/group/nsr-group", ++ "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude": "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude", ++ "cervical/cervical-dysfunctions/muscular": "cervical/cervical-dysfunctions/muscular", ++ "cervical/cervical-dysfunctions/muscular/splenius-tension": "cervical/cervical-dysfunctions/muscular/splenius-tension", ++ "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis": "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis", ++ "cervical/cervical-dysfunctions/muscular/scalenus-tension": "cervical/cervical-dysfunctions/muscular/scalenus-tension", ++ "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension": "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension", ++ "cervical/cervical-dysfunctions/muscular/multifidus-cervicis": "cervical/cervical-dysfunctions/muscular/multifidus-cervicis", ++ "cervical/cervical-dysfunctions/mechanical": "cervical/cervical-dysfunctions/mechanical", ++ "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry": "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry", ++ "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry": "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "cervical/cervical-observations": "cervical/cervical-consultation-reasons", ++ "cervical/cervical-observations/ridden-work": "cervical/cervical-consultation-reasons/ridden-work", ++ "cervical/cervical-observations/ridden-work/bend-asymmetry-work": "cervical/cervical-consultation-reasons/ridden-work/bend-asymmetry-work", ++ "cervical/cervical-observations/ridden-work/head-carriage": "cervical/cervical-consultation-reasons/ridden-work/head-carriage", ++ "cervical/cervical-observations/ridden-work/contact-resistance": "cervical/cervical-consultation-reasons/ridden-work/contact-resistance", ++ "cervical/cervical-observations/stumbling-proprioceptive": "cervical/cervical-consultation-reasons/stumbling-proprioceptive", ++ "cervical/cervical-observations/palpation-sensitivity": "cervical/cervical-consultation-reasons/palpation-sensitivity", ++ "cervical/cervical-observations/new-stiffness": "cervical/cervical-consultation-reasons/new-stiffness", ++ "cervical/anamnesis": "cervical/anamnesis", ++ "cervical/anamnesis/trauma-direct": "cervical/anamnesis/trauma-direct", ++ "cervical/anamnesis/saddle-context": "cervical/anamnesis/saddle-context", ++ "cervical/anamnesis/posture-context": "cervical/anamnesis/posture-context", ++ "cervical/anamnesis/stress-context": "cervical/anamnesis/stress-context", ++ "cervical/anamnesis/post-veterinary": "cervical/anamnesis/post-veterinary", ++ "cervical/anamnesis/no-identified-cause": "cervical/anamnesis/no-identified-cause", ++ "c7-t1/c7-t1-dysfunctions": "c7-t1/c7-t1-dysfunctions", ++ "c7-t1/c7-t1-dysfunctions/segmental": "c7-t1/c7-t1-dysfunctions/segmental", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension": "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation": "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation", ++ "c7-t1/c7-t1-dysfunctions/segmental/fixation": "c7-t1/c7-t1-dysfunctions/segmental/fixation", ++ "c7-t1/c7-t1-dysfunctions/muscular": "c7-t1/c7-t1-dysfunctions/muscular", ++ "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension": "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension": "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension": "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension": "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension", ++ "c7-t1/c7-t1-dysfunctions/mechanical": "c7-t1/c7-t1-dysfunctions/mechanical", ++ "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry", ++ "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry", ++ "c7-t1/c7-t1-observations": "c7-t1/c7-t1-consultation-reasons", ++ "c7-t1/c7-t1-observations/base-neck-stiffness": "c7-t1/c7-t1-consultation-reasons/base-neck-stiffness", ++ "c7-t1/c7-t1-observations/forelimb-engagement": "c7-t1/c7-t1-consultation-reasons/forelimb-engagement", ++ "c7-t1/c7-t1-observations/ewe-neck-posture": "c7-t1/c7-t1-consultation-reasons/ewe-neck-posture", ++ "c7-t1/c7-t1-observations/forelimb-lameness": "c7-t1/c7-t1-consultation-reasons/forelimb-lameness", ++ "c7-t1/anamnesis": "c7-t1/anamnesis", ++ "c7-t1/anamnesis/trauma-direct": "c7-t1/anamnesis/trauma-direct", ++ "c7-t1/anamnesis/saddle-context": "c7-t1/anamnesis/saddle-context", ++ "c7-t1/anamnesis/posture-context": "c7-t1/anamnesis/posture-context", ++ "c7-t1/anamnesis/stress-context": "c7-t1/anamnesis/stress-context", ++ "c7-t1/anamnesis/post-veterinary": "c7-t1/anamnesis/post-veterinary", ++ "c7-t1/anamnesis/no-identified-cause": "c7-t1/anamnesis/no-identified-cause", ++ "shoulder/shoulder-dysfunctions": "shoulder/shoulder-dysfunctions", ++ "shoulder/shoulder-dysfunctions/articular": "shoulder/shoulder-dysfunctions/articular", ++ "shoulder/shoulder-dysfunctions/articular/restriction-flexion": "shoulder/shoulder-dysfunctions/articular/restriction-flexion", ++ "shoulder/shoulder-dysfunctions/articular/restriction-extension": "shoulder/shoulder-dysfunctions/articular/restriction-extension", ++ "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction": "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction", ++ "shoulder/shoulder-dysfunctions/articular/restriction-glide": "shoulder/shoulder-dysfunctions/articular/restriction-glide", ++ "shoulder/shoulder-dysfunctions/articular/hypomobility": "shoulder/shoulder-dysfunctions/articular/hypomobility", ++ "shoulder/shoulder-dysfunctions/articular/hypermobility": "shoulder/shoulder-dysfunctions/articular/hypermobility", ++ "shoulder/shoulder-dysfunctions/muscular": "shoulder/shoulder-dysfunctions/muscular", ++ "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus": "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus", ++ "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension": "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension", ++ "shoulder/shoulder-dysfunctions/muscular/deltoid-tension": "shoulder/shoulder-dysfunctions/muscular/deltoid-tension", ++ "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension": "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension", ++ "shoulder/shoulder-dysfunctions/muscular/trigger-points": "shoulder/shoulder-dysfunctions/muscular/trigger-points", ++ "shoulder/shoulder-dysfunctions/mechanical": "shoulder/shoulder-dysfunctions/mechanical", ++ "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry", ++ "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry", ++ "shoulder/shoulder-observations": "shoulder/shoulder-consultation-reasons", ++ "shoulder/shoulder-observations/ridden-work": "shoulder/shoulder-consultation-reasons/ridden-work", ++ "shoulder/shoulder-observations/ridden-work/canter-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/canter-difficulty", ++ "shoulder/shoulder-observations/ridden-work/backing-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/backing-difficulty", ++ "shoulder/shoulder-observations/ridden-work/limb-engagement": "shoulder/shoulder-consultation-reasons/ridden-work/limb-engagement", ++ "shoulder/shoulder-observations/ridden-work/jumping-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/jumping-difficulty", ++ "shoulder/shoulder-observations/shortened-cranial-phase": "shoulder/shoulder-consultation-reasons/shortened-cranial-phase", ++ "shoulder/shoulder-observations/limb-lameness": "shoulder/shoulder-consultation-reasons/limb-lameness", ++ "shoulder/anamnesis": "shoulder/anamnesis", ++ "shoulder/anamnesis/trauma-direct": "shoulder/anamnesis/trauma-direct", ++ "shoulder/anamnesis/sport-context": "shoulder/anamnesis/sport-context", ++ "shoulder/anamnesis/posture-context": "shoulder/anamnesis/posture-context", ++ "shoulder/anamnesis/stress-context": "shoulder/anamnesis/stress-context", ++ "shoulder/anamnesis/post-veterinary": "shoulder/anamnesis/post-veterinary", ++ "shoulder/anamnesis/no-identified-cause": "shoulder/anamnesis/no-identified-cause", ++ "elbow/elbow-dysfunctions": "elbow/elbow-dysfunctions", ++ "elbow/elbow-dysfunctions/articular": "elbow/elbow-dysfunctions/articular", ++ "elbow/elbow-dysfunctions/articular/restriction-flexion": "elbow/elbow-dysfunctions/articular/restriction-flexion", ++ "elbow/elbow-dysfunctions/articular/restriction-extension": "elbow/elbow-dysfunctions/articular/restriction-extension", ++ "elbow/elbow-dysfunctions/articular/restriction-lateromedial": "elbow/elbow-dysfunctions/articular/restriction-lateromedial", ++ "elbow/elbow-dysfunctions/articular/hypomobility": "elbow/elbow-dysfunctions/articular/hypomobility", ++ "elbow/elbow-dysfunctions/articular/hypermobility": "elbow/elbow-dysfunctions/articular/hypermobility", ++ "elbow/elbow-dysfunctions/muscular": "elbow/elbow-dysfunctions/muscular", ++ "elbow/elbow-dysfunctions/muscular/triceps-tension": "elbow/elbow-dysfunctions/muscular/triceps-tension", ++ "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension": "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension", ++ "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin": "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin", ++ "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin": "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin", ++ "elbow/elbow-dysfunctions/muscular/trigger-points": "elbow/elbow-dysfunctions/muscular/trigger-points", ++ "elbow/elbow-dysfunctions/mechanical": "elbow/elbow-dysfunctions/mechanical", ++ "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry": "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry": "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry", ++ "elbow/elbow-observations": "elbow/elbow-consultation-reasons", ++ "elbow/elbow-observations/ridden-work": "elbow/elbow-consultation-reasons/ridden-work", ++ "elbow/elbow-observations/ridden-work/canter-difficulty": "elbow/elbow-consultation-reasons/ridden-work/canter-difficulty", ++ "elbow/elbow-observations/ridden-work/backing-difficulty": "elbow/elbow-consultation-reasons/ridden-work/backing-difficulty", ++ "elbow/elbow-observations/ridden-work/limb-engagement": "elbow/elbow-consultation-reasons/ridden-work/limb-engagement", ++ "elbow/elbow-observations/ridden-work/jumping-difficulty": "elbow/elbow-consultation-reasons/ridden-work/jumping-difficulty", ++ "elbow/elbow-observations/limb-lameness": "elbow/elbow-consultation-reasons/limb-lameness", ++ "elbow/anamnesis": "elbow/anamnesis", ++ "elbow/anamnesis/trauma-direct": "elbow/anamnesis/trauma-direct", ++ "elbow/anamnesis/sport-context": "elbow/anamnesis/sport-context", ++ "elbow/anamnesis/posture-context": "elbow/anamnesis/posture-context", ++ "elbow/anamnesis/stress-context": "elbow/anamnesis/stress-context", ++ "elbow/anamnesis/post-veterinary": "elbow/anamnesis/post-veterinary", ++ "elbow/anamnesis/no-identified-cause": "elbow/anamnesis/no-identified-cause", ++ "fore-fetlock/fore-fetlock-dysfunctions": "fore-fetlock/fore-fetlock-dysfunctions", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular": "fore-fetlock/fore-fetlock-dysfunctions/articular", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular": "fore-fetlock/fore-fetlock-dysfunctions/muscular", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia": "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical": "fore-fetlock/fore-fetlock-dysfunctions/mechanical", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", ++ "fore-fetlock/fore-fetlock-observations": "fore-fetlock/fore-fetlock-consultation-reasons", ++ "fore-fetlock/fore-fetlock-observations/ridden-work": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/canter-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/canter-difficulty", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/backing-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/backing-difficulty", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/limb-engagement": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/limb-engagement", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/jumping-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/jumping-difficulty", ++ "fore-fetlock/fore-fetlock-observations/limb-lameness": "fore-fetlock/fore-fetlock-consultation-reasons/limb-lameness", ++ "fore-fetlock/anamnesis": "fore-fetlock/anamnesis", ++ "fore-fetlock/anamnesis/trauma-direct": "fore-fetlock/anamnesis/trauma-direct", ++ "fore-fetlock/anamnesis/sport-context": "fore-fetlock/anamnesis/sport-context", ++ "fore-fetlock/anamnesis/posture-context": "fore-fetlock/anamnesis/posture-context", ++ "fore-fetlock/anamnesis/stress-context": "fore-fetlock/anamnesis/stress-context", ++ "fore-fetlock/anamnesis/post-veterinary": "fore-fetlock/anamnesis/post-veterinary", ++ "fore-fetlock/anamnesis/no-identified-cause": "fore-fetlock/anamnesis/no-identified-cause", ++ "fore-sesamoids/fore-sesamoids-dysfunctions": "fore-sesamoids/fore-sesamoids-dysfunctions", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "fore-sesamoids/fore-sesamoids-observations": "fore-sesamoids/fore-sesamoids-consultation-reasons", ++ "fore-sesamoids/fore-sesamoids-observations/local-sensitivity": "fore-sesamoids/fore-sesamoids-consultation-reasons/local-sensitivity", ++ "fore-sesamoids/fore-sesamoids-observations/shortened-stride": "fore-sesamoids/fore-sesamoids-consultation-reasons/shortened-stride", ++ "fore-sesamoids/fore-sesamoids-observations/forelimb-lameness": "fore-sesamoids/fore-sesamoids-consultation-reasons/forelimb-lameness", ++ "fore-sesamoids/anamnesis": "fore-sesamoids/anamnesis", ++ "fore-sesamoids/anamnesis/trauma-direct": "fore-sesamoids/anamnesis/trauma-direct", ++ "fore-sesamoids/anamnesis/sport-context": "fore-sesamoids/anamnesis/sport-context", ++ "fore-sesamoids/anamnesis/posture-context": "fore-sesamoids/anamnesis/posture-context", ++ "fore-sesamoids/anamnesis/stress-context": "fore-sesamoids/anamnesis/stress-context", ++ "fore-sesamoids/anamnesis/post-veterinary": "fore-sesamoids/anamnesis/post-veterinary", ++ "fore-sesamoids/anamnesis/no-identified-cause": "fore-sesamoids/anamnesis/no-identified-cause", ++ "thoracic/thoracic-dysfunctions": "thoracic/thoracic-dysfunctions", ++ "thoracic/thoracic-dysfunctions/segmental": "thoracic/thoracic-dysfunctions/segmental", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-flexion": "thoracic/thoracic-dysfunctions/segmental/restriction-flexion", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-extension": "thoracic/thoracic-dysfunctions/segmental/restriction-extension", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion": "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-rotation": "thoracic/thoracic-dysfunctions/segmental/restriction-rotation", ++ "thoracic/thoracic-dysfunctions/segmental/localized-fixation": "thoracic/thoracic-dysfunctions/segmental/localized-fixation", ++ "thoracic/thoracic-dysfunctions/costovertebral": "thoracic/thoracic-dysfunctions/costovertebral", ++ "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction", ++ "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction", ++ "thoracic/thoracic-dysfunctions/group": "thoracic/thoracic-dysfunctions/group", ++ "thoracic/thoracic-dysfunctions/group/nsr-group": "thoracic/thoracic-dysfunctions/group/nsr-group", ++ "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude": "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude", ++ "thoracic/thoracic-dysfunctions/muscular": "thoracic/thoracic-dysfunctions/muscular", ++ "thoracic/thoracic-dysfunctions/muscular/longissimus-tension": "thoracic/thoracic-dysfunctions/muscular/longissimus-tension", ++ "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension": "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension", ++ "thoracic/thoracic-dysfunctions/muscular/trapezius-tension": "thoracic/thoracic-dysfunctions/muscular/trapezius-tension", ++ "thoracic/thoracic-dysfunctions/muscular/latissimus-tension": "thoracic/thoracic-dysfunctions/muscular/latissimus-tension", ++ "thoracic/thoracic-dysfunctions/muscular/trigger-points": "thoracic/thoracic-dysfunctions/muscular/trigger-points", ++ "thoracic/thoracic-dysfunctions/mechanical": "thoracic/thoracic-dysfunctions/mechanical", ++ "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry", ++ "thoracic/thoracic-observations": "thoracic/thoracic-consultation-reasons", ++ "thoracic/thoracic-observations/ridden-work": "thoracic/thoracic-consultation-reasons/ridden-work", ++ "thoracic/thoracic-observations/ridden-work/saddle-region-sensitivity": "thoracic/thoracic-consultation-reasons/ridden-work/saddle-region-sensitivity", ++ "thoracic/thoracic-observations/ridden-work/cold-backed": "thoracic/thoracic-consultation-reasons/ridden-work/cold-backed", ++ "thoracic/thoracic-observations/ridden-work/hindquarter-engagement": "thoracic/thoracic-consultation-reasons/ridden-work/back-transmission", ++ "thoracic/thoracic-observations/ridden-work/bucking": "thoracic/thoracic-consultation-reasons/ridden-work/bucking", ++ "thoracic/thoracic-observations/girthing-defense": "thoracic/thoracic-consultation-reasons/girthing-defense", ++ "thoracic/thoracic-observations/palpation-sensitivity": "thoracic/thoracic-consultation-reasons/palpation-sensitivity", ++ "thoracic/thoracic-observations/new-stiffness": "thoracic/thoracic-consultation-reasons/new-stiffness", ++ "thoracic/anamnesis": "thoracic/anamnesis", ++ "thoracic/anamnesis/trauma-direct": "thoracic/anamnesis/trauma-direct", ++ "thoracic/anamnesis/saddle-context": "thoracic/anamnesis/saddle-context", ++ "thoracic/anamnesis/posture-context": "thoracic/anamnesis/posture-context", ++ "thoracic/anamnesis/stress-context": "thoracic/anamnesis/stress-context", ++ "thoracic/anamnesis/post-veterinary": "thoracic/anamnesis/post-veterinary", ++ "thoracic/anamnesis/no-identified-cause": "thoracic/anamnesis/no-identified-cause", ++ "t18-l1/t18-l1-dysfunctions": "t18-l1/t18-l1-dysfunctions", ++ "t18-l1/t18-l1-dysfunctions/segmental": "t18-l1/t18-l1-dysfunctions/segmental", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension": "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation": "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation", ++ "t18-l1/t18-l1-dysfunctions/segmental/fixation": "t18-l1/t18-l1-dysfunctions/segmental/fixation", ++ "t18-l1/t18-l1-dysfunctions/muscular": "t18-l1/t18-l1-dysfunctions/muscular", ++ "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension": "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension", ++ "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension": "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension", ++ "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia": "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia", ++ "t18-l1/t18-l1-dysfunctions/muscular/trigger-points": "t18-l1/t18-l1-dysfunctions/muscular/trigger-points", ++ "t18-l1/t18-l1-dysfunctions/mechanical": "t18-l1/t18-l1-dysfunctions/mechanical", ++ "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry", ++ "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry", ++ "t18-l1/t18-l1-observations": "t18-l1/t18-l1-consultation-reasons", ++ "t18-l1/t18-l1-observations/back-mobility-loss": "t18-l1/t18-l1-consultation-reasons/back-mobility-loss", ++ "t18-l1/t18-l1-observations/saddle-rear-sensitivity": "t18-l1/t18-l1-consultation-reasons/saddle-rear-sensitivity", ++ "t18-l1/t18-l1-observations/transmission-defect": "t18-l1/t18-l1-consultation-reasons/transmission-defect", ++ "t18-l1/t18-l1-observations/palpation-sensitivity": "t18-l1/t18-l1-consultation-reasons/palpation-sensitivity", ++ "t18-l1/anamnesis": "t18-l1/anamnesis", ++ "t18-l1/anamnesis/trauma-direct": "t18-l1/anamnesis/trauma-direct", ++ "t18-l1/anamnesis/saddle-context": "t18-l1/anamnesis/saddle-context", ++ "t18-l1/anamnesis/posture-context": "t18-l1/anamnesis/posture-context", ++ "t18-l1/anamnesis/stress-context": "t18-l1/anamnesis/stress-context", ++ "t18-l1/anamnesis/post-veterinary": "t18-l1/anamnesis/post-veterinary", ++ "t18-l1/anamnesis/no-identified-cause": "t18-l1/anamnesis/no-identified-cause", ++ "lumbar/lumbar-dysfunctions": "lumbar/lumbar-dysfunctions", ++ "lumbar/lumbar-dysfunctions/segmental": "lumbar/lumbar-dysfunctions/segmental", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-flexion": "lumbar/lumbar-dysfunctions/segmental/restriction-flexion", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-extension": "lumbar/lumbar-dysfunctions/segmental/restriction-extension", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion": "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-rotation": "lumbar/lumbar-dysfunctions/segmental/restriction-rotation", ++ "lumbar/lumbar-dysfunctions/segmental/localized-fixation": "lumbar/lumbar-dysfunctions/segmental/localized-fixation", ++ "lumbar/lumbar-dysfunctions/group": "lumbar/lumbar-dysfunctions/group", ++ "lumbar/lumbar-dysfunctions/group/nsr-group": "lumbar/lumbar-dysfunctions/group/nsr-group", ++ "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude": "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude", ++ "lumbar/lumbar-dysfunctions/muscular": "lumbar/lumbar-dysfunctions/muscular", ++ "lumbar/lumbar-dysfunctions/muscular/longissimus-tension": "lumbar/lumbar-dysfunctions/muscular/longissimus-tension", ++ "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension": "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension", ++ "lumbar/lumbar-dysfunctions/muscular/psoas-tension": "lumbar/lumbar-dysfunctions/muscular/psoas-tension", ++ "lumbar/lumbar-dysfunctions/muscular/trigger-points": "lumbar/lumbar-dysfunctions/muscular/trigger-points", ++ "lumbar/lumbar-dysfunctions/mechanical": "lumbar/lumbar-dysfunctions/mechanical", ++ "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry", ++ "lumbar/lumbar-observations": "lumbar/lumbar-consultation-reasons", ++ "lumbar/lumbar-observations/ridden-work": "lumbar/lumbar-consultation-reasons/ridden-work", ++ "lumbar/lumbar-observations/ridden-work/hollow-back-under-rider": "lumbar/lumbar-consultation-reasons/ridden-work/hollow-back-under-rider", ++ "lumbar/lumbar-observations/ridden-work/hindlimb-engagement": "lumbar/lumbar-consultation-reasons/ridden-work/hindlimb-engagement", ++ "lumbar/lumbar-observations/ridden-work/jumping-difficulty": "lumbar/lumbar-consultation-reasons/ridden-work/jumping-difficulty", ++ "lumbar/lumbar-observations/ridden-work/blocking-at-work": "lumbar/lumbar-consultation-reasons/ridden-work/blocking-at-work", ++ "lumbar/lumbar-observations/girthing-defense": "lumbar/lumbar-consultation-reasons/girthing-defense", ++ "lumbar/lumbar-observations/palpation-sensitivity": "lumbar/lumbar-consultation-reasons/palpation-sensitivity", ++ "lumbar/lumbar-observations/new-stiffness": "lumbar/lumbar-consultation-reasons/new-stiffness", ++ "lumbar/anamnesis": "lumbar/anamnesis", ++ "lumbar/anamnesis/trauma-direct": "lumbar/anamnesis/trauma-direct", ++ "lumbar/anamnesis/saddle-context": "lumbar/anamnesis/saddle-context", ++ "lumbar/anamnesis/posture-context": "lumbar/anamnesis/posture-context", ++ "lumbar/anamnesis/stress-context": "lumbar/anamnesis/stress-context", ++ "lumbar/anamnesis/post-veterinary": "lumbar/anamnesis/post-veterinary", ++ "lumbar/anamnesis/no-identified-cause": "lumbar/anamnesis/no-identified-cause", ++ "l6-s1/l6-s1-dysfunctions": "l6-s1/l6-s1-dysfunctions", ++ "l6-s1/l6-s1-dysfunctions/segmental": "l6-s1/l6-s1-dysfunctions/segmental", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension": "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation": "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation", ++ "l6-s1/l6-s1-dysfunctions/segmental/fixation": "l6-s1/l6-s1-dysfunctions/segmental/fixation", ++ "l6-s1/l6-s1-dysfunctions/muscular": "l6-s1/l6-s1-dysfunctions/muscular", ++ "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension": "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension": "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension": "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/trigger-points": "l6-s1/l6-s1-dysfunctions/muscular/trigger-points", ++ "l6-s1/l6-s1-dysfunctions/mechanical": "l6-s1/l6-s1-dysfunctions/mechanical", ++ "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry", ++ "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry", ++ "l6-s1/l6-s1-observations": "l6-s1/l6-s1-consultation-reasons", ++ "l6-s1/l6-s1-observations/hindlimb-engagement": "l6-s1/l6-s1-consultation-reasons/hindlimb-engagement", ++ "l6-s1/l6-s1-observations/canter-quality": "l6-s1/l6-s1-consultation-reasons/canter-quality", ++ "l6-s1/l6-s1-observations/jumping-propulsion": "l6-s1/l6-s1-consultation-reasons/jumping-propulsion", ++ "l6-s1/l6-s1-observations/palpation-sensitivity": "l6-s1/l6-s1-consultation-reasons/palpation-sensitivity", ++ "l6-s1/anamnesis": "l6-s1/anamnesis", ++ "l6-s1/anamnesis/trauma-direct": "l6-s1/anamnesis/trauma-direct", ++ "l6-s1/anamnesis/saddle-context": "l6-s1/anamnesis/saddle-context", ++ "l6-s1/anamnesis/posture-context": "l6-s1/anamnesis/posture-context", ++ "l6-s1/anamnesis/stress-context": "l6-s1/anamnesis/stress-context", ++ "l6-s1/anamnesis/post-veterinary": "l6-s1/anamnesis/post-veterinary", ++ "l6-s1/anamnesis/no-identified-cause": "l6-s1/anamnesis/no-identified-cause", ++ "sacral/sacral-dysfunctions": "sacral/sacral-dysfunctions", ++ "sacral/sacral-dysfunctions/mobility": "sacral/sacral-dysfunctions/mobility", ++ "sacral/sacral-dysfunctions/mobility/nutation-restriction": "sacral/sacral-dysfunctions/mobility/nutation-restriction", ++ "sacral/sacral-dysfunctions/mobility/counternutation-restriction": "sacral/sacral-dysfunctions/mobility/counternutation-restriction", ++ "sacral/sacral-dysfunctions/mobility/sacral-torsion": "sacral/sacral-dysfunctions/mobility/sacral-torsion", ++ "sacral/sacral-dysfunctions/mobility/lateralisation": "sacral/sacral-dysfunctions/mobility/lateralisation", ++ "sacral/sacral-dysfunctions/muscular": "sacral/sacral-dysfunctions/muscular", ++ "sacral/sacral-dysfunctions/muscular/gluteal-tension": "sacral/sacral-dysfunctions/muscular/gluteal-tension", ++ "sacral/sacral-dysfunctions/muscular/longissimus-tension": "sacral/sacral-dysfunctions/muscular/longissimus-tension", ++ "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension": "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension", ++ "sacral/sacral-dysfunctions/muscular/trigger-points": "sacral/sacral-dysfunctions/muscular/trigger-points", ++ "sacral/sacral-dysfunctions/mechanical": "sacral/sacral-dysfunctions/mechanical", ++ "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry", ++ "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity": "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity", ++ "sacral/sacral-observations": "sacral/sacral-consultation-reasons", ++ "sacral/sacral-observations/ridden-work": "sacral/sacral-consultation-reasons/ridden-work", ++ "sacral/sacral-observations/ridden-work/hindlimb-propulsion": "sacral/sacral-consultation-reasons/ridden-work/hindlimb-propulsion", ++ "sacral/sacral-observations/ridden-work/canter-quality": "sacral/sacral-consultation-reasons/ridden-work/canter-quality", ++ "sacral/sacral-observations/ridden-work/bunny-hopping": "sacral/sacral-consultation-reasons/ridden-work/bunny-hopping", ++ "sacral/sacral-observations/tail-carriage": "sacral/sacral-consultation-reasons/tail-carriage", ++ "sacral/sacral-observations/palpation-sensitivity": "sacral/sacral-consultation-reasons/palpation-sensitivity", ++ "sacral/sacral-observations/new-stiffness": "sacral/sacral-consultation-reasons/new-stiffness", ++ "sacral/anamnesis": "sacral/anamnesis", ++ "sacral/anamnesis/trauma-direct": "sacral/anamnesis/trauma-direct", ++ "sacral/anamnesis/saddle-context": "sacral/anamnesis/saddle-context", ++ "sacral/anamnesis/posture-context": "sacral/anamnesis/posture-context", ++ "sacral/anamnesis/stress-context": "sacral/anamnesis/stress-context", ++ "sacral/anamnesis/post-veterinary": "sacral/anamnesis/post-veterinary", ++ "sacral/anamnesis/no-identified-cause": "sacral/anamnesis/no-identified-cause", ++ "sacroiliac/sacroiliac-dysfunctions": "sacroiliac/sacroiliac-dysfunctions", ++ "sacroiliac/sacroiliac-dysfunctions/articular": "sacroiliac/sacroiliac-dysfunctions/articular", ++ "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation": "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation", ++ "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility", ++ "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility", ++ "sacroiliac/sacroiliac-dysfunctions/muscular": "sacroiliac/sacroiliac-dysfunctions/muscular", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-ligament", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points": "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical": "sacroiliac/sacroiliac-dysfunctions/mechanical", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity": "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity", ++ "sacroiliac/sacroiliac-observations": "sacroiliac/sacroiliac-consultation-reasons", ++ "sacroiliac/sacroiliac-observations/ridden-work": "sacroiliac/sacroiliac-consultation-reasons/ridden-work", ++ "sacroiliac/sacroiliac-observations/ridden-work/hindlimb-engagement": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/hindlimb-engagement", ++ "sacroiliac/sacroiliac-observations/ridden-work/canter-disunited": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/canter-disunited", ++ "sacroiliac/sacroiliac-observations/ridden-work/bunny-hopping": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/bunny-hopping", ++ "sacroiliac/sacroiliac-observations/ridden-work/jumping-difficulty": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/jumping-difficulty", ++ "sacroiliac/sacroiliac-observations/croup-asymmetry": "sacroiliac/sacroiliac-consultation-reasons/croup-asymmetry", ++ "sacroiliac/sacroiliac-observations/hindlimb-lameness": "sacroiliac/sacroiliac-consultation-reasons/hindlimb-lameness", ++ "sacroiliac/anamnesis": "sacroiliac/anamnesis", ++ "sacroiliac/anamnesis/trauma-direct": "sacroiliac/anamnesis/trauma-direct", ++ "sacroiliac/anamnesis/sport-context": "sacroiliac/anamnesis/sport-context", ++ "sacroiliac/anamnesis/posture-context": "sacroiliac/anamnesis/posture-context", ++ "sacroiliac/anamnesis/stress-context": "sacroiliac/anamnesis/stress-context", ++ "sacroiliac/anamnesis/post-veterinary": "sacroiliac/anamnesis/post-veterinary", ++ "sacroiliac/anamnesis/no-identified-cause": "sacroiliac/anamnesis/no-identified-cause", ++ "hip/hip-dysfunctions": "hip/hip-dysfunctions", ++ "hip/hip-dysfunctions/articular": "hip/hip-dysfunctions/articular", ++ "hip/hip-dysfunctions/articular/restriction-flexion": "hip/hip-dysfunctions/articular/restriction-flexion", ++ "hip/hip-dysfunctions/articular/restriction-extension": "hip/hip-dysfunctions/articular/restriction-extension", ++ "hip/hip-dysfunctions/articular/restriction-abduction-adduction": "hip/hip-dysfunctions/articular/restriction-abduction-adduction", ++ "hip/hip-dysfunctions/articular/restriction-rotation": "hip/hip-dysfunctions/articular/restriction-rotation", ++ "hip/hip-dysfunctions/articular/hypomobility": "hip/hip-dysfunctions/articular/hypomobility", ++ "hip/hip-dysfunctions/articular/hypermobility": "hip/hip-dysfunctions/articular/hypermobility", ++ "hip/hip-dysfunctions/muscular": "hip/hip-dysfunctions/muscular", ++ "hip/hip-dysfunctions/muscular/gluteal-group-tension": "hip/hip-dysfunctions/muscular/gluteal-group-tension", ++ "hip/hip-dysfunctions/muscular/iliopsoas-tension": "hip/hip-dysfunctions/muscular/iliopsoas-tension", ++ "hip/hip-dysfunctions/muscular/adductors-tension": "hip/hip-dysfunctions/muscular/adductors-tension", ++ "hip/hip-dysfunctions/muscular/biceps-femoris-tension": "hip/hip-dysfunctions/muscular/biceps-femoris-tension", ++ "hip/hip-dysfunctions/muscular/trigger-points": "hip/hip-dysfunctions/muscular/trigger-points", ++ "hip/hip-dysfunctions/mechanical": "hip/hip-dysfunctions/mechanical", ++ "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry": "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hip/hip-dysfunctions/mechanical/amplitude-asymmetry": "hip/hip-dysfunctions/mechanical/amplitude-asymmetry", ++ "hip/hip-dysfunctions/mechanical/croup-asymmetry": "hip/hip-dysfunctions/mechanical/croup-asymmetry", ++ "hip/hip-observations": "hip/hip-consultation-reasons", ++ "hip/hip-observations/ridden-work": "hip/hip-consultation-reasons/ridden-work", ++ "hip/hip-observations/ridden-work/canter-difficulty": "hip/hip-consultation-reasons/ridden-work/canter-difficulty", ++ "hip/hip-observations/ridden-work/backing-difficulty": "hip/hip-consultation-reasons/ridden-work/backing-difficulty", ++ "hip/hip-observations/ridden-work/limb-engagement": "hip/hip-consultation-reasons/ridden-work/limb-engagement", ++ "hip/hip-observations/ridden-work/jumping-difficulty": "hip/hip-consultation-reasons/ridden-work/jumping-difficulty", ++ "hip/hip-observations/limb-lameness": "hip/hip-consultation-reasons/limb-lameness", ++ "hip/anamnesis": "hip/anamnesis", ++ "hip/anamnesis/trauma-direct": "hip/anamnesis/trauma-direct", ++ "hip/anamnesis/sport-context": "hip/anamnesis/sport-context", ++ "hip/anamnesis/posture-context": "hip/anamnesis/posture-context", ++ "hip/anamnesis/stress-context": "hip/anamnesis/stress-context", ++ "hip/anamnesis/post-veterinary": "hip/anamnesis/post-veterinary", ++ "hip/anamnesis/no-identified-cause": "hip/anamnesis/no-identified-cause", ++ "stifle/stifle-dysfunctions": "stifle/stifle-dysfunctions", ++ "stifle/stifle-dysfunctions/articular": "stifle/stifle-dysfunctions/articular", ++ "stifle/stifle-dysfunctions/articular/restriction-flexion": "stifle/stifle-dysfunctions/articular/restriction-flexion", ++ "stifle/stifle-dysfunctions/articular/restriction-extension": "stifle/stifle-dysfunctions/articular/restriction-extension", ++ "stifle/stifle-dysfunctions/articular/restriction-patellar-glide": "stifle/stifle-dysfunctions/articular/restriction-patellar-glide", ++ "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation": "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation", ++ "stifle/stifle-dysfunctions/articular/hypomobility": "stifle/stifle-dysfunctions/articular/hypomobility", ++ "stifle/stifle-dysfunctions/articular/hypermobility": "stifle/stifle-dysfunctions/articular/hypermobility", ++ "stifle/stifle-dysfunctions/muscular": "stifle/stifle-dysfunctions/muscular", ++ "stifle/stifle-dysfunctions/muscular/quadriceps-tension": "stifle/stifle-dysfunctions/muscular/quadriceps-tension", ++ "stifle/stifle-dysfunctions/muscular/hamstrings-tension": "stifle/stifle-dysfunctions/muscular/hamstrings-tension", ++ "stifle/stifle-dysfunctions/muscular/tfl-tension": "stifle/stifle-dysfunctions/muscular/tfl-tension", ++ "stifle/stifle-dysfunctions/muscular/trigger-points": "stifle/stifle-dysfunctions/muscular/trigger-points", ++ "stifle/stifle-dysfunctions/mechanical": "stifle/stifle-dysfunctions/mechanical", ++ "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry": "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry": "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry", ++ "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation": "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation", ++ "stifle/stifle-observations": "stifle/stifle-consultation-reasons", ++ "stifle/stifle-observations/ridden-work": "stifle/stifle-consultation-reasons/ridden-work", ++ "stifle/stifle-observations/ridden-work/canter-difficulty": "stifle/stifle-consultation-reasons/ridden-work/canter-difficulty", ++ "stifle/stifle-observations/ridden-work/backing-difficulty": "stifle/stifle-consultation-reasons/ridden-work/backing-difficulty", ++ "stifle/stifle-observations/ridden-work/limb-engagement": "stifle/stifle-consultation-reasons/ridden-work/limb-engagement", ++ "stifle/stifle-observations/ridden-work/jumping-difficulty": "stifle/stifle-consultation-reasons/ridden-work/jumping-difficulty", ++ "stifle/stifle-observations/patellar-catching": "stifle/stifle-consultation-reasons/patellar-catching", ++ "stifle/stifle-observations/limb-lameness": "stifle/stifle-consultation-reasons/limb-lameness", ++ "stifle/anamnesis": "stifle/anamnesis", ++ "stifle/anamnesis/trauma-direct": "stifle/anamnesis/trauma-direct", ++ "stifle/anamnesis/sport-context": "stifle/anamnesis/sport-context", ++ "stifle/anamnesis/posture-context": "stifle/anamnesis/posture-context", ++ "stifle/anamnesis/stress-context": "stifle/anamnesis/stress-context", ++ "stifle/anamnesis/post-veterinary": "stifle/anamnesis/post-veterinary", ++ "stifle/anamnesis/no-identified-cause": "stifle/anamnesis/no-identified-cause", ++ "hock/hock-dysfunctions": "hock/hock-dysfunctions", ++ "hock/hock-dysfunctions/articular": "hock/hock-dysfunctions/articular", ++ "hock/hock-dysfunctions/articular/restriction-flexion": "hock/hock-dysfunctions/articular/restriction-flexion", ++ "hock/hock-dysfunctions/articular/restriction-extension": "hock/hock-dysfunctions/articular/restriction-extension", ++ "hock/hock-dysfunctions/articular/restriction-rotation": "hock/hock-dysfunctions/articular/restriction-rotation", ++ "hock/hock-dysfunctions/articular/restriction-small-joints": "hock/hock-dysfunctions/articular/restriction-small-joints", ++ "hock/hock-dysfunctions/articular/hypomobility": "hock/hock-dysfunctions/articular/hypomobility", ++ "hock/hock-dysfunctions/articular/hypermobility": "hock/hock-dysfunctions/articular/hypermobility", ++ "hock/hock-dysfunctions/muscular": "hock/hock-dysfunctions/muscular", ++ "hock/hock-dysfunctions/muscular/gastrocnemius-tension": "hock/hock-dysfunctions/muscular/gastrocnemius-tension", ++ "hock/hock-dysfunctions/muscular/peroneus-tertius": "hock/hock-dysfunctions/muscular/peroneus-tertius", ++ "hock/hock-dysfunctions/muscular/deep-digital-flexor": "hock/hock-dysfunctions/muscular/deep-digital-flexor", ++ "hock/hock-dysfunctions/muscular/tibialis-cranialis": "hock/hock-dysfunctions/muscular/tibialis-cranialis", ++ "hock/hock-dysfunctions/muscular/trigger-points": "hock/hock-dysfunctions/muscular/trigger-points", ++ "hock/hock-dysfunctions/mechanical": "hock/hock-dysfunctions/mechanical", ++ "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry": "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hock/hock-dysfunctions/mechanical/amplitude-asymmetry": "hock/hock-dysfunctions/mechanical/amplitude-asymmetry", ++ "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry": "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry", ++ "hock/hock-observations": "hock/hock-consultation-reasons", ++ "hock/hock-observations/ridden-work": "hock/hock-consultation-reasons/ridden-work", ++ "hock/hock-observations/ridden-work/canter-difficulty": "hock/hock-consultation-reasons/ridden-work/canter-difficulty", ++ "hock/hock-observations/ridden-work/backing-difficulty": "hock/hock-consultation-reasons/ridden-work/backing-difficulty", ++ "hock/hock-observations/ridden-work/limb-engagement": "hock/hock-consultation-reasons/ridden-work/limb-engagement", ++ "hock/hock-observations/ridden-work/jumping-difficulty": "hock/hock-consultation-reasons/ridden-work/jumping-difficulty", ++ "hock/hock-observations/limb-lameness": "hock/hock-consultation-reasons/limb-lameness", ++ "hock/anamnesis": "hock/anamnesis", ++ "hock/anamnesis/trauma-direct": "hock/anamnesis/trauma-direct", ++ "hock/anamnesis/sport-context": "hock/anamnesis/sport-context", ++ "hock/anamnesis/posture-context": "hock/anamnesis/posture-context", ++ "hock/anamnesis/stress-context": "hock/anamnesis/stress-context", ++ "hock/anamnesis/post-veterinary": "hock/anamnesis/post-veterinary", ++ "hock/anamnesis/no-identified-cause": "hock/anamnesis/no-identified-cause", ++ "hind-fetlock/hind-fetlock-dysfunctions": "hind-fetlock/hind-fetlock-dysfunctions", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular": "hind-fetlock/hind-fetlock-dysfunctions/articular", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular": "hind-fetlock/hind-fetlock-dysfunctions/muscular", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia": "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical": "hind-fetlock/hind-fetlock-dysfunctions/mechanical", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", ++ "hind-fetlock/hind-fetlock-observations": "hind-fetlock/hind-fetlock-consultation-reasons", ++ "hind-fetlock/hind-fetlock-observations/ridden-work": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/canter-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/canter-difficulty", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/backing-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/backing-difficulty", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/limb-engagement": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/limb-engagement", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/jumping-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/jumping-difficulty", ++ "hind-fetlock/hind-fetlock-observations/limb-lameness": "hind-fetlock/hind-fetlock-consultation-reasons/limb-lameness", ++ "hind-fetlock/anamnesis": "hind-fetlock/anamnesis", ++ "hind-fetlock/anamnesis/trauma-direct": "hind-fetlock/anamnesis/trauma-direct", ++ "hind-fetlock/anamnesis/sport-context": "hind-fetlock/anamnesis/sport-context", ++ "hind-fetlock/anamnesis/posture-context": "hind-fetlock/anamnesis/posture-context", ++ "hind-fetlock/anamnesis/stress-context": "hind-fetlock/anamnesis/stress-context", ++ "hind-fetlock/anamnesis/post-veterinary": "hind-fetlock/anamnesis/post-veterinary", ++ "hind-fetlock/anamnesis/no-identified-cause": "hind-fetlock/anamnesis/no-identified-cause", ++ "caudal/caudal-dysfunctions": "caudal/caudal-dysfunctions", ++ "caudal/caudal-dysfunctions/segmental": "caudal/caudal-dysfunctions/segmental", ++ "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion": "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion", ++ "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral": "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral", ++ "caudal/caudal-dysfunctions/segmental/localized-fixation": "caudal/caudal-dysfunctions/segmental/localized-fixation", ++ "caudal/caudal-dysfunctions/muscular": "caudal/caudal-dysfunctions/muscular", ++ "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis", ++ "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis", ++ "caudal/caudal-dysfunctions/muscular/coccygeus-tension": "caudal/caudal-dysfunctions/muscular/coccygeus-tension", ++ "caudal/caudal-dysfunctions/mechanical": "caudal/caudal-dysfunctions/mechanical", ++ "caudal/caudal-dysfunctions/mechanical/tail-deviation": "caudal/caudal-dysfunctions/mechanical/tail-deviation", ++ "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry": "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry", ++ "caudal/caudal-observations": "caudal/caudal-consultation-reasons", ++ "caudal/caudal-observations/tail-clamped": "caudal/caudal-consultation-reasons/tail-clamped", ++ "caudal/caudal-observations/tail-swishing": "caudal/caudal-consultation-reasons/tail-swishing", ++ "caudal/caudal-observations/tail-deviation-new": "caudal/caudal-consultation-reasons/tail-deviation-new", ++ "caudal/caudal-observations/tail-handling-sensitivity": "caudal/caudal-consultation-reasons/tail-handling-sensitivity", ++ "caudal/anamnesis": "caudal/anamnesis", ++ "caudal/anamnesis/trauma-direct": "caudal/anamnesis/trauma-direct", ++ "caudal/anamnesis/saddle-context": "caudal/anamnesis/saddle-context", ++ "caudal/anamnesis/posture-context": "caudal/anamnesis/posture-context", ++ "caudal/anamnesis/stress-context": "caudal/anamnesis/stress-context", ++ "caudal/anamnesis/post-veterinary": "caudal/anamnesis/post-veterinary", ++ "caudal/anamnesis/no-identified-cause": "caudal/anamnesis/no-identified-cause" ++ } ++} +diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json +new file mode 100644 +index 0000000..5633394 +--- /dev/null ++++ b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json +@@ -0,0 +1,7 @@ ++{ ++ "sheet_id": "503dc301-a8b1-50d4-9e44-0919b2fc2916", ++ "version_id": null, ++ "document_sha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", ++ "schema_version": 2, ++ "species_id": "equine" ++} +diff --git a/crates/core/tests/pdf_compare.rs b/crates/core/tests/pdf_compare.rs +index c864071..d3fc0e1 100644 +--- a/crates/core/tests/pdf_compare.rs ++++ b/crates/core/tests/pdf_compare.rs +@@ -27,24 +27,58 @@ use serde_json::{Value, json}; + const SEED: &str = "supabase/seed/anatomical-sheets/equine/draft"; + + /// The seed sheet as the binary loads it: document and map, no drawing. ++/// The sheet O10 was frozen against (before R5.6): the seed's document with the pre-switch ++/// `sheet-ref.json` and migration map (`tests/fixtures/r5-6/pre-switch`). O10 replays in that ++/// context; the switched seed has its own test under the declared rule below. + fn draft_sheet() -> &'static LoadedSheet { + static SHEET: OnceLock = OnceLock::new(); +- SHEET.get_or_init(|| { +- let seed = repo_root().join(SEED); +- let read = |name: &str| -> Value { +- serde_json::from_str(&std::fs::read_to_string(seed.join(name)).unwrap()).unwrap() +- }; +- let payload = json!({ +- "status": "draft", +- "ref": read("sheet-ref.json"), +- "document": read("document.json"), +- "migrationMap": read("report-migration-map.json"), +- "assets": {}, +- "assetHashes": {}, +- }); +- let data: BundledSheetData = serde_json::from_value(payload).unwrap(); +- LoadedSheet::from_bundle(data).unwrap() +- }) ++ SHEET ++ .get_or_init(|| sheet_with(&repo_root().join("crates/core/tests/fixtures/r5-6/pre-switch"))) ++} ++ ++/// The committed (switched) seed, as the `report-compare` binary reads it. ++fn switched_sheet() -> &'static LoadedSheet { ++ static SHEET: OnceLock = OnceLock::new(); ++ SHEET.get_or_init(|| sheet_with(&repo_root().join(SEED))) ++} ++ ++fn sheet_with(refs: &std::path::Path) -> LoadedSheet { ++ let seed = repo_root().join(SEED); ++ let read = |dir: &std::path::Path, name: &str| -> Value { ++ serde_json::from_str(&std::fs::read_to_string(dir.join(name)).unwrap()).unwrap() ++ }; ++ let payload = json!({ ++ "status": "draft", ++ "ref": read(refs, "sheet-ref.json"), ++ "document": read(&seed, "document.json"), ++ "migrationMap": read(refs, "report-migration-map.json"), ++ "assets": {}, ++ "assetHashes": {}, ++ }); ++ let data: BundledSheetData = serde_json::from_value(payload).unwrap(); ++ LoadedSheet::from_bundle(data).unwrap() ++} ++ ++/// The declared difference of the R5.6 switch for `report-compare` (`R5.6-fingerprint-v1`), per ++/// file block: a report read as is keeps its historical stamp and is the bundled sheet through ++/// the trusted alias, both raw values printed; a v2 report migrated on the switched map carries ++/// the canonical value and keeps the plain line. Only that one line changes; a report on ++/// another document still prints `!!`, so no content difference can hide behind the rule. ++fn r5_6_rule(text: &str) -> String { ++ let plain = "(draft, matches the bundled sheet)"; ++ let alias = "(draft, matches the bundled sheet through the trusted alias: report sha 27c7383c445c…, sheet sha 12d788727c1e…)"; ++ let mut out = String::new(); ++ for (index, block) in text.split("== ").enumerate() { ++ if index > 0 { ++ out.push_str("== "); ++ } ++ if block.contains("(migrated)") { ++ out.push_str(block); ++ } else { ++ out.push_str(&block.replace(plain, alias)); ++ } ++ } ++ out + } + + /// The repository as the TypeScript CLI saw it: arguments typed from the root. +@@ -131,6 +165,10 @@ fn replay(row: &Row) -> Run { + run(draft_sheet(), &row.args, &RepoFiles) + } + ++fn replay_switched(row: &Row) -> Run { ++ run(switched_sheet(), &row.args, &RepoFiles) ++} ++ + fn assert_exact(row: &Row) { + let got = replay(row); + let args = row.args.join(" "); +@@ -436,9 +474,14 @@ fn binary_prints_what_the_pure_run_prints_from_init_cwd() { + let shapes = ["cli", "folder"]; + let mut spawned = 0; + for row in rows.iter().filter(|r| shapes.contains(&r.group.as_str())) { ++ // The binary reads the committed (switched) seed: the oracle under the declared rule. + let got = spawn(&row.args); + let args = row.args.join(" "); +- assert_eq!(got.stdout, row.stdout, "binary stdout of `{args}`"); ++ assert_eq!( ++ got.stdout, ++ r5_6_rule(&row.stdout), ++ "binary stdout of `{args}`" ++ ); + assert_eq!(got.stderr, row.stderr, "binary stderr of `{args}`"); + assert_eq!(got.exit_code, row.exit_code, "binary exit code of `{args}`"); + spawned += 1; +@@ -449,10 +492,28 @@ fn binary_prints_what_the_pure_run_prints_from_init_cwd() { + .iter() + .find(|r| r.args.first().map(String::as_str) == Some("a.pdf")) + .unwrap(); +- assert_eq!(spawn(&scenario.args), replay(scenario)); ++ assert_eq!(spawn(&scenario.args), replay_switched(scenario)); + let full = rows + .iter() + .find(|r| r.args.first().map(String::as_str) == Some("--full") && r.args.len() == 2) + .unwrap(); +- assert_eq!(spawn(&full.args), replay(full)); ++ assert_eq!(spawn(&full.args), replay_switched(full)); ++} ++ ++/// After R5.6, on the switched seed: every exact O10 row prints the oracle under the declared ++/// rule (the one sheet line), stderr and exit codes unchanged. ++#[test] ++fn o10_on_the_switched_seed_differs_only_by_the_declared_alias_line() { ++ let mut aliased = 0; ++ for row in rows().iter().filter(|r| r.declared.is_none()) { ++ let got = replay_switched(row); ++ let args = row.args.join(" "); ++ let expected = r5_6_rule(&row.stdout); ++ aliased += usize::from(expected != row.stdout); ++ assert_eq!(got.stdout, expected, "stdout of `{args}`"); ++ assert_eq!(got.stderr, row.stderr, "stderr of `{args}`"); ++ assert_eq!(got.exit_code, row.exit_code, "exit code of `{args}`"); ++ } ++ assert_eq!(aliased, 77, "rows through the alias"); ++ assert!(switched_sheet().is_fingerprint_verified() && !draft_sheet().is_fingerprint_verified()); + } +diff --git a/crates/core/tests/pdf_import.rs b/crates/core/tests/pdf_import.rs +index 97f13ec..05fcdf3 100644 +--- a/crates/core/tests/pdf_import.rs ++++ b/crates/core/tests/pdf_import.rs +@@ -32,22 +32,34 @@ const SEED: &str = "supabase/seed/anatomical-sheets/equine/draft"; + + /// The bundled draft sheet exactly as `apps/app/vite/sheet-bundle.ts` embeds it. + fn draft_sheet() -> LoadedSheet { ++ sheet_with(&repo_root().join(SEED)) ++} ++ ++/// The sheet the R4 oracles were frozen against (before R5.6): the same document and drawing, ++/// with the pre-switch `sheet-ref.json` and migration map (`tests/fixtures/r5-6/pre-switch`, ++/// proven to be the TypeScript's files by `curation_draft`). ++fn historical_sheet() -> LoadedSheet { ++ sheet_with(&repo_root().join("crates/core/tests/fixtures/r5-6/pre-switch")) ++} ++ ++/// The seed's document and drawings, with `sheet-ref.json` and the migration map from `refs`. ++fn sheet_with(refs: &std::path::Path) -> LoadedSheet { + let seed = repo_root().join(SEED); +- let read = |name: &str| std::fs::read_to_string(seed.join(name)).unwrap(); +- let manifest: Value = serde_json::from_str(&read("assets.json")).unwrap(); ++ let read = |dir: &std::path::Path, name: &str| std::fs::read_to_string(dir.join(name)).unwrap(); ++ let manifest: Value = serde_json::from_str(&read(&seed, "assets.json")).unwrap(); + let mut assets = serde_json::Map::new(); + let mut hashes = serde_json::Map::new(); + for asset in manifest.as_array().unwrap() { + let id = asset["svg_asset_id"].as_str().unwrap().to_owned(); + let file = format!("assets/{}", asset["file"].as_str().unwrap()); +- assets.insert(id.clone(), Value::String(read(&file))); ++ assets.insert(id.clone(), Value::String(read(&seed, &file))); + hashes.insert(id, asset["sha256"].clone()); + } + let payload = json!({ + "status": "draft", +- "ref": parse_json(&read("sheet-ref.json")).unwrap(), +- "document": parse_json(&read("document.json")).unwrap(), +- "migrationMap": parse_json(&read("report-migration-map.json")).unwrap(), ++ "ref": parse_json(&read(refs, "sheet-ref.json")).unwrap(), ++ "document": parse_json(&read(&seed, "document.json")).unwrap(), ++ "migrationMap": parse_json(&read(refs, "report-migration-map.json")).unwrap(), + "assets": assets, + "assetHashes": hashes, + }); +@@ -126,7 +138,9 @@ fn archive_row(text: &str, sheet: &LoadedSheet) -> Value { + #[test] + fn o7_locate_and_read_match_the_typescript() { + let oracle = r4_oracle("read.json"); +- let sheet = draft_sheet(); ++ // In its original context: the oracle froze the reports a v2 migration stamps with the ++ // pre-switch map (R5.6 leaves it untouched; the post-switch stamp has its own test below). ++ let sheet = historical_sheet(); + let (mut inputs, mut located, mut archives, mut mismatches) = (0, 0, 0, Vec::new()); + for row in oracle["inputs"].as_array().unwrap() { + if row["kind"] != "pdf" { +@@ -179,6 +193,46 @@ fn o7_locate_and_read_match_the_typescript() { + println!("O7: {inputs} inputs, {located} locate rows, {archives} archive rows"); + } + ++/// After R5.6 a v2 migration stamps the canonical value; everything else is what O7 froze. ++#[test] ++fn o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves() { ++ let (now, then) = (draft_sheet(), historical_sheet()); ++ for file in ["scan.report-v2-full.pdf", "scan.report-v2-minimal.pdf"] { ++ let bytes = r4_input("read", file); ++ let text = read_attached_document(&bytes, ProbeLimits::UNBOUNDED) ++ .unwrap() ++ .text ++ .into_owned(); ++ let data = parse_json(&text).unwrap(); ++ let after = read_archive_document(&data, &now.migration_map).unwrap(); ++ let before = read_archive_document(&data, &then.migration_map).unwrap(); ++ assert_eq!( ++ after.report.sheet.document_sha256, now.reference.document_sha256, ++ "{file}" ++ ); ++ assert_eq!( ++ before.report.sheet.document_sha256, then.reference.document_sha256, ++ "{file}" ++ ); ++ let mut aligned = after.report.clone(); ++ aligned.sheet.document_sha256 = before.report.sheet.document_sha256.clone(); ++ assert_eq!(aligned, before.report, "{file}"); ++ assert_eq!( ++ ( ++ after.migrated, ++ after.unresolved_zones, ++ after.unresolved_findings ++ ), ++ ( ++ before.migrated, ++ before.unresolved_zones, ++ before.unresolved_findings ++ ), ++ "{file}" ++ ); ++ } ++} ++ + fn compare( + mismatches: &mut Vec, + file: &str, +diff --git a/crates/core/tests/r5_6_switch.rs b/crates/core/tests/r5_6_switch.rs +new file mode 100644 +index 0000000..07d5064 +--- /dev/null ++++ b/crates/core/tests/r5_6_switch.rs +@@ -0,0 +1,427 @@ ++//! The R5.6 switch on the switched seed (owner 2026-10-24 « corrections préalables à la ++//! bascule » §1, M1 option 1): an old PDF stamped with the registered historical value opens ++//! with no rebase; re-exported, its snapshot keeps the report's stamp, so the current reader, ++//! the pre-switch bundle (rollback) and the frozen N-1 reader (vitest ++//! `packages/core-wasm/tests/r5-6.n-1.test.ts`) all keep the snapshot; archived labels, views, ++//! annotations and branding survive; forged or unknown values and a real content change keep ++//! their behaviour; the sheet load refuses a contradicting reference. ++#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] ++ ++mod archive_support; ++mod common; ++ ++use archive_support::{draft_sheet, from, json_file, loaded}; ++use faunosteo_core::domain::archive::build_sheet_snapshot; ++use faunosteo_core::domain::session::import_archive; ++use faunosteo_core::domain::sheet::fingerprint::{TRUSTED_ALIASES, document_fingerprint}; ++use faunosteo_core::domain::sheet::{BundledSheetData, LoadError, LoadedSheet}; ++use faunosteo_core::pdf::read::probe::{ProbeLimits, read_attached_document}; ++use faunosteo_core::pdf::write::export::export_pdf; ++use faunosteo_core::pdf::write::input::{ExportInput, Rasters}; ++use serde_json::{Value, json}; ++ ++const OLD_PDF: &str = "apps/app/tests/fixtures/pdf/r3/demo.fr.nologos.pdf"; ++const DRAFT: &str = "supabase/seed/anatomical-sheets/equine/draft"; ++const PRE_SWITCH: &str = "crates/core/tests/fixtures/r5-6/pre-switch"; ++ ++fn alias() -> &'static str { ++ TRUSTED_ALIASES[0].alias ++} ++ ++fn canonical() -> &'static str { ++ TRUSTED_ALIASES[0].canonical ++} ++ ++fn attachment(pdf: &[u8]) -> Value { ++ let text = read_attached_document(pdf, ProbeLimits::UNBOUNDED) ++ .unwrap() ++ .text ++ .into_owned(); ++ serde_json::from_str(&text).unwrap() ++} ++ ++fn old_envelope() -> Value { ++ attachment(&std::fs::read(common::repo_path(OLD_PDF)).unwrap()) ++} ++ ++/// The bundle with its reference and migration map replaced (the document and drawings stay). ++fn sheet_with_ref(reference: Value, map: Value) -> Result { ++ let base = draft_sheet(); ++ let assets: serde_json::Map = base ++ .assets ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let hashes: serde_json::Map = base ++ .asset_hashes ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let data: BundledSheetData = serde_json::from_value(json!({ ++ "status": "draft", ++ "ref": reference, ++ "document": json_file(&format!("{DRAFT}/document.json")), ++ "migrationMap": map, ++ "assets": assets, ++ "assetHashes": hashes, ++ })) ++ .map_err(|e| format!("shape: {e}"))?; ++ LoadedSheet::from_bundle(data).map_err(|e: LoadError| format!("{e:?}")) ++} ++ ++/// The pre-switch bundle: what a rollback build ships. ++fn rollback_sheet() -> LoadedSheet { ++ sheet_with_ref( ++ json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), ++ json_file(&format!("{PRE_SWITCH}/report-migration-map.json")), ++ ) ++ .unwrap() ++} ++ ++fn reexport(sheet: &LoadedSheet, envelope: &Value) -> Vec { ++ let report = import_archive(sheet, &envelope.to_string()) ++ .unwrap() ++ .rebase ++ .report; ++ let input = ExportInput { ++ sheet_snapshot: serde_json::to_value(build_sheet_snapshot(sheet, &report)).unwrap(), ++ report, ++ branding: envelope["branding"].clone(), ++ labels: envelope["labels"].clone(), ++ locale: from(envelope["locale"].clone()), ++ exported_at: "2026-10-24T12:00:00.000Z".into(), ++ }; ++ export_pdf(input, &Rasters::default()).unwrap().pdf ++} ++ ++#[test] ++fn the_switched_seed_is_v1_and_the_old_pdf_carries_the_alias() { ++ let sheet = draft_sheet(); ++ assert_eq!(sheet.reference.document_sha256, canonical()); ++ assert_eq!(document_fingerprint(&sheet.document).unwrap(), canonical()); ++ let envelope = old_envelope(); ++ assert_eq!(envelope["report"]["sheet"]["documentSha256"], alias()); ++ assert_eq!(envelope["sheetSnapshot"]["ref"]["documentSha256"], alias()); ++} ++ ++#[test] ++fn an_old_pdf_opens_with_no_rebase_and_keeps_its_archive_and_stamp() { ++ let import = import_archive(&draft_sheet(), &old_envelope().to_string()).unwrap(); ++ assert!(!import.rebase.rebased); ++ assert_eq!(import.rebase.report.sheet.document_sha256, alias()); ++ assert!(import.read.archive.is_some() && import.read.snapshot_rejected.is_none()); ++} ++ ++#[test] ++fn a_reexport_writes_one_stamp_that_every_reader_keeps() { ++ let envelope = old_envelope(); ++ let pdf = reexport(&draft_sheet(), &envelope); ++ let written = attachment(&pdf); ++ assert_eq!(written["report"]["sheet"]["documentSha256"], alias()); ++ assert_eq!(written["sheetSnapshot"]["ref"]["documentSha256"], alias()); ++ // The current reader, then the pre-switch bundle (rollback): snapshot kept, no rebase. ++ for sheet in [draft_sheet(), rollback_sheet()] { ++ let import = import_archive(&sheet, &written.to_string()).unwrap(); ++ assert!( ++ import.read.archive.is_some(), ++ "{:?}", ++ import.read.snapshot_rejected ++ ); ++ assert!(!import.rebase.rebased); ++ } ++ // Kept for the rollback check with the pre-switch build's own `report-compare`. ++ let out = std::path::PathBuf::from(common::repo_path("target/tmp/r5-6")); ++ std::fs::create_dir_all(&out).unwrap(); ++ std::fs::write(out.join("reexport.demo.fr.nologos.pdf"), &pdf).unwrap(); ++} ++ ++#[test] ++fn a_reexport_preserves_the_archived_labels_views_annotations_and_branding() { ++ let envelope = old_envelope(); ++ let written = attachment(&reexport(&draft_sheet(), &envelope)); ++ for key in ["labels", "branding", "locale", "report"] { ++ assert_eq!(written[key], envelope[key], "{key}"); ++ } ++ let (before, after) = (&envelope["sheetSnapshot"], &written["sheetSnapshot"]); ++ assert_eq!( ++ after["document"], before["document"], ++ "views, annotations, findings, labels" ++ ); ++ assert_eq!(after["assets"], before["assets"]); ++ assert_eq!(after["ref"], before["ref"]); ++} ++ ++#[test] ++fn a_new_report_still_carries_the_canonical_value() { ++ let sheet = draft_sheet(); ++ let mut envelope = old_envelope(); ++ envelope["report"]["sheet"]["documentSha256"] = json!(canonical()); ++ envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); ++ let written = attachment(&reexport(&sheet, &envelope)); ++ assert_eq!(written["report"]["sheet"]["documentSha256"], canonical()); ++ assert_eq!( ++ written["sheetSnapshot"]["ref"]["documentSha256"], ++ canonical() ++ ); ++} ++ ++#[test] ++fn an_unknown_or_forged_stamp_rebases_and_a_mixed_envelope_loses_its_snapshot() { ++ let sheet = draft_sheet(); ++ let mut envelope = old_envelope(); ++ envelope["report"]["sheet"]["documentSha256"] = json!("c".repeat(64)); ++ envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!("c".repeat(64)); ++ assert!( ++ import_archive(&sheet, &envelope.to_string()) ++ .unwrap() ++ .rebase ++ .rebased ++ ); ++ // A case-changed canonical value is no 64-lowercase-hex stamp: the v3 contract refuses it. ++ let mut upper = old_envelope(); ++ upper["report"]["sheet"]["documentSha256"] = json!(canonical().to_uppercase()); ++ assert!(import_archive(&sheet, &upper.to_string()).is_err()); ++ // An archive pairing the alias with the canonical value is not loosened into a match. ++ let mut mixed = old_envelope(); ++ mixed["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); ++ let import = import_archive(&sheet, &mixed.to_string()).unwrap(); ++ assert!(import.read.archive.is_none() && import.read.snapshot_rejected.is_some()); ++} ++ ++#[test] ++fn a_real_content_change_still_rebases() { ++ let mut document = json_file(&format!("{DRAFT}/document.json")); ++ document["name"]["fr"] = json!("Fiche équine modifiée"); ++ let typed = from(document.clone()); ++ let changed = document_fingerprint(&typed).unwrap(); ++ assert_ne!(changed, canonical()); ++ let mut reference = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ reference["document_sha256"] = json!(changed); ++ reference["fingerprint"]["aliases"] = json!([]); ++ let base = draft_sheet(); ++ let assets: serde_json::Map = base ++ .assets ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let hashes: serde_json::Map = base ++ .asset_hashes ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let sheet = loaded( ++ reference, ++ document, ++ json_file(&format!("{DRAFT}/report-migration-map.json")), ++ Value::Object(assets), ++ Value::Object(hashes), ++ ); ++ let import = import_archive(&sheet, &old_envelope().to_string()).unwrap(); ++ assert!(import.rebase.rebased); ++} ++ ++#[test] ++fn the_sheet_load_refuses_a_reference_that_contradicts_the_registry_or_the_content() { ++ let map = json_file(&format!("{DRAFT}/report-migration-map.json")); ++ let good = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ assert!(sheet_with_ref(good.clone(), map.clone()).is_ok()); ++ let mut cases = Vec::new(); ++ let mut forged = good.clone(); ++ forged["fingerprint"]["aliases"] = json!(["d".repeat(64)]); ++ cases.push(forged); ++ let mut convention = good.clone(); ++ convention["fingerprint"]["convention"] = json!("sha256-rfc8785-validated-v2"); ++ cases.push(convention); ++ let mut content = good.clone(); ++ content["document_sha256"] = json!("e".repeat(64)); ++ content["fingerprint"]["aliases"] = json!([]); ++ cases.push(content); ++ let mut unknown_key = good.clone(); ++ unknown_key["fingerprint"]["trusted"] = json!(true); ++ cases.push(unknown_key); ++ for reference in cases { ++ assert!( ++ sheet_with_ref(reference.clone(), map.clone()).is_err(), ++ "{reference}" ++ ); ++ } ++ // A historical v0 reference (no block) still loads, unverified, with no alias privilege, ++ // even when it carries the canonical value: an old stamp then rebases. ++ let rollback = sheet_with_ref( ++ json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), ++ map.clone(), ++ ); ++ assert!(!rollback.unwrap().is_fingerprint_verified()); ++ let mut v0_with_v1_value = good.clone(); ++ v0_with_v1_value ++ .as_object_mut() ++ .unwrap() ++ .remove("fingerprint"); ++ let unverified = sheet_with_ref(v0_with_v1_value, map).unwrap(); ++ assert!(!unverified.is_fingerprint_verified()); ++ let import = import_archive(&unverified, &old_envelope().to_string()).unwrap(); ++ assert!(import.rebase.rebased); ++ assert!(draft_sheet().is_fingerprint_verified()); ++} ++ ++// --------------------------------------------------------------------------- ++// M1 correction (owner 2026-10-25): the direct APIs, not only the application's paths. ++ ++fn old_report() -> faunosteo_core::domain::report::Report { ++ from(old_envelope()["report"].clone()) ++} ++ ++/// The direct export: a snapshot built by the core for `sheet`, then `export_pdf`. ++fn export_on( ++ sheet: &LoadedSheet, ++ report: &faunosteo_core::domain::report::Report, ++) -> Result, String> { ++ let envelope = old_envelope(); ++ let input = ExportInput { ++ sheet_snapshot: serde_json::to_value(build_sheet_snapshot(sheet, report)).unwrap(), ++ report: report.clone(), ++ branding: envelope["branding"].clone(), ++ labels: envelope["labels"].clone(), ++ locale: from(envelope["locale"].clone()), ++ exported_at: "2026-10-25T12:00:00.000Z".into(), ++ }; ++ export_pdf(input, &Rasters::default()) ++ .map(|r| r.pdf) ++ .map_err(|e| format!("{e:?}")) ++} ++ ++#[test] ++fn the_direct_export_on_an_unverified_v0_sheet_with_the_canonical_value_is_refused() { ++ let map = json_file(&format!("{DRAFT}/report-migration-map.json")); ++ let mut v0 = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ v0.as_object_mut().unwrap().remove("fingerprint"); ++ let sheet = sheet_with_ref(v0, map).unwrap(); ++ assert!(!sheet.is_fingerprint_verified()); ++ let snapshot = build_sheet_snapshot(&sheet, &old_report()); ++ assert_eq!(snapshot.reference.document_sha256, canonical()); ++ let refused = export_on(&sheet, &old_report()).unwrap_err(); ++ assert!(refused.contains("SheetMismatch"), "{refused}"); ++} ++ ++#[test] ++fn a_mutated_document_or_reference_never_keeps_the_alias() { ++ let mut document = draft_sheet(); ++ document.document.name.fr = "Fiche modifiée après chargement".into(); ++ assert!(!document.recognises_historical_stamp(&document.reference.sheet_id.clone(), alias())); ++ assert!(export_on(&document, &old_report()).is_err()); ++ let mut reference = draft_sheet(); ++ reference.reference.document_sha256 = "f".repeat(64); ++ assert!(!reference.recognises_historical_stamp(&reference.reference.sheet_id.clone(), alias())); ++ assert!(export_on(&reference, &old_report()).is_err()); ++ // Untouched, the same sheet grants it, and the direct export writes one stamp. ++ let sheet = draft_sheet(); ++ assert!(sheet.recognises_historical_stamp(&sheet.reference.sheet_id, alias())); ++ let written = attachment(&export_on(&sheet, &old_report()).unwrap()); ++ assert_eq!(written["sheetSnapshot"]["ref"]["documentSha256"], alias()); ++} ++ ++#[test] ++fn the_historical_value_on_another_sheet_id_is_not_recognised() { ++ let sheet = draft_sheet(); ++ assert!(!sheet.recognises_historical_stamp("00000000-0000-0000-0000-000000000000", alias())); ++ let mut report = old_report(); ++ report.sheet.sheet_id = "00000000-0000-0000-0000-000000000000".into(); ++ assert_eq!( ++ build_sheet_snapshot(&sheet, &report) ++ .reference ++ .document_sha256, ++ canonical() ++ ); ++ assert!(export_on(&sheet, &report).is_err()); ++ let import_other = { ++ let mut envelope = old_envelope(); ++ envelope["report"]["sheet"]["sheetId"] = json!("00000000-0000-0000-0000-000000000000"); ++ import_archive(&sheet, &envelope.to_string()).unwrap() ++ }; ++ assert!(import_other.rebase.rebased); ++} ++ ++#[test] ++fn a_v1_block_whose_value_contradicts_the_content_is_refused_at_load() { ++ let mut document = json_file(&format!("{DRAFT}/document.json")); ++ document["name"]["fr"] = json!("Contenu modifié, tampon conservé"); ++ let base = draft_sheet(); ++ let assets: serde_json::Map = base ++ .assets ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let data: Result = serde_json::from_value(json!({ ++ "status": "draft", ++ "ref": json_file(&format!("{DRAFT}/sheet-ref.json")), ++ "document": document, ++ "migrationMap": json_file(&format!("{DRAFT}/report-migration-map.json")), ++ "assets": assets, ++ "assetHashes": {}, ++ })); ++ let refused = LoadedSheet::from_bundle(data.unwrap()).unwrap_err(); ++ assert!( ++ format!("{refused:?}").contains("ContentMismatch"), ++ "{refused:?}" ++ ); ++} ++ ++#[test] ++fn an_explicit_null_block_is_refused_and_an_absent_one_is_v0() { ++ let map = json_file(&format!("{DRAFT}/report-migration-map.json")); ++ let mut null_block = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ null_block["fingerprint"] = Value::Null; ++ let refused = sheet_with_ref(null_block, map.clone()).unwrap_err(); ++ assert!(refused.starts_with("shape:"), "{refused}"); ++ let mut malformed = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ malformed["fingerprint"] = json!("sha256-rfc8785-validated-v1"); ++ assert!(sheet_with_ref(malformed, map.clone()).is_err()); ++ let absent = sheet_with_ref(json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), map).unwrap(); ++ assert!(!absent.is_fingerprint_verified()); ++} ++ ++#[test] ++fn a_v1_sheet_carrying_only_draft_warnings_loads() { ++ use faunosteo_core::domain::sheet::validate::{SheetIssueSeverity, validate_sheet_document}; ++ let mut document = json_file(&format!("{DRAFT}/document.json")); ++ document["annotations"][0]["finding_zone_id"] = Value::Null; ++ let typed = from(document.clone()); ++ let issues = validate_sheet_document(&typed); ++ assert!(!issues.is_empty()); ++ assert!( ++ issues ++ .iter() ++ .all(|i| i.severity == SheetIssueSeverity::Warning), ++ "{issues:?}" ++ ); ++ let value = document_fingerprint(&typed).unwrap(); ++ let mut reference = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ reference["document_sha256"] = json!(value); ++ reference["fingerprint"]["aliases"] = json!([]); ++ let base = draft_sheet(); ++ let assets: serde_json::Map = base ++ .assets ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let hashes: serde_json::Map = base ++ .asset_hashes ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let sheet = loaded( ++ reference, ++ document, ++ json_file(&format!("{DRAFT}/report-migration-map.json")), ++ Value::Object(assets), ++ Value::Object(hashes), ++ ); ++ assert!(sheet.is_fingerprint_verified()); ++ // Another content: an old report on it is no alias, it rebases. ++ assert!( ++ import_archive(&sheet, &old_envelope().to_string()) ++ .unwrap() ++ .rebase ++ .rebased ++ ); ++} +diff --git a/crates/core/tests/sheet_fingerprint.rs b/crates/core/tests/sheet_fingerprint.rs +index 79a9e09..3707e95 100644 +--- a/crates/core/tests/sheet_fingerprint.rs ++++ b/crates/core/tests/sheet_fingerprint.rs +@@ -126,17 +126,16 @@ fn the_registry_holds_one_pair_bound_to_the_equine_sheet() { + equivalence(SHEET, CANONICAL, CANONICAL), + Equivalence::Identical + ); +- assert_eq!( +- equivalence(SHEET, CANONICAL, ALIAS), +- Equivalence::TrustedAlias +- ); ++ // One direction only: an old stamp against the canonical value (R5.6 rehearsal), never a ++ // canonical stamp against a sheet that declares the old value. + assert_eq!( + equivalence(SHEET, ALIAS, CANONICAL), + Equivalence::TrustedAlias + ); ++ assert_eq!(equivalence(SHEET, CANONICAL, ALIAS), Equivalence::Different); + let other_sheet = "00000000-0000-0000-0000-000000000000"; + assert_eq!( +- equivalence(other_sheet, CANONICAL, ALIAS), ++ equivalence(other_sheet, ALIAS, CANONICAL), + Equivalence::Different + ); + let other_content = "a".repeat(64); +@@ -239,7 +238,7 @@ fn historical_archives_open_as_the_same_document_only_through_the_registered_pai + stamps(&value, &mut found); + } + } +- assert!(pdfs > 50, "{pdfs} attachments read"); ++ assert_eq!(pdfs, 147, "attachments read"); + let mut same = 0; + for (sheet, sha) in &found { + let verdict = equivalence(sheet, sha, CANONICAL); +@@ -252,7 +251,7 @@ fn historical_archives_open_as_the_same_document_only_through_the_registered_pai + "census: {pdfs} PDF attachments, {} stamps, {same} alias", + found.len() + ); +- assert!(same > 30, "{same} of {}", found.len()); ++ assert_eq!((found.len(), same), (124, 123), "stamps, aliases"); + } + + #[test] +@@ -268,3 +267,27 @@ fn v1_never_carries_the_historical_value_or_a_malformed_one() { + ); + } + } ++ ++fn nested(depth: usize) -> Value { ++ let mut value = Value::from(1); ++ for _ in 0..depth { ++ value = Value::Array(vec![value]); ++ } ++ value ++} ++ ++#[test] ++fn nesting_is_bounded_with_a_controlled_error() { ++ use faunosteo_core::domain::sheet::fingerprint::{CanonicalError, MAX_CANONICAL_DEPTH}; ++ assert_eq!(MAX_CANONICAL_DEPTH, 128); ++ assert!(canonical_json(&nested(MAX_CANONICAL_DEPTH)).is_ok()); ++ assert_eq!( ++ canonical_json(&nested(MAX_CANONICAL_DEPTH + 1)), ++ Err(CanonicalError::TooDeep) ++ ); ++ let mut object = Value::from(1); ++ for _ in 0..=MAX_CANONICAL_DEPTH { ++ object = serde_json::json!({ "k": object }); ++ } ++ assert_eq!(canonical_json(&object), Err(CanonicalError::TooDeep)); ++} +diff --git a/package.json b/package.json +index 6907a5a..02b42a7 100644 +--- a/package.json ++++ b/package.json +@@ -25,7 +25,8 @@ + "check": "pnpm typecheck && pnpm test:run && pnpm lint && pnpm build", + "check:all": "bash scripts/check-all.sh", + "report:compare": "bash scripts/report-compare.sh", +- "import:equine": "pnpm --filter @faunosteo/anatomy import:equine", ++ "import:equine": "bash scripts/import-equine.sh", ++ "import:equine:legacy": "pnpm --filter @faunosteo/anatomy import:equine", + "r5:import-equine": "bash scripts/import-equine.sh", + "supabase": "bash scripts/supabase.sh", + "db:start": "bash scripts/supabase.sh start", +diff --git a/packages/anatomy/tests/r5.pipeline-oracles.test.ts b/packages/anatomy/tests/r5.pipeline-oracles.test.ts +index 20e3d08..55d44ac 100644 +--- a/packages/anatomy/tests/r5.pipeline-oracles.test.ts ++++ b/packages/anatomy/tests/r5.pipeline-oracles.test.ts +@@ -350,8 +350,16 @@ describe('R5.1 oracles (crates/core/tests/oracles/r5)', () => { + const oracle = JSON.parse(frozen('pipeline.json')) as { + artifacts: Array<{ folder: string; file: string; sha256: string }> + } ++ // Since R5.6 the two fingerprinted draft files are Rust's (`v1`); the ledger recorded the ++ // TypeScript's, frozen under `crates/core/tests/fixtures/r5-6/pre-switch` (the Rust suite ++ // `curation_draft` proves the committed ones are those under the declared rule). ++ const preSwitch = new Set(['sheet-ref.json', 'report-migration-map.json']) + for (const row of oracle.artifacts) { +- const committed = readFileSync(resolve(REPO, row.folder, row.file)) ++ const folder = ++ row.folder.endsWith('/draft') && preSwitch.has(row.file) ++ ? 'crates/core/tests/fixtures/r5-6/pre-switch' ++ : row.folder ++ const committed = readFileSync(resolve(REPO, folder, row.file)) + expect(sha256Hex(committed), `${row.folder}/${row.file}`).toBe(row.sha256) + } + }) +diff --git a/packages/anatomy/tests/seed.golden.test.ts b/packages/anatomy/tests/seed.golden.test.ts +index 5af7cb3..f49eb78 100644 +--- a/packages/anatomy/tests/seed.golden.test.ts ++++ b/packages/anatomy/tests/seed.golden.test.ts +@@ -62,10 +62,21 @@ describe('committed legacy-import folder (golden)', () => { + }) + }) + ++/** ++ * Since R5.6 the Rust pipeline writes the seed (`pnpm import:equine`) under the fingerprint ++ * convention `sha256-rfc8785-validated-v1`; this TypeScript generator (`import:equine:legacy`) ++ * keeps the historical one. Its two fingerprint-bearing files are compared with the pre-switch ++ * files it wrote (frozen under `crates/core/tests/fixtures/r5-6/pre-switch`, proven against the ++ * R5.1 ledger by the Rust suite `curation_draft`); every other file with the committed seed. ++ */ ++const PRE_SWITCH = join(REPO_ROOT, 'crates/core/tests/fixtures/r5-6/pre-switch') ++const FINGERPRINTED = new Set(['sheet-ref.json', 'report-migration-map.json']) ++ + describe('committed draft folder (golden)', () => { +- it('equals a fresh run for every produced file (rerun pnpm import:equine)', async () => { ++ it('equals a fresh run for every produced file (the two fingerprinted ones before R5.6)', async () => { + for (const [file, content] of Object.entries(draftFiles)) { +- expect(await readFile(join(draftDir, file), 'utf8'), file).toBe(content) ++ const dir = FINGERPRINTED.has(file) ? PRE_SWITCH : draftDir ++ expect(await readFile(join(dir, file), 'utf8'), file).toBe(content) + } + }) + +diff --git a/packages/core-wasm/tests/r5-6.n-1.test.ts b/packages/core-wasm/tests/r5-6.n-1.test.ts +new file mode 100644 +index 0000000..953fc1d +--- /dev/null ++++ b/packages/core-wasm/tests/r5-6.n-1.test.ts +@@ -0,0 +1,121 @@ ++/** ++ * R5.6 M1 (owner 2026-10-25) through the module and the frozen N-1 readers: an old PDF stamped ++ * with the registered historical value, re-exported on the switched sheet, gets its snapshot ++ * from the core (`archive.snapshot` on the sheet handle: the loaded sheet verified its `v1` ++ * value, recomputed now), carrying the report's own stamp; the N-1 scanner and Zod readers of ++ * the R3 build and 0.2.0 keep that snapshot and its content. On an unverified v0 sheet the ++ * core's snapshot carries the sheet's value and the export refuses the old report. The native ++ * side is `crates/core/tests/r5_6_switch.rs`. ++ */ ++import { readFileSync } from 'node:fs' ++import { join } from 'node:path' ++import { fileURLToPath } from 'node:url' ++ ++import { CoreRuntime } from '../src/index' ++import { loadProofModule, nodeCoreSource } from '../src/node' ++import { readArchiveDocument, ReportArchiveEnvelopeSchema } from './n-1' ++import { ReportMigrationMapSchema } from './n-1/domain' ++import { readAttachedDocument } from './n-1/scanner/attachment/read' ++ ++const ROOT = fileURLToPath(new URL('../../../', import.meta.url)) ++const SEED = join(ROOT, 'supabase/seed/anatomical-sheets/equine/draft') ++const ALIAS = '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++const CANONICAL = '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++const json = (path: string): unknown => JSON.parse(readFileSync(path, 'utf8')) ++ ++interface Envelope { ++ report: { sheet: { documentSha256: string } } ++ sheetSnapshot: { ref: { documentSha256: string }; document: unknown; assets: unknown } ++ branding: unknown ++ labels: unknown ++ locale: string ++} ++ ++/** The bundle as `apps/app/vite/sheet-bundle.ts` builds it, with `ref` replaceable. */ ++function bundle(ref: unknown): string { ++ const manifest = json(join(SEED, 'assets.json')) as Array<{ ++ file: string ++ sha256: string ++ svg_asset_id: string ++ }> ++ const assets: Record = {} ++ const assetHashes: Record = {} ++ for (const asset of manifest) { ++ assets[asset.svg_asset_id] = readFileSync(join(SEED, 'assets', asset.file), 'utf8') ++ assetHashes[asset.svg_asset_id] = asset.sha256 ++ } ++ return JSON.stringify({ ++ status: 'draft', ++ ref, ++ document: json(join(SEED, 'document.json')), ++ migrationMap: json(join(SEED, 'report-migration-map.json')), ++ assets, ++ assetHashes, ++ }) ++} ++ ++async function coreSnapshot(ref: unknown, report: unknown): Promise { ++ const runtime = new CoreRuntime(nodeCoreSource('pkg')) ++ expect(await runtime.ready()).toBe(true) ++ const outcome = runtime ++ .sheet(bundle(ref)) ++ .call('archive.snapshot', JSON.stringify({ report })) ++ expect(outcome.ok).toBe(true) ++ return (outcome as { ok: true; value: Envelope['sheetSnapshot'] }).value ++} ++ ++function exportInput(old: Envelope, snapshot: unknown): string { ++ return JSON.stringify({ ++ report: old.report, ++ sheetSnapshot: snapshot, ++ branding: old.branding, ++ labels: old.labels, ++ locale: old.locale, ++ exportedAt: '2026-10-25T12:00:00.000Z', ++ }) ++} ++ ++async function oldEnvelope(): Promise { ++ const pdf = new Uint8Array( ++ readFileSync(join(ROOT, 'apps/app/tests/fixtures/pdf/r3/demo.fr.nologos.pdf')), ++ ) ++ return (await readAttachedDocument(pdf)) as Envelope ++} ++ ++describe('R5.6 re-export of an old archive, read by the N-1 readers', () => { ++ it('writes one stamp and the frozen readers keep the snapshot and its content', async () => { ++ const proofs = await loadProofModule() ++ const old = await oldEnvelope() ++ expect(old.report.sheet.documentSha256).toBe(ALIAS) ++ const ref = json(join(SEED, 'sheet-ref.json')) as { document_sha256: string } ++ expect(ref.document_sha256).toBe(CANONICAL) ++ const snapshot = await coreSnapshot(ref, old.report) ++ expect(snapshot.ref.documentSha256).toBe(ALIAS) ++ const written = (await readAttachedDocument( ++ proofs.export_pdf_for_test(exportInput(old, snapshot), JSON.stringify({ views: [] })), ++ )) as Envelope ++ expect(written.report.sheet.documentSha256).toBe(ALIAS) ++ expect(written.sheetSnapshot.ref.documentSha256).toBe(ALIAS) ++ expect(ReportArchiveEnvelopeSchema.safeParse(written).success).toBe(true) ++ const map = ReportMigrationMapSchema.parse(json(join(SEED, 'report-migration-map.json'))) ++ const outcome = readArchiveDocument(written, map) ++ expect(outcome.snapshotRejected).toBeUndefined() ++ expect(outcome.archive).toBeDefined() ++ expect(written.sheetSnapshot.document).toEqual(old.sheetSnapshot.document) ++ expect(written.sheetSnapshot.assets).toEqual(old.sheetSnapshot.assets) ++ expect(written.labels).toEqual(old.labels) ++ expect(written.branding).toEqual(old.branding) ++ }, 60_000) ++ ++ it('refuses the old report on an unverified v0 sheet carrying the canonical value', async () => { ++ const proofs = await loadProofModule() ++ const old = await oldEnvelope() ++ const v0 = json(join(SEED, 'sheet-ref.json')) as Record ++ delete v0.fingerprint ++ const snapshot = await coreSnapshot(v0, old.report) ++ expect(snapshot.ref.documentSha256).toBe(CANONICAL) ++ expect(() => ++ proofs.export_pdf_for_test(exportInput(old, snapshot), JSON.stringify({ views: [] })), ++ ).toThrow(/sheet_mismatch/) ++ }, 60_000) ++}) +diff --git a/packages/domain/tests/r2-oracles.test.ts b/packages/domain/tests/r2-oracles.test.ts +index e0593ef..2fcb5e5 100644 +--- a/packages/domain/tests/r2-oracles.test.ts ++++ b/packages/domain/tests/r2-oracles.test.ts +@@ -22,25 +22,89 @@ const MAKE = process.env.MAKE_R2_ORACLES === '1' + const SEED = 'supabase/seed/anatomical-sheets/equine' + + const CASES: Array<[string, string, z.ZodTypeAny]> = [ +- ['sheet.draft.json', `${SEED}/draft/document.json`, AnatomicalSheetDocumentSchema], +- ['sheet.legacy-import.json', `${SEED}/legacy-import/document.json`, AnatomicalSheetDocumentSchema], +- ['migration-map.draft.json', `${SEED}/draft/report-migration-map.json`, ReportMigrationMapSchema], +- ['report-v3.demo.json', 'apps/app/tests/fixtures/report-v3.demo.json', ReportSchema], +- ['report-v2.full.json', 'apps/app/tests/fixtures/report-v2.full.json', ReportV2Schema], +- ['report-v2.minimal.json', 'apps/app/tests/fixtures/report-v2.minimal.json', ReportV2Schema], ++ [ ++ 'sheet.draft.json', ++ `${SEED}/draft/document.json`, ++ AnatomicalSheetDocumentSchema, ++ ], ++ [ ++ 'sheet.legacy-import.json', ++ `${SEED}/legacy-import/document.json`, ++ AnatomicalSheetDocumentSchema, ++ ], ++ [ ++ 'migration-map.draft.json', ++ `${SEED}/draft/report-migration-map.json`, ++ ReportMigrationMapSchema, ++ ], ++ [ ++ 'report-v3.demo.json', ++ 'apps/app/tests/fixtures/report-v3.demo.json', ++ ReportSchema, ++ ], ++ [ ++ 'report-v2.full.json', ++ 'apps/app/tests/fixtures/report-v2.full.json', ++ ReportV2Schema, ++ ], ++ [ ++ 'report-v2.minimal.json', ++ 'apps/app/tests/fixtures/report-v2.minimal.json', ++ ReportV2Schema, ++ ], + ] + ++/** ++ * Since R5.6 the committed migration map carries the `v1` fingerprint; the oracle was frozen on ++ * the pre-switch file, read here in that original context (`tests/fixtures/r5-6/pre-switch`, ++ * proven the same TypeScript output by the Rust suite `curation_draft`). ++ */ ++const PRE_SWITCH: Record = { ++ [`${SEED}/draft/report-migration-map.json`]: ++ 'crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json', ++} ++const ALIAS = '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++const CANONICAL = ++ '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++ + describe('Zod output oracles of the R2 switch', () => { + it.each(CASES)('%s', (name, source, schema) => { +- const input: unknown = JSON.parse(readFileSync(resolve(ROOT, source), 'utf8')) ++ const read = PRE_SWITCH[source] ?? source ++ const input: unknown = JSON.parse(readFileSync(resolve(ROOT, read), 'utf8')) + const text = JSON.stringify(schema.parse(input), null, 2) + const file = resolve(OUT, name) + if (MAKE) { + mkdirSync(OUT, { recursive: true }) +- writeFileSync(file, `${JSON.stringify({ source, output: JSON.parse(text) })}\n`) ++ writeFileSync( ++ file, ++ `${JSON.stringify({ source, output: JSON.parse(text) })}\n`, ++ ) ++ } ++ const oracle = JSON.parse(readFileSync(file, 'utf8')) as { ++ source: string ++ output: unknown + } +- const oracle = JSON.parse(readFileSync(file, 'utf8')) as { source: string; output: unknown } + expect(oracle.source).toBe(source) + expect(JSON.stringify(oracle.output, null, 2)).toBe(text) + }) + }) ++ ++describe('the committed migration map after R5.6', () => { ++ it('is the oracle with only the fingerprint moved to the canonical value', () => { ++ const source = `${SEED}/draft/report-migration-map.json` ++ const committed = ReportMigrationMapSchema.parse( ++ JSON.parse(readFileSync(resolve(ROOT, source), 'utf8')), ++ ) ++ const oracle = JSON.parse( ++ readFileSync(resolve(OUT, 'migration-map.draft.json'), 'utf8'), ++ ) as { output: { sheet: { documentSha256: string } } } ++ expect(oracle.output.sheet.documentSha256).toBe(ALIAS) ++ const expected = { ++ ...oracle.output, ++ sheet: { ...oracle.output.sheet, documentSha256: CANONICAL }, ++ } ++ expect(JSON.stringify(committed, null, 2)).toBe( ++ JSON.stringify(expected, null, 2), ++ ) ++ }) ++}) +diff --git a/scripts/import-equine.sh b/scripts/import-equine.sh +index 011f78d..861b227 100755 +--- a/scripts/import-equine.sh ++++ b/scripts/import-equine.sh +@@ -1,12 +1,12 @@ + #!/usr/bin/env bash +-# `pnpm r5:import-equine --check | --out `: the anatomical pipeline on the core (R5.2 to +-# R5.4), the `import-equine` binary of crates/core behind its `curation` feature, on the native ++# `pnpm import:equine --check | --out ` (alias `pnpm r5:import-equine`): the official ++# writer of the seed since R5.6, the anatomical pipeline on the core (R5.2 to R5.6), the `import-equine` binary of crates/core behind its `curation` feature, on the native + # toolchain of the development machine (scripts/rust-env.sh). The first run compiles it + # (release profile); the next ones start at once. `--check` compares the produced folders with + # the committed seed and writes nothing; `--out ` writes `/legacy-import` and + # `/draft` into an absent or empty folder (a relative path is typed from the folder pnpm +-# was run in, INIT_CWD). The TypeScript `pnpm import:equine` stays the writer of the seed until +-# the R5 switch. ++# was run in, INIT_CWD). The TypeScript generator stays reachable as `pnpm import:equine:legacy` ++# (pre-switch fingerprint convention) until R5.7. + set -euo pipefail + + cd "$(dirname "$0")/.." +diff --git a/scripts/rust-check.sh b/scripts/rust-check.sh +index d5f8207..568c1bc 100755 +--- a/scripts/rust-check.sh ++++ b/scripts/rust-check.sh +@@ -33,10 +33,10 @@ cargo test -p faunosteo-core --features curation --locked + # against a loopback stub of the local stack (`upload_tool`); never built into the module. + cargo clippy -p faunosteo-core --all-targets --features upload --locked -- -D warnings + cargo test -p faunosteo-core --features upload --locked +-# The sheet fingerprint (R5.6, prepared, not active): RFC 8785, the V8 and Node oracles, the +-# registry, and the census of the fixture archives (their attachments need the PDF reader). +-cargo clippy -p faunosteo-core --all-targets --features fingerprint,pdf-read --locked -- -D warnings +-cargo test -p faunosteo-core --features fingerprint,pdf-read --locked --test sheet_fingerprint ++# The sheet fingerprint (R5.6): RFC 8785, the V8 and Node oracles, the registry, and the census ++# of the fixture archives (their attachments need the PDF reader). ++cargo clippy -p faunosteo-core --all-targets --features pdf-read --locked -- -D warnings ++cargo test -p faunosteo-core --features pdf-read --locked --test sheet_fingerprint + # Exports the TypeScript types of the contracts (ts-rs) into packages/core-wasm/types. + # `git status --porcelain --untracked-files=all -- packages/core-wasm/types` must stay + # empty afterwards (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types +diff --git a/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json b/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json +index c199d71..e90de50 100644 +--- a/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json ++++ b/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json +@@ -3,7 +3,7 @@ + "sheet": { + "sheetId": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "versionId": null, +- "documentSha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ "documentSha256": "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2" + }, + "main_view_id": "main", + "views": { +diff --git a/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json b/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json +index 5633394..b79c201 100644 +--- a/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json ++++ b/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json +@@ -1,7 +1,13 @@ + { + "sheet_id": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "version_id": null, +- "document_sha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", ++ "document_sha256": "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2", + "schema_version": 2, +- "species_id": "equine" ++ "species_id": "equine", ++ "fingerprint": { ++ "convention": "sha256-rfc8785-validated-v1", ++ "aliases": [ ++ "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ ] ++ } + } diff --git a/.prettierignore b/.prettierignore index a9140e4f..aaeef54a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,3 +7,6 @@ packages/core-wasm/types/ packages/core-wasm/pkg/ packages/core-wasm/pkg-proofs/ packages/core-wasm/tests/n-1/ +# Written by the Rust pipeline (`pnpm r5:import-equine`, R5.6): byte-exact, never reformatted. +supabase/seed/anatomical-sheets/equine/legacy-import/ +supabase/seed/anatomical-sheets/equine/draft/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8796fabc..c023545f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,37 @@ Versions follow [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Removed (2026-10-25, Rust R5.7: the TypeScript pipeline and domain packages) + +- `packages/anatomy` (legacy importer, curation pipeline, TypeScript renderer, `import-equine` CLI) and `packages/domain` (Zod schemas and rules) are deleted, with the TypeScript upload script `packages/supabase/scripts/upload-sheet-assets.ts` and the scripts `pnpm import:equine:legacy` and `assets:upload:legacy`. The Rust core does all of it: `pnpm import:equine` and `pnpm assets:upload` are unchanged for the user. `@xmldom/xmldom` leaves the lockfile; `tsx` is no longer a dependency of any package (pnpm keeps it only as an optional peer of vite); root Prettier stays (`pnpm format`, `db:types`). +- Every one of the 407 TypeScript test cases is dispositioned in `crates/core/tests/curation/LEDGER.tsv` (ported, replaced by a frozen oracle, or deleted with its reason, none uncovered) and every deleted file in `crates/core/tests/curation/FILES.tsv`; the contracts the TypeScript alone still checked are ported to Rust (the 612 legacy leaves and 26 legacy annotations, region inference, the R5.1 artifact ledger, the generated folders' file list, the migration-map oracle entry by entry, review overlay removals, the halo filter, reserved and dollar-tag refusals). The `report-v2.*.json` fixtures moved to `crates/core/tests/fixtures/` with their bytes unchanged. No oracle, golden, digest or seed byte changed. The historical TypeScript pipeline stays replayable from commit 59521dc (official writer) or 756b7ef (last revision holding it) in a detached worktree (`docs/development/RUST.md` §11.23). + +### Changed (2026-10-25, Rust R5.6: the sheet fingerprint convention `sha256-rfc8785-validated-v1`) + +- The equine sheet's fingerprint is now the SHA-256 of the RFC 8785 canonical form of the validated document: `12d78872…74e2` in `draft/sheet-ref.json` (with a `fingerprint` block naming the convention) and in `draft/report-migration-map.json`, the only two seed files changed; `document.json`, the drawing and the SQL seed are byte-identical. The previous value `27c7383c…2660` stays recognised for this sheet only, through the core's compiled registry and a fingerprint recomputed from the loaded document: old reports and PDFs open with no message and no rebase, and a re-export keeps their stamp so older readers keep the archive. A report written after the switch, opened by a build from before it, is rebased with nothing lost. `pnpm import:equine` runs the Rust pipeline; the TypeScript generator stays as `pnpm import:equine:legacy` until R5.7 (`docs/development/RUST.md` §11.22). + +### Changed (2026-10-23, Rust R5.5: the sheet-asset upload tool in Rust) + +- `pnpm assets:upload [--check] ` runs the Rust binary `upload-sheet-assets` (`crates/core`, feature `upload`, `ureq`) in place of the TypeScript script (kept as `assets:upload:legacy` until R5.7). Local stack only: no default destination, `http` with an explicit port on loopback or the configured DEV address, a private-bucket handshake before any transfer; every file checked against `assets.json` and the SVG reader before the first request; an existing object is hashed and never overwritten, a missing or foreign asset row stops the run, a row is confirmed only after its object is read back; bounded retries, resumable; the service key is never printed. Runbook `docs/development/SUPABASE.md` §3.1, `pnpm e2e:sheet-assets` for the local stack, `docs/development/RUST.md` §11.16. +- `changes.json` and `references.json` are refused above 4 MiB with an explicit message (core and binary). The serde tolerance of the R2 contracts is characterised (test `characterisation_serde_tolerance`), not changed. + +### Changed (2026-10-23, Rust R5.4: the review files in Rust) + +- The review drawings (`review/annotations-*.svg`, `review/app-*.svg`), `CHANGELOG.md` and `REVIEW-REPORT.md` of the draft are produced by the Rust pipeline: the two reports and three drawings byte for byte with the committed files; `review/app-main.svg` carries the head trigger's English name ("Head (left lateral view)"), the name the editor canvas shows since R3, where the committed file repeats the French one. `pnpm r5:import-equine --check` now compares the whole draft (12 files) and fails on any file missing or different without a declared rule; `--out` writes the 18 files. The seed, `horse.svg`, `pnpm import:equine` and `documentSha256` are unchanged (`docs/development/RUST.md` §11.14). + +### Changed (2026-10-22, Rust R5.3: the curated draft in Rust) + +- The draft side of the anatomical pipeline runs in Rust behind the core's `curation` feature (`crates/core/src/curation/draft`): the authored changeset and references files parsed strictly, the six ops of a change applied on the plain JSON document with their records, the review rule of levels B and C, the shape and integrity gate of the R2 core, the report migration map, the document statistics and the seed SQL. `pnpm r5:import-equine --check` reproduces `legacy-import/` and the R5.3 files of `draft/` (`document.json`, `assets.json`, `sheet-ref.json`, `report-migration-map.json`, `equine_draft.sql`, the frozen `assets/horse.svg`) byte for byte, 12 files, 0 differences; `pnpm r5:import-equine --out ` writes both folders into an empty folder and never deletes anything. The review drawings, `CHANGELOG.md` and `REVIEW-REPORT.md` of the draft stay with the TypeScript until R5.4; `pnpm import:equine` and the seed are unchanged; `documentSha256` stays `27c7383c…2660` until R5.6 (`docs/development/RUST.md` §11.12). + +### Changed (2026-10-22, Rust R5.1b and R5.2) + +- The core prints an exact decimal tie as JavaScript does (`840.1692504882812`, round half to even), its digits now from `zmij`, the formatter serde_json already used; no historical output carried such a value, so no oracle, golden or PDF digest changed (`docs/development/RUST.md` §11.9). +- The legacy importer runs in Rust behind the core's `curation` feature: `import-equine --check` reproduces the committed `legacy-import/` folder byte for byte, and `--out ` writes it into an empty folder. The TypeScript pipeline, `pnpm import:equine` and the seed are unchanged; `documentSha256` stays as it is until R5.6 (§11.10). + +### Changed (2026-10-22, Rust R5.1: the TypeScript pipeline frozen, not yet ported) + +- `packages/anatomy` and `packages/domain` are unchanged; their outputs are recorded as oracles under `crates/core/tests/oracles/r5/` (intermediate values, ids and slugs, the fingerprint of every generated JSON file under today's rule and the candidate rules of D-R5), generated by `packages/anatomy/tests/r5.pipeline-oracles.test.ts` with `MAKE_R5_ORACLES=1`. Study scripts `scripts/r5-fingerprints.mjs` and `packages/supabase/scripts/r5-jsonb-fingerprint.mjs` (read-only). `documentSha256` and the generated seed are untouched; the D-R5 decision is the owner's (`docs/development/RUST.md` §11). Known defect recorded, not fixed: the core's JavaScript number printing rounds an exact decimal tie upward where JavaScript rounds to even (no value of the curated draft is affected). + ### Fixed (2026-10-21, R4 close) - Sign-in redirects: a `next` value whose dot segments normalise into `//host` (`/..//host`, `/%2e%2e//host`) now falls back to the dashboard instead of being returned as a protocol-relative path. The worker image runs on `distroless/static-debian13:nonroot` (the Debian 12 tags are no longer updated). DEPLOY.md shows `http2 on;` for nginx 1.25.1 and later and keeps the `listen ... http2` form for nginx 1.24 (`docs/development/RUST.md` §10.14). diff --git a/CLAUDE.md b/CLAUDE.md index 79f47ff8..3900c68e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,8 +15,8 @@ writes conclusion, and exports an A4 PDF. PDF carries the full JSON state as a n attachment so importing it restores the session for a follow-up. SPA deployed via Docker + nginx on Scaleway VPS. Backend foundation on Supabase (PostgreSQL + Auth + RLS) since Step 3 of the SaaS plan: profiles, platform roles and -audit log exist; Step 4 added the canonical anatomical sheet model (`packages/domain`, -tables `species`, `anatomical_sheets` / `_versions` / `_assets`). Step 5 moved the +audit log exist; Step 4 added the canonical anatomical sheet model (since R2 in +`crates/core/src/domain/sheet`; the TypeScript `packages/domain` left at R5.7), tables `species`, `anatomical_sheets` / `_versions` / `_assets`). Step 5 moved the application onto that model: the editor renders the bundled reference sheet (the curated equine DRAFT, `SHEET_BUNDLE=draft`), writes Report v3 and imports v2 PDFs through a generated migration map. Step 6 made the PDF an autonomous archive: the @@ -40,8 +40,11 @@ Rust R2 moved the application's domain rules into `crates/core` (sheet, report a archive contracts, integrity rules, sheet index, migration, rebase, snapshot, layered archive reading, editor reducers, findings and vertebra rules, report operations), reached through the wasm facade and `packages/core-wasm`, loaded lazily by the sheet -pages only (`docs/development/RUST.md` §8); `packages/domain` is frozen for the PDF -engine, the pipeline and the compare CLI. +pages only (`docs/development/RUST.md` §8). R5 moved the anatomical pipeline (legacy +importer, curation, migration map, review files, seed SQL, upload tool) into the core +(feature `curation`); R5.6 switched the sheet fingerprint to `sha256-rfc8785-validated-v1`; +R5.7 deleted `packages/anatomy` and `packages/domain` (`RUST.md` §11.23, test ledger +`crates/core/tests/curation/LEDGER.tsv`). MVP species: equine only. Open-source MIT. --- @@ -74,8 +77,8 @@ MVP species: equine only. Open-source MIT. ## Build commands -pnpm workspace: `apps/app` = the private application, `packages/domain` = pure -Zod domain model (anatomical sheet document), `packages/supabase` = Supabase +pnpm workspace: `apps/app` = the private application, `packages/core-wasm` = the +Rust core in the browser (runtime, generated types, frozen N-1 reader), `packages/supabase` = Supabase access layer (see `docs/development/WORKSPACE.md`). Every command below runs from the repository root and delegates to the packages. @@ -118,7 +121,10 @@ pnpm db:types:check # CI diff # Reference sheet in the app: the dev server bundles the curated draft; a build does not pnpm build:preview # SHEET_BUNDLE=draft build (manual validation, preview deployments) pnpm preview:draft # same, then serves it -pnpm import:equine # regenerate legacy-import/ and draft/ (document, migration map, review drawings) +pnpm import:equine --check | --out # since R5.6 the official seed writer: the Rust pipeline (same as `pnpm r5:import-equine`), fingerprint `sha256-rfc8785-validated-v1`; the TypeScript generator left at R5.7 (replayed from a historical revision only, RUST.md §11.23) +pnpm r5:import-equine --check | --out # the Rust pipeline (R5.2 importer, R5.3 draft, R5.4 review files): compare the 18 generated files with the committed folders (bytes; app drawings under the declared R3 rule), or write /{legacy-import,draft} into an empty folder; never deletes (scripts/import-equine.sh, first run compiles) +pnpm assets:upload [--check] # R5.5: uploads the sheet drawings of a generated seed folder to the LOCAL stack's private bucket (Rust `upload-sheet-assets`, feature `upload`; SUPABASE_URL local with a port, SUPABASE_SERVICE_ROLE_KEY typed, never printed; no overwrite, confirm after verify; run by hand, scripts/upload-sheet-assets.sh) +pnpm e2e:sheet-assets # scripts/sheet-assets-e2e.sh: that tool against the local stack (upload, rerun, anon and wrong key, refused destinations); run by hand pnpm report:compare ... # archive check: attachment vs its v3 reading, unresolved items flagged (docs/PDF-FORMAT.md); the core's `report-compare` binary since R4.7 (scripts/report-compare.sh, first run compiles) # Rust (docs/development/RUST.md) — native toolchain (user-level rustup, channel of rust-toolchain.toml) first @@ -169,7 +175,7 @@ pnpm test # vitest watch — dev loop Test files live in `apps/app/tests/unit/*.test.ts(x)`; golden fixtures in `apps/app/tests/fixtures/`. The 612 legacy catalog leaves run through the v2 → v3 migration -in both `packages/anatomy` (against the draft document) and the app (sheet index + PDF roundtrip). Setup: `apps/app/tests/setup.ts` imports +in the core (`crates/core/tests/curation_leaves.rs`, against the draft document) and the app (sheet index + PDF roundtrip). Setup: `apps/app/tests/setup.ts` imports @testing-library/jest-dom. Suites run on the bundled reference sheet (`tests/helpers/sheet.ts`); frozen v2 fixtures under `tests/fixtures/`. SQL: `supabase/tests/*.sql` (pgTAP) run by `packages/supabase/tests/db/pgtap.test.ts` on PGlite (part of `pnpm test:run`) and by `pnpm db:test` on the real stack. @@ -256,13 +262,7 @@ faunosteo/ ├─ eslint.config.js, index.html, package.json (@faunosteo/app) ├─ tsconfig*.json, vite.config.ts, vitest.config.ts │ (end of apps/app) -├─ packages/domain/ ← @faunosteo/domain (pure, no DOM, zod only): anatomical-sheet (document, integrity rules, sheet-index), report (v3, v2 migration, rebase), archive (sheet snapshot, envelope v1, branding, labels, layered reader) -│ ├─ src/anatomical-sheet/{schema,validate,create}.ts ← canonical sheet document + integrity rules -│ └─ tests/{fixtures/horse-slice.ts,*.test.ts} -├─ packages/anatomy/ ← @faunosteo/anatomy: legacy importer, curation pipeline, frozen TS annotation-layer renderer + view composer (`./render`: the pipeline until R5; no app and no PDF consumer since R4.8) -│ ├─ src/legacy/{svg,catalog,regions,ids,report,importer}.ts, src/cli/import-equine.ts -│ ├─ src/curation/{schema,targets,fields,ops,rename,apply,types,assets,labels,stats,changelog,review-report,overlay,seed,sources,pipeline}.ts ← changeset → draft -│ └─ tests/ ← counts preserved, special cases, determinism, curation ops, golden artifacts +│ (packages/domain and packages/anatomy deleted at R5.7: their sources resolve at 756b7ef, crates/core/tests/curation/{FILES,LEDGER}.tsv) ├─ packages/supabase/ ← @faunosteo/supabase │ ├─ src/{index,client,database.types,anatomical-sheets,assets}.ts ← typed client, generated types, publish gate, avatar flow (closed AssetFailure kinds) │ ├─ tests/e2e/avatar-flow.e2e.ts + vitest.e2e.config.ts ← real-stack end-to-end (`pnpm e2e:avatar`), skipped without the stack env @@ -279,10 +279,10 @@ faunosteo/ ├─ packages/README.md ← shared packages index ├─ packages/core-wasm/ ← @faunosteo/core-wasm: CoreRuntime (lazy, poison, recovery) + CoreExportSession (R4.6) + Node source, pkg/ shipped and pkg-proofs/ (built, git-ignored, BUILD_STAMP), ts-rs types (committed), frozen N-1 reader (tests/n-1), tests ├─ crates/ ← Rust workspace (Cargo.toml, rust-toolchain.toml, deny.toml, clippy.toml, .cargo/config.toml at the root) -│ ├─ core/ ← faunosteo-core: domain/{js,sheet,report,archive,editor,session} (contracts and rules), anatomy/{svg/{prescan,tree,sanitize,refs,number,serialize},layer,compose} (R3: the one SVG reader, the layer, canvas + highlight composition), pdf/{read,json_js,import,write,compare} (R4: reader, writer and session, the archive check tool behind feature `cli`), ops.rs + facade.rs (`call`, `call_with_sheet`), json (JS number printing), bin/report_compare.rs (`pnpm report:compare`, the one file allowed std::fs); tests/{oracles,conformance,fixtures,pdf/LEDGER.tsv} frozen from the TypeScript (oracles/r3, oracles/r4, fixtures/svg/hostile); no I/O, no clock (lint-enforced) +│ ├─ core/ ← faunosteo-core: domain/{js,sheet,report,archive,editor,session} (contracts and rules), anatomy/{svg/{prescan,tree,sanitize,refs,number,serialize},layer,compose} (R3: the one SVG reader, the layer, canvas + highlight composition), pdf/{read,json_js,import,write,compare} (R4: reader, writer and session, the archive check tool behind feature `cli`), ops.rs + facade.rs (`call`, `call_with_sheet`), json (JS number printing), curation/{text,ids,prettier_json,markdown,report_guard,legacy/*,draft/*} (R5, feature `curation`: Prettier layout, the legacy importer, the changeset applier, migration map, stats, seed SQL, CHANGELOG, REVIEW-REPORT, review drawings), curation/upload.rs (R5.5, feature `upload`: the upload rules, pure) + bin/report_compare.rs (`pnpm report:compare`) + bin/import_equine.rs (`pnpm r5:import-equine`) + bin/upload_sheet_assets/ (`pnpm assets:upload`, ureq; the three tools allowed std::fs); tests/{oracles,conformance,fixtures,pdf/LEDGER.tsv} frozen from the TypeScript (oracles/r3, oracles/r4, fixtures/svg/hostile); no I/O, no clock (lint-enforced) │ ├─ wasm/ ← faunosteo-wasm: wasm-bindgen facade (core_version, call, SheetHandle; trap exports in the proofs build only) │ └─ worker/ ← faunosteo-worker: plain main; `decode` sandboxed child (rlimits, seccomp allowlist, image → libwebp), parent Spawner + RIFF check; R1 `run` loop: config, log (JSON lines, allowlist), keys, backend trait + http (ureq, PostgREST rpc + Storage objects), job, sweep, watchdog; Dockerfile, scripts/derive-seccomp.sh -├─ scripts/{rust-env,rust-check,wasm-build,check-all,avatar-e2e,report-compare}.sh, wasm-stamp.mjs ← native Rust gate, wasm build (pkg + pkg-proofs + stamp), the pre-merge gate (`pnpm check:all`), the real-stack avatar e2e, the archive check tool (`pnpm report:compare`) +├─ scripts/{rust-env,rust-check,wasm-build,check-all,avatar-e2e,report-compare,import-equine,upload-sheet-assets,sheet-assets-e2e,floor-clarification-check}.sh, wasm-stamp.mjs ← native Rust gate, wasm build (pkg + pkg-proofs + stamp), the pre-merge gate (`pnpm check:all`), the real-stack avatar e2e, the archive check tool (`pnpm report:compare`), the Rust pipeline (`pnpm r5:import-equine`) ├─ scripts/{dev-env,supabase,dev}.sh ← the DEV origin (LAN address) in one place; CLI wrapper; `pnpm dev` on that origin ├─ docker-compose.yml ← `app` service; `worker` service under the `worker` profile (read-only, cap_drop ALL, external Supabase network, `.env.worker`) ├─ docker/rust-builder.Dockerfile, rust-run.sh, csp-proof/ ← reproducible Rust builder (alternative) + the CSP proofs (R0 module, R2 app image: app-image.sh) @@ -406,8 +406,8 @@ Database (Supabase) ### Annotation rendering - docs/ANNOTATION-RENDERING.md is the source of truth: the drawing carries no annotation element, the markers are - drawn from the document (Rust core for the canvas since R3, `crates/core/src/anatomy`; the frozen TS renderer - `@faunosteo/anatomy/render` for the pipeline until R5, same output), with the attributes listed there + drawn from the document (the Rust core, `crates/core/src/anatomy`, for the canvas since R3, the PDF since R4 and + the pipeline's review drawings since R5), with the attributes listed there - Every SVG the product draws goes through the core's one reader (`anatomy::svg::read_svg`): caps before any parse, allowlist, reference graph; a product drawing with anything removed is refused at load, never repaired - Never rely on element id, className or a label for click targeting or behaviour — always `data-anno-id` @@ -418,8 +418,8 @@ Database (Supabase) ### Schemas - The data contracts live in Rust since R2 (`crates/core/src/domain/{sheet,report,archive}`, Zod semantics reproduced: strict where Zod was strict, optional absent, nullable required, Zod schema field order); - `packages/domain` is frozen (no new logic) for the pipeline until R5 (the app no longer depends on it: R4.8), - and its Zod copy under `packages/core-wasm/tests/n-1` is the permanent N-1 reader. Never change a contract + `packages/domain` was deleted at R5.7; its byte-identical Zod copy under `packages/core-wasm/tests/n-1` is the + permanent N-1 reader. Never change a contract without bumping the version on a breaking change (additive optional fields keep it); a change touches the Rust struct, the regenerated ts-rs types and the N-1 test - Every report entering the store comes from the core (new report, draft restore, import, reducer outputs); @@ -491,16 +491,16 @@ Database (Supabase) - Avatar UI follows the validated mockup: photo in Mon compte (Informations personnelles), sidebar, drawer and top bar link to Mon compte; JPEG / PNG / WebP only, never SVG; no signed URL for the owner-only avatar (download under RLS). -### Anatomical sheet model (packages/domain + migration 20261008110000) +### Anatomical sheet model (crates/core/src/domain/sheet + migration 20261008110000) - `docs/development/ANATOMICAL_SHEET_MODEL.md` is the source of truth: document shape, issue codes, tables, RPCs. - Ids are stable slugs never derived from labels; labels are `{ fr, en }` objects. Annotation → findings is the explicit `finding_zone_id`; vertebral regions are ordered data with free codes. No label matching at runtime. - A published version is immutable (trigger, every role). Change = new draft (`create_sheet_draft`) then - `publish_sheet_version`. Integrity rule codes are shared by `validateSheetDocument` (TS) and + `publish_sheet_version`. Integrity rule codes are shared by `validate_sheet_document` (Rust core) and `private.sheet_document_issues` (SQL); add a rule on both sides and in the spec table. - Document schema change → bump `SHEET_DOCUMENT_SCHEMA_VERSION`, extend the SQL CHECK on `document_schema_version`. -- Official equine sheet = generated seed `draft/` (`pnpm import:equine`, never edit `legacy-import/` or `draft/` by hand; - the golden test fails on drift). Every content change goes through `curation/changes.json` (traced in CHANGELOG.md). +- Official equine sheet = generated seed `draft/` (`pnpm import:equine --out` into an empty folder, then reviewed and copied; never edit `legacy-import/` or `draft/` by hand; + `curation_draft` / `curation_review` fail on drift, `pnpm import:equine --check` lists it). Every content change goes through `curation/changes.json` (traced in CHANGELOG.md). It is a DRAFT until a platform admin publishes it after business review of `REVIEW-REPORT.md`. - Sheet SVG bytes live in Storage bucket `anatomical-sheet-assets` as `.svg`; uploads are an operator task (`pnpm assets:upload ` with the service key in env), never from the browser. @@ -526,7 +526,9 @@ Database (Supabase) Study and roadmap: `docs/development/RUST_ARCHITECTURE_REVIEW.md` (validated with the amendments of Annex C). Done: R0, R1 (worker), R2 (domain core used by the app, `docs/development/RUST.md` §8), R3 (anatomy core: SVG reader, layer, composition; editor canvas on it, -RUST.md §9; validated and merged 2026-10-17). Next: R4 (PDF core), R5 (pipeline); release 0.2.0 unaffected. +RUST.md §9; validated and merged 2026-10-17), R4 (PDF core, RUST.md §10; merged 2026-10-21). R5 (pipeline, +RUST.md §11: R5.1 to R5.7, the TypeScript packages deleted; merged 2026-10-25, not a production authorisation); +release 0.2.0 unaffected. - Any logic that can run in Rust with no significant loss (features, UX, graphics, data compatibility, security, reliability, useful performance, diff --git a/Cargo.lock b/Cargo.lock index 18fc0d35..436117b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -364,6 +364,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" name = "faunosteo-core" version = "0.1.0" dependencies = [ + "icu_normalizer", "lopdf", "miniz_oxide 0.9.1", "roxmltree", @@ -371,7 +372,9 @@ dependencies = [ "serde_json", "sha2", "ts-rs", + "ureq", "url", + "zmij", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8cb5a48d..2cd511f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,12 @@ libc = "0.2" # Supabase over HTTPS) and the hash of the clean output. No async runtime: the loop is sequential. ureq = { version = "3.4.2", default-features = false, features = ["rustls", "json"] } sha2 = "0.11" +# Shortest round-trip float digits with ECMAScript's tie rule (round half to even), the +# formatter serde_json already uses (R5.1b, F1): the version serde_json locks. +zmij = "1.0.23" +# NFD for the pipeline's slugs and region roots (R5.2): the normaliser `url` already locks +# through idna, its compiled data only. +icu_normalizer = { version = "2.3.0", default-features = false, features = ["compiled_data"] } # The library crates deny unwrap/expect so that no panic path depends on content; # the worker binary relaxes disallowed_methods (it owns I/O) in its own [lints]. diff --git a/Dockerfile b/Dockerfile index 9162afbf..ca0b224a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,6 @@ RUN corepack enable && corepack prepare pnpm@10.13.1 --activate # Workspace manifests first for layer caching (install depends only on these) COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ COPY apps/app/package.json apps/app/ -COPY packages/domain/package.json packages/domain/ -COPY packages/anatomy/package.json packages/anatomy/ COPY packages/supabase/package.json packages/supabase/ COPY packages/core-wasm/package.json packages/core-wasm/ diff --git a/README.md b/README.md index 8c401205..d9106969 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ full report JSON embedded as a native PDF attachment. Re-importing that PDF restores the state for a follow-up. Multi-species by design. The MVP ships the **horse** sheet: a canonical anatomical -sheet document (drawing + annotations + findings catalog, `packages/domain`) +sheet document (drawing + annotations + findings catalog, `crates/core/src/domain/sheet`) generated and curated under `supabase/seed/anatomical-sheets/equine/`. Another species is another sheet document, no code change. See `docs/development/ANATOMICAL_SHEET_MODEL.md` §6 for how a sheet is produced. @@ -93,7 +93,7 @@ docker compose up --build ```bash pnpm typecheck # TypeScript strict, no emit pnpm lint # ESLint 9 flat config, 0 warnings -pnpm test:run # vitest run (domain, anatomy, supabase/PGlite, app) +pnpm test:run # vitest run (core-wasm, supabase/PGlite, app) pnpm build # tsc + vite build → apps/app/dist/ pnpm report:compare ... # archive PDF vs its v3 reading, unresolved items flagged (the core's binary; first run compiles) pnpm rust:check # native: fmt, clippy -D warnings, cargo test, ts-rs export, cargo deny @@ -152,8 +152,8 @@ faunosteo/ pnpm workspace (see docs/development/WORKSPACE.md) ├─ src/lib/ id, dates, assert utilities ├─ src/styles/ Tailwind v4 CSS + design tokens ├─ tests/unit/ vitest tests on the bundled sheet (+ frozen v2 fixtures) -├─ packages/domain/ @faunosteo/domain: canonical sheet document + report document (v3, v2 migration) -├─ packages/anatomy/ @faunosteo/anatomy: legacy importer, curation pipeline, annotation-layer renderer + view composer +├─ packages/core-wasm/ @faunosteo/core-wasm: the Rust core in the browser (runtime, generated types, frozen N-1 reader) +├─ crates/ Rust: core (contracts, rules, SVG, PDF, anatomical pipeline), wasm facade, worker ├─ packages/supabase/ @faunosteo/supabase: typed client, generated types, PGlite SQL test harness ├─ supabase/ CLI config, SQL migrations, local seed (incl. the equine sheet), pgTAP tests ├─ docker/ entrypoint.sh + nginx.conf @@ -169,7 +169,7 @@ v0.1.0 MVP — implementation complete. - `pnpm typecheck` ✅ - `pnpm lint` ✅ -- `pnpm test:run` ✅ — 367 tests across the workspace (domain, anatomy, supabase, app) +- `pnpm test:run` ✅ — the vitest suites of the workspace (core-wasm, supabase, app); `pnpm rust:check` runs the Rust ones - `pnpm build` ✅ The first species ships as the equine anatomical sheet: the historical diff --git a/apps/app/eslint.config.js b/apps/app/eslint.config.js index 3f55f6f9..d85d44c3 100644 --- a/apps/app/eslint.config.js +++ b/apps/app/eslint.config.js @@ -55,8 +55,8 @@ export default tseslint.config( }, { // R2: the application's rules run in the Rust core; its contracts come from - // @faunosteo/core-wasm. The TypeScript domain is no longer a dependency of the - // application (R4.8); it stays frozen for the pipeline until R5 + // @faunosteo/core-wasm. The TypeScript domain left the application at R4.8 and + // the repository at R5.7 with the pipeline package and its xmldom // (RUST_ARCHITECTURE_REVIEW VI.4). The rule keeps the door closed. files: ['src/**/*.{ts,tsx}'], rules: { @@ -68,8 +68,16 @@ export default tseslint.config( name: '@faunosteo/domain', message: 'Use @faunosteo/core-wasm (types) and the core operations.', }, + { + name: '@faunosteo/anatomy', + message: 'The SVG layer and composition are the core operations.', + }, + { + name: '@xmldom/xmldom', + message: 'Every SVG goes through the core reader (anatomy::svg).', + }, ], - patterns: ['@faunosteo/domain/*'], + patterns: ['@faunosteo/domain/*', '@faunosteo/anatomy/*'], }, ], }, diff --git a/apps/app/tests/helpers/goldenReports.ts b/apps/app/tests/helpers/goldenReports.ts index ef46bce3..d66fb68b 100644 --- a/apps/app/tests/helpers/goldenReports.ts +++ b/apps/app/tests/helpers/goldenReports.ts @@ -43,15 +43,34 @@ function buildV2Unresolved(sheet: SheetIndex) { ).read } +/** + * The goldens were frozen before R5.6, when a v2 migration stamped the historical fingerprint + * (the pre-switch migration map). Since R5.6 the map stamps the canonical `v1` value and + * nothing else of the migrated report changes (Rust `pdf_import` + * `o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves`): the + * golden v2 reports are taken in that original context, as reports migrated before the switch + * and exported now. Their export keeps the stamp in the snapshot (M1), so the frozen bytes hold. + */ +export const HISTORICAL_FINGERPRINT = + '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' + +export function migratedBeforeR56(report: Report): Report { + return { + ...report, + sheet: { ...report.sheet, documentSha256: HISTORICAL_FINGERPRINT }, + } +} + export function buildGoldenReports(sheet: SheetIndex): GoldenReports { const v2unresolved = buildV2Unresolved(sheet) return { reports: { - v2full: importAttachment(readJson('report-v2.full.json'), sheet).read - .report, + v2full: migratedBeforeR56( + importAttachment(readJson('report-v2.full.json'), sheet).read.report, + ), demo: importAttachment(readJson('report-v3.demo.json'), sheet).read .report, - v2unresolved: v2unresolved.report, + v2unresolved: migratedBeforeR56(v2unresolved.report), }, unresolvedOfV2Unresolved: v2unresolved.unresolvedFindings, } diff --git a/apps/app/tests/unit/r4.census.test.ts b/apps/app/tests/unit/r4.census.test.ts index a3468ca5..52a9fde2 100644 --- a/apps/app/tests/unit/r4.census.test.ts +++ b/apps/app/tests/unit/r4.census.test.ts @@ -2,7 +2,8 @@ * R4.8 census (plan §B.7 R4.8, RUST.md §10.10): the PDF path runs on the core and nothing of * the TypeScript engine is left where the application or its glue could reach it. Grep facts * over the repository, so that a reintroduced import, a dependency added back or a script - * repointed fails here before anything else. + * repointed fails here before anything else. Since R5.7 xmldom, the TypeScript domain and the + * pipeline package are gone too (`r5.census.test.ts` holds the rest of that census). */ import { describe, it, expect } from 'vitest' import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs' @@ -43,6 +44,7 @@ describe('the TypeScript PDF engine is gone', () => { '@faunosteo/pdf', 'pdf-lib', '@faunosteo/domain', + '@faunosteo/anatomy', '@xmldom/xmldom', ] for (const file of [ @@ -70,6 +72,8 @@ describe('the TypeScript PDF engine is gone', () => { '@faunosteo/pdf', 'pdf-lib', '@faunosteo/domain', + '@faunosteo/anatomy', + '@xmldom/xmldom', 'tsx', ]) { expect(names, path).not.toContain(banned) @@ -77,16 +81,27 @@ describe('the TypeScript PDF engine is gone', () => { } }) - it('the lockfile holds no pdf-lib, @pdf-lib or resvg; xmldom only under packages/anatomy', () => { + it('the lockfile holds no pdf-lib, @pdf-lib, resvg or xmldom (R5.7: the pipeline left with its xmldom)', () => { const lock = read('pnpm-lock.yaml') for (const name of ['pdf-lib@', '@pdf-lib/', '@resvg/resvg-js']) { expect(lock, name).not.toContain(name) } - const importers = lock.split(/^ (?=[a-z@][^\n]*:$)/m) - const withXmldom = importers - .filter((block) => block.includes("'@xmldom/xmldom':")) - .map((block) => block.split(':')[0]!.trim()) - expect(withXmldom).toEqual(['packages/anatomy']) + const section = lock.slice( + lock.indexOf('\nimporters:\n'), + lock.indexOf('\npackages:\n'), + ) + const importers = section + .split(/\n(?= [^ \n][^\n]*:\n)/) + .slice(1) + .map((block) => block.slice(2, block.indexOf(':\n'))) + // Non-vacuity: the split finds the importers a dependency would sit under. + expect(importers).toEqual( + expect.arrayContaining(['.', 'apps/app', 'packages/core-wasm']), + ) + expect(importers).not.toContain('packages/anatomy') + expect(importers).not.toContain('packages/domain') + expect(lock).toContain("'@faunosteo/core-wasm':") + expect(lock).not.toContain('@xmldom/xmldom') }) }) diff --git a/apps/app/tests/unit/r5-6.switch.test.ts b/apps/app/tests/unit/r5-6.switch.test.ts new file mode 100644 index 00000000..00c80fc2 --- /dev/null +++ b/apps/app/tests/unit/r5-6.switch.test.ts @@ -0,0 +1,87 @@ +/** + * R5.6 in the application, on the switched bundled sheet (`sha256-rfc8785-validated-v1`): + * a v2 report migrated now carries the canonical value and exports one consistent envelope + * that the N-1 readers accept; an old report on the historical value opens with no rebase and + * re-exports with its own stamp in the snapshot (the goldens prove the bytes); no visible + * change. The historical goldens run in their original context (`helpers/goldenReports.ts`). + */ +import { readFileSync } from 'node:fs' +import { resolve } from 'node:path' +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' +import { + readArchiveDocument, + readAttachmentBytes, + ReportArchiveEnvelopeSchema, +} from '@faunosteo/core-wasm/n-1' +import { exportReportToPdf } from '@/pdf/export' +import type { SheetIndex } from '@/services/sheetIndex' +import { bundledMigrationMap, loadTestSheet } from '../helpers/sheet' +import { FIXTURES_DIR, ONE_PX_PNG } from '../helpers/goldens' +import { HISTORICAL_FINGERPRINT } from '../helpers/goldenReports' +import { importAttachment } from '../helpers/pdfImport' + +vi.mock('@/pdf/browserRasterizer', () => ({ + browserRasterizer: vi.fn(async () => ONE_PX_PNG), +})) +vi.mock('@/pdf/branding', async () => { + const { brandingOf } = await import('../helpers/goldens') + return { loadBranding: vi.fn(() => brandingOf('nologos')) } +}) + +const CANONICAL = + '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' +let sheet: SheetIndex + +beforeAll(async () => { + sheet = await loadTestSheet() + vi.spyOn(console, 'warn').mockImplementation(() => undefined) +}) +afterAll(() => vi.restoreAllMocks()) + +interface Stamped { + report: { sheet: { documentSha256: string } } + sheetSnapshot: { ref: { documentSha256: string } } +} + +async function exported( + report: Parameters[0], +): Promise { + const { pdf } = await exportReportToPdf(report, sheet, { locale: 'fr' }) + const bytes = new Uint8Array(await pdf.arrayBuffer()) + return JSON.parse( + new TextDecoder().decode(await readAttachmentBytes(bytes)), + ) as Stamped +} + +describe('R5.6 on the switched sheet', () => { + it('stamps a new or newly migrated report with the canonical value', async () => { + expect(sheet.sheet.ref.documentSha256).toBe(CANONICAL) + const v2 = JSON.parse( + readFileSync(resolve(FIXTURES_DIR, 'report-v2.full.json'), 'utf8'), + ) + const migrated = importAttachment(v2, sheet).read.report + expect(migrated.sheet.documentSha256).toBe(CANONICAL) + const envelope = await exported(migrated) + expect(envelope.report.sheet.documentSha256).toBe(CANONICAL) + expect(envelope.sheetSnapshot.ref.documentSha256).toBe(CANONICAL) + expect(ReportArchiveEnvelopeSchema.safeParse(envelope).success).toBe(true) + const outcome = readArchiveDocument(envelope, await bundledMigrationMap()) + expect(outcome.snapshotRejected).toBeUndefined() + }, 30_000) + + it('opens an old report with no rebase and re-exports it with one stamp', async () => { + const demo = JSON.parse( + readFileSync(resolve(FIXTURES_DIR, 'report-v3.demo.json'), 'utf8'), + ) + const imported = importAttachment(demo, sheet) + expect(imported.rebase.rebased).toBe(false) + expect(imported.rebase.report.sheet.documentSha256).toBe( + HISTORICAL_FINGERPRINT, + ) + const envelope = await exported(imported.rebase.report) + expect(envelope.report.sheet.documentSha256).toBe(HISTORICAL_FINGERPRINT) + expect(envelope.sheetSnapshot.ref.documentSha256).toBe( + HISTORICAL_FINGERPRINT, + ) + }, 30_000) +}) diff --git a/apps/app/tests/unit/r5.census.test.ts b/apps/app/tests/unit/r5.census.test.ts new file mode 100644 index 00000000..00a0a6e6 --- /dev/null +++ b/apps/app/tests/unit/r5.census.test.ts @@ -0,0 +1,346 @@ +/** + * R5.7 census (plan 2026-10-25, RUST.md §11.23): the anatomical pipeline and the + * sheet, report and archive rules run in the Rust core only; `packages/anatomy` + * and `packages/domain` are gone and nothing reaches them again. Grep facts over + * the repository, and the two disposition matrices of the deletion checked + * against the tree, so that a reintroduced package, dependency, import, script or + * a ledger target that no longer exists fails here. + */ +import { createHash } from 'node:crypto' +import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs' +import { dirname, join, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { describe, expect, it } from 'vitest' + +const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../../../..') +const read = (path: string) => readFileSync(join(ROOT, path), 'utf8') +const exists = (path: string) => existsSync(join(ROOT, path)) +const sha256 = (path: string) => + createHash('sha256') + .update(readFileSync(join(ROOT, path))) + .digest('hex') + +const DELETED_PACKAGES = ['packages/anatomy', 'packages/domain'] +const BANNED_SPECIFIERS = [ + '@faunosteo/anatomy', + '@faunosteo/domain', + '@xmldom/xmldom', +] +const BANNED_DEPENDENCIES = [...BANNED_SPECIFIERS, 'tsx'] + +/** Source files under `dir` (relative to the root), node_modules excluded. */ +function sources(dir: string, pattern = /\.(tsx?|mjs|js)$/): string[] { + const out: string[] = [] + const walk = (at: string) => { + for (const entry of readdirSync(join(ROOT, at))) { + if (entry === 'node_modules') continue + const path = `${at}/${entry}` + if (statSync(join(ROOT, path)).isDirectory()) walk(path) + else if (pattern.test(entry)) out.push(path) + } + } + walk(dir) + return out +} + +/** Static, dynamic and `require` module specifiers of a source text. */ +const specifiersOf = (text: string): string[] => + [ + ...text.matchAll(/\bfrom\s+['"]([^'"]+)['"]/g), + ...text.matchAll(/\bimport\s*\(\s*['"]([^'"]+)['"]/g), + ...text.matchAll(/\brequire\s*\(\s*['"]([^'"]+)['"]/g), + ].map((m) => m[1]!) + +const isBanned = (spec: string) => + BANNED_SPECIFIERS.some((b) => spec === b || spec.startsWith(`${b}/`)) || + DELETED_PACKAGES.some((p) => spec.includes(p)) || + /(^|\/)(anatomy|domain)\/src(\/|$)/.test(spec) + +type Manifest = Record | undefined> + +/** Every workspace manifest: the root, `apps/*`, `packages/*` (with a manifest). */ +function manifests(): string[] { + const found = ['package.json'] + for (const group of ['apps', 'packages']) { + for (const entry of readdirSync(join(ROOT, group))) { + const path = `${group}/${entry}/package.json` + if (exists(path)) found.push(path) + } + } + return found.sort() +} + +/** `pnpm-lock.yaml` importers (name → block) and the `packages:` keys. */ +function lockfile(): { importers: Map; packages: string[] } { + const lock = read('pnpm-lock.yaml') + const start = lock.indexOf('\nimporters:\n') + const end = lock.indexOf('\npackages:\n') + const section = lock.slice(start, end) + const importers = new Map() + for (const block of section.split(/\n(?= [^ \n][^\n]*:\n)/).slice(1)) { + importers.set(block.slice(2, block.indexOf(':\n')), block) + } + const after = lock.slice(end + '\npackages:\n'.length) + const packages = [ + ...after + .slice(0, after.indexOf('\nsnapshots:\n')) + .matchAll(/^ {2}'?([^\s'][^\n]*?)'?:$/gm), + ].map((m) => m[1]!) + return { importers, packages } +} + +/** Data rows of a committed TSV, checked against its header. */ +function tsv(path: string, header: string[]): string[][] { + const [head, ...rows] = read(path).trimEnd().split('\n') + expect(head!.split('\t'), path).toEqual(header) + return rows.map((row) => { + const cells = row.split('\t') + expect(cells.length, `${path}: ${row}`).toBe(header.length) + return cells + }) +} + +/** The file a ledger target names: `cargo ::::`. */ +function cargoTargetFile(binary: string): string[] { + if (binary === 'faunosteo_core') return sources('crates/core/src', /\.rs$/) + if (['import_equine', 'report_compare'].includes(binary)) { + return [`crates/core/src/bin/${binary}.rs`] + } + if (binary === 'upload_sheet_assets') { + return sources('crates/core/src/bin/upload_sheet_assets', /\.rs$/) + } + return [`crates/core/tests/${binary}.rs`] +} + +describe('the TypeScript pipeline and domain packages are gone', () => { + it('packages/anatomy, packages/domain and the TS upload script no longer exist', () => { + // A folder may linger with a git-ignored node_modules of a stale install. + for (const dir of DELETED_PACKAGES) { + for (const part of ['package.json', 'src', 'tests']) { + expect(exists(`${dir}/${part}`), `${dir}/${part}`).toBe(false) + } + } + expect(exists('packages/supabase/scripts/upload-sheet-assets.ts')).toBe( + false, + ) + }) + + it('no workspace manifest depends on them, and the scripts run the Rust tools', () => { + const found = manifests() + for (const path of [ + 'package.json', + 'apps/app/package.json', + 'packages/core-wasm/package.json', + 'packages/supabase/package.json', + ]) { + expect(found).toContain(path) + } + for (const path of found) { + const pkg = JSON.parse(read(path)) as Manifest + const names = Object.keys({ + ...pkg.dependencies, + ...pkg.devDependencies, + ...pkg.peerDependencies, + ...pkg.optionalDependencies, + }) + for (const banned of BANNED_DEPENDENCIES) { + expect(names, path).not.toContain(banned) + } + for (const [name, script] of Object.entries(pkg.scripts ?? {})) { + expect(name, path).not.toMatch(/:legacy$/) + expect(script, `${path} ${name}`).not.toMatch( + /@faunosteo\/(anatomy|domain)|packages\/(anatomy|domain)|\btsx\b/, + ) + } + } + const root = JSON.parse(read('package.json')) as Manifest + expect(root.scripts?.['import:equine']).toBe( + 'bash scripts/import-equine.sh', + ) + expect(root.scripts?.['r5:import-equine']).toBe( + 'bash scripts/import-equine.sh', + ) + expect(root.scripts?.['assets:upload']).toBe( + 'bash scripts/upload-sheet-assets.sh', + ) + expect(read('scripts/import-equine.sh')).toContain( + '--features curation --bin import-equine', + ) + expect(read('scripts/upload-sheet-assets.sh')).toContain( + '--bin upload-sheet-assets', + ) + }) + + it('the lockfile has one importer per manifest and resolves none of them', () => { + const { importers, packages } = lockfile() + const dirs = manifests().map((path) => + path === 'package.json' ? '.' : path.slice(0, -'/package.json'.length), + ) + // Non-vacuity: the parser sees exactly the workspace the manifests declare. + expect([...importers.keys()].sort()).toEqual(dirs.sort()) + expect(packages.length).toBeGreaterThan(100) + expect(packages.some((key) => key.startsWith('zod@'))).toBe(true) + for (const [name, block] of importers) { + for (const banned of BANNED_DEPENDENCIES) { + expect(block, `${name}: ${banned}`).not.toMatch( + new RegExp(`^ {6}'?${banned.replace('/', '\\/')}'?:$`, 'm'), + ) + } + } + for (const banned of BANNED_SPECIFIERS) { + expect( + packages.filter((key) => key.startsWith(`${banned}@`)), + banned, + ).toEqual([]) + } + // `tsx` left with the pipeline's CLI; it stays resolved only as the optional peer of vite, + // which pnpm marks `optional: true` (`pnpm dedupe --check` clean, RUST.md §11.23). + const lock = read('pnpm-lock.yaml') + const snapshots = lock.slice(lock.indexOf('\nsnapshots:\n')) + const tsx = snapshots.split('\n\n').filter((b) => /^ {2}tsx@/.test(b)) + for (const block of tsx) expect(block).toMatch(/^ {4}optional: true$/m) + }) +}) + +describe('no production path reaches a deleted engine', () => { + it('the application, the glue, the Supabase package and their configs import none of them', () => { + const files = [ + ...sources('apps/app/src'), + ...sources('apps/app/vite'), + 'apps/app/vite.config.ts', + 'apps/app/vitest.config.ts', + 'apps/app/eslint.config.js', + ...sources('packages/core-wasm/src'), + ...sources('packages/supabase/src'), + ] + // Non-vacuity: the specifier scan finds the imports these sources do have. + expect(files.length).toBeGreaterThan(100) + const specs = files.flatMap((file) => specifiersOf(read(file))) + expect(specs).toContain('@faunosteo/core-wasm') + for (const file of files) { + expect(specifiersOf(read(file)).filter(isBanned), file).toEqual([]) + } + const tsconfig = read('apps/app/tsconfig.json') + expect(tsconfig).not.toMatch(/packages\/(anatomy|domain)/) + }) + + it('the Dockerfile copies only manifests that exist', () => { + const dockerfile = read('Dockerfile') + expect(dockerfile).not.toMatch(/packages\/(anatomy|domain)/) + const copied = [ + ...dockerfile.matchAll(/^COPY (\S+\/package\.json) /gm), + ].map((m) => m[1]!) + expect(copied).toContain('packages/core-wasm/package.json') + expect(copied).toContain('packages/supabase/package.json') + for (const path of copied) expect(exists(path), path).toBe(true) + }) + + it('the application lint rule keeps the deleted packages out', () => { + const config = read('apps/app/eslint.config.js') + for (const name of BANNED_SPECIFIERS) { + expect(config).toContain(`name: '${name}'`) + } + }) +}) + +describe('the disposition of the deleted files and tests', () => { + it('every deleted file is absent and its counterpart exists', () => { + const rows = tsv('crates/core/tests/curation/FILES.tsv', [ + 'ts_file', + 'disposition', + 'counterpart', + 'note', + ]) + expect(rows.length).toBeGreaterThan(80) + for (const [file, disposition, counterpart] of rows) { + expect(file, file).toMatch(/^packages\/(anatomy|domain|supabase)\//) + expect(exists(file!), file).toBe(false) + expect(['ported', 'replaced', 'deleted'], file).toContain(disposition) + if (disposition === 'deleted') continue + for (const path of counterpart!.split(', ')) { + expect(exists(path), `${file} → ${path}`).toBe(true) + } + } + }) + + it('every TS case of the two packages has a disposition and a live target', () => { + const rows = tsv('crates/core/tests/curation/LEDGER.tsv', [ + 'ts_file', + 'case_title', + 'contract', + 'disposition', + 'target', + 'oracle', + 'note', + ]) + const per = (dir: string) => + rows.filter(([file]) => file!.startsWith(dir)).length + expect(rows.length).toBe(407) + expect(per('packages/anatomy/tests/')).toBe(144) + expect(per('packages/domain/tests/')).toBe(263) + for (const [file, title, , disposition, target, oracle] of rows) { + const id = `${file} > ${title}` + expect(exists(file!), id).toBe(false) + expect(['ported', 'replaced', 'kept', 'deleted'], id).toContain( + disposition, + ) + for (const path of oracle === '-' ? [] : oracle!.split(', ')) { + expect(exists(path), `${id}: ${path}`).toBe(true) + } + if (disposition === 'deleted') continue + expect(target, id).not.toBe('-') + for (const part of target!.split(' ; ')) { + const cargo = + /^cargo ([a-z0-9_]+)::(?:[a-z0-9_]+::)*([a-z0-9_]+)$/.exec(part) + if (cargo) { + const [, binary, test] = cargo + const files = cargoTargetFile(binary!) + // A `#[test]` function of that name, not any `fn` (attributes and doc lines between), + // and never an `#[ignore]` one: `cargo test` would skip it and the row would be passive. + const testFn = new RegExp( + `#\\[test\\]\\s*(?:(?:#\\[(?!ignore)[^\\]]*\\]|///[^\\n]*)\\s*)*fn ${test}\\(`, + ) + const defined = files.some( + (path) => exists(path) && testFn.test(read(path)), + ) + expect(defined, `${id}: ${part}`).toBe(true) + continue + } + const vitest = /^vitest (\S+) > (.+)$/.exec(part) + if (vitest) { + expect(exists(vitest[1]!), `${id}: ${part}`).toBe(true) + continue + } + expect(part, id).toBe('import-equine --check') + } + } + }) +}) + +describe('the historical references stay byte for byte', () => { + it('the moved report fixtures keep their sha256', () => { + expect(sha256('crates/core/tests/fixtures/report-v2.full.json')).toBe( + 'e96b088282b5d20bd5ed925ea980c1faca86cf1f87eb500201834dda714b729c', + ) + expect(sha256('crates/core/tests/fixtures/report-v2.minimal.json')).toBe( + 'ba79698c5691dd89f8c6a3ada5a9c6ceb6ea41a85e64596e3eec7399c33cfde7', + ) + }) + + it('the oracles, the pre-switch seed files and the N-1 readers stay', () => { + for (const path of [ + 'crates/core/tests/oracles/sheet.draft.json', + 'crates/core/tests/oracles/migration-map.draft.json', + 'crates/core/tests/oracles/r3/highlight.json', + 'crates/core/tests/oracles/r5/pipeline.json', + 'crates/core/tests/oracles/r5/ids.json', + 'crates/core/tests/oracles/r5/fingerprints.json', + 'crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json', + 'crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json', + 'crates/core/tests/fixtures/horse-slice.json', + 'packages/core-wasm/tests/n-1/domain', + ]) { + expect(exists(path), path).toBe(true) + } + }) +}) diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 747191c1..7c15f76b 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -22,20 +22,41 @@ pdf-write = ["pdf-read"] # The archive check tool (R4.7, plan §B.1.7): `pdf::compare` and the `report-compare` binary, # the one file of the crate that reads the file system. Never enabled by the wasm facade. cli = ["pdf-read", "pdf-write"] +# The anatomical pipeline (R5): legacy importer, curation, generated files and their +# formatting, the `import-equine` tool. Never enabled by the wasm facade or the worker. +curation = ["dep:icu_normalizer"] +# The sheet-asset upload tool (R5.5): the `upload-sheet-assets` binary, a local-stack operator +# tool. The rules are in `curation::upload`; only the binary reaches the network. +upload = ["curation", "dep:ureq"] [dependencies] serde.workspace = true serde_json.workspace = true url.workspace = true roxmltree.workspace = true +zmij.workspace = true ts-rs = { workspace = true, optional = true } miniz_oxide = { workspace = true, optional = true } +# The sheet fingerprint (`sha256-rfc8785-validated-v1`, R5.6): recomputed at sheet load too. +sha2.workspace = true +icu_normalizer = { workspace = true, optional = true } +ureq = { workspace = true, optional = true } [[bin]] name = "report-compare" path = "src/bin/report_compare.rs" required-features = ["cli"] +[[bin]] +name = "import-equine" +path = "src/bin/import_equine.rs" +required-features = ["curation"] + +[[bin]] +name = "upload-sheet-assets" +path = "src/bin/upload_sheet_assets/main.rs" +required-features = ["upload"] + [dev-dependencies] # Reads the PDFs the tests compare (the R3 fixtures and the R4 output): objects, streams, # annotations; never in the library. @@ -98,3 +119,44 @@ required-features = ["cli"] [lints] workspace = true + +# The pipeline suites (R5) compile only with the feature. +[[test]] +name = "curation_format" +required-features = ["curation"] + +[[test]] +name = "curation_legacy" +required-features = ["curation"] + +[[test]] +name = "curation_draft" +required-features = ["curation"] + +[[test]] +name = "curation_review" +required-features = ["curation"] + +[[test]] +name = "curation_markdown" +required-features = ["curation"] + +[[test]] +name = "curation_caps" +required-features = ["curation"] + +[[test]] +name = "curation_upload" +required-features = ["curation"] + +[[test]] +name = "upload_tool" +required-features = ["upload"] + +[[test]] +name = "sheet_fingerprint" +required-features = ["pdf-read"] + +[[test]] +name = "r5_6_switch" +required-features = ["pdf-read", "pdf-write"] diff --git a/crates/core/src/anatomy/mod.rs b/crates/core/src/anatomy/mod.rs index 7adcb7dc..6e4dc7a7 100644 --- a/crates/core/src/anatomy/mod.rs +++ b/crates/core/src/anatomy/mod.rs @@ -1,5 +1,7 @@ //! The anatomy core (R3): SVG reading and sanitising, the annotation layer drawn from the -//! sheet document, and the composition of a view (canvas and highlight). +//! sheet document, and the composition of a view (canvas and highlight). The TypeScript +//! renderer it replaced (`packages/anatomy/src/render`) was deleted at R5.7; cited paths resolve +//! at commit 756b7ef. pub mod compose; pub mod layer; diff --git a/crates/core/src/bin/import_equine.rs b/crates/core/src/bin/import_equine.rs new file mode 100644 index 00000000..371a5e80 --- /dev/null +++ b/crates/core/src/bin/import_equine.rs @@ -0,0 +1,537 @@ +//! `import-equine` (R5.2 to R5.4): the anatomical pipeline on the core. Reads the historical +//! equine files, the authored curation files and the frozen cleaned drawing of the repository, +//! and produces the two generated folders the TypeScript `pnpm import:equine` writes, whole: +//! `legacy-import/` (6 files) and `draft/` (12 files). +//! +//! import-equine --check compare with the committed folders, write nothing: every file +//! byte for byte, except the application's drawings, which may +//! fall back on parsed trees under the declared R3 rule; a file +//! missing, not produced or different fails the check +//! import-equine --out write /legacy-import and /draft ( absent or empty) +//! +//! The repository is found from this crate's manifest folder; a relative `--out` is typed from +//! the folder pnpm was run in (`INIT_CWD`), else the current one. Nothing is ever deleted: +//! `--out` refuses an empty path, a symbolic link, a path that is not a folder and a folder +//! holding any file, so the official seed can never be rewritten by this tool. Like +//! `report-compare`, this file is the only one of its tool allowed the file system. +#![allow(clippy::disallowed_methods)] + +use std::fs::OpenOptions; +use std::io::{Read, Write}; +use std::path::{Component, Path, PathBuf}; +use std::{env, fs, process}; + +use faunosteo_core::curation::draft::schema::MAX_CURATION_FILE_BYTES; +use faunosteo_core::curation::draft::svg_compare::{TriggerNames, compare_drawing}; +use faunosteo_core::curation::draft::{ + DraftInput, build_equine_draft, parse_changeset, parse_references, parse_view_box, + render_draft_artifacts, +}; +use faunosteo_core::curation::legacy::{ + EquineLegacyInput, HEAD_VIEW_ID, ImportResult, SvgSource, import_equine_legacy, + render_artifacts, +}; +use faunosteo_core::domain::sheet::AnatomicalSheetDocument; + +const SEED: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../supabase/seed/anatomical-sheets/equine" +); + +const LEGACY_FOLDER: &str = "legacy-import"; +const DRAFT_FOLDER: &str = "draft"; +const CLEANED_ASSET: &str = "assets/horse.svg"; + +/// The files of the draft whose comparison may fall back on parsed trees under the declared +/// R3 trigger-name rule (`svg_compare`): the application's drawings of each view. +const APP_DRAWING_PREFIX: &str = "review/app-"; + +/// A file of a generated folder: its path relative to the folder and its bytes. +type FolderFile = (String, Vec); + +/// A generated folder: its name under the seed and its files. +struct Folder { + name: &'static str, + files: Vec, + /// The declared tree rule of the application's drawings (the draft only). + trigger_names: Option, +} + +/// A bound no source or generated file approaches (the largest, the draft CHANGELOG, is about +/// 1.1 MB): a resource cap on what the tool reads. +const MAX_FILE_BYTES: u64 = 16 * 1024 * 1024; + +/// The cap of an authored curation file, the core's own (`MAX_CURATION_FILE_BYTES`): the file +/// is never read beyond it, so a larger one is refused before the allocation. +const MAX_CURATION_BYTES: u64 = MAX_CURATION_FILE_BYTES as u64; + +/// A regular file of the seed folder, read under the cap: its canonical path (every symbolic +/// link resolved, folders included) must lie in the canonical seed folder, so a link never +/// leads a read outside it; devices and pipes are refused. The repository is a single user's +/// working copy: a swap between the check and the read is not defended (RUST.md §11.13). +fn read(path: &Path) -> Result, String> { + read_capped(path, MAX_FILE_BYTES) +} + +/// `read` under a given cap, enforced on the bytes actually read as well as on the size seen +/// first, so a file that grows between the two is still refused before it is held. +fn read_capped(path: &Path, cap: u64) -> Result, String> { + let refuse = |why: &str| format!("{}: {why}", path.display()); + let seed = fs::canonicalize(SEED).map_err(|error| format!("{SEED}: {error}"))?; + let canonical = fs::canonicalize(path).map_err(|error| refuse(&error.to_string()))?; + if !inside(&canonical, &seed) { + return Err(refuse("leads outside the seed folder")); + } + let metadata = fs::metadata(&canonical).map_err(|error| refuse(&error.to_string()))?; + if !metadata.file_type().is_file() { + return Err(refuse("not a regular file")); + } + if metadata.len() > cap { + return Err(refuse(&format!("larger than {cap} bytes"))); + } + let mut bytes = Vec::new(); + let file = fs::File::open(&canonical).map_err(|error| refuse(&error.to_string()))?; + file.take(cap + 1) + .read_to_end(&mut bytes) + .map_err(|error| refuse(&error.to_string()))?; + if bytes.len() as u64 > cap { + return Err(refuse(&format!("larger than {cap} bytes"))); + } + Ok(bytes) +} + +/// `readFile(path, 'utf8')` of an authored curation file, under the 4 MiB curation cap: invalid +/// UTF-8 becomes U+FFFD, as the TypeScript read them. +fn read_curation_text(path: &Path) -> Result { + Ok(String::from_utf8_lossy(&read_capped(path, MAX_CURATION_BYTES)?).into_owned()) +} + +fn svg(name: &str) -> Result { + let bytes = read(&Path::new(SEED).join("legacy-sources").join(name))?; + Ok(SvgSource { + file_name: name.to_owned(), + bytes, + }) +} + +fn legacy_input() -> Result { + let sources = Path::new(SEED).join("legacy-sources"); + Ok(EquineLegacyInput { + main_svg: svg("Horse.svg")?, + head_svg: svg("Horse_head.svg")?, + catalog: read(&sources.join("pathologies.json"))?, + vertebrae: read(&sources.join("vertebrae.ts"))?, + }) +} + +fn texts(files: Vec<(String, String)>) -> Vec { + files + .into_iter() + .map(|(name, text)| (name, text.into_bytes())) + .collect() +} + +/// `legacy-import/`: the four texts, then the two SVG copies. +fn legacy_folder(input: &EquineLegacyInput, result: &ImportResult) -> Result { + let mut files = texts(render_artifacts(result).map_err(|error| error.to_string())?); + for source in [&input.main_svg, &input.head_svg] { + files.push((format!("assets/{}", source.file_name), source.bytes.clone())); + } + Ok(Folder { + name: LEGACY_FOLDER, + files, + trigger_names: None, + }) +} + +/// `draft/`: the R5.3 texts, then the frozen cleaned drawing (read, never re-cleaned). +fn draft_folder(result: &ImportResult) -> Result { + let curation = Path::new(SEED).join("curation"); + let references = parse_references(&read_curation_text(&curation.join("references.json"))?) + .map_err(|error| error.to_string())?; + let changeset = parse_changeset(&read_curation_text(&curation.join("changes.json"))?) + .map_err(|error| error.to_string())?; + let cleaned_svg = read(&Path::new(SEED).join(DRAFT_FOLDER).join(CLEANED_ASSET))?; + let head = result.view_boxes.get(HEAD_VIEW_ID).and_then(|v| v.as_str()); + let head_view_box = parse_view_box(head).map_err(|error| error.to_string())?; + let draft = build_equine_draft(&DraftInput { + import_result: result, + cleaned_svg: &cleaned_svg, + head_view_box, + references: &references, + changes: &changeset.changes, + }) + .map_err(|error| error.to_string())?; + let rendered = + render_draft_artifacts(&draft, &result.anomalies).map_err(|error| error.to_string())?; + let typed: AnatomicalSheetDocument = + serde_json::from_value(draft.document.clone()).map_err(|error| error.to_string())?; + let mut files = texts(rendered); + files.push((CLEANED_ASSET.to_owned(), cleaned_svg)); + Ok(Folder { + name: DRAFT_FOLDER, + files, + trigger_names: Some(TriggerNames::of(&typed)), + }) +} + +fn folders() -> Result, String> { + let input = legacy_input()?; + let result = import_equine_legacy(&input).map_err(|error| error.to_string())?; + Ok(vec![ + legacy_folder(&input, &result)?, + draft_folder(&result)?, + ]) +} + +/// Relative paths of every file under `dir`. +fn listed(dir: &Path, prefix: &str, out: &mut Vec) -> Result<(), String> { + let entries = fs::read_dir(dir).map_err(|error| format!("{}: {error}", dir.display()))?; + for entry in entries { + let entry = entry.map_err(|error| error.to_string())?; + let name = format!("{prefix}{}", entry.file_name().to_string_lossy()); + // `file_type` does not follow a symbolic link: a link is listed, never walked into. + let is_dir = entry.file_type().is_ok_and(|kind| kind.is_dir()); + if is_dir { + listed(&entry.path(), &format!("{name}/"), out)?; + } else { + out.push(name); + } + } + Ok(()) +} + +/// How one produced file compares with the committed one: byte identity, or, for the +/// application's drawings only, parsed trees under the declared R3 rule (printed as declared). +fn compare_file( + folder: &Folder, + name: &str, + produced: &[u8], + committed: &[u8], +) -> Result<(), String> { + if produced == committed { + return Ok(()); + } + let rule = folder + .trigger_names + .as_ref() + .filter(|_| name.starts_with(APP_DRAWING_PREFIX)); + let (Ok(produced), Ok(committed)) = ( + std::str::from_utf8(produced), + std::str::from_utf8(committed), + ) else { + return Err(format!("{}: differs: {name}", folder.name)); + }; + match compare_drawing(produced, committed, rule) { + Ok(_) => { + println!( + "{}: declared: {name} (byte-identical once the R3 trigger-name rule is applied)", + folder.name + ); + Ok(()) + } + Err(why) => Err(format!("{}: differs: {name} ({why})", folder.name)), + } +} + +/// The differences between a produced folder and the committed one: every committed file must +/// be produced and every produced file committed and equal (`compare_file`). +fn check(folder: &Folder) -> Result, String> { + let target = Path::new(SEED).join(folder.name); + // The generated folder itself must lie in the seed: a link there is never listed through. + let seed = fs::canonicalize(SEED).map_err(|error| format!("{SEED}: {error}"))?; + let canonical = fs::canonicalize(&target).map_err(|e| format!("{}: {e}", target.display()))?; + if canonical != seed.join(folder.name) { + return Ok(vec![format!("{}: not a folder of the seed", folder.name)]); + } + let mut problems = Vec::new(); + for (name, bytes) in &folder.files { + match read(&target.join(name)) { + Ok(committed) => { + if let Err(problem) = compare_file(folder, name, bytes, &committed) { + problems.push(problem); + } + } + Err(_) => problems.push(format!("{}: missing: {name}", folder.name)), + } + } + let mut present = Vec::new(); + listed(&target, "", &mut present)?; + for name in present { + if folder.files.iter().any(|(produced, _)| *produced == name) { + continue; + } + problems.push(format!("{}: not produced: {name}", folder.name)); + } + Ok(problems) +} + +/// Claims a destination this tool may fill and returns its canonical path. The typed path +/// must be non-empty, hold no `..`, have an existing parent folder, and name either nothing +/// (the folder is created here, its parent's symbolic links resolved) or an empty folder that +/// is not a symbolic link. A destination inside the seed folder is refused: the tool never +/// writes into the official seed. The writes that follow are exclusive (`write_exclusive`). +fn claim_destination(typed: &Path, seed: &Path) -> Result { + let refuse = |why: &str| format!("{}: {why}, nothing written", typed.display()); + if typed.as_os_str().is_empty() { + return Err("--out needs a destination path".to_owned()); + } + if typed.components().any(|c| c == Component::ParentDir) { + return Err(refuse("`..` is not accepted")); + } + // Rebuilt from its components: a trailing `/` would make the system resolve a final + // symbolic link before the check below could see it. + let out: PathBuf = typed.components().collect(); + let parent = out.parent().filter(|p| !p.as_os_str().is_empty()); + let parent = match parent { + Some(parent) => { + fs::canonicalize(parent).map_err(|_| refuse("the parent folder does not exist"))? + } + None => return Err(refuse("not a destination folder")), + }; + if inside(&parent, seed) || inside_by_identity(&parent, seed)? { + return Err(refuse("inside the seed folder")); + } + let name = out + .file_name() + .ok_or_else(|| format!("{}: not a destination folder", typed.display()))?; + let root = parent.join(name); + match fs::symlink_metadata(&root) { + Err(_) => fs::create_dir(&root).map_err(|error| refuse(&error.to_string()))?, + Ok(metadata) if metadata.file_type().is_symlink() => return Err(refuse("a symbolic link")), + Ok(metadata) if !metadata.is_dir() => return Err(refuse("not a folder")), + Ok(_) => { + // An existing folder may itself be a second path to a folder of the seed. + if inside_by_identity(&root, seed)? { + return Err(refuse("inside the seed folder")); + } + let mut entries = + fs::read_dir(&root).map_err(|error| format!("{}: {error}", root.display()))?; + if entries.next().is_some() { + return Err(refuse("not empty")); + } + } + } + Ok(root) +} + +/// Whether a canonical folder is the seed folder or lies under it. +fn inside(folder: &Path, seed: &Path) -> bool { + folder.starts_with(seed) +} + +/// The file identities (device, inode) of the seed folder and of every folder under it, links +/// never followed; `None` when the walk fails (the caller then refuses). +fn seed_identities(seed: &Path) -> Option> { + use std::os::unix::fs::MetadataExt; + let mut identities = Vec::new(); + let mut pending = vec![seed.to_path_buf()]; + while let Some(folder) = pending.pop() { + let metadata = fs::symlink_metadata(&folder).ok()?; + identities.push((metadata.dev(), metadata.ino())); + for entry in fs::read_dir(&folder).ok()? { + let entry = entry.ok()?; + if entry.file_type().ok()?.is_dir() { + pending.push(entry.path()); + } + } + } + Some(identities) +} + +/// Whether `folder` or one of its ancestors is the seed folder or a folder under it, by file +/// identity: a second path to any of them (a bind mount, a share mounted twice on the same +/// device) is caught too. A seed walk that fails is an error (the claim then refuses). +fn inside_by_identity(folder: &Path, seed: &Path) -> Result { + use std::os::unix::fs::MetadataExt; + let identities = seed_identities(seed).ok_or_else(|| { + format!( + "{}: the seed folder cannot be read, nothing written", + seed.display() + ) + })?; + Ok(folder.ancestors().any(|ancestor| { + fs::metadata(ancestor).is_ok_and(|m| identities.contains(&(m.dev(), m.ino()))) + })) +} + +/// Where a relative destination is typed from: `INIT_CWD` when pnpm set it to an absolute +/// path, else the current folder (the repository root when the script is run directly: it +/// moves there first). +fn base_dir() -> PathBuf { + env::var_os("INIT_CWD") + .map(PathBuf::from) + .filter(|path| path.is_absolute()) + .or_else(|| env::current_dir().ok()) + .unwrap_or_default() +} + +/// Creates `relative` and the folders leading to it under `root`: every folder is one this run +/// created (`created`), every file new; an entry that appeared since the claim, file, folder +/// or symbolic link, is refused, never followed or truncated (`create_dir`, `create_new`). +fn write_exclusive( + root: &Path, + relative: &Path, + bytes: &[u8], + created: &mut Vec, +) -> Result<(), String> { + // The claimed folder is checked again: a swap for a symbolic link since the claim is refused. + if !fs::symlink_metadata(root).is_ok_and(|m| m.file_type().is_dir()) { + return Err(format!("{}: no longer the claimed folder", root.display())); + } + let mut folder = root.to_path_buf(); + let components: Vec<_> = relative.components().collect(); + if !components.iter().all(|c| matches!(c, Component::Normal(_))) { + return Err(format!( + "{}: not a plain relative file name", + relative.display() + )); + } + let (file, folders) = components.split_last().ok_or("an empty file name")?; + for component in folders { + folder.push(component); + if created.contains(&folder) { + continue; + } + fs::create_dir(&folder).map_err(|error| format!("{}: {error}", folder.display()))?; + created.push(folder.clone()); + } + let path = folder.join(file); + let mut handle = OpenOptions::new() + .write(true) + .create_new(true) + .open(&path) + .map_err(|error| format!("{}: {error}", path.display()))?; + handle + .write_all(bytes) + .map_err(|error| format!("{}: {error}", path.display())) +} + +/// Writes every file under the claimed destination; returns the file count. +fn write(folders: &[Folder], root: &Path) -> Result { + let mut written = 0; + let mut created = Vec::new(); + for folder in folders { + for (name, bytes) in &folder.files { + let relative = Path::new(folder.name).join(name); + write_exclusive(root, &relative, bytes, &mut created)?; + written += 1; + } + } + Ok(written) +} + +fn run(args: &[String]) -> Result { + let folders = folders()?; + match args { + [flag] if flag == "--check" => { + let mut total = 0; + for folder in &folders { + let problems = check(folder)?; + for problem in &problems { + eprintln!("{problem}"); + } + println!( + "{}: {} files, {} differences", + folder.name, + folder.files.len(), + problems.len() + ); + total += problems.len(); + } + Ok(i32::from(total != 0)) + } + [flag, dir] if flag == "--out" => { + if dir.is_empty() { + return Err("--out needs a destination path".to_owned()); + } + let seed = fs::canonicalize(SEED).map_err(|error| format!("{SEED}: {error}"))?; + let root = claim_destination(&base_dir().join(dir), &seed)?; + println!("writing to {}", root.display()); + let written = write(&folders, &root)?; + println!("{written} files written to {}", root.display()); + Ok(0) + } + _ => Err("usage: import-equine --check | --out ".to_owned()), + } +} + +fn main() { + let args: Option> = env::args_os() + .skip(1) + .map(|a| a.into_string().ok()) + .collect(); + let Some(args) = args else { + eprintln!("an argument is not valid UTF-8"); + process::exit(2); + }; + match run(&args) { + Ok(code) => process::exit(code), + Err(message) => { + eprintln!("{message}"); + process::exit(2); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Fixed fixtures under the workspace's target folder (private to the checkout): created + /// once, never deleted, never written by the refusals below. + fn fixture_seed() -> PathBuf { + let base = Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/../../target/tmp")) + .join("import-equine-claim"); + fs::create_dir_all(base.join("seed/draft")).unwrap_or_else(|e| panic!("{e}")); + fs::canonicalize(base.join("seed")).unwrap_or_else(|e| panic!("{e}")) + } + + #[test] + fn the_claim_refuses_a_destination_inside_the_seed_and_creates_nothing() { + let seed = fixture_seed(); + for typed in [seed.join("new"), seed.join("draft/new")] { + let refused = claim_destination(&typed, &seed).err().unwrap_or_default(); + assert!(refused.contains("inside the seed folder"), "{refused}"); + assert!(fs::symlink_metadata(&typed).is_err()); + } + let parent = seed.parent().map(Path::to_path_buf).unwrap_or_default(); + let refused = claim_destination(&parent, &seed).err().unwrap_or_default(); + assert!(refused.contains("not empty"), "{refused}"); + } + + #[test] + fn a_difference_fails_the_check_unless_a_declared_rule_covers_it() { + let draft = Folder { + name: DRAFT_FOLDER, + files: Vec::new(), + trigger_names: None, + }; + assert!(compare_file(&draft, "CHANGELOG.md", b"a\n", b"a\n").is_ok()); + let differs = compare_file(&draft, "CHANGELOG.md", b"a\n", b"b\n") + .err() + .unwrap_or_default(); + assert!(differs.contains("differs: CHANGELOG.md"), "{differs}"); + // No rule for the folder: even an application drawing must be byte-identical. + let svg = b""; + let other = b""; + assert!(compare_file(&draft, "review/app-main.svg", svg, other).is_err()); + } + + #[test] + fn a_folder_under_the_seed_or_the_seed_itself_is_inside_it() { + let seed = Path::new("/repo/supabase/seed/anatomical-sheets/equine"); + assert!(inside(seed, seed)); + assert!(inside(&seed.join("draft"), seed)); + assert!(inside(&seed.join("x/y"), seed)); + assert!(!inside( + Path::new("/repo/supabase/seed/anatomical-sheets"), + seed + )); + assert!(!inside( + Path::new("/repo/supabase/seed/anatomical-sheets/equine-copy"), + seed + )); + assert!(!inside(Path::new("/tmp/out"), seed)); + } +} diff --git a/crates/core/src/bin/report_compare.rs b/crates/core/src/bin/report_compare.rs index 59cf060b..0748403a 100644 --- a/crates/core/src/bin/report_compare.rs +++ b/crates/core/src/bin/report_compare.rs @@ -37,6 +37,11 @@ struct SeedRef { document_sha256: String, schema_version: f64, species_id: String, + #[serde( + default, + deserialize_with = "faunosteo_core::domain::sheet::loaded::present_block" + )] + fingerprint: Option, } fn seed_json Deserialize<'de>>(name: &str) -> Result { @@ -58,6 +63,7 @@ fn load_sheet() -> Result { document_sha256: reference.document_sha256, schema_version, species_id: reference.species_id, + fingerprint: reference.fingerprint, }, document: seed_json("document.json")?, migration_map: seed_json("report-migration-map.json")?, diff --git a/crates/core/src/bin/upload_sheet_assets/main.rs b/crates/core/src/bin/upload_sheet_assets/main.rs new file mode 100644 index 00000000..8e3c5062 --- /dev/null +++ b/crates/core/src/bin/upload_sheet_assets/main.rs @@ -0,0 +1,279 @@ +//! `upload-sheet-assets` (R5.5): uploads the SVG drawings of a generated sheet seed folder to +//! the private Storage bucket `anatomical-sheet-assets` of a LOCAL Supabase stack, content +//! addressed (`.svg`), and confirms each asset row once its object is verified. +//! +//! upload-sheet-assets --check read-only: verify the files, the destination +//! and what is already there; write nothing +//! upload-sheet-assets the same, then upload and confirm what is missing +//! +//! Environment: `SUPABASE_URL` (a local stack: loopback, or the DEV address +//! `FAUNOSTEO_DEV_HOST`; `http` with an explicit port; no default) and +//! `SUPABASE_SERVICE_ROLE_KEY` (never printed). The folder lies under +//! `supabase/seed/anatomical-sheets`; a relative path is typed from the folder pnpm was run in +//! (`INIT_CWD`), else the current one. +//! +//! Order of a run: files and manifest checked, destination checked, handshake, then every +//! entry planned from the state found; any refusal stops the run before the first write. An +//! object that exists is read back and compared with its key, never replaced; an asset row is +//! confirmed only after its object is verified. A rerun after a failure resumes safely. +//! Like `import-equine`, this tool owns the file system, the environment and the network; the +//! rules are the core's (`curation::upload`). +#![allow(clippy::disallowed_methods)] + +mod storage; + +use std::io::Read; +use std::path::{Path, PathBuf}; +use std::{env, fs, process}; + +use faunosteo_core::curation::upload::{ + AssetEntry, MAX_ASSET_BYTES, MAX_MANIFEST_BYTES, ObjectState, Plan, UploadError, UploadKind, + check_destination, parse_manifest, plan_entry, refuse, verify_asset, +}; +use storage::{Secret, Storage}; + +const SEED_ROOT: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../supabase/seed/anatomical-sheets" +); + +/// A local entry whose bytes passed `verify_asset`. +struct Local { + entry: AssetEntry, + bytes: Vec, +} + +/// A regular file under `root` (every link resolved), read under a cap: a file that grows +/// between the size check and the read is still refused. The seed is a single user's working +/// copy: a swap between the check and the read is not defended. +fn read_confined(path: &Path, root: &Path, cap: usize) -> Result, UploadError> { + let bad = |why: &str| refuse(UploadKind::Content, format!("{}: {why}", path.display())); + let canonical = fs::canonicalize(path).map_err(|e| bad(&e.to_string()))?; + if !canonical.starts_with(root) { + return Err(bad("leads outside the seed folder")); + } + let metadata = fs::metadata(&canonical).map_err(|e| bad(&e.to_string()))?; + if !metadata.is_file() || metadata.len() > cap as u64 { + return Err(bad("not a regular file, or too large")); + } + let mut bytes = Vec::new(); + let file = fs::File::open(&canonical).map_err(|e| bad(&e.to_string()))?; + file.take(cap as u64 + 1) + .read_to_end(&mut bytes) + .map_err(|e| bad(&e.to_string()))?; + if bytes.len() > cap { + return Err(bad("too large")); + } + Ok(bytes) +} + +/// The folder typed on the command line: from `INIT_CWD` when pnpm set it, canonical, a +/// directory, inside the seed root. +fn resolve_folder(typed: &str) -> Result { + let bad = |why: &str| refuse(UploadKind::Content, format!("{typed}: {why}")); + let base = env::var_os("INIT_CWD") + .map(PathBuf::from) + .filter(|p| p.is_absolute()) + .map_or_else(env::current_dir, Ok) + .map_err(|e| bad(&e.to_string()))?; + let folder = fs::canonicalize(base.join(typed)).map_err(|e| bad(&e.to_string()))?; + let root = fs::canonicalize(SEED_ROOT).map_err(|e| bad(&e.to_string()))?; + if !folder.starts_with(&root) || !folder.is_dir() { + return Err(bad("not a folder under supabase/seed/anatomical-sheets")); + } + Ok(folder) +} + +/// Manifest, then every drawing, all verified before any request is made. +fn load_local(folder: &Path) -> Result, UploadError> { + let manifest = read_confined(&folder.join("assets.json"), folder, MAX_MANIFEST_BYTES)?; + let text = String::from_utf8(manifest) + .map_err(|_| refuse(UploadKind::Manifest, "assets.json is not UTF-8"))?; + parse_manifest(&text)? + .into_iter() + .map(|entry| { + let path = folder.join("assets").join(&entry.file); + let bytes = read_confined(&path, folder, MAX_ASSET_BYTES)?; + verify_asset(&entry, &bytes)?; + Ok(Local { entry, bytes }) + }) + .collect() +} + +fn required_env(name: &str) -> Result { + env::var(name) + .ok() + .filter(|value| !value.is_empty()) + .ok_or_else(|| refuse(UploadKind::Destination, format!("{name} is required"))) +} + +/// The DEV address counts only if it is one of this machine's own unicast addresses: a socket +/// binds to it, and connecting it to that address (no packet is sent) keeps it as the local +/// end. A subnet broadcast binds but refuses the connect (no `SO_BROADCAST`). Otherwise the +/// DEV address is ignored and only loopback stays allowed. +fn own_address(host: &str) -> bool { + let Ok(ip) = host.parse::() else { + return false; + }; + // A multicast group binds and connects like an own address on Linux: never unicast. + if ip.is_multicast() { + return false; + } + let Ok(socket) = std::net::UdpSocket::bind((ip, 0)) else { + return false; + }; + socket.connect((ip, 9)).is_ok() && socket.local_addr().is_ok_and(|a| a.ip() == ip) +} + +fn connect() -> Result { + let dev_host = env::var("FAUNOSTEO_DEV_HOST") + .ok() + .filter(|h| own_address(h)); + let destination = check_destination(&required_env("SUPABASE_URL")?, dev_host.as_deref())?; + let key = Secret::new(required_env("SUPABASE_SERVICE_ROLE_KEY")?); + Ok(Storage::new(&destination, key)) +} + +/// What the destination holds for each entry and the steps that follow; refuses on the first +/// entry that cannot be planned, so nothing is written for a run that cannot complete. +fn plan_all(storage: &Storage, locals: &[Local]) -> Result, UploadError> { + locals + .iter() + .map(|local| { + let object = storage.object_state(&local.entry)?; + let row = storage.row_state(&local.entry)?; + Ok((plan_entry(&local.entry, &object, &row)?, object)) + }) + .collect() +} + +fn describe(local: &Local, plan: Plan, check: bool) -> String { + let steps: Vec<&str> = match (plan.upload, plan.confirm) { + (false, false) => vec!["object verified, row confirmed, nothing to do"], + (true, true) => vec!["upload", "confirm"], + (true, false) => vec!["upload"], + (false, true) => vec!["object verified", "confirm"], + }; + let verb = if check { "would" } else { "will" }; + format!( + "{} {}: {verb} {}", + local.entry.file, + local.entry.object_key(), + steps.join(", ") + ) +} + +/// Uploads (if absent), verifies the object by reading it back, then confirms (if pending). +fn apply(storage: &Storage, local: &Local, plan: Plan) -> Result<(), UploadError> { + if plan.upload { + storage.upload(&local.entry, &local.bytes)?; + } + if storage.object_state(&local.entry)? != ObjectState::Verified { + return Err(refuse( + UploadKind::State, + format!( + "{}: the object is not the expected bytes after upload", + local.entry.file + ), + )); + } + if plan.confirm { + storage.confirm(&local.entry)?; + } + Ok(()) +} + +fn run(args: &[String]) -> Result<(), UploadError> { + let (check, folder) = match args { + [flag, folder] if flag == "--check" => (true, folder), + [folder] if folder != "--check" => (false, folder), + _ => { + return Err(refuse( + UploadKind::Content, + "usage: upload-sheet-assets [--check] ", + )); + } + }; + let locals = load_local(&resolve_folder(folder)?)?; + let storage = connect()?; + storage.handshake()?; + let plans = plan_all(&storage, &locals)?; + for (local, (plan, _)) in locals.iter().zip(&plans) { + println!("{}", describe(local, *plan, check)); + } + if check { + return Ok(()); + } + for (local, (plan, _)) in locals.iter().zip(&plans) { + apply(&storage, local, *plan)?; + println!("{} done", local.entry.file); + } + Ok(()) +} + +fn main() { + let args: Option> = env::args_os() + .skip(1) + .map(|a| a.into_string().ok()) + .collect(); + let Some(args) = args else { + eprintln!("an argument is not valid UTF-8"); + process::exit(2); + }; + match run(&args) { + Ok(()) => println!("ok"), + Err(error) => { + eprintln!("refused: {error}"); + process::exit(if error.kind == UploadKind::Network { + 3 + } else { + 1 + }); + } + } +} + +#[cfg(test)] +mod tests { + use super::own_address; + + /// `inet` and `brd` addresses of this host, as `ip -4 -o addr` prints them. + fn host_addresses() -> (Vec, Vec) { + let listing = std::process::Command::new("ip") + .args(["-4", "-o", "addr"]) + .output() + .map(|output| String::from_utf8_lossy(&output.stdout).into_owned()) + .unwrap_or_default(); + let field = |line: &str, name: &str| { + let mut words = line.split_whitespace(); + words.find(|w| *w == name)?; + Some(words.next()?.split('/').next()?.to_owned()) + }; + let lines: Vec<&str> = listing.lines().collect(); + let unicast = lines.iter().filter_map(|l| field(l, "inet")).collect(); + let broadcast = lines.iter().filter_map(|l| field(l, "brd")).collect(); + (unicast, broadcast) + } + + #[test] + fn only_an_own_unicast_address_counts_as_the_dev_address() { + assert!(own_address("127.0.0.1")); + for refused in [ + "255.255.255.255", + "224.0.0.1", + "239.255.255.250", + "203.0.113.7", + "not-an-ip", + "", + ] { + assert!(!own_address(refused), "{refused}"); + } + let (unicast, broadcast) = host_addresses(); + for address in &unicast { + assert!(own_address(address), "{address}"); + } + for address in &broadcast { + assert!(!own_address(address), "broadcast {address}"); + } + } +} diff --git a/crates/core/src/bin/upload_sheet_assets/storage.rs b/crates/core/src/bin/upload_sheet_assets/storage.rs new file mode 100644 index 00000000..f33178c5 --- /dev/null +++ b/crates/core/src/bin/upload_sheet_assets/storage.rs @@ -0,0 +1,280 @@ +//! The destination, over HTTP: Storage objects and the asset rows of a local Supabase stack, +//! with the service key. Every status is classified into the closed `UploadKind`s; the key is +//! held in a `Secret` and goes in two request headers, nowhere else. + +use std::time::Duration; + +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::upload::{ + AssetEntry, BUCKET, Destination, MAX_ASSET_BYTES, ObjectState, RowState, UploadError, + UploadKind, refuse, +}; +use serde_json::{Value, json}; +use ureq::Agent; + +const MAX_BODY: u64 = 1024 * 1024; +/// One try and three retries. +const ATTEMPTS: u32 = 4; + +/// A key that never prints: `Debug` hides it and there is no `Display`. +pub struct Secret(String); + +impl Secret { + pub fn new(text: String) -> Self { + Self(text) + } +} + +impl std::fmt::Debug for Secret { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("Secret()") + } +} + +/// What an HTTP exchange gave back: the status and the (capped) body. +struct Reply { + status: u16, + body: Vec, +} + +pub struct Storage { + agent: Agent, + origin: String, + key: Secret, +} + +impl Storage { + pub fn new(destination: &Destination, key: Secret) -> Self { + let agent: Agent = Agent::config_builder() + .timeout_global(Some(Duration::from_secs(30))) + .timeout_connect(Some(Duration::from_secs(5))) + .max_redirects(0) + // The service key never goes through a proxy picked up from the environment. + .proxy(None) + .http_status_as_error(false) + .user_agent("faunosteo-upload-sheet-assets") + .build() + .into(); + Self { + agent, + origin: destination.origin().to_owned(), + key, + } + } + + /// One exchange, retried on a transport error or a 5xx only (a refusal, an oversized body + /// and a malformed request are final). The request is built again on each attempt. + fn exchange( + &self, + limit: u64, + send: impl Fn(&Agent, &Self) -> Result, ureq::Error>, + ) -> Result { + let mut last = refuse(UploadKind::Network, "no attempt made"); + for attempt in 1..=ATTEMPTS { + if attempt > 1 { + std::thread::sleep(Duration::from_millis(500 * u64::from(attempt))); + } + match send(&self.agent, self).and_then(|mut response| read_reply(&mut response, limit)) + { + Ok(reply) if reply.status < 500 => return Ok(reply), + Ok(reply) => last = refuse(UploadKind::Network, format!("HTTP {}", reply.status)), + Err(error) if is_transient(&error) => { + last = refuse(UploadKind::Network, error.to_string()); + } + Err(error) => return Err(final_error(&error)), + } + } + Err(last) + } + + fn authorised(&self, request: ureq::RequestBuilder) -> ureq::RequestBuilder { + request + .header("apikey", &self.key.0) + .header("Authorization", &format!("Bearer {}", self.key.0)) + } + + fn object_url(&self, entry: &AssetEntry) -> String { + format!( + "{}/storage/v1/object/{BUCKET}/{}", + self.origin, + entry.object_key() + ) + } + + /// The destination is the local Faunosteo stack: the sheet bucket exists and is private, + /// and the key is accepted. Nothing is written. + pub fn handshake(&self) -> Result<(), UploadError> { + let url = format!("{}/storage/v1/bucket/{BUCKET}", self.origin); + let reply = self.exchange(MAX_BODY, |agent, me| me.authorised(agent.get(&url)).call())?; + check_access(&reply)?; + let bucket: Value = serde_json::from_slice(&reply.body) + .map_err(|_| refuse(UploadKind::Handshake, "the bucket answer is not JSON"))?; + let name = bucket.get("name").and_then(Value::as_str); + let public = bucket.get("public").and_then(Value::as_bool); + if reply.status != 200 || name != Some(BUCKET) || public != Some(false) { + return Err(refuse( + UploadKind::Handshake, + format!("{BUCKET} is missing, or not a private bucket"), + )); + } + Ok(()) + } + + /// Absent, or present with bytes that hash to the key, or present with other bytes. + pub fn object_state(&self, entry: &AssetEntry) -> Result { + let url = self.object_url(entry); + let limit = MAX_ASSET_BYTES as u64 + 1; + let reply = self.exchange(limit, |agent, me| me.authorised(agent.get(&url)).call())?; + if is_not_found(&reply) { + return Ok(ObjectState::Absent); + } + check_access(&reply)?; + expect_status(&reply, 200, "object read")?; + let found = sha256_hex(&reply.body); + Ok(if found == entry.sha256 { + ObjectState::Verified + } else { + ObjectState::Different(found) + }) + } + + /// Creates the object; an existing key is never replaced (`x-upsert: false`). Returns + /// whether this call created it. + pub fn upload(&self, entry: &AssetEntry, bytes: &[u8]) -> Result { + let url = self.object_url(entry); + let reply = self.exchange(MAX_BODY, |agent, me| { + me.authorised(agent.post(&url)) + .header("Content-Type", "image/svg+xml") + .header("x-upsert", "false") + .send(bytes) + })?; + check_access(&reply)?; + if is_duplicate(&reply) { + return Ok(false); + } + expect_status(&reply, 200, "upload")?; + Ok(true) + } + + /// The row of the asset: absent, another hash, pending or confirmed. + pub fn row_state(&self, entry: &AssetEntry) -> Result { + let url = format!( + "{}/rest/v1/anatomical_sheet_assets?id=eq.{}&select=sha256,uploaded_at", + self.origin, entry.svg_asset_id + ); + let reply = self.exchange(MAX_BODY, |agent, me| me.authorised(agent.get(&url)).call())?; + check_access(&reply)?; + expect_status(&reply, 200, "row read")?; + let rows: Vec = serde_json::from_slice(&reply.body) + .map_err(|_| refuse(UploadKind::Handshake, "the row answer is not a JSON list"))?; + Ok(match rows.first() { + None => RowState::Unknown, + Some(row) => row_state_of(row, &entry.sha256), + }) + } + + /// Marks the asset bytes as present (idempotent on the server, service role only). + pub fn confirm(&self, entry: &AssetEntry) -> Result<(), UploadError> { + let url = format!("{}/rest/v1/rpc/confirm_sheet_asset_upload", self.origin); + let body = json!({ "asset_id": entry.svg_asset_id }); + let reply = self.exchange(MAX_BODY, |agent, me| { + me.authorised(agent.post(&url)).send_json(&body) + })?; + check_access(&reply)?; + expect_status(&reply, 200, "confirm") + } +} + +/// The connection could not be made or broke: worth another attempt. +fn is_transient(error: &ureq::Error) -> bool { + matches!( + error, + ureq::Error::Io(_) + | ureq::Error::Timeout(_) + | ureq::Error::HostNotFound + | ureq::Error::ConnectionFailed + ) +} + +/// Not retried: a body over its cap is a destination holding something it should not (an +/// object larger than any drawing); anything else is a request the tool cannot build or an +/// answer it cannot read (a key a header refuses, a malformed HTTP answer: `Protocol`), the +/// same on every attempt. The key itself is never part of the message. +fn final_error(error: &ureq::Error) -> UploadError { + match error { + ureq::Error::BodyExceedsLimit(limit) => refuse( + UploadKind::State, + format!("the destination answered more than {limit} bytes"), + ), + _ => refuse( + UploadKind::Handshake, + "the request failed and is not retried (a key a header refuses, a malformed answer)", + ), + } +} + +fn row_state_of(row: &Value, expected_sha256: &str) -> RowState { + let found = row + .get("sha256") + .and_then(Value::as_str) + .unwrap_or_default(); + if found != expected_sha256 { + return RowState::OtherHash(found.to_owned()); + } + match row.get("uploaded_at") { + Some(Value::Null) | None => RowState::Pending, + Some(_) => RowState::Confirmed, + } +} + +fn read_reply( + response: &mut ureq::http::Response, + limit: u64, +) -> Result { + let body = response + .body_mut() + .with_config() + .limit(limit) + .read_to_vec()?; + Ok(Reply { + status: response.status().as_u16(), + body, + }) +} + +/// The `statusCode` of a Storage error body (a string, "404" or "409" here). +fn storage_code(reply: &Reply) -> Option { + let body: Value = serde_json::from_slice(&reply.body).ok()?; + body.get("statusCode")?.as_str().map(str::to_owned) +} + +/// Storage answers a missing object with HTTP 400 and `statusCode` "404" in this image family. +fn is_not_found(reply: &Reply) -> bool { + reply.status == 404 || (reply.status == 400 && storage_code(reply).as_deref() == Some("404")) +} + +/// A key that already exists answers 409, or 400 with `statusCode` "409" ("Duplicate"). +fn is_duplicate(reply: &Reply) -> bool { + reply.status == 409 || (reply.status == 400 && storage_code(reply).as_deref() == Some("409")) +} + +fn check_access(reply: &Reply) -> Result<(), UploadError> { + if matches!(reply.status, 401 | 403) { + return Err(refuse( + UploadKind::Access, + format!("HTTP {}: the destination refused the key", reply.status), + )); + } + Ok(()) +} + +fn expect_status(reply: &Reply, wanted: u16, what: &str) -> Result<(), UploadError> { + if reply.status == wanted { + return Ok(()); + } + // The server's free text is not echoed: only the step and the status. + Err(refuse( + UploadKind::Handshake, + format!("{what}: unexpected HTTP {}", reply.status), + )) +} diff --git a/crates/core/src/curation/draft/app_review.rs b/crates/core/src/curation/draft/app_review.rs new file mode 100644 index 00000000..bca78823 --- /dev/null +++ b/crates/core/src/curation/draft/app_review.rs @@ -0,0 +1,37 @@ +//! The drawing of one view exactly as the application renders it +//! (`packages/anatomy/src/curation/app-review.ts`): the cleaned asset framed on the view's box +//! plus the annotation layer generated from the document, by the R3 layer the editor canvas +//! uses. Written under `draft/review/app-.svg` so the markers and the framing can be +//! compared outside the browser. +//! +//! Declared difference: the R3 owner decision (2026-10-15) gives a trigger without a name of +//! its own the opened view's name in each language; the TypeScript renderer wrote the French +//! name twice (`svg_compare::TriggerNames`). + +use std::collections::HashSet; + +use super::drawing::{CleanedDrawing, drawing_text}; +use super::targets::fail; +use crate::anatomy::layer::{find_view, render_layer, view_box_of}; +use crate::anatomy::svg::Node; +use crate::curation::PipelineError; +use crate::domain::sheet::AnatomicalSheetDocument; + +pub fn render_app_review_drawing( + drawing: &CleanedDrawing, + document: &AnatomicalSheetDocument, + view_id: &str, +) -> Result { + let view = + find_view(document, view_id).ok_or_else(|| fail(format!("unknown view \"{view_id}\"")))?; + let mut root = drawing.root.clone(); + if let Some(view_box) = view_box_of(view) { + root.set_attr("viewBox", view_box); + } + root.remove_attr("width"); + root.remove_attr("height"); + let layer = render_layer(document, view_id, &HashSet::new()) + .map_err(|_| fail(format!("unknown view \"{view_id}\"")))?; + root.children.push(Node::Element(layer)); + drawing_text(&drawing.prolog, &root) +} diff --git a/crates/core/src/curation/draft/apply.rs b/crates/core/src/curation/draft/apply.rs new file mode 100644 index 00000000..357789db --- /dev/null +++ b/crates/core/src/curation/draft/apply.rs @@ -0,0 +1,231 @@ +//! Applies a changeset on a baseline document (`packages/anatomy/src/curation/apply.ts`), +//! deterministically and with a record per elementary edit. The references file replaces the +//! document registry first (it is the source of truth). Any op that cannot apply exactly as +//! written, and any integrity error left at the end, refuses: a curated document is never +//! produced from a partially applied changeset. +//! +//! Review rule: a level B or C change never leaves what it touched (findings, finding +//! categories, annotations: every item a set, add, cite, rename or move resolved to, whole +//! added subtrees and subtree scopes included) as inherited or reviewed. After its ops, the +//! applier sets `review_status = 'to_confirm'` on each one and records that edit under the +//! same change id. An explicit 'reviewed' in such a change refuses. Level A is untouched by +//! the rule. + +use serde_json::Value; + +use super::ops::{apply_op, assert_declared}; +use super::records::{ + ChangeRecord, CurationResult, RecordParts, Recorder, charge, strip_marks, touch_order, +}; +use super::schema::{Change, ChangeSummary, Op, SetOp}; +use super::shape::assert_same_shape; +use super::targets::{ + Path, Step, TargetKind, all_findings, at, fail, item_at_mut, list_at, top_collection_path, +}; +use crate::curation::PipelineError; +use crate::domain::sheet::{ + AnatomicalSheetDocument, Reference, SheetIssue, SheetIssueSeverity, validate_sheet_document, +}; + +/// A finding or an annotation a change touched: its touch order, its path, its target. +struct Touched { + order: u64, + path: Path, + target: String, +} + +/// Findings and annotations of the document the change touched, in first-touch order. +fn touched_reviewable(doc: &Value) -> Result, PipelineError> { + let mut candidates: Vec<(Path, String)> = all_findings(doc)? + .into_iter() + .map(|entry| (entry.path, entry.target)) + .collect(); + let annotations = top_collection_path(TargetKind::Annotation); + for (index, annotation) in list_at(doc, &annotations)?.iter().enumerate() { + let mut path = annotations.clone(); + path.push(Step::Index(index)); + let id = super::records::js_string(annotation.get("id")); + candidates.push((path, format!("annotation:{id}"))); + } + let mut touched = Vec::new(); + for (path, target) in candidates { + let Some(order) = at(doc, &path)?.as_object().and_then(touch_order) else { + continue; + }; + touched.push(Touched { + order, + path, + target, + }); + } + touched.sort_by_key(|item| item.order); + Ok(touched) +} + +/// Marks every touched item still in the document 'to_confirm'. +fn mark_to_confirm( + doc: &mut Value, + change: &ChangeSummary, + records: &mut Vec, + spent: &mut usize, +) -> Result<(), PipelineError> { + for touched in touched_reviewable(doc)? { + let item = item_at_mut(doc, &touched.path)?; + let status = item.get("review_status").cloned(); + if status == Some(Value::from("to_confirm")) { + continue; + } + let before = match status { + None | Some(Value::Null) => Value::from("inherited"), + Some(value) => value, + }; + item.insert("review_status".to_owned(), Value::from("to_confirm")); + let op = Op::Set(SetOp { + target: touched.target.clone(), + field: "review_status".to_owned(), + value: Value::from("to_confirm"), + scope: None, + }); + let after = Value::from("to_confirm"); + let parts = RecordParts { + change, + op: &op, + target: &touched.target, + field: Some("review_status"), + before: &before, + after: &after, + }; + charge(spent, parts)?; + records.push(ChangeRecord { + change: change.clone(), + op, + target: touched.target, + field: Some("review_status".to_owned()), + before, + after, + }); + } + Ok(()) +} + +fn apply_change( + doc: &mut Value, + change: &Change, + records: &mut Vec, + spent: &mut usize, +) -> Result<(), PipelineError> { + let summary = change.summary(); + assert_declared(doc, &change.reference_ids) + .map_err(|error| fail(format!("{}: {error}", change.id)))?; + let mut next_touch = 0; + for (index, op) in change.ops.iter().enumerate() { + let mut recorder = Recorder::new(&summary, op, records, (&mut next_touch, &mut *spent)); + apply_op(doc, &mut recorder) + .and_then(|()| assert_depth(doc)) + .map_err(|error| fail(format!("{} op {index}: {error}", change.id)))?; + } + if change.level.needs_confirmation() { + mark_to_confirm(doc, &summary, records, spent) + .map_err(|error| fail(format!("{}: {error}", change.id)))?; + } + strip_marks(doc); + Ok(()) +} + +/// Nesting a valid sheet document never approaches (the equine document has 10 levels): a +/// resource bound checked after every op, so repeated adds, moves or deep values cannot grow +/// the document until a recursive walk overflows the stack. +pub const MAX_DOCUMENT_DEPTH: usize = 64; + +/// Values a valid sheet document never approaches (the equine document holds 6,374): a +/// resource bound checked with the depth, so the document, and the work done after each op, +/// cannot grow without limit. +pub const MAX_DOCUMENT_VALUES: usize = 200_000; + +/// The nesting and the number of values of `value`, walked with an explicit stack (no +/// recursion); the walk stops counting past the value bound. +fn measure(value: &Value) -> (usize, usize) { + let (mut deepest, mut count) = (0, 0); + let mut pending = vec![(value, 1)]; + while let Some((value, depth)) = pending.pop() { + count += 1; + if count > MAX_DOCUMENT_VALUES { + break; + } + let children: Box> = match value { + Value::Object(map) => Box::new(map.values()), + Value::Array(items) => Box::new(items.iter()), + _ => continue, + }; + deepest = deepest.max(depth); + pending.extend(children.map(|child| (child, depth + 1))); + } + (deepest, count) +} + +fn assert_depth(doc: &Value) -> Result<(), PipelineError> { + let (depth, count) = measure(doc); + if count > MAX_DOCUMENT_VALUES { + return Err(fail(format!( + "the document holds more than {MAX_DOCUMENT_VALUES} values" + ))); + } + if depth > MAX_DOCUMENT_DEPTH { + return Err(fail(format!( + "the document nests more than {MAX_DOCUMENT_DEPTH} levels" + ))); + } + Ok(()) +} + +fn describe(issues: &[SheetIssue]) -> String { + issues + .iter() + .map(|issue| format!("{}: {}", issue.path, issue.message)) + .collect::>() + .join("; ") +} + +/// Shape (the strict R2 contract) then integrity check of a curated document. Refuses on any +/// shape issue or integrity error; returns the warnings, which are allowed. +pub fn curated_issues(doc: &Value) -> Result, PipelineError> { + let parsed: AnatomicalSheetDocument = serde_json::from_value(doc.clone()) + .map_err(|error| fail(format!("curated document is not shape-valid: {error}")))?; + assert_same_shape("curated document is not shape-valid", doc, &parsed)?; + let issues = validate_sheet_document(&parsed); + let errors: Vec = issues + .iter() + .filter(|issue| issue.severity == SheetIssueSeverity::Error) + .cloned() + .collect(); + if !errors.is_empty() { + return Err(fail(format!( + "curated document has integrity errors: {}", + describe(&errors) + ))); + } + Ok(issues) +} + +pub fn apply_changeset( + baseline: &Value, + references: &[Reference], + changes: &[Change], +) -> Result { + let mut doc = baseline.clone(); + let registry = + serde_json::to_value(references).map_err(|error| fail(format!("references: {error}")))?; + doc.as_object_mut() + .ok_or_else(|| fail("the baseline is not an object"))? + .insert("references".to_owned(), registry); + let mut records = Vec::new(); + let mut spent = 0; + for change in changes { + apply_change(&mut doc, change, &mut records, &mut spent)?; + } + curated_issues(&doc)?; + Ok(CurationResult { + document: doc, + records, + }) +} diff --git a/crates/core/src/curation/draft/changelog.rs b/crates/core/src/curation/draft/changelog.rs new file mode 100644 index 00000000..f4d813e2 --- /dev/null +++ b/crates/core/src/curation/draft/changelog.rs @@ -0,0 +1,204 @@ +//! French CHANGELOG of the working revision (`packages/anatomy/src/curation/changelog.ts`): +//! volumes before / after, then one table per change level with every elementary edit. Pure +//! formatting of the records, deterministic (no dates). The text returned here is the raw +//! report; `markdown::format_markdown` aligns its tables as Prettier did. + +use serde_json::Value; + +use super::labels::{LEVELS, kind_label, level_label}; +use super::migration_map::MigrationMapStats; +use super::records::ChangeRecord; +use super::schema::ChangeLevel; +use super::stats::{DocumentStats, stat_rows}; +use super::targets::fail; +use crate::curation::PipelineError; +use crate::curation::markdown::{Cell, assert_table_bound, code, table}; +use crate::curation::report_guard::assert_authored; +use crate::json::to_js_compact; + +/// The longest value text a table cell shows, in UTF-16 units (`text.length`). +const MAX_VALUE_LENGTH: usize = 120; + +/// `isLabel`: a non-empty object whose keys are `fr` / `en` with string values. +fn is_label(value: &Value) -> bool { + value.as_object().is_some_and(|map| { + !map.is_empty() + && map + .iter() + .all(|(key, value)| (key == "fr" || key == "en") && value.is_string()) + }) +} + +/// `compactValue`: labels as text, other non-strings as JSON, cut to 120 UTF-16 units with an +/// ellipsis. A cut inside a surrogate pair leaves a lone surrogate, which the file write turned +/// into U+FFFD: `from_utf16_lossy` gives the same text. +pub fn compact_value(value: &Value) -> Result { + let text = match value { + Value::String(text) => text.clone(), + Value::Object(map) if is_label(value) => map + .values() + .filter_map(Value::as_str) + .collect::>() + .join(" / "), + other => to_js_compact(other).map_err(|error| fail(format!("value: {error}")))?, + }; + let units: Vec = text.encode_utf16().collect(); + if units.len() <= MAX_VALUE_LENGTH { + return Ok(text); + } + Ok(format!( + "{}…", + String::from_utf16_lossy(&units[..MAX_VALUE_LENGTH - 1]) + )) +} + +fn authored(text: String) -> Result { + assert_authored(&text)?; + Ok(text) +} + +/// `recordSubject`: the target, with its field when there is one. +pub fn record_subject(record: &ChangeRecord) -> String { + match &record.field { + None => record.target.clone(), + Some(field) => format!("{}.{field}", record.target), + } +} + +fn record_row(record: &ChangeRecord) -> Result, PipelineError> { + // Authored texts reach the cells raw: no backtick (code spans are the generator's). + assert_authored(&record.change.title.fr)?; + assert_authored(&record.change.rationale)?; + let change = &record.change; + let references: Vec = change + .reference_ids + .iter() + .map(|id| code(Some(id))) + .collect(); + let references = if references.is_empty() { + "-".to_owned() + } else { + references.join(", ") + }; + let confirm = if change.level.needs_confirmation() { + "oui" + } else { + "non" + }; + Ok(vec![ + Cell::from(format!("{} {}", code(Some(&change.id)), change.title.fr)), + Cell::from(code(Some(&record_subject(record)))), + Cell::from(authored(compact_value(&record.before)?)?), + Cell::from(authored(compact_value(&record.after)?)?), + Cell::from(kind_label(change.kind)), + Cell::from(change.rationale.as_str()), + Cell::from(references), + Cell::from(confirm), + ]) +} + +fn level_section( + level: ChangeLevel, + records: &[ChangeRecord], + spent: &mut usize, +) -> Result { + let rows = records + .iter() + .filter(|record| record.change.level == level) + .map(record_row) + .collect::, _>>()?; + let head = [ + "Changement", + "Objet", + "Avant", + "Après", + "Nature", + "Justification", + "Références", + "Confirmation requise", + ]; + // The rows are bounded through the records' weight; the alignment of the three level + // tables together is checked here, before each raw table is joined. + assert_table_bound(&head, &rows, spent)?; + let body = if rows.is_empty() { + "Aucun changement de ce niveau.".to_owned() + } else { + table(&head, &rows) + }; + Ok(format!("## {}\n\n{body}", level_label(level))) +} + +fn comparison(before: &DocumentStats, after: &DocumentStats) -> String { + let after_rows = stat_rows(after); + let rows: Vec> = stat_rows(before) + .into_iter() + .map(|(label, value)| { + let later = after_rows + .iter() + .find(|(other, _)| *other == label) + .map_or(0, |(_, value)| *value); + vec![Cell::from(label), Cell::from(value), Cell::from(later)] + }) + .collect(); + format!( + "## Comparaison quantitative\n\n{}", + table(&["Indicateur", "Avant", "Après"], &rows) + ) +} + +fn intro() -> String { + [ + "# Journal des changements : révision de travail", + "", + "Généré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements \ + rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.", + "", + "Niveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les \ + niveaux B et C demandent une confirmation professionnelle.", + ] + .join("\n") +} + +/// Fate of the legacy finding nodes a Report v2 may cite (`report-migration-map.json`). +fn migration(stats: &MigrationMapStats) -> String { + let row = |label: &str, value: usize| vec![Cell::from(label), Cell::from(value.to_string())]; + let rows = vec![ + row("Nœuds du catalogue historique", stats.nodes), + row("Chemin identique", stats.identical), + row( + "Chemin renommé ou déplacé (suivi des renommages)", + stats.remapped, + ), + row( + "Relogé sous une autre catégorie (correspondance unique)", + stats.rehomed, + ), + row( + "Retiré : le bilan garde le constat avec ses libellés figés", + stats.removed, + ), + ]; + format!( + "## Migration des bilans v2\n\n{}", + table(&["Nœuds", "Nombre"], &rows) + ) +} + +/// `renderChangelog`: the raw text, before the table alignment. +pub fn render_changelog( + records: &[ChangeRecord], + before: &DocumentStats, + after: &DocumentStats, + migration_stats: &MigrationMapStats, +) -> Result { + let mut sections = vec![ + intro(), + comparison(before, after), + migration(migration_stats), + ]; + let mut spent = 0; + for level in LEVELS { + sections.push(level_section(level, records, &mut spent)?); + } + Ok(format!("{}\n", sections.join("\n\n"))) +} diff --git a/crates/core/src/curation/draft/drawing.rs b/crates/core/src/curation/draft/drawing.rs new file mode 100644 index 00000000..1e3b2fc2 --- /dev/null +++ b/crates/core/src/curation/draft/drawing.rs @@ -0,0 +1,68 @@ +//! The frozen cleaned drawing as the review files read it: the text of +//! `draft/assets/horse.svg` through the core's one SVG reader (refused if the reader removes +//! anything: the product's drawings come out untouched), and its prolog (the bytes before the +//! root element: the XML declaration and its line break), kept verbatim in front of every +//! drawing the pipeline writes, as xmldom's serialiser kept it. + +use crate::anatomy::svg::serialize::{is_xml_text, serialize}; +use crate::anatomy::svg::{Element, Node, read_svg}; +use crate::curation::PipelineError; + +pub struct CleanedDrawing { + pub prolog: String, + pub root: Element, +} + +fn refuse(why: impl std::fmt::Display) -> PipelineError { + PipelineError::Source(format!("horse.svg: {why}")) +} + +/// Reads the cleaned drawing (UTF-8, refused otherwise, as `TextDecoder` fatal was). +pub fn read_cleaned_drawing(bytes: &[u8]) -> Result { + let text = std::str::from_utf8(bytes).map_err(|_| refuse("invalid UTF-8"))?; + let sanitized = read_svg(text).map_err(|error| refuse(error.reason()))?; + if !sanitized.removed.is_empty() { + return Err(refuse(format!( + "the reader removed {:?}", + sanitized.removed + ))); + } + let document = roxmltree::Document::parse(text).map_err(refuse)?; + let start = document.root_element().range().start; + Ok(CleanedDrawing { + prolog: text[..start].to_owned(), + root: sanitized.root, + }) +} + +/// A value or text the drawing cannot carry as the TypeScript wrote it: a code point XML 1.0 +/// refuses, or a carriage return (xmldom wrote it raw in text, a parser reads it back as a line +/// feed; the core writes ` `, which a parser keeps). Walked with an explicit stack. +fn first_unwritable(root: &Element) -> Option { + let bad = |text: &str| !is_xml_text(text) || text.contains('\r'); + let mut pending = vec![root]; + while let Some(element) = pending.pop() { + if let Some(attr) = element.attrs.iter().find(|a| bad(&a.value)) { + return Some(attr.value.clone()); + } + for child in &element.children { + match child { + Node::Element(child) => pending.push(child), + Node::Text(text) if bad(text) => return Some(text.clone()), + Node::Text(_) => {} + } + } + } + None +} + +/// The file text of a drawing built on the cleaned root; refused when a label, an id or a path +/// holds what the drawing cannot carry (`first_unwritable`). +pub fn drawing_text(prolog: &str, root: &Element) -> Result { + if let Some(text) = first_unwritable(root) { + return Err(PipelineError::Guard(format!( + "a review drawing cannot carry {text:?}" + ))); + } + Ok(format!("{prolog}{}", serialize(root))) +} diff --git a/crates/core/src/curation/draft/fields.rs b/crates/core/src/curation/draft/fields.rs new file mode 100644 index 00000000..e7071993 --- /dev/null +++ b/crates/core/src/curation/draft/fields.rs @@ -0,0 +1,161 @@ +//! Fields a `set` may write, per kind of item (`packages/anatomy/src/curation/fields.ts`). Ids +//! are left out on purpose: an id changes through `rename`, which also rewrites every +//! reference to it. Unlisted field → the op fails instead of writing a stray key. + +use serde_json::{Map, Value}; + +use super::targets::{Item, ParsedTarget, TargetKind, fail}; +use crate::curation::PipelineError; +use crate::curation::text::js_insert; + +/// Item kind of the settable table; a finding is a category or a node. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum FieldKind { + Document, + Region, + Reference, + Category, + View, + Annotation, + Zone, + FindingCategory, + FindingNode, +} + +impl FieldKind { + pub fn of(target: &ParsedTarget, is_category: Option) -> Self { + match target.kind { + TargetKind::Document => Self::Document, + TargetKind::Region => Self::Region, + TargetKind::Reference => Self::Reference, + TargetKind::Category => Self::Category, + TargetKind::View => Self::View, + TargetKind::Annotation => Self::Annotation, + TargetKind::Zone => Self::Zone, + TargetKind::Finding => { + if is_category.unwrap_or(target.ids.len() == 2) { + Self::FindingCategory + } else { + Self::FindingNode + } + } + } + } + + fn settable(self) -> &'static [&'static str] { + match self { + Self::Document => &["name", "description", "scope_disclaimer", "attribution"], + Self::Region => &["name", "count", "count_range"], + Self::Reference => &["type", "citation", "url", "doi"], + Self::Category => &["name", "color"], + Self::View => &["name", "svg_asset_id", "view_box", "parent_view_id"], + Self::Annotation => &[ + "name", + "kind", + "view_id", + "category_id", + "laterality", + "geometry", + "review_status", + "finding_zone_id", + "vertebral_region_code", + "opens_view_id", + "color", + ], + Self::Zone => &["name"], + Self::FindingCategory => &[ + "kind", + "name", + "description", + "reference_ids", + "review_status", + ], + Self::FindingNode => &[ + "name", + "description", + "requires_vet_referral", + "reference_ids", + "review_status", + ], + } + } +} + +/// More segments than any settable path needs (the deepest has two): a resource bound, so a +/// field path cannot nest the document without limit. +pub const MAX_FIELD_SEGMENTS: usize = 8; + +/// The segments of a dot path. A segment starting with NUL is reserved for the applier's +/// touch marks (`records::TOUCH_MARK`): written, it would be stripped with them and the +/// author's value lost, so it is refused (the TypeScript refused such a key at the gate). +pub fn split_field(field: &str) -> Result, PipelineError> { + let path: Vec<&str> = field.split('.').collect(); + if path.iter().any(|key| key.is_empty()) { + return Err(fail(format!("malformed field \"{field}\""))); + } + if path.len() > MAX_FIELD_SEGMENTS { + return Err(fail(format!( + "field \"{field}\" has more than {MAX_FIELD_SEGMENTS} segments" + ))); + } + if let Some(key) = path.iter().find(|key| key.starts_with('\0')) { + return Err(fail(format!("reserved key {key:?} in field \"{field}\""))); + } + // A segment reaches the reports' code spans through the record: the alphabet of every + // settable path (`name.fr`, `view_box.min_x`, `count_range.min`), nothing a Markdown parser + // could pair with the text around the span (a `]` closed an author's `[` there). + let id_alphabet = |key: &str| { + key.chars() + .all(|c| c.is_ascii_alphanumeric() || "_-".contains(c)) + }; + if !path.iter().all(|key| id_alphabet(key)) { + return Err(fail(format!( + "field {field:?} holds a segment outside [A-Za-z0-9_-]" + ))); + } + // A JavaScript assignment through `__proto__` never wrote a key: it set a prototype, + // polluted `Object.prototype` or did nothing. No faithful reading exists, so it is refused. + if path.contains(&"__proto__") { + return Err(fail(format!( + "reserved key \"__proto__\" in field \"{field}\"" + ))); + } + Ok(path) +} + +pub fn is_settable(kind: FieldKind, field: &str) -> Result { + Ok(kind.settable().contains(&split_field(field)?[0])) +} + +/// The value at a dot path; `None` where JavaScript read `undefined`. +pub fn read_field(item: &Item, field: &str) -> Result, PipelineError> { + let mut value: Option<&Map> = Some(item); + let mut found: Option<&Value> = None; + for key in split_field(field)? { + let Some(holder) = value else { + return Ok(None); + }; + found = holder.get(key); + value = found.and_then(Value::as_object); + } + Ok(found.cloned()) +} + +/// Writes a deep copy of value; missing intermediate objects are created (a non-object value +/// on the way is replaced, as `holder[key] = {}` did). +pub fn write_field(item: &mut Item, field: &str, value: &Value) -> Result<(), PipelineError> { + let path = split_field(field)?; + let (last, holders) = path.split_last().ok_or_else(|| fail("empty field"))?; + let mut holder = item; + for key in holders { + if !holder.get(*key).is_some_and(Value::is_object) { + js_insert(holder, key, Value::Object(Map::new())); + } + holder = holder + .get_mut(*key) + .and_then(Value::as_object_mut) + .ok_or_else(|| fail("field holder vanished"))?; + } + js_insert(holder, last, value.clone()); + Ok(()) +} diff --git a/crates/core/src/curation/draft/labels.rs b/crates/core/src/curation/draft/labels.rs new file mode 100644 index 00000000..8679d05b --- /dev/null +++ b/crates/core/src/curation/draft/labels.rs @@ -0,0 +1,45 @@ +//! French labels shared by the CHANGELOG and the review report +//! (`packages/anatomy/src/curation/labels.ts`). + +use super::schema::{ChangeKind, ChangeLevel, ChangePriority}; + +pub fn kind_label(kind: ChangeKind) -> &'static str { + match kind { + ChangeKind::Correction => "Correction", + ChangeKind::Terminology => "Terminologie", + ChangeKind::Translation => "Traduction", + ChangeKind::Restructure => "Réorganisation", + ChangeKind::Enrichment => "Ajout", + ChangeKind::Reference => "Référence", + ChangeKind::Geometry => "Géométrie", + ChangeKind::Removal => "Suppression", + ChangeKind::Technical => "Technique", + } +} + +pub fn level_label(level: ChangeLevel) -> &'static str { + match level { + ChangeLevel::A => "Niveau A : erreurs démontrées", + ChangeLevel::B => "Niveau B : améliorations étayées (confirmation requise)", + ChangeLevel::C => "Niveau C : points incertains (question au professionnel)", + } +} + +pub fn priority_label(priority: ChangePriority) -> &'static str { + match priority { + ChangePriority::High => "haute", + ChangePriority::Medium => "moyenne", + ChangePriority::Low => "basse", + } +} + +pub const LEVELS: [ChangeLevel; 3] = [ChangeLevel::A, ChangeLevel::B, ChangeLevel::C]; + +/// The letter of a level, as the reports print it. +pub fn level_letter(level: ChangeLevel) -> &'static str { + match level { + ChangeLevel::A => "A", + ChangeLevel::B => "B", + ChangeLevel::C => "C", + } +} diff --git a/crates/core/src/curation/draft/migration_map.rs b/crates/core/src/curation/draft/migration_map.rs new file mode 100644 index 00000000..515f41f5 --- /dev/null +++ b/crates/core/src/curation/draft/migration_map.rs @@ -0,0 +1,310 @@ +//! Report migration map (`packages/anatomy/src/curation/migration-map.ts`): where every +//! identifier a Report v2 may carry lands in the curated draft. Annotations come from the +//! legacy id map (then follow annotation renames), finding paths from replaying the applier's +//! rename, move and remove records over every node of the legacy baseline. A node removed with +//! its category and re-added under another category at the same relative place (the sphenoid +//! restructure) is re-homed when the match is unique; anything else stays null = "removed", +//! and the report keeps the finding with its snapshots. + +use serde::Serialize; +use serde_json::{Map, Value, json}; + +use super::records::ChangeRecord; +use super::schema::Op; +use super::targets::{TargetKind, all_findings, list_at, top_collection_path}; +use crate::curation::PipelineError; +use crate::curation::text::js_object; + +const FINDING: &str = "finding:"; + +/// The sheet a report references: id, database version (null for a bundled draft), document +/// fingerprint (the `SheetRef` of Report v3, camelCase). +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct SheetRef { + pub sheet_id: String, + pub version_id: Option, + pub document_sha256: String, +} + +pub struct MigrationMapInput<'a> { + pub baseline: &'a Value, + pub final_document: &'a Value, + pub legacy_id_map: &'a Map, + pub records: &'a [ChangeRecord], + pub sheet: &'a SheetRef, + pub main_view_id: &'a str, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct MigrationMapStats { + pub nodes: usize, + pub identical: usize, + pub remapped: usize, + pub rehomed: usize, + pub removed: usize, +} + +struct PathEntry { + legacy: String, + current: Option, + rehomed: bool, +} + +/// `target.slice(FINDING.length)`: the first eight UTF-16 units dropped, whatever they are. +fn strip(target: &str) -> String { + let mut units: Vec = target.encode_utf16().collect(); + units.drain(..units.len().min(FINDING.len())); + String::from_utf16_lossy(&units) +} + +fn last_segment(path: &str) -> &str { + path.rsplit('/').next().unwrap_or(path) +} + +fn with_last_segment(path: &str, id: &str) -> String { + match path.rfind('/') { + None => id.to_owned(), + Some(cut) => format!("{}{id}", &path[..=cut]), + } +} + +fn replace_prefix(entries: &mut [PathEntry], from: &str, to: Option<&str>) { + for entry in entries { + let Some(current) = &entry.current else { + continue; + }; + if current == from { + entry.current = to.map(str::to_owned); + } else if let Some(rest) = current.strip_prefix(&format!("{from}/")) { + entry.current = to.map(|to| format!("{to}/{rest}")); + } + } +} + +/// Legacy id → current id, for the annotations and the views (`Map` in the TypeScript). +struct Ids { + annotations: Vec<(String, String)>, + views: Vec<(String, String)>, +} + +fn id_entries(map: &Map, key: &str) -> Vec<(String, String)> { + map.get(key) + .and_then(Value::as_object) + .map(|object| { + object + .iter() + .map(|(legacy, current)| { + ( + legacy.clone(), + current.as_str().unwrap_or_default().to_owned(), + ) + }) + .collect() + }) + .unwrap_or_default() +} + +fn apply_record(entries: &mut [PathEntry], ids: &mut Ids, record: &ChangeRecord) { + let target = record.target.as_str(); + let (rename_to, move_to) = match &record.op { + Op::Rename(op) => (Some(op.id.as_str()), None), + Op::Remove(_) => (None, None), + Op::Move(op) => (None, Some(op.to.as_str())), + _ => return, + }; + if let Some(from) = target.strip_prefix(FINDING) { + match &record.op { + Op::Rename(op) => replace_prefix(entries, from, Some(&with_last_segment(from, &op.id))), + Op::Remove(_) => replace_prefix(entries, from, None), + _ => { + let to = format!( + "{}/{}", + strip(move_to.unwrap_or_default()), + last_segment(from) + ); + replace_prefix(entries, from, Some(&to)); + } + } + return; + } + // `target.split(':', 2)`: the kind, then what lies before the next colon. + let mut parts = target.splitn(3, ':'); + let kind = parts.next().unwrap_or_default(); + let id = parts.next().unwrap_or_default(); + if kind == "zone" { + for entry in entries { + let Some(current) = &entry.current else { + continue; + }; + let Some(rest) = current.strip_prefix(&format!("{id}/")) else { + continue; + }; + entry.current = match &record.op { + Op::Remove(_) => None, + Op::Rename(op) => Some(format!("{}/{rest}", op.id)), + _ => Some(format!("{id}/{rest}")), + }; + } + return; + } + if let Some(to) = rename_to + && (kind == "annotation" || kind == "view") + { + let map = if kind == "annotation" { + &mut ids.annotations + } else { + &mut ids.views + }; + for (_, current) in map.iter_mut() { + if current == id { + *current = to.to_owned(); + } + } + } +} + +/// `zone//` present exactly once in the final document. +fn rehome(entry: &mut PathEntry, final_paths: &[String]) { + let mut segments = entry.legacy.split('/'); + let zone = segments.next().unwrap_or_default(); + let _category = segments.next(); + let rest: Vec<&str> = segments.collect(); + if rest.is_empty() { + return; + } + let tail = format!("/{}", rest.join("/")); + let matches: Vec<&String> = final_paths + .iter() + .filter(|path| { + path.starts_with(&format!("{zone}/")) + && path.ends_with(&tail) + && path.split('/').count() == rest.len() + 2 + }) + .collect(); + if let [only] = matches[..] { + entry.current = Some(only.clone()); + entry.rehomed = true; + } +} + +fn text(value: Option<&Value>) -> String { + value.and_then(Value::as_str).unwrap_or_default().to_owned() +} + +/// Annotation id → `{ fr, en }` of its name, empty strings where the name is missing. +fn annotation_names(doc: &Value) -> Result, PipelineError> { + let annotations = list_at(doc, &top_collection_path(TargetKind::Annotation))?; + Ok(annotations + .iter() + .map(|annotation| { + let name = annotation.get("name"); + let id = super::records::js_string(annotation.get("id")); + let fr = text(name.and_then(|n| n.get("fr"))); + let en = text(name.and_then(|n| n.get("en"))); + (id, json!({ "fr": fr, "en": en })) + }) + .collect()) +} + +fn initial_entries(baseline: &Value) -> Result, PipelineError> { + Ok(all_findings(baseline)? + .into_iter() + .map(|entry| { + let legacy = strip(&entry.target); + PathEntry { + current: Some(legacy.clone()), + legacy, + rehomed: false, + } + }) + .collect()) +} + +fn stats_of(entries: &[PathEntry]) -> MigrationMapStats { + MigrationMapStats { + nodes: entries.len(), + identical: entries + .iter() + .filter(|e| e.current.as_deref() == Some(e.legacy.as_str())) + .count(), + remapped: entries + .iter() + .filter(|e| { + e.current.is_some() && e.current.as_deref() != Some(e.legacy.as_str()) && !e.rehomed + }) + .count(), + rehomed: entries.iter().filter(|e| e.rehomed).count(), + removed: entries.iter().filter(|e| e.current.is_none()).count(), + } +} + +fn pairs(entries: &[(String, String)]) -> Map { + js_object( + entries + .iter() + .map(|(legacy, current)| (legacy.clone(), Value::from(current.as_str()))), + ) +} + +/// The map (in the TypeScript key order) and its stats. +pub fn build_report_migration_map( + input: &MigrationMapInput<'_>, +) -> Result<(Value, MigrationMapStats), PipelineError> { + let mut entries = initial_entries(input.baseline)?; + let mut ids = Ids { + annotations: id_entries(input.legacy_id_map, "annotations"), + views: id_entries(input.legacy_id_map, "views"), + }; + for record in input.records { + apply_record(&mut entries, &mut ids, record); + } + // `new Set(...)`: a path met twice counts once. + let mut final_paths: Vec = Vec::new(); + for entry in all_findings(input.final_document)? { + let path = strip(&entry.target); + if !final_paths.contains(&path) { + final_paths.push(path); + } + } + for entry in &mut entries { + if entry + .current + .as_ref() + .is_some_and(|current| !final_paths.contains(current)) + { + entry.current = None; + } + if entry.current.is_none() { + rehome(entry, &final_paths); + } + } + let legacy_names = annotation_names(input.baseline)?; + let import_ids = id_entries(input.legacy_id_map, "annotations"); + let annotations = js_object(ids.annotations.iter().map(|(legacy, final_id)| { + let imported = import_ids + .iter() + .find(|(key, _)| key == legacy) + .map(|(_, id)| id.as_str()); + let name = imported + .and_then(|id| legacy_names.iter().find(|(key, _)| key == id)) + .map_or_else(|| json!({ "fr": "", "en": "" }), |(_, name)| name.clone()); + (legacy.clone(), json!({ "id": final_id, "name": name })) + })); + let finding_paths = js_object(entries.iter().map(|entry| { + let current = entry + .current + .as_ref() + .map_or(Value::Null, |c| Value::from(c.as_str())); + (entry.legacy.clone(), current) + })); + let map = json!({ + "schema_version": 1, + "sheet": input.sheet, + "main_view_id": input.main_view_id, + "views": pairs(&ids.views), + "annotations": annotations, + "finding_paths": finding_paths, + }); + Ok((map, stats_of(&entries))) +} diff --git a/crates/core/src/curation/draft/mod.rs b/crates/core/src/curation/draft/mod.rs new file mode 100644 index 00000000..dc447e88 --- /dev/null +++ b/crates/core/src/curation/draft/mod.rs @@ -0,0 +1,32 @@ +//! The draft side of the pipeline (`packages/anatomy/src/curation`): the authored changeset +//! applied on the legacy baseline, the report migration map, the document statistics and the +//! seed SQL (R5.3), the CHANGELOG, the review report and the review drawings (R5.4). Parity with +//! the TypeScript is proven by `tests/curation_draft.rs` and `tests/curation_review.rs` against +//! the committed `draft/` folder and the `oracles/r5` files. + +pub mod app_review; +pub mod apply; +pub mod changelog; +pub mod drawing; +pub mod fields; +pub mod labels; +pub mod migration_map; +pub mod ops; +pub mod overlay; +pub mod pipeline; +pub mod records; +pub mod rename; +pub mod review_report; +pub mod schema; +pub mod seed; +pub mod shape; +pub mod stats; +pub mod svg_compare; +pub mod targets; + +pub use apply::{apply_changeset, curated_issues}; +pub use pipeline::{ + CLEANED_ASSET_FILE, DRAFT_SEED_SQL_FILE, DraftInput, DraftResult, MIGRATION_MAP_FILE, + SHEET_REF_FILE, build_equine_draft, cleaned_asset, parse_view_box, render_draft_artifacts, +}; +pub use schema::{ASSET_CHANGE_ID, Change, Changeset, parse_changeset, parse_references}; diff --git a/crates/core/src/curation/draft/ops.rs b/crates/core/src/curation/draft/ops.rs new file mode 100644 index 00000000..dc82cba5 --- /dev/null +++ b/crates/core/src/curation/draft/ops.rs @@ -0,0 +1,466 @@ +//! The six op kinds of a change (`packages/anatomy/src/curation/ops.ts`). Each one resolves +//! its target, edits the working document in place and records what it changed; anything it +//! cannot do exactly as written refuses (the applier adds the change id and op index). + +use std::collections::HashSet; + +use serde_json::Value; + +use super::fields::{FieldKind, is_settable, read_field, write_field}; +use super::records::{Recorder, js_deep_equal, js_string}; +use super::rename::{Rename, propagate_rename}; +use super::schema::{ + AddOp, CiteOp, DocumentCollection, MoveOp, Op, Position, RemoveOp, RenameOp, Scope, SetOp, +}; +use super::targets::{ + Located, Path, Step, TargetKind, at, child_list, child_prefix, fail, finding_scope, has_key, + id_text, item_at_mut, list_at, list_at_mut, locate, top_collection_path, +}; +use crate::curation::PipelineError; +use crate::domain::js; + +fn collection_kind(field: DocumentCollection) -> TargetKind { + match field { + DocumentCollection::References => TargetKind::Reference, + DocumentCollection::Categories => TargetKind::Category, + DocumentCollection::Views => TargetKind::View, + DocumentCollection::Annotations => TargetKind::Annotation, + DocumentCollection::FindingZones => TargetKind::Zone, + DocumentCollection::Regions => TargetKind::Region, + } +} + +fn collection_name(field: DocumentCollection) -> &'static str { + match field { + DocumentCollection::References => "references", + DocumentCollection::Categories => "categories", + DocumentCollection::Views => "views", + DocumentCollection::Annotations => "annotations", + DocumentCollection::FindingZones => "finding_zones", + DocumentCollection::Regions => "regions", + } +} + +/// No sibling but `excluded` may already carry the id. +fn assert_free( + list: &[Value], + key: &str, + id: &str, + excluded: Option, +) -> Result<(), PipelineError> { + let taken = list + .iter() + .enumerate() + .any(|(index, entry)| Some(index) != excluded && has_key(entry, key, id)); + if taken { + return Err(fail(format!("\"{id}\" already exists among its siblings"))); + } + Ok(()) +} + +fn insertion_index( + list: &[Value], + key: &str, + position: Option<&Position>, +) -> Result { + let Some(position) = position else { + return Ok(list.len()); + }; + let (anchor, after) = match position { + Position::Index(index) => { + let index = usize::try_from(*index).unwrap_or(usize::MAX); + if index > list.len() { + return Err(fail(format!("position {index} out of range"))); + } + return Ok(index); + } + Position::After { after } => (after, true), + Position::Before { before } => (before, false), + }; + let index = list + .iter() + .position(|entry| has_key(entry, key, anchor)) + .ok_or_else(|| fail(format!("unknown sibling \"{anchor}\"")))?; + Ok(if after { index + 1 } else { index }) +} + +fn unknown_field(op: &SetOp) -> PipelineError { + fail(format!( + "unknown field \"{}\" on \"{}\"", + op.field, op.target + )) +} + +/// A B or C change leaves findings to the professional: no 'reviewed'. +fn assert_not_reviewed(recorder: &Recorder<'_>, op: &SetOp) -> Result<(), PipelineError> { + if op.field != "review_status" || op.value != "reviewed" { + return Ok(()); + } + if recorder.change.level.needs_confirmation() { + return Err(fail(format!( + "level {:?} cannot set \"{}\" review_status to \"reviewed\"", + recorder.change.level, op.target + ))); + } + Ok(()) +} + +fn set_self( + doc: &mut Value, + recorder: &mut Recorder<'_>, + located: &Located, + op: &SetOp, +) -> Result<(), PipelineError> { + if !is_settable(FieldKind::of(&located.target, None), &op.field)? { + return Err(unknown_field(op)); + } + let item = item_at_mut(doc, &located.item_path())?; + recorder.touch(item); + let before = read_field(item, &op.field)?; + write_field(item, &op.field, &op.value)?; + recorder.record(&op.target, Some(&op.field), before, Some(op.value.clone()))?; + Ok(()) +} + +/// Target and descendants that carry the field; unchanged items are skipped. +fn set_subtree( + doc: &mut Value, + recorder: &mut Recorder<'_>, + located: &Located, + op: &SetOp, +) -> Result<(), PipelineError> { + if located.target.kind != TargetKind::Finding { + return Err(fail(format!( + "scope subtree needs a finding target, got \"{}\"", + op.target + ))); + } + let mut entries = Vec::new(); + for entry in finding_scope(doc, located, true)? { + let kind = FieldKind::of(&located.target, Some(entry.is_category)); + if is_settable(kind, &op.field)? { + entries.push(entry); + } + } + if entries.is_empty() { + return Err(unknown_field(op)); + } + for entry in &entries { + recorder.touch(item_at_mut(doc, &entry.path)?); + } + for entry in &entries { + let item = item_at_mut(doc, &entry.path)?; + let before = read_field(item, &op.field)?; + if before + .as_ref() + .is_some_and(|value| js_deep_equal(value, &op.value)) + { + continue; + } + write_field(item, &op.field, &op.value)?; + recorder.record( + &entry.target, + Some(&op.field), + before, + Some(op.value.clone()), + )?; + } + Ok(()) +} + +fn apply_set( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &SetOp, +) -> Result<(), PipelineError> { + assert_not_reviewed(recorder, op)?; + let located = locate(doc, &op.target)?; + match op.scope { + None | Some(Scope::OwnItem) => set_self(doc, recorder, &located, op), + Some(Scope::Subtree) => set_subtree(doc, recorder, &located, op), + } +} + +fn apply_rename( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &RenameOp, +) -> Result<(), PipelineError> { + let located = locate(doc, &op.target)?; + let Some(list) = &located.list else { + return Err(fail("the document has no id to rename")); + }; + let key = located.target.kind.key_field(); + assert_stable_id(Some(&Value::from(op.id.as_str())), key)?; + assert_free(list_at(doc, list)?, key, &op.id, Some(located.index))?; + let item = item_at_mut(doc, &located.item_path())?; + let before = Value::Object(item.clone()); + let from = js_string(item.get(key)); + item.insert(key.to_owned(), Value::from(op.id.clone())); + recorder.touch(item); + let after = Value::Object(item.clone()); + recorder.record(&op.target, None, Some(before), Some(after))?; + let rename = Rename { + kind: located.target.kind, + from, + to: op.id.clone(), + }; + propagate_rename(doc, recorder, &rename) +} + +struct Destination { + list: Path, + key: &'static str, + prefix: String, +} + +fn add_destination(doc: &mut Value, op: &AddOp) -> Result { + let parent = locate(doc, &op.target)?; + if parent.target.kind != TargetKind::Document { + if let Some(field) = op.field { + return Err(fail(format!( + "field \"{}\" is only valid on document", + collection_name(field) + ))); + } + return Ok(Destination { + list: child_list(doc, &parent)?, + key: "id", + prefix: child_prefix(&parent), + }); + } + let Some(field) = op.field else { + return Err(fail("add on document needs a field")); + }; + let kind = collection_kind(field); + let list = top_collection_path(kind); + list_at(doc, &list)?; + Ok(Destination { + list, + key: kind.key_field(), + prefix: format!("{}:", kind.name()), + }) +} + +/// An id an op writes must already be what the final document requires (a stable id; a region +/// code for a region): an id that passed only because a later op removed or renamed its item +/// would still reach the records, and from them the reports' code spans (a line break there +/// forged sections). Refused at the op (RUST.md §11.14). +fn assert_stable_id(value: Option<&Value>, key: &str) -> Result<(), PipelineError> { + let valid = match value.and_then(Value::as_str) { + Some(id) if key == "code" => js::is_region_code(id), + Some(id) => js::is_stable_id(id), + None => false, + }; + if !valid { + return Err(fail(format!( + "the {} {:?} is not a valid {}", + key, + value.map(js_string_value).unwrap_or_default(), + if key == "code" { + "region code" + } else { + "stable id" + } + ))); + } + Ok(()) +} + +fn js_string_value(value: &Value) -> String { + super::records::js_string(Some(value)) +} + +/// A `children` or `categories` of an added value must be a list (a later add would otherwise +/// replace the author's value by `[]`, as the TypeScript's `childrenOf` did), each entry an +/// object with a stable id. The TypeScript met a null or a primitive there inconsistently (a +/// TypeError when it walked it, silently skipped when a rename walked past it, refused by the +/// gate when it stayed); the port refuses it at the add (RUST.md §11.12). Explicit stack. +fn assert_object_children(value: &Value) -> Result<(), PipelineError> { + let mut pending = vec![value]; + while let Some(item) = pending.pop() { + let Some(map) = item.as_object() else { + continue; + }; + for key in ["children", "categories"] { + let list = match map.get(key) { + None => continue, + Some(Value::Array(list)) => list, + Some(_) => { + return Err(fail(format!( + "the added item holds a \"{key}\" that is not a list" + ))); + } + }; + if list.iter().any(|entry| !entry.is_object()) { + return Err(fail(format!( + "the added item holds a \"{key}\" entry that is not an object" + ))); + } + for entry in list { + assert_stable_id(entry.get("id"), "id")?; + } + pending.extend(list); + } + } + Ok(()) +} + +fn apply_add( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &AddOp, +) -> Result<(), PipelineError> { + let Some(value) = op.value.as_object() else { + return Err(fail("add needs an object value")); + }; + assert_object_children(&op.value)?; + let dest = add_destination(doc, op)?; + let Some(id) = value.get(dest.key).and_then(Value::as_str) else { + return Err(fail(format!( + "the added item needs a string \"{}\"", + dest.key + ))); + }; + assert_stable_id(value.get(dest.key), dest.key)?; + let list = list_at(doc, &dest.list)?; + assert_free(list, dest.key, id, None)?; + let index = insertion_index(list, dest.key, op.position.as_ref())?; + list_at_mut(doc, &dest.list)?.insert(index, op.value.clone()); + let mut added = dest.list.clone(); + added.push(Step::Index(index)); + recorder.touch_tree(doc, &added)?; + let target = format!("{}{id}", dest.prefix); + recorder.record(&target, None, None, Some(op.value.clone()))?; + Ok(()) +} + +fn apply_remove( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &RemoveOp, +) -> Result<(), PipelineError> { + let located = locate(doc, &op.target)?; + let Some(list) = &located.list else { + return Err(fail("the document cannot be removed")); + }; + let item = list_at_mut(doc, list)?.remove(located.index); + recorder.record(&op.target, None, Some(item), None)?; + Ok(()) +} + +/// `after` of a move record is the new target path of the item. +fn apply_move( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &MoveOp, +) -> Result<(), PipelineError> { + let source = locate(doc, &op.target)?; + if source.target.kind != TargetKind::Finding { + return Err(fail(format!("only findings move, got \"{}\"", op.target))); + } + if op.to == op.target || op.to.starts_with(&format!("{}/", op.target)) { + return Err(fail(format!("cannot move \"{}\" into itself", op.target))); + } + let parent = locate(doc, &op.to)?; + let list = child_list(doc, &parent)?; + let id = id_text(at(doc, &source.item_path())?); + let excluded = (Some(&list) == source.list.as_ref()).then_some(source.index); + assert_free(list_at(doc, &list)?, "id", &id, excluded)?; + let source_list = source + .list + .as_ref() + .ok_or_else(|| fail("a finding has siblings"))?; + let item = list_at_mut(doc, source_list)?.remove(source.index); + // The removal may have shifted the destination's indices: resolve it again. + let parent = locate(doc, &op.to)?; + let list = child_list(doc, &parent)?; + let index = insertion_index(list_at(doc, &list)?, "id", op.position.as_ref())?; + list_at_mut(doc, &list)?.insert(index, item); + let mut moved = list; + moved.push(Step::Index(index)); + let item = item_at_mut(doc, &moved)?; + recorder.touch(item); + let before = Value::Object(item.clone()); + let after = format!("{}{id}", child_prefix(&parent)); + recorder.record(&op.target, None, Some(before), Some(Value::from(after)))?; + Ok(()) +} + +/// Every cited id must be declared in the document references. +pub fn assert_declared(doc: &Value, ids: &[String]) -> Result<(), PipelineError> { + let declared: HashSet<&str> = list_at(doc, &top_collection_path(TargetKind::Reference))? + .iter() + .filter_map(|reference| reference.get("id").and_then(Value::as_str)) + .collect(); + let missing: Vec<&str> = ids + .iter() + .map(String::as_str) + .filter(|id| !declared.contains(id)) + .collect(); + if !missing.is_empty() { + return Err(fail(format!( + "undeclared reference(s): {}", + missing.join(", ") + ))); + } + Ok(()) +} + +/// `[...new Set(ids)]`: first occurrences, in order. +fn distinct(ids: &[String]) -> Vec<&String> { + let mut seen: HashSet<&str> = HashSet::new(); + ids.iter().filter(|id| seen.insert(id.as_str())).collect() +} + +/// Appends citations in order, never twice on the same item. +fn apply_cite( + doc: &mut Value, + recorder: &mut Recorder<'_>, + op: &CiteOp, +) -> Result<(), PipelineError> { + assert_declared(doc, &op.reference_ids)?; + let located = locate(doc, &op.target)?; + let scope = finding_scope(doc, &located, op.scope == Some(Scope::Subtree))?; + for entry in &scope { + recorder.touch(item_at_mut(doc, &entry.path)?); + } + for entry in &scope { + let item = item_at_mut(doc, &entry.path)?; + let before: Vec = item + .get("reference_ids") + .and_then(Value::as_array) + .cloned() + .unwrap_or_default(); + // `before.includes(id)`: only an equal string matches; hashed once per item. + let existing: HashSet<&str> = before.iter().filter_map(Value::as_str).collect(); + let added: Vec = distinct(&op.reference_ids) + .into_iter() + .filter(|id| !existing.contains(id.as_str())) + .map(|id| Value::from(id.clone())) + .collect(); + if added.is_empty() { + continue; + } + let after: Vec = before.iter().cloned().chain(added).collect(); + item.insert("reference_ids".to_owned(), Value::Array(after.clone())); + recorder.record( + &entry.target, + Some("reference_ids"), + Some(Value::Array(before)), + Some(Value::Array(after)), + )?; + } + Ok(()) +} + +pub fn apply_op(doc: &mut Value, recorder: &mut Recorder<'_>) -> Result<(), PipelineError> { + match recorder.op { + Op::Set(op) => apply_set(doc, recorder, op), + Op::Rename(op) => apply_rename(doc, recorder, op), + Op::Add(op) => apply_add(doc, recorder, op), + Op::Remove(op) => apply_remove(doc, recorder, op), + Op::Move(op) => apply_move(doc, recorder, op), + Op::Cite(op) => apply_cite(doc, recorder, op), + } +} diff --git a/crates/core/src/curation/draft/overlay.rs b/crates/core/src/curation/draft/overlay.rs new file mode 100644 index 00000000..0ee07c21 --- /dev/null +++ b/crates/core/src/curation/draft/overlay.rs @@ -0,0 +1,376 @@ +//! Before / after drawing of one view for the professional review +//! (`packages/anatomy/src/curation/overlay.ts`): the cleaned anatomy, the curated annotations +//! as an SVG layer, and the baseline position of every moved or removed annotation beside it +//! (dashed). Pure data, deterministic, opens in any browser. + +use std::collections::{HashMap, HashSet}; + +use serde_json::Value; + +use super::drawing::{CleanedDrawing, drawing_text}; +use super::records::{js_deep_equal, js_string}; +use super::targets::fail; +use crate::anatomy::svg::number::{is_js_space, js_number_of}; +use crate::anatomy::svg::{Element, Node}; +use crate::curation::PipelineError; +use crate::curation::text::js_round; +use crate::json::js_number; + +pub const REVIEW_OVERLAY_DIR: &str = "review"; +const LAYER_ID: &str = "review-annotations"; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum Status { + Unchanged, + Moved, + Added, + Removed, +} + +impl Status { + fn name(self) -> &'static str { + match self { + Self::Unchanged => "unchanged", + Self::Moved => "moved", + Self::Added => "added", + Self::Removed => "removed", + } + } + + /// The marker style, attribute by attribute in the TypeScript order. + fn style(self) -> &'static [(&'static str, &'static str)] { + match self { + Self::Unchanged => &[ + ("stroke", "#1d4ed8"), + ("fill", "#1d4ed8"), + ("fill-opacity", "0.12"), + ], + Self::Moved | Self::Added => &[ + ("stroke", "#15803d"), + ("fill", "#15803d"), + ("fill-opacity", "0.2"), + ], + // fill-opacity rather than fill="none": some rasterizers drop unfilled shapes. + Self::Removed => &[ + ("stroke", "#b91c1c"), + ("fill", "#b91c1c"), + ("fill-opacity", "0.04"), + ("stroke-dasharray", "8 6"), + ], + } + } + + fn stroke(self) -> &'static str { + self.style()[0].1 + } +} + +struct Marker<'a> { + id: String, + geometry: &'a Value, + status: Status, +} + +fn annotations(doc: &Value) -> &[Value] { + doc.get("annotations") + .and_then(Value::as_array) + .map_or(&[], Vec::as_slice) +} + +/// Annotations of the view that carry a geometry (`withGeometry`). +fn with_geometry<'a>(doc: &'a Value, view_id: &str) -> impl Iterator { + annotations(doc).iter().filter(move |a| { + a.get("view_id").and_then(Value::as_str) == Some(view_id) + && a.get("geometry").is_some_and(|g| !g.is_null()) + }) +} + +/// `new Map(entries)`: the first position of an id, its last value. +struct Previous<'a> { + entries: Vec<(String, &'a Value)>, + index: HashMap, +} + +fn previous_geometries<'a>(before: &'a Value, view_id: &str) -> Previous<'a> { + let mut previous = Previous { + entries: Vec::new(), + index: HashMap::new(), + }; + for annotation in with_geometry(before, view_id) { + let id = js_string(annotation.get("id")); + let geometry = &annotation["geometry"]; + match previous.index.get(&id) { + Some(&at) => previous.entries[at].1 = geometry, + None => { + previous.index.insert(id.clone(), previous.entries.len()); + previous.entries.push((id, geometry)); + } + } + } + previous +} + +/// `overlayMarkers`: curated annotations with their status, then the baseline shapes they left. +fn overlay_markers<'a>(before: &'a Value, after: &'a Value, view_id: &str) -> Vec> { + let previous = previous_geometries(before, view_id); + let mut markers = Vec::new(); + for annotation in with_geometry(after, view_id) { + let id = js_string(annotation.get("id")); + let geometry = &annotation["geometry"]; + let old = previous.index.get(&id).map(|&at| previous.entries[at].1); + let status = match old { + None => Status::Added, + Some(old) if js_deep_equal(old, geometry) => Status::Unchanged, + Some(_) => Status::Moved, + }; + markers.push(Marker { + id: id.clone(), + geometry, + status, + }); + if let (Status::Moved, Some(old)) = (status, old) { + markers.push(Marker { + id, + geometry: old, + status: Status::Removed, + }); + } + } + let kept: HashSet = annotations(after) + .iter() + .map(|a| js_string(a.get("id"))) + .collect(); + for (id, geometry) in previous.entries { + if !kept.contains(&id) { + markers.push(Marker { + id, + geometry, + status: Status::Removed, + }); + } + } + markers +} + +fn number(geometry: &Value, key: &str) -> f64 { + geometry + .get(key) + .and_then(Value::as_f64) + .unwrap_or(f64::NAN) +} + +/// `String(number)`, NaN and the infinities included. +fn text_of(value: f64) -> String { + match value { + v if v.is_nan() => "NaN".to_owned(), + f64::INFINITY => "Infinity".to_owned(), + f64::NEG_INFINITY => "-Infinity".to_owned(), + v => js_number(v), + } +} + +fn points(geometry: &Value) -> Vec<(f64, f64)> { + let list = geometry.get("points").and_then(Value::as_array); + list.into_iter() + .flatten() + .map(|point| { + let at = |i: usize| point.get(i).and_then(Value::as_f64).unwrap_or(f64::NAN); + (at(0), at(1)) + }) + .collect() +} + +fn shape_element(geometry: &Value) -> Result { + match geometry.get("type").and_then(Value::as_str) { + Some("circle") => Ok(Element::svg( + "circle", + vec![ + ("cx", text_of(number(geometry, "cx"))), + ("cy", text_of(number(geometry, "cy"))), + ("r", text_of(number(geometry, "r"))), + ], + Vec::new(), + )), + Some("polygon") => { + let list: Vec = points(geometry) + .into_iter() + .map(|(x, y)| format!("{},{}", text_of(x), text_of(y))) + .collect(); + Ok(Element::svg( + "polygon", + vec![("points", list.join(" "))], + Vec::new(), + )) + } + Some("path") => Ok(Element::svg( + "path", + vec![("d", js_string(geometry.get("d")))], + Vec::new(), + )), + _ => Err(fail("a geometry of an unknown type")), + } +} + +fn label_anchor(geometry: &Value) -> Option<(f64, f64)> { + match geometry.get("type").and_then(Value::as_str) { + Some("circle") => Some(( + number(geometry, "cx"), + number(geometry, "cy") - number(geometry, "r") - 4.0, + )), + Some("polygon") => { + let list = points(geometry); + let (sx, sy) = list + .iter() + .fold((0.0, 0.0), |(ax, ay), (x, y)| (ax + x, ay + y)); + let n = list.len() as f64; + Some((sx / n, sy / n)) + } + _ => None, + } +} + +fn text_element(attrs: Vec<(&str, String)>, text: String) -> Element { + Element::svg("text", attrs, vec![Node::Text(text)]) +} + +fn marker_group(marker: &Marker<'_>, font_size: f64) -> Result { + let mut shape = shape_element(marker.geometry)?; + for (key, value) in marker.status.style() { + shape.set_attr(key, (*value).to_owned()); + } + shape.set_attr("stroke-width", text_of(font_size / 8.0)); + let title = Element::svg( + "title", + Vec::new(), + vec![Node::Text(format!( + "{} ({})", + marker.id, + marker.status.name() + ))], + ); + let mut children = vec![Node::Element(title), Node::Element(shape)]; + if let Some((x, y)) = label_anchor(marker.geometry).filter(|_| marker.status != Status::Removed) + { + children.push(Node::Element(text_element( + vec![ + ("x", text_of(x)), + ("y", text_of(y)), + ("text-anchor", "middle".to_owned()), + ("font-family", "sans-serif".to_owned()), + ("font-size", text_of(font_size)), + ("fill", marker.status.stroke().to_owned()), + ], + marker.id.clone(), + ))); + } + Ok(Element::svg( + "g", + vec![ + ("data-review-id", marker.id.clone()), + ("data-review-status", marker.status.name().to_owned()), + ], + children, + )) +} + +fn legend(layer: &mut Element, (x, y): (f64, f64), font_size: f64) { + let lines = [ + (Status::Unchanged, "bleu : inchangé"), + ( + Status::Moved, + "vert : déplacé ou ajouté (pointillé rouge = position précédente)", + ), + (Status::Removed, "rouge pointillé : retiré"), + ]; + for (index, (status, label)) in lines.into_iter().enumerate() { + let line = (index + 1) as f64; + layer.children.push(Node::Element(text_element( + vec![ + ("x", text_of(x)), + ("y", text_of(y + line * font_size * 1.3)), + ("font-family", "sans-serif".to_owned()), + ("font-size", text_of(font_size)), + ("fill", status.stroke().to_owned()), + ], + label.to_owned(), + ))); + } +} + +/// `raw.split(/[\s,]+/).map(Number)`, without the trim the TypeScript did not do: a run of +/// separators splits once, a leading or trailing run leaves an empty part (`Number("")` is 0). +fn split_numbers(raw: &str) -> Vec { + let mut parts = Vec::new(); + let mut current = String::new(); + let mut in_separator = false; + for c in raw.chars() { + if is_js_space(c) || c == ',' { + if !in_separator { + parts.push(std::mem::take(&mut current)); + in_separator = true; + } + } else { + in_separator = false; + current.push(c); + } + } + parts.push(current); + parts.iter().map(|part| js_number_of(part)).collect() +} + +/// `Math.max(Math.round(width / 90), 10)` with `Math.max`'s NaN. +fn font_size_of(width: f64) -> f64 { + let rounded = js_round(width / 90.0); + if rounded.is_nan() { + f64::NAN + } else { + rounded.max(10.0) + } +} + +pub struct OverlayInput<'a> { + pub drawing: &'a CleanedDrawing, + pub before: &'a Value, + pub after: &'a Value, + pub view_id: &'a str, +} + +/// The review drawing of one view, framed on that view's box (`renderReviewOverlay`). +pub fn render_review_overlay(input: &OverlayInput<'_>) -> Result { + let view = input + .after + .get("views") + .and_then(Value::as_array) + .and_then(|views| { + views + .iter() + .find(|v| v.get("id").and_then(Value::as_str) == Some(input.view_id)) + }) + .ok_or_else(|| fail(format!("unknown view \"{}\"", input.view_id)))?; + let mut root = input.drawing.root.clone(); + if let Some(view_box) = view.get("view_box").filter(|b| b.is_object()) { + let part = |key: &str| text_of(number(view_box, key)); + let text = format!( + "{} {} {} {}", + part("min_x"), + part("min_y"), + part("width"), + part("height") + ); + root.set_attr("viewBox", text); + } + root.remove_attr("width"); + root.remove_attr("height"); + let frame = split_numbers(root.attr("viewBox").unwrap_or("0 0 1000 1000")); + let at = |i: usize| frame.get(i).copied().unwrap_or(f64::NAN); + let font_size = font_size_of(at(2)); + let mut layer = Element::svg("g", vec![("id", LAYER_ID.to_owned())], Vec::new()); + for marker in overlay_markers(input.before, input.after, input.view_id) { + layer + .children + .push(Node::Element(marker_group(&marker, font_size)?)); + } + legend(&mut layer, (at(0) + font_size, at(1)), font_size); + root.children.push(Node::Element(layer)); + drawing_text(&input.drawing.prolog, &root) +} diff --git a/crates/core/src/curation/draft/pipeline.rs b/crates/core/src/curation/draft/pipeline.rs new file mode 100644 index 00000000..dcc19b66 --- /dev/null +++ b/crates/core/src/curation/draft/pipeline.rs @@ -0,0 +1,371 @@ +//! Legacy import → curated working draft (`packages/anatomy/src/curation/pipeline.ts`). The +//! asset step runs first as the reserved change CHG-000 (one cleaned drawing, head view = +//! crop), then the authored changeset; both land in the same records, so the CHANGELOG lists +//! them alike. Deterministic: same inputs, same bytes. +//! +//! The cleaned drawing is an input here, not a product: the owner froze the bytes of +//! `draft/assets/horse.svg` (BDR-068), so the Rust pipeline describes them (sha256, byte size, +//! asset id) and copies them, and never re-cleans the legacy drawing. The review drawings and +//! the two Markdown reports are R5.4. + +use crate::domain::sheet::fingerprint::{ + FINGERPRINT_CONVENTION, TRUSTED_ALIASES, sheet_fingerprint, +}; +use serde_json::{Map, Value, json}; + +use crate::json::to_js_compact; + +use super::app_review::render_app_review_drawing; +use super::apply::{apply_changeset, curated_issues}; +use super::changelog::render_changelog; +use super::drawing::read_cleaned_drawing; +use super::migration_map::{MigrationMapInput, SheetRef, build_report_migration_map}; +use super::overlay::{OverlayInput, REVIEW_OVERLAY_DIR, render_review_overlay}; +use super::records::ChangeRecord; +use super::review_report::{ReviewReportInput, render_review_report}; +use super::schema::{ + ASSET_CHANGE_ID, Change, ChangeKind, ChangeLevel, ChangePriority, ChangeSummary, ChangeTitle, + Op, SetOp, +}; +use super::seed::{DRAFT_CHANGE_NOTE, DraftSeedParams, render_draft_seed_sql}; +use super::stats::{DocumentStats, document_stats}; +use super::targets::fail; +use crate::anatomy::svg::number::{js_number_of, js_split_list}; +use crate::curation::PipelineError; +use crate::curation::ids::{asset_id_from_sha256, sha256_hex}; +use crate::curation::legacy::types::{Anomaly, AssetRecord, ImportResult}; +use crate::curation::legacy::{HEAD_VIEW_ID, MAIN_VIEW_ID}; +use crate::curation::prettier_json::format_json; +use crate::curation::report_guard::format_report; +use crate::domain::sheet::{AnatomicalSheetDocument, Reference, SheetIssue, ViewBox}; + +pub const DRAFT_SEED_SQL_FILE: &str = "equine_draft.sql"; +pub const SHEET_REF_FILE: &str = "sheet-ref.json"; +pub const MIGRATION_MAP_FILE: &str = "report-migration-map.json"; +pub const CLEANED_ASSET_FILE: &str = "horse.svg"; + +pub struct DraftInput<'a> { + pub import_result: &'a ImportResult, + /// The frozen cleaned drawing, `draft/assets/horse.svg`. + pub cleaned_svg: &'a [u8], + pub head_view_box: ViewBox, + pub references: &'a [Reference], + pub changes: &'a [Change], +} + +pub struct DraftResult { + pub document: Value, + /// Legacy import the changeset was applied to. + pub baseline: Value, + pub legacy_id_map: Map, + pub records: Vec, + pub changes: Vec, + pub assets: Vec, + pub stats_before: DocumentStats, + pub stats_after: DocumentStats, + /// Integrity warnings of the curated document (errors refuse). + pub issues: Vec, + pub sheet_id: String, + /// The frozen cleaned drawing, `draft/assets/horse.svg`, the review drawings' base. + pub cleaned_svg: Vec, +} + +/// Manifest entry of the cleaned drawing; id derived from its sha256 (`cleanedAsset`). +pub fn cleaned_asset(bytes: &[u8]) -> AssetRecord { + let sha256 = sha256_hex(bytes); + AssetRecord { + file: CLEANED_ASSET_FILE.to_owned(), + svg_asset_id: asset_id_from_sha256(&sha256), + sha256, + byte_size: bytes.len(), + } +} + +/// SVG viewBox attribute ("minX minY width height") → document view_box (`parseViewBox`). +pub fn parse_view_box(raw: Option<&str>) -> Result { + let numbers: Vec = js_split_list(raw.unwrap_or_default()) + .into_iter() + .map(js_number_of) + .collect(); + if numbers.len() != 4 || numbers.iter().any(|n| !n.is_finite()) { + return Err(fail(format!("invalid viewBox {:?}", raw.unwrap_or("null")))); + } + Ok(ViewBox { + min_x: numbers[0], + min_y: numbers[1], + width: numbers[2], + height: numbers[3], + }) +} + +fn set(target: String, field: &str, value: Value) -> Op { + Op::Set(SetOp { + target, + field: field.to_owned(), + value, + scope: None, + }) +} + +fn asset_change(asset: &AssetRecord, head_view_box: &ViewBox) -> Result { + let view_box = serde_json::to_value(head_view_box) + .map_err(|error| fail(format!("head view box: {error}")))?; + Ok(Change { + id: ASSET_CHANGE_ID.to_owned(), + level: ChangeLevel::A, + kind: ChangeKind::Technical, + title: ChangeTitle { + fr: "Un seul dessin, vue tête = recadrage".to_owned(), + en: "Single drawing, head view = crop".to_owned(), + }, + rationale: "Les deux fichiers historiques portent le même dessin (tracés identiques) et \ + les marqueurs sont désormais des données de la fiche : un seul dessin \ + nettoyé, la vue tête en est un recadrage." + .to_owned(), + reference_ids: Vec::new(), + question: None, + priority: ChangePriority::Medium, + ops: vec![ + set( + format!("view:{MAIN_VIEW_ID}"), + "svg_asset_id", + Value::from(asset.svg_asset_id.as_str()), + ), + set(format!("view:{HEAD_VIEW_ID}"), "svg_asset_id", Value::Null), + set(format!("view:{HEAD_VIEW_ID}"), "view_box", view_box), + ], + }) +} + +fn assert_not_reserved(changes: &[Change]) -> Result<(), PipelineError> { + if changes.iter().any(|change| change.id == ASSET_CHANGE_ID) { + return Err(fail(format!( + "{ASSET_CHANGE_ID} is reserved for the asset step" + ))); + } + Ok(()) +} + +pub fn build_equine_draft(input: &DraftInput<'_>) -> Result { + assert_not_reserved(input.changes)?; + let asset = cleaned_asset(input.cleaned_svg); + let mut changes = vec![asset_change(&asset, &input.head_view_box)?]; + changes.extend(input.changes.iter().cloned()); + let baseline = &input.import_result.document; + let result = apply_changeset(baseline, input.references, &changes)?; + Ok(DraftResult { + stats_before: document_stats(baseline)?, + stats_after: document_stats(&result.document)?, + issues: curated_issues(&result.document)?, + document: result.document, + baseline: baseline.clone(), + legacy_id_map: input.import_result.legacy_id_map.clone(), + records: result.records, + changes: changes.iter().map(Change::summary).collect(), + assets: vec![asset], + sheet_id: input.import_result.sheet_id.clone(), + cleaned_svg: input.cleaned_svg.to_vec(), + }) +} + +/// What a report references: the sheet and its `sha256-rfc8785-validated-v1` fingerprint +/// (R5.6; the pre-switch rule hashed the formatted bytes, kept as a registered alias). +fn sheet_ref(draft: &DraftResult, document_json: &str) -> Result { + let fingerprint = sheet_fingerprint(document_json) + .map_err(|error| fail(format!("document fingerprint: {error:?}")))?; + Ok(SheetRef { + sheet_id: draft.sheet_id.clone(), + version_id: None, + document_sha256: fingerprint, + }) +} + +/// The registered aliases of this sheet's canonical value (descriptive in `sheet-ref.json`). +fn registered_aliases(reference: &SheetRef) -> Vec<&'static str> { + TRUSTED_ALIASES + .iter() + .filter(|e| e.sheet_id == reference.sheet_id && e.canonical == reference.document_sha256) + .map(|e| e.alias) + .collect() +} + +/// The migration map (`report-migration-map.json` value) and its stats. +pub fn draft_migration_map( + draft: &DraftResult, + reference: &SheetRef, +) -> Result<(Value, super::migration_map::MigrationMapStats), PipelineError> { + build_report_migration_map(&MigrationMapInput { + baseline: &draft.baseline, + final_document: &draft.document, + legacy_id_map: &draft.legacy_id_map, + records: &draft.records, + sheet: reference, + main_view_id: MAIN_VIEW_ID, + }) +} + +/// The views of the curated document, in document order. +fn view_ids(document: &Value) -> Vec { + document + .get("views") + .and_then(Value::as_array) + .into_iter() + .flatten() + .filter_map(|view| view.get("id").and_then(Value::as_str).map(str::to_owned)) + .collect() +} + +/// The review drawings' bytes, projected as an upper bound before any is rendered (the equine +/// draft projects 1.41 MB for 0.56 MB written): every drawing repeats the whole cleaned drawing, +/// two per view, and each annotation of a view adds its markup. Views added by a changeset +/// multiply the drawing (2,000 views asked for 547 MB, security gate R5.4 round 8); unnamed +/// triggers repeat the opened view's names in theirs (a 485 KB changeset wrote a 131 MB +/// drawing, round 10). +pub const MAX_REVIEW_DRAWINGS_BYTES: usize = 64 * 1024 * 1024; + +/// An upper bound of what one annotation writes in a drawing: a fixed part (tags, styles, +/// numbers the renderer adds), then its own JSON text and the longest view name, each copied +/// at most four times (data attributes and titles of the hit box and the visible circle) and +/// escaped at most six times longer (`"` → `"`). +fn annotation_bytes(annotation: &Value, view_names: usize) -> Result { + let text = to_js_compact(annotation).map_err(|error| fail(format!("annotation: {error}")))?; + Ok(1024 + 24 * (text.len() + view_names)) +} + +/// The bound of the markup a document's annotations add to one view's drawing. +fn layer_bytes(document: &Value, view_id: &str, view_names: usize) -> Result { + let annotations = document.get("annotations").and_then(Value::as_array); + let mut total = 0usize; + for annotation in annotations.into_iter().flatten() { + if annotation.get("view_id").and_then(Value::as_str) == Some(view_id) { + total = total.saturating_add(annotation_bytes(annotation, view_names)?); + } + } + Ok(total) +} + +/// The longest JSON text of a view name, in either document. +fn longest_view_name(documents: [&Value; 2]) -> Result { + let mut longest = 0; + for document in documents { + let views = document.get("views").and_then(Value::as_array); + for name in views + .into_iter() + .flatten() + .filter_map(|view| view.get("name")) + { + let text = to_js_compact(name).map_err(|error| fail(format!("view: {error}")))?; + longest = longest.max(text.len()); + } + } + Ok(longest) +} + +/// What a drawing writes besides the cleaned drawing and its annotations: the layer group, the +/// overlay's group and legend (under 1 KB each; a view without annotations carries them alone). +const DRAWING_FIXED_BYTES: usize = 4096; + +/// The projected bytes of the review drawings: per view, the overlay (both documents' markers) +/// and the application's drawing (the curated layer), each over the cleaned drawing. +pub fn review_drawings_bytes(draft: &DraftResult) -> Result { + let names = longest_view_name([&draft.baseline, &draft.document])?; + let mut total = 0usize; + for view_id in view_ids(&draft.document) { + let after = layer_bytes(&draft.document, &view_id, names)?; + let before = layer_bytes(&draft.baseline, &view_id, names)?; + let drawings = draft.cleaned_svg.len() + DRAWING_FIXED_BYTES; + let view = drawings.saturating_mul(2) + before + after.saturating_mul(2); + total = total.saturating_add(view); + } + Ok(total) +} + +/// One review overlay per view (`review/annotations-.svg`), then the application's +/// drawing of each view (`review/app-.svg`). +pub fn review_drawings(draft: &DraftResult) -> Result, PipelineError> { + let projected = review_drawings_bytes(draft)?; + if projected > MAX_REVIEW_DRAWINGS_BYTES { + return Err(fail(format!( + "the review drawings would write up to {projected} bytes, past the \ + {MAX_REVIEW_DRAWINGS_BYTES} bound" + ))); + } + let views = view_ids(&draft.document); + let drawing = read_cleaned_drawing(&draft.cleaned_svg)?; + let typed: AnatomicalSheetDocument = serde_json::from_value(draft.document.clone()) + .map_err(|error| fail(format!("curated document: {error}")))?; + let mut files = Vec::new(); + for view_id in &views { + let overlay = render_review_overlay(&OverlayInput { + drawing: &drawing, + before: &draft.baseline, + after: &draft.document, + view_id, + })?; + files.push(( + format!("{REVIEW_OVERLAY_DIR}/annotations-{view_id}.svg"), + overlay, + )); + } + for view_id in &views { + let app = render_app_review_drawing(&drawing, &typed, view_id)?; + files.push((format!("{REVIEW_OVERLAY_DIR}/app-{view_id}.svg"), app)); + } + Ok(files) +} + +/// The text artifacts of the draft folder, keyed by file name, in the TypeScript order +/// (`renderDraftArtifacts`); the frozen `assets/horse.svg` is the caller's byte copy. +pub fn render_draft_artifacts( + draft: &DraftResult, + legacy_anomalies: &[Anomaly], +) -> Result, PipelineError> { + let document_json = format_json(&draft.document)?; + // The drawings' resource bound applies before the fingerprint validates the document. + let drawings = review_drawings(draft)?; + let reference = sheet_ref(draft, &document_json)?; + let (map, migration_stats) = draft_migration_map(draft, &reference)?; + let assets = serde_json::to_value(&draft.assets) + .map_err(|error| fail(format!("assets.json: {error}")))?; + let sheet_ref_json = json!({ + "sheet_id": reference.sheet_id, + "version_id": reference.version_id, + "document_sha256": reference.document_sha256, + "schema_version": draft.document.get("schema_version"), + "species_id": draft.document.get("species_id"), + "fingerprint": { + "convention": FINGERPRINT_CONVENTION, + "aliases": registered_aliases(&reference), + }, + }); + let changelog = render_changelog( + &draft.records, + &draft.stats_before, + &draft.stats_after, + &migration_stats, + )?; + let review = render_review_report(&ReviewReportInput { + changes: &draft.changes, + records: &draft.records, + document: &draft.document, + stats_before: &draft.stats_before, + legacy_anomalies, + })?; + let seed = render_draft_seed_sql(&DraftSeedParams { + sheet_id: &draft.sheet_id, + assets: &draft.assets, + document_json: &document_json, + change_note: DRAFT_CHANGE_NOTE, + })?; + let mut files = vec![ + ("document.json".to_owned(), document_json), + ("assets.json".to_owned(), format_json(&assets)?), + (SHEET_REF_FILE.to_owned(), format_json(&sheet_ref_json)?), + (MIGRATION_MAP_FILE.to_owned(), format_json(&map)?), + ]; + files.extend(drawings); + files.push(("CHANGELOG.md".to_owned(), format_report(&changelog)?)); + files.push(("REVIEW-REPORT.md".to_owned(), format_report(&review)?)); + files.push((DRAFT_SEED_SQL_FILE.to_owned(), seed)); + Ok(files) +} diff --git a/crates/core/src/curation/draft/records.rs b/crates/core/src/curation/draft/records.rs new file mode 100644 index 00000000..9e029bbb --- /dev/null +++ b/crates/core/src/curation/draft/records.rs @@ -0,0 +1,299 @@ +//! One elementary edit of the curated document, kept for the CHANGELOG +//! (`packages/anatomy/src/curation/types.ts`), and the state shared by the ops of one change. +//! +//! The TypeScript remembered the items a change touched by object identity. The port marks +//! each touched item with a transient key (`TOUCH_MARK`, holding the touch order) that the +//! applier removes at the end of the change and that never reaches a record. + +use serde::Serialize; +use serde_json::{Map, Value}; + +use super::schema::{ChangeSummary, Op, Position}; +use super::targets::{Item, Path, Step, at_mut}; +use crate::curation::PipelineError; + +/// A key no authored document holds: a NUL character starts it. +pub const TOUCH_MARK: &str = "\u{0}touched"; + +/// `before` / `after` are deep copies: the field value for a set, the whole item for a rename, +/// remove or move, null on the missing side. +#[derive(Debug, Clone, PartialEq, Serialize)] +pub struct ChangeRecord { + pub change: ChangeSummary, + pub op: Op, + pub target: String, + pub field: Option, + pub before: Value, + pub after: Value, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct CurationResult { + pub document: Value, + pub records: Vec, +} + +/// The total weight of the records (`record_weight`): about 16 MiB of text, or a quarter of a +/// million JSON values, far past the equine changeset (test `the_records_cannot_outgrow_their_bound`) +/// and small enough that the reports built from them stay bounded too. Charged as each record +/// is made, before the change and the op are cloned into it: one op touching many items is +/// refused at the record that passes the bound. +pub const MAX_RECORDED_WEIGHT: usize = 16 * 1024 * 1024; + +/// The records' running weight; refuses the record that would pass `MAX_RECORDED_WEIGHT`. +pub fn charge(spent: &mut usize, record: RecordParts<'_>) -> Result<(), PipelineError> { + *spent = spent.saturating_add(parts_weight(&record)); + if *spent > MAX_RECORDED_WEIGHT { + return Err(PipelineError::Guard(format!( + "the records weigh more than {MAX_RECORDED_WEIGHT} units" + ))); + } + Ok(()) +} + +/// What a record is made of, borrowed: weighed before anything is cloned. +pub struct RecordParts<'a> { + pub change: &'a ChangeSummary, + pub op: &'a Op, + pub target: &'a str, + pub field: Option<&'a str>, + pub before: &'a Value, + pub after: &'a Value, +} + +/// What the op functions of one change share besides the document; the touch counter spans +/// the ops of the change (the first touch of an item fixes its place in the review marking). +pub struct Recorder<'a> { + pub change: &'a ChangeSummary, + pub op: &'a Op, + pub records: &'a mut Vec, + next_touch: &'a mut u64, + spent: &'a mut usize, +} + +impl<'a> Recorder<'a> { + pub fn new( + change: &'a ChangeSummary, + op: &'a Op, + records: &'a mut Vec, + counters: (&'a mut u64, &'a mut usize), + ) -> Self { + Self { + change, + op, + records, + next_touch: counters.0, + spent: counters.1, + } + } + + /// Absent values are recorded as null so records stay plain JSON. Refused when the + /// records would pass their bound (`charge`), before the change and the op are cloned. + pub fn record( + &mut self, + target: &str, + field: Option<&str>, + before: Option, + after: Option, + ) -> Result<(), PipelineError> { + let (before, after) = (unmarked(before), unmarked(after)); + let parts = RecordParts { + change: self.change, + op: self.op, + target, + field, + before: &before, + after: &after, + }; + charge(self.spent, parts)?; + self.records.push(ChangeRecord { + change: self.change.clone(), + op: self.op.clone(), + target: target.to_owned(), + field: field.map(str::to_owned), + before, + after, + }); + Ok(()) + } + + /// Marks an item as touched by the change, once (the first touch keeps its order). + pub fn touch(&mut self, item: &mut Item) { + if item.contains_key(TOUCH_MARK) { + return; + } + item.insert(TOUCH_MARK.to_owned(), Value::from(*self.next_touch)); + *self.next_touch += 1; + } + + /// Touches the item at `path` and every descendant node, depth first (`descendants`). + pub fn touch_tree(&mut self, doc: &mut Value, path: &Path) -> Result<(), PipelineError> { + let holder = at_mut(doc, path)?; + let Some(item) = holder.as_object_mut() else { + return Ok(()); + }; + self.touch(item); + let count = item + .get("children") + .and_then(Value::as_array) + .map_or(0, Vec::len); + for index in 0..count { + let mut child = path.clone(); + child.push(Step::Key("children")); + child.push(Step::Index(index)); + self.touch_tree(doc, &child)?; + } + Ok(()) + } +} + +/// What a record holds, in weight units, about its bytes in memory: 64 per JSON value and per +/// string (a `Value` node or a `String` header and its allocation cost tens of bytes, so a run of +/// one-character ids is not free) plus one per byte of text: the values, and the change and the +/// op, which each record clones. A rename or a remove records the whole item and one op can record once per +/// item it reaches, so the records can grow far past the document: `charge` bounds their total. +pub fn record_weight(record: &ChangeRecord) -> usize { + parts_weight(&RecordParts { + change: &record.change, + op: &record.op, + target: &record.target, + field: record.field.as_deref(), + before: &record.before, + after: &record.after, + }) +} + +fn parts_weight(parts: &RecordParts<'_>) -> usize { + let change = parts.change; + let texts = [ + change.id.as_str(), + &change.title.fr, + &change.title.en, + &change.rationale, + change.question.as_deref().unwrap_or_default(), + parts.target, + parts.field.unwrap_or_default(), + ]; + let text: usize = texts.iter().map(|text| text_weight(text)).sum::() + + change + .reference_ids + .iter() + .map(|id| text_weight(id)) + .sum::(); + text + op_weight(parts.op) + value_weight(parts.before) + value_weight(parts.after) +} + +/// The op a record clones: its target, its value or its ids. +fn op_weight(op: &Op) -> usize { + let carried = match op { + Op::Set(op) => text_weight(&op.field) + value_weight(&op.value), + Op::Add(op) => value_weight(&op.value) + position_weight(op.position.as_ref()), + Op::Rename(op) => text_weight(&op.id), + Op::Move(op) => text_weight(&op.to) + position_weight(op.position.as_ref()), + Op::Cite(op) => op.reference_ids.iter().map(|id| text_weight(id)).sum(), + Op::Remove(_) => 0, + }; + 64 + text_weight(op.target()) + carried +} + +/// The anchor an add or a move clones with its op. +fn position_weight(position: Option<&Position>) -> usize { + match position { + Some(Position::After { after: id } | Position::Before { before: id }) => text_weight(id), + Some(Position::Index(_)) | None => 0, + } +} + +/// A cloned string: its header and allocation, then its bytes. +fn text_weight(text: &str) -> usize { + 64 + text.len() +} + +/// The weight of a value, walked with an explicit stack (no recursion). +fn value_weight(value: &Value) -> usize { + let mut weight = 0; + let mut pending = vec![value]; + while let Some(value) = pending.pop() { + weight += 64; + match value { + Value::String(text) => weight += text.len(), + Value::Object(map) => { + weight += map.keys().map(|key| text_weight(key)).sum::(); + pending.extend(map.values()); + } + Value::Array(items) => pending.extend(items), + _ => {} + } + } + weight +} + +/// The touch order of a marked item. +pub fn touch_order(item: &Item) -> Option { + item.get(TOUCH_MARK).and_then(Value::as_u64) +} + +/// Removes the marks from a value and every value under it, keeping the key order. +pub fn strip_marks(value: &mut Value) { + match value { + Value::Object(map) => { + map.shift_remove(TOUCH_MARK); + map.values_mut().for_each(strip_marks); + } + Value::Array(items) => items.iter_mut().for_each(strip_marks), + _ => {} + } +} + +fn unmarked(value: Option) -> Value { + let mut value = value.unwrap_or(Value::Null); + strip_marks(&mut value); + value +} + +/// `String(value)` of a JSON value read from the document. +pub fn js_string(value: Option<&Value>) -> String { + match value { + None => "undefined".to_owned(), + Some(Value::Null) => "null".to_owned(), + Some(Value::Bool(flag)) => flag.to_string(), + Some(Value::Number(number)) => number + .as_f64() + .map_or_else(|| number.to_string(), crate::json::js_number), + Some(Value::String(text)) => text.clone(), + Some(Value::Array(items)) => items + .iter() + .map(|item| match item { + Value::Null => String::new(), + other => js_string(Some(other)), + }) + .collect::>() + .join(","), + Some(Value::Object(_)) => "[object Object]".to_owned(), + } +} + +fn same_number(a: &serde_json::Number, b: &serde_json::Number) -> bool { + match (a.as_f64(), b.as_f64()) { + (Some(a), Some(b)) => a.to_bits() == b.to_bits(), + _ => a == b, + } +} + +/// `isDeepStrictEqual` on JSON values: numbers by value (`Object.is`), objects by key set. +pub fn js_deep_equal(a: &Value, b: &Value) -> bool { + match (a, b) { + (Value::Number(a), Value::Number(b)) => same_number(a, b), + (Value::Array(a), Value::Array(b)) => { + a.len() == b.len() && a.iter().zip(b).all(|(x, y)| js_deep_equal(x, y)) + } + (Value::Object(a), Value::Object(b)) => same_entries(a, b), + _ => a == b, + } +} + +fn same_entries(a: &Map, b: &Map) -> bool { + a.len() == b.len() + && a.iter() + .all(|(key, value)| b.get(key).is_some_and(|other| js_deep_equal(value, other))) +} diff --git a/crates/core/src/curation/draft/rename.rs b/crates/core/src/curation/draft/rename.rs new file mode 100644 index 00000000..ba69f22e --- /dev/null +++ b/crates/core/src/curation/draft/rename.rs @@ -0,0 +1,130 @@ +//! Rename propagation (`packages/anatomy/src/curation/rename.ts`): every field pointing at the +//! renamed id follows, and each rewrite is a record of its own so the CHANGELOG shows the +//! cascade. + +use serde_json::Value; + +use super::records::{Recorder, js_string}; +use super::targets::{Step, TargetKind, all_findings, item_at_mut, list_at, top_collection_path}; +use crate::curation::PipelineError; + +pub struct Rename { + pub kind: TargetKind, + pub from: String, + pub to: String, +} + +/// A field of the annotations or the views that holds an id of the renamed kind. +struct Link { + kind: TargetKind, + field: &'static str, +} + +fn links(kind: TargetKind) -> &'static [Link] { + match kind { + TargetKind::Zone => &[Link { + kind: TargetKind::Annotation, + field: "finding_zone_id", + }], + TargetKind::Region => &[Link { + kind: TargetKind::Annotation, + field: "vertebral_region_code", + }], + TargetKind::View => &[ + Link { + kind: TargetKind::View, + field: "parent_view_id", + }, + Link { + kind: TargetKind::Annotation, + field: "view_id", + }, + Link { + kind: TargetKind::Annotation, + field: "opens_view_id", + }, + ], + TargetKind::Category => &[Link { + kind: TargetKind::Annotation, + field: "category_id", + }], + _ => &[], + } +} + +fn follow_link( + doc: &mut Value, + recorder: &mut Recorder<'_>, + link: &Link, + rename: &Rename, +) -> Result<(), PipelineError> { + let list = top_collection_path(link.kind); + let from = Value::from(rename.from.as_str()); + for index in 0..list_at(doc, &list)?.len() { + let mut path = list.clone(); + path.push(Step::Index(index)); + let item = item_at_mut(doc, &path)?; + if item.get(link.field) != Some(&from) { + continue; + } + item.insert(link.field.to_owned(), Value::from(rename.to.as_str())); + let target = format!("{}:{}", link.kind.name(), js_string(item.get("id"))); + recorder.record( + &target, + Some(link.field), + Some(from.clone()), + Some(Value::from(rename.to.as_str())), + )?; + } + Ok(()) +} + +fn follow_citations( + doc: &mut Value, + recorder: &mut Recorder<'_>, + rename: &Rename, +) -> Result<(), PipelineError> { + let from = Value::from(rename.from.as_str()); + for entry in all_findings(doc)? { + let item = item_at_mut(doc, &entry.path)?; + let Some(ids) = item.get("reference_ids").and_then(Value::as_array) else { + continue; + }; + if !ids.contains(&from) { + continue; + } + let before = Value::Array(ids.clone()); + let after: Vec = ids + .iter() + .map(|id| { + if *id == from { + Value::from(rename.to.as_str()) + } else { + id.clone() + } + }) + .collect(); + recorder.record( + &entry.target, + Some("reference_ids"), + Some(before), + Some(Value::Array(after.clone())), + )?; + item.insert("reference_ids".to_owned(), Value::Array(after)); + } + Ok(()) +} + +pub fn propagate_rename( + doc: &mut Value, + recorder: &mut Recorder<'_>, + rename: &Rename, +) -> Result<(), PipelineError> { + if rename.kind == TargetKind::Reference { + return follow_citations(doc, recorder, rename); + } + for link in links(rename.kind) { + follow_link(doc, recorder, link, rename)?; + } + Ok(()) +} diff --git a/crates/core/src/curation/draft/review_report.rs b/crates/core/src/curation/draft/review_report.rs new file mode 100644 index 00000000..0b1f9ece --- /dev/null +++ b/crates/core/src/curation/draft/review_report.rs @@ -0,0 +1,444 @@ +//! French review report for the osteopath, ten fixed sections +//! (`packages/anatomy/src/curation/review-report.ts`). It only formats data (changes, +//! records, stats, references): no medical content is written here, every statement comes +//! from the authored changeset. The text returned is the raw report, before the table +//! alignment. + +use std::cmp::Ordering; +use std::collections::{HashMap, HashSet}; + +use serde_json::Value; + +use super::changelog::{compact_value, record_subject}; +use super::labels::{kind_label, level_letter, priority_label}; +use super::records::{ChangeRecord, js_string}; +use super::schema::{ChangeKind, ChangeLevel, ChangePriority, ChangeSummary}; +use super::stats::{DocumentStats, stat_rows}; +use super::targets::{Step, TargetKind, all_findings, at, top_collection_path, zone_findings}; +use crate::curation::PipelineError; +use crate::curation::legacy::types::Anomaly; +use crate::curation::markdown::{Cell, code, table}; +use crate::curation::report_guard::assert_authored; +use crate::curation::text::utf16_cmp; + +pub struct ReviewReportInput<'a> { + pub changes: &'a [ChangeSummary], + pub records: &'a [ChangeRecord], + pub document: &'a Value, + pub stats_before: &'a DocumentStats, + pub legacy_anomalies: &'a [Anomaly], +} + +const NONE: &str = "Aucun élément dans cette révision."; + +/// `[...new Set(items)]`: first occurrences, in order. +fn distinct(items: impl Iterator) -> Vec { + let mut seen = HashSet::new(); + items.filter(|item| seen.insert(item.clone())).collect() +} + +fn codes(items: &[String]) -> String { + items + .iter() + .map(|item| code(Some(item))) + .collect::>() + .join(", ") +} + +fn subjects(subjects: &HashMap<&str, Vec>, change: &ChangeSummary) -> String { + codes( + subjects + .get(change.id.as_str()) + .map_or(&[][..], Vec::as_slice), + ) +} + +/// The distinct subjects of each change's records, grouped in one pass. +fn subjects_by_change(records: &[ChangeRecord]) -> HashMap<&str, Vec> { + let mut grouped: HashMap<&str, Vec> = HashMap::new(); + let mut seen: HashSet<(&str, String)> = HashSet::new(); + for record in records { + let subject = record_subject(record); + if seen.insert((record.change.id.as_str(), subject.clone())) { + grouped + .entry(record.change.id.as_str()) + .or_default() + .push(subject); + } + } + grouped +} + +fn references(ids: &[String]) -> String { + if ids.is_empty() { + "aucune".to_owned() + } else { + codes(ids) + } +} + +fn change_line(grouped: &HashMap<&str, Vec>, change: &ChangeSummary) -> String { + let confirm = if change.level.needs_confirmation() { + "oui" + } else { + "non" + }; + let question = change + .question + .as_ref() + .map_or_else(String::new, |question| format!(" Question : {question}")); + format!( + "- {} {} (niveau {}, {}, confirmation requise : {confirm}). {} Objets : {}. \ + Références : {}.{question}", + code(Some(&change.id)), + change.title.fr, + level_letter(change.level), + kind_label(change.kind), + change.rationale, + subjects(grouped, change), + references(&change.reference_ids), + ) +} + +fn change_list(input: &ReviewReportInput<'_>, keep: impl Fn(&ChangeSummary) -> bool) -> String { + let grouped = subjects_by_change(input.records); + let lines: Vec = input + .changes + .iter() + .filter(|change| keep(change)) + .map(|change| change_line(&grouped, change)) + .collect(); + if lines.is_empty() { + NONE.to_owned() + } else { + lines.join("\n") + } +} + +fn stat_table(head: &str, stats: &DocumentStats) -> String { + let rows: Vec> = stat_rows(stats) + .into_iter() + .map(|(label, value)| vec![Cell::from(label), Cell::from(value)]) + .collect(); + table(&[head, "Valeur"], &rows) +} + +fn initial_quality(input: &ReviewReportInput<'_>) -> String { + let to_validate = input + .legacy_anomalies + .iter() + .filter(|anomaly| anomaly.level == "a_valider") + .count(); + [ + format!( + "L'import historique signale {} anomalies, dont {to_validate} à valider (détail dans \ + `legacy-import/IMPORT-REPORT.md`).", + input.legacy_anomalies.len() + ), + String::new(), + stat_table("Indicateur (import historique)", input.stats_before), + ] + .join("\n") +} + +fn translations(input: &ReviewReportInput<'_>) -> String { + let changes: Vec<&ChangeSummary> = input + .changes + .iter() + .filter(|change| change.kind == ChangeKind::Translation) + .collect(); + let ids: HashSet<&str> = changes.iter().map(|change| change.id.as_str()).collect(); + let targets = distinct( + input + .records + .iter() + .filter(|record| ids.contains(record.change.id.as_str())) + .map(record_subject), + ); + let head = format!( + "{} changement(s) de traduction, {} objet(s) traduit(s).", + changes.len(), + targets.len() + ); + if targets.is_empty() { + return head; + } + let lines: Vec = targets + .iter() + .map(|target| format!("- {}", code(Some(target)))) + .collect(); + format!("{head}\n\n{}", lines.join("\n")) +} + +fn vet_flag_changes(input: &ReviewReportInput<'_>) -> Result { + let mut lines = Vec::new(); + for record in input + .records + .iter() + .filter(|record| record.field.as_deref() == Some("requires_vet_referral")) + { + lines.push(format!( + "- {} : {} → {} ({})", + code(Some(&record.target)), + compact_value(&record.before)?, + compact_value(&record.after)?, + code(Some(&record.change.id)) + )); + } + Ok(if lines.is_empty() { + "Aucun renvoi vétérinaire modifié dans cette révision.".to_owned() + } else { + lines.join("\n") + }) +} + +fn vet_flags_per_zone(document: &Value) -> Result { + let zones_path = top_collection_path(TargetKind::Zone); + let count = document + .get("finding_zones") + .and_then(Value::as_array) + .map_or(0, Vec::len); + let mut rows = Vec::new(); + for index in 0..count { + let mut zone_path = zones_path.clone(); + zone_path.push(Step::Index(index)); + let zone = at(document, &zone_path)?; + let flags = zone_findings(document, &zone_path)? + .iter() + .filter(|entry| { + at(document, &entry.path) + .is_ok_and(|item| item.get("requires_vet_referral") == Some(&Value::Bool(true))) + }) + .count(); + if flags > 0 { + rows.push(vec![ + Cell::from(code(Some(&js_string(zone.get("id"))))), + Cell::from(flags), + ]); + } + } + Ok(if rows.is_empty() { + "Aucun renvoi vétérinaire.".to_owned() + } else { + table(&["Zone", "Renvois vétérinaires"], &rows) + }) +} + +fn clinical_vigilance(input: &ReviewReportInput<'_>) -> Result { + Ok([ + "Renvois vétérinaires modifiés :".to_owned(), + String::new(), + vet_flag_changes(input)?, + String::new(), + "Renvois vétérinaires de la fiche, par zone :".to_owned(), + String::new(), + vet_flags_per_zone(input.document)?, + ] + .join("\n")) +} + +/// Citing findings per reference id, counted in one walk: a finding citing an id twice +/// counts once, as `ids.includes(id)` did. +fn citation_counts(document: &Value) -> Result, PipelineError> { + let mut counts: HashMap = HashMap::new(); + for entry in all_findings(document)? { + let ids = at(document, &entry.path)? + .get("reference_ids") + .and_then(Value::as_array); + let distinct: HashSet<&str> = ids + .into_iter() + .flatten() + .filter_map(Value::as_str) + .collect(); + for id in distinct { + *counts.entry(id.to_owned()).or_default() += 1; + } + } + Ok(counts) +} + +/// `Boolean(value)` of a reference field. +fn truthy_text(value: Option<&Value>) -> Option { + match value { + None | Some(Value::Null | Value::Bool(false)) => None, + Some(Value::String(text)) if text.is_empty() => None, + other => Some(js_string(other)), + } +} + +fn bibliography(document: &Value) -> Result { + let references = document + .get("references") + .and_then(Value::as_array) + .map_or(&[][..], Vec::as_slice); + let counts = citation_counts(document)?; + let mut lines = Vec::new(); + for (index, reference) in references.iter().enumerate() { + let links: Vec = [ + truthy_text(reference.get("url")).map(|url| format!("URL : {url}")), + truthy_text(reference.get("doi")).map(|doi| format!("DOI : {doi}")), + ] + .into_iter() + .flatten() + .collect(); + let place = if links.is_empty() { + String::new() + } else { + format!(" ({})", links.join(", ")) + }; + let id = js_string(reference.get("id")); + lines.push(format!( + "{}. {} {}{place}, cité par {} nœud(s).", + index + 1, + code(Some(&id)), + js_string(reference.get("citation")), + counts.get(&id).copied().unwrap_or(0) + )); + } + Ok(if lines.is_empty() { + "Aucune référence déclarée.".to_owned() + } else { + lines.join("\n") + }) +} + +fn priority_rank(priority: ChangePriority) -> u8 { + match priority { + ChangePriority::High => 0, + ChangePriority::Medium => 1, + ChangePriority::Low => 2, + } +} + +/// `byPriorityThenId`: priority order, then ids by UTF-16 code units (a stable sort). +fn by_priority_then_id(a: &&ChangeSummary, b: &&ChangeSummary) -> Ordering { + priority_rank(a.priority) + .cmp(&priority_rank(b.priority)) + .then_with(|| utf16_cmp(&a.id, &b.id)) +} + +fn professional_decisions(input: &ReviewReportInput<'_>) -> String { + let mut questions: Vec<&ChangeSummary> = input + .changes + .iter() + .filter(|change| change.question.is_some()) + .collect(); + questions.sort_by(by_priority_then_id); + if questions.is_empty() { + return "Aucune question ouverte.".to_owned(); + } + questions + .iter() + .enumerate() + .map(|(index, change)| { + format!( + "{}. {} (priorité {}) : {} Références : {}.", + index + 1, + code(Some(&change.id)), + priority_label(change.priority), + change.question.as_deref().unwrap_or_default(), + references(&change.reference_ids) + ) + }) + .collect::>() + .join("\n") +} + +fn intro() -> String { + [ + "# Rapport de revue : révision de travail", + "", + "Généré par `pnpm import:equine` à partir des changements rédigés \ + (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision \ + reste un brouillon jusqu’à la décision du professionnel.", + ] + .join("\n") +} + +/// A control character (a line break, a tab, a carriage return…) in an authored text the +/// report writes in a list item would break the item, and Prettier re-indents what follows: +/// refused (the TypeScript wrote it raw). A list-item field shares its line with the other fields of the change and the generated +/// code spans: no control character, and no wiki-link or liquid bracket (`[[`, `]]`, `{%`, `%}`), +/// which Prettier pairs across the whole line (a `[[` in a rationale closed by the question's +/// `]]`, the code spans between them notwithstanding). +fn assert_single_line(text: &str) -> Result<(), PipelineError> { + let across = ["[[", "]]", "{%", "%}"] + .iter() + .any(|bracket| text.contains(bracket)); + if across || text.chars().any(char::is_control) { + return Err(PipelineError::UnsupportedMarkdown(text.to_owned())); + } + assert_authored(text) +} + +fn assert_list_items_single_line(input: &ReviewReportInput<'_>) -> Result<(), PipelineError> { + for change in input.changes { + assert_single_line(&change.title.fr)?; + assert_single_line(&change.rationale)?; + if let Some(question) = &change.question { + assert_single_line(question)?; + } + } + let references = input.document.get("references").and_then(Value::as_array); + for reference in references.into_iter().flatten() { + for key in ["citation", "url", "doi"] { + assert_single_line(&js_string(reference.get(key)))?; + } + } + for record in input.records { + if record.field.as_deref() == Some("requires_vet_referral") { + assert_single_line(&compact_value(&record.before)?)?; + assert_single_line(&compact_value(&record.after)?)?; + } + } + Ok(()) +} + +/// `renderReviewReport`: the raw text, before the table alignment. +pub fn render_review_report(input: &ReviewReportInput<'_>) -> Result { + assert_list_items_single_line(input)?; + let is = |level: ChangeLevel| move |c: &ChangeSummary| c.level == level; + let sections: Vec<(&str, String)> = vec![ + ("1. Qualité des données initiales", initial_quality(input)), + ( + "2. Principales erreurs anatomiques et ostéopathiques", + change_list(input, |c| { + c.level == ChangeLevel::A + && matches!(c.kind, ChangeKind::Correction | ChangeKind::Removal) + }), + ), + ( + "3. Corrections effectuées", + change_list(input, is(ChangeLevel::A)), + ), + ( + "4. Ajouts", + change_list(input, |c| c.kind == ChangeKind::Enrichment), + ), + ( + "5. Réorganisations du catalogue", + change_list(input, |c| c.kind == ChangeKind::Restructure), + ), + ( + "6. Éléments incertains", + change_list(input, is(ChangeLevel::C)), + ), + ("7. Traductions", translations(input)), + ( + "8. Points de vigilance clinique", + clinical_vigilance(input)?, + ), + ("9. Bibliographie", bibliography(input.document)?), + ( + "10. Décisions réservées au professionnel", + professional_decisions(input), + ), + ]; + let mut parts = vec![intro()]; + parts.extend( + sections + .into_iter() + .map(|(title, body)| format!("## {title}\n\n{body}")), + ); + Ok(format!("{}\n", parts.join("\n\n"))) +} diff --git a/crates/core/src/curation/draft/schema.rs b/crates/core/src/curation/draft/schema.rs new file mode 100644 index 00000000..b2bedb45 --- /dev/null +++ b/crates/core/src/curation/draft/schema.rs @@ -0,0 +1,456 @@ +//! The authored curation inputs (`packages/anatomy/src/curation/schema.ts`): a changeset of +//! traceable changes applied on the legacy baseline, and the references registry they cite. +//! Every object is strict, as the Zod schemas were, so a typo in a hand-written file fails +//! loud instead of being ignored. Serialisation follows the Zod output: the shape order of the +//! keys, `priority` always present, an absent option absent. +//! +//! An optional key is `.optional()` as in Zod: absent is fine, `null` is refused. +//! +//! Declared difference: a `set` without `value` is refused (`z.unknown()` accepted the missing +//! key and `JSON.stringify` then dropped the field). + +use serde::{Deserialize, Serialize}; +use serde_json::{Map, Value}; + +use super::shape::assert_same_shape; +use crate::curation::PipelineError; +use crate::curation::text::js_normalize; +use crate::domain::js; +use crate::domain::sheet::Reference; + +/// Reserved for the asset step of the pipeline, never authored. +pub const ASSET_CHANGE_ID: &str = "CHG-000"; + +/// A demonstrated error, B supported improvement, C uncertain (question). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +pub enum ChangeLevel { + A, + B, + C, +} + +impl ChangeLevel { + /// Derived, never stored: only a demonstrated error needs no sign-off. + pub fn needs_confirmation(self) -> bool { + self != Self::A + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ChangeKind { + Correction, + Terminology, + Translation, + Restructure, + Enrichment, + Reference, + Geometry, + Removal, + Technical, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ChangePriority { + High, + Medium, + Low, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum Scope { + #[serde(rename = "self")] + OwnItem, + Subtree, +} + +/// Document-level collections an `add` on 'document' may extend. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum DocumentCollection { + References, + Categories, + Views, + Annotations, + FindingZones, + Regions, +} + +/// Where an added or moved item lands among its siblings. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(untagged, deny_unknown_fields)] +pub enum Position { + Index(#[serde(deserialize_with = "non_negative_int")] u64), + After { + #[serde(deserialize_with = "non_empty")] + after: String, + }, + Before { + #[serde(deserialize_with = "non_empty")] + before: String, + }, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct SetOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, + #[serde(deserialize_with = "non_empty")] + pub field: String, + pub value: Value, + #[serde( + default, + deserialize_with = "js::present", + skip_serializing_if = "Option::is_none" + )] + pub scope: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct RenameOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, + #[serde(deserialize_with = "non_empty")] + pub id: String, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct AddOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, + #[serde( + default, + deserialize_with = "js::present", + skip_serializing_if = "Option::is_none" + )] + pub field: Option, + pub value: Value, + #[serde( + default, + deserialize_with = "js::present", + skip_serializing_if = "Option::is_none" + )] + pub position: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct RemoveOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct MoveOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, + #[serde(deserialize_with = "non_empty")] + pub to: String, + #[serde( + default, + deserialize_with = "js::present", + skip_serializing_if = "Option::is_none" + )] + pub position: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct CiteOp { + #[serde(deserialize_with = "non_empty")] + pub target: String, + #[serde(deserialize_with = "non_empty_strings_min_one")] + pub reference_ids: Vec, + #[serde( + default, + deserialize_with = "js::present", + skip_serializing_if = "Option::is_none" + )] + pub scope: Option, +} + +/// The six op kinds of a change, tagged by `op`. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(tag = "op", rename_all = "snake_case")] +pub enum Op { + Set(SetOp), + Rename(RenameOp), + Add(AddOp), + Remove(RemoveOp), + Move(MoveOp), + Cite(CiteOp), +} + +impl Op { + pub fn target(&self) -> &str { + match self { + Self::Set(op) => &op.target, + Self::Rename(op) => &op.target, + Self::Add(op) => &op.target, + Self::Remove(op) => &op.target, + Self::Move(op) => &op.target, + Self::Cite(op) => &op.target, + } + } +} + +/// The discriminated union: the `op` key picks the variant, the rest is parsed strictly. +impl<'de> Deserialize<'de> for Op { + fn deserialize>(deserializer: D) -> Result { + use serde::de::Error; + let mut object = Map::::deserialize(deserializer)?; + let kind = match object.remove("op") { + Some(Value::String(kind)) => kind, + Some(_) => return Err(D::Error::custom("op must be a string")), + None => return Err(D::Error::custom("missing field `op`")), + }; + let rest = Value::Object(object); + let parsed = match kind.as_str() { + "set" => serde_json::from_value(rest).map(Self::Set), + "rename" => serde_json::from_value(rest).map(Self::Rename), + "add" => serde_json::from_value(rest).map(Self::Add), + "remove" => serde_json::from_value(rest).map(Self::Remove), + "move" => serde_json::from_value(rest).map(Self::Move), + "cite" => serde_json::from_value(rest).map(Self::Cite), + other => return Err(D::Error::custom(format!("unknown op \"{other}\""))), + }; + parsed.map_err(|error| D::Error::custom(format!("{kind} op: {error}"))) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct ChangeTitle { + #[serde(deserialize_with = "non_empty")] + pub fr: String, + #[serde(deserialize_with = "non_empty")] + pub en: String, +} + +/// A change as cited by its records: everything but the ops, in the Zod shape order. +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct ChangeSummary { + pub id: String, + pub level: ChangeLevel, + pub kind: ChangeKind, + pub title: ChangeTitle, + pub rationale: String, + pub reference_ids: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub question: Option, + pub priority: ChangePriority, +} + +/// One authored change: `ChangeSchema` (strict, `priority` defaulted, `ops` non-empty). +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct Change { + #[serde(deserialize_with = "change_id")] + pub id: String, + pub level: ChangeLevel, + pub kind: ChangeKind, + pub title: ChangeTitle, + #[serde(deserialize_with = "non_empty")] + pub rationale: String, + #[serde(deserialize_with = "non_empty_strings")] + pub reference_ids: Vec, + #[serde( + default, + deserialize_with = "optional_non_empty", + skip_serializing_if = "Option::is_none" + )] + pub question: Option, + #[serde(default = "default_priority")] + pub priority: ChangePriority, + #[serde(deserialize_with = "ops_min_one")] + pub ops: Vec, +} + +fn default_priority() -> ChangePriority { + ChangePriority::Medium +} + +impl Change { + /// `changeSummary`: the change without its ops. + pub fn summary(&self) -> ChangeSummary { + ChangeSummary { + id: self.id.clone(), + level: self.level, + kind: self.kind, + title: self.title.clone(), + rationale: self.rationale.clone(), + reference_ids: self.reference_ids.clone(), + question: self.question.clone(), + priority: self.priority, + } + } +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct Changeset { + pub changes: Vec, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct ReferencesFile { + references: Vec, +} + +fn non_empty<'de, D: serde::Deserializer<'de>>(d: D) -> Result { + let text = String::deserialize(d)?; + if text.is_empty() { + return Err(serde::de::Error::custom("must not be empty")); + } + Ok(text) +} + +fn optional_non_empty<'de, D: serde::Deserializer<'de>>(d: D) -> Result, D::Error> { + non_empty(d).map(Some) +} + +fn non_empty_strings<'de, D: serde::Deserializer<'de>>(d: D) -> Result, D::Error> { + let items = Vec::::deserialize(d)?; + if items.iter().any(String::is_empty) { + return Err(serde::de::Error::custom("ids must not be empty")); + } + Ok(items) +} + +fn non_empty_strings_min_one<'de, D: serde::Deserializer<'de>>( + d: D, +) -> Result, D::Error> { + let items = non_empty_strings(d)?; + if items.is_empty() { + return Err(serde::de::Error::custom("at least one id")); + } + Ok(items) +} + +fn ops_min_one<'de, D: serde::Deserializer<'de>>(d: D) -> Result, D::Error> { + let ops = Vec::::deserialize(d)?; + if ops.is_empty() { + return Err(serde::de::Error::custom("a change needs at least one op")); + } + Ok(ops) +} + +/// `^CHG-\d{3,}$` (ASCII digits, as a JavaScript regex without the `u` flag). +fn change_id<'de, D: serde::Deserializer<'de>>(d: D) -> Result { + let id = String::deserialize(d)?; + let digits = id.strip_prefix("CHG-").unwrap_or_default(); + if digits.len() < 3 || !digits.bytes().all(|byte| byte.is_ascii_digit()) { + return Err(serde::de::Error::custom(format!( + "invalid change id {id:?}" + ))); + } + Ok(id) +} + +/// `z.number().int().min(0)`: an integral, non-negative JavaScript number (−0 and `1.0` +/// included); a value beyond `u64` saturates and fails the range check of the op. +fn non_negative_int<'de, D: serde::Deserializer<'de>>(d: D) -> Result { + let value = f64::deserialize(d)?; + if !value.is_finite() || value.fract() != 0.0 || value < 0.0 { + return Err(serde::de::Error::custom( + "position must be a non-negative integer", + )); + } + Ok(value as u64) +} + +fn duplicates<'a>(ids: impl Iterator) -> Vec<&'a str> { + let mut seen: std::collections::HashSet<&str> = std::collections::HashSet::new(); + ids.filter(|id| !seen.insert(id)).collect() +} + +fn refuse(file: &str, error: impl std::fmt::Display) -> PipelineError { + PipelineError::Source(format!("{file}: {error}")) +} + +/// The size cap of an authored curation file (`changes.json`, `references.json`), checked +/// before any parse allocation. The committed files are about 222 KB and 17 KB; the cap leaves +/// a wide margin to grow and bounds the parse (RUST.md §11.16). +pub const MAX_CURATION_FILE_BYTES: usize = 4 * 1024 * 1024; + +/// `JSON.parse`: a repeated key keeps its first position and its last value (the parsed +/// value is read into the typed shape afterwards, so duplicates never reach serde's derive), +/// array index keys come first, integers beyond 2^53 are rounded (`js_normalize`). +fn json_parse(file: &str, text: &str) -> Result { + if text.len() > MAX_CURATION_FILE_BYTES { + return Err(refuse( + file, + format!("larger than {MAX_CURATION_FILE_BYTES} bytes"), + )); + } + let mut value = js::parse_json(text).map_err(|error| refuse(file, error))?; + js_normalize(&mut value); + Ok(value) +} + +/// A key starting with NUL is reserved for the applier's transient touch marks +/// (`records::TOUCH_MARK`); an authored value holding one is refused (the TypeScript refused +/// such a key at the strict document gate). +fn reserved_key(value: &Value) -> Option<&str> { + match value { + Value::Object(map) => map.iter().find_map(|(key, item)| { + if key.starts_with('\0') { + Some(key.as_str()) + } else { + reserved_key(item) + } + }), + Value::Array(items) => items.iter().find_map(reserved_key), + _ => None, + } +} + +/// `ChangesetSchema.parse(JSON.parse(text))`. +pub fn parse_changeset(text: &str) -> Result { + let value = json_parse("changes.json", text)?; + if let Some(key) = reserved_key(&value) { + return Err(refuse("changes.json", format!("reserved key {key:?}"))); + } + let changeset: Changeset = + serde_json::from_value(value.clone()).map_err(|e| refuse("changes.json", e))?; + assert_same_shape("changes.json", &value, &changeset)?; + for change in &changeset.changes { + if change.level == ChangeLevel::C && change.question.is_none() { + return Err(refuse( + "changes.json", + format!("{}: a level C change needs a question", change.id), + )); + } + } + let ids = changeset.changes.iter().map(|change| change.id.as_str()); + if let Some(id) = duplicates(ids).first() { + return Err(refuse("changes.json", format!("duplicate change id {id}"))); + } + Ok(changeset) +} + +/// `ReferencesFileSchema.parse(JSON.parse(text)).references`. +pub fn parse_references(text: &str) -> Result, PipelineError> { + let value = json_parse("references.json", text)?; + let file: ReferencesFile = + serde_json::from_value(value.clone()).map_err(|e| refuse("references.json", e))?; + assert_same_shape("references.json", &value, &file)?; + let ids = file + .references + .iter() + .map(|reference| reference.id.as_str()); + if let Some(id) = duplicates(ids).first() { + return Err(refuse( + "references.json", + format!("duplicate reference id {id}"), + )); + } + Ok(file.references) +} diff --git a/crates/core/src/curation/draft/seed.rs b/crates/core/src/curation/draft/seed.rs new file mode 100644 index 00000000..5d14dc70 --- /dev/null +++ b/crates/core/src/curation/draft/seed.rs @@ -0,0 +1,150 @@ +//! Idempotent and converging PostgreSQL seed of an official sheet's working DRAFT +//! (`packages/anatomy/src/curation/seed.ts`). Runs as the database owner in `supabase db +//! reset` and in the PGlite harness. A fresh database gets the draft through +//! `private.insert_sheet_draft` (audited, null actor); a database still holding an older draft +//! as the sheet's only version gets its content replaced in place. Published rows are never +//! touched and nothing is published: that stays a human act through `publish_sheet_version`. + +use super::targets::fail; +use crate::anatomy::svg::number::is_js_space; +use crate::curation::PipelineError; +use crate::curation::legacy::types::AssetRecord; + +pub const DOCUMENT_DOLLAR_TAG: &str = "$equine_doc$"; + +const SHEET_DESCRIPTION: &str = + "Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)"; + +pub const DRAFT_CHANGE_NOTE: &str = "Révision de travail 4c (audit anatomique et ostéopathique) sur l’import des données historiques"; + +pub struct DraftSeedParams<'a> { + pub sheet_id: &'a str, + pub assets: &'a [AssetRecord], + /// `document.json` text, embedded verbatim in a dollar-quoted literal. + pub document_json: &'a str, + pub change_note: &'a str, +} + +/// Only ever fed fixed values; doubled quotes keep it literal-safe. +fn sql_text(value: &str) -> String { + format!("'{}'", value.replace('\'', "''")) +} + +/// The second line still names the TypeScript generator: it is part of the frozen seed bytes +/// (sha256 `c5a24312…ed1e`, the R5.1 ledger), so it stays as written; the generator is this +/// module since R5.6 and `packages/anatomy` left at R5.7 (RUST.md §11.23). +fn header() -> String { + [ + "-- Official equine anatomical sheet: working revision, DRAFT.", + "-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.", + "-- Idempotent and converging. Never publishes: the version stays in status", + "-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.", + ] + .join("\n") +} + +fn sheet_insert(sheet_id: &str) -> String { + [ + "insert into public.anatomical_sheets".to_owned(), + " (id, species_id, name, slug, description, creator_user_id, is_official, visibility)" + .to_owned(), + "values (".to_owned(), + format!( + " {}, 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',", + sql_text(sheet_id) + ), + format!(" {},", sql_text(SHEET_DESCRIPTION)), + " null, true, 'private'".to_owned(), + ")".to_owned(), + "on conflict (id) do nothing;".to_owned(), + ] + .join("\n") +} + +fn asset_inserts(sheet_id: &str, assets: &[AssetRecord]) -> String { + let rows: Vec = assets + .iter() + .map(|a| { + format!( + " ({}, {}, {}, {}, 'image/svg+xml', {})", + sql_text(&a.svg_asset_id), + sql_text(sheet_id), + sql_text(&a.sha256), + a.byte_size, + sql_text(&a.file) + ) + }) + .collect(); + [ + "insert into public.anatomical_sheet_assets".to_owned(), + " (id, sheet_id, sha256, byte_size, content_type, file_name)".to_owned(), + "values".to_owned(), + rows.join(",\n"), + "on conflict (sheet_id, sha256) do nothing;".to_owned(), + ] + .join("\n") +} + +/// `trimEnd`: the JavaScript white space and line terminators. +fn trim_end_js(text: &str) -> &str { + text.trim_end_matches(is_js_space) +} + +fn document_literal(document_json: &str) -> Result { + if document_json.contains(DOCUMENT_DOLLAR_TAG) { + return Err(fail(format!( + "document JSON contains the dollar-quote tag {DOCUMENT_DOLLAR_TAG}" + ))); + } + Ok(format!( + "{DOCUMENT_DOLLAR_TAG}{}{DOCUMENT_DOLLAR_TAG}::jsonb", + trim_end_js(document_json) + )) +} + +fn draft_insert(params: &DraftSeedParams<'_>, literal: &str) -> String { + let sheet = sql_text(params.sheet_id); + [ + "select private.insert_sheet_draft(".to_owned(), + " null,".to_owned(), + format!(" {sheet},"), + format!(" {literal},"), + format!(" {}", sql_text(params.change_note)), + ")".to_owned(), + "where not exists (".to_owned(), + format!(" select 1 from public.anatomical_sheet_versions where sheet_id = {sheet}"), + ");".to_owned(), + ] + .join("\n") +} + +/// Only when the sheet's single version is a draft whose content differs; the document +/// literal is read once through the derived table. +fn draft_converge(params: &DraftSeedParams<'_>, literal: &str) -> String { + let sheet = sql_text(params.sheet_id); + [ + "update public.anatomical_sheet_versions v".to_owned(), + format!( + "set content = d.content, change_note = {}", + sql_text(params.change_note) + ), + format!("from (select {literal} as content) d"), + format!("where v.sheet_id = {sheet} and v.status = 'draft'"), + " and v.content <> d.content".to_owned(), + " and (select count(*) from public.anatomical_sheet_versions o".to_owned(), + format!(" where o.sheet_id = {sheet}) = 1;"), + ] + .join("\n") +} + +pub fn render_draft_seed_sql(params: &DraftSeedParams<'_>) -> Result { + let literal = document_literal(params.document_json)?; + let parts = [ + header(), + sheet_insert(params.sheet_id), + asset_inserts(params.sheet_id, params.assets), + draft_insert(params, &literal), + draft_converge(params, &literal), + ]; + Ok(format!("{}\n", parts.join("\n\n"))) +} diff --git a/crates/core/src/curation/draft/shape.rs b/crates/core/src/curation/draft/shape.rs new file mode 100644 index 00000000..61517562 --- /dev/null +++ b/crates/core/src/curation/draft/shape.rs @@ -0,0 +1,73 @@ +//! The JSON shapes Zod refused and serde's derives accept. serde reads a struct from a +//! positional array (`"title": ["Titre", "Title"]`) and a unit enum variant from a one-key map +//! (`"level": {"A": null}`); Zod refused both (`invalid_type`). The authored files and the +//! curated document are therefore compared, by shape, with the typed value serialised back: +//! an object must stay an object, an array an array of the same length, a scalar a scalar of +//! the same kind. Keys the typed value adds (defaults filled in) are allowed. +//! +//! The R2 contracts carry the same derives; their readers are outside R5.3 (owner's go). + +use serde::Serialize; +use serde_json::Value; + +use super::targets::fail; +use crate::curation::PipelineError; + +fn kind(value: &Value) -> &'static str { + match value { + Value::Null => "null", + Value::Bool(_) => "a boolean", + Value::Number(_) => "a number", + Value::String(_) => "a string", + Value::Array(_) => "an array", + Value::Object(_) => "an object", + } +} + +fn mismatch(path: &str, typed: &Value, written: &Value) -> String { + let at = if path.is_empty() { "the root" } else { path }; + format!( + "expected {} at {at}, received {}", + kind(typed), + kind(written) + ) +} + +/// The first place where `written` (as parsed) and `typed` (read and serialised back) differ +/// in shape. +fn first_mismatch(written: &Value, typed: &Value, path: &str) -> Option { + match (written, typed) { + (Value::Object(w), Value::Object(t)) => w.iter().find_map(|(key, value)| { + let here = format!("{path}.{key}"); + match t.get(key) { + Some(typed) => first_mismatch(value, typed, &here), + None => Some(format!("unexpected key at {here}")), + } + }), + (Value::Array(w), Value::Array(t)) if w.len() != t.len() => Some(format!( + "expected {} items at {path}, received {}", + t.len(), + w.len() + )), + (Value::Array(w), Value::Array(t)) => w + .iter() + .zip(t) + .enumerate() + .find_map(|(index, (w, t))| first_mismatch(w, t, &format!("{path}.{index}"))), + _ if std::mem::discriminant(written) == std::mem::discriminant(typed) => None, + _ => Some(mismatch(path, typed, written)), + } +} + +/// Refuses `written` when its typed reading `typed` does not keep its shape. +pub fn assert_same_shape( + what: &str, + written: &Value, + typed: &T, +) -> Result<(), PipelineError> { + let typed = serde_json::to_value(typed).map_err(|error| fail(format!("{what}: {error}")))?; + match first_mismatch(written, &typed, "") { + None => Ok(()), + Some(why) => Err(fail(format!("{what}: {why}"))), + } +} diff --git a/crates/core/src/curation/draft/stats.rs b/crates/core/src/curation/draft/stats.rs new file mode 100644 index 00000000..41c16b39 --- /dev/null +++ b/crates/core/src/curation/draft/stats.rs @@ -0,0 +1,217 @@ +//! Volumes of a sheet document (`packages/anatomy/src/curation/stats.ts`), compared before / +//! after curation in the CHANGELOG and shown for the baseline in the review report. Nodes +//! count finding categories too, as `countTree` does in the import report. Field order is the +//! TypeScript object order, so the serialised stats compare with `oracles/r5/pipeline.json`. + +use serde::Serialize; +use serde_json::{Map, Value}; + +use super::records::js_string; +use super::targets::{FindingEntry, all_findings, at}; +use crate::curation::PipelineError; + +const ANNOTATION_KINDS: [&str; 3] = ["point", "zone", "detail_trigger"]; +const REVIEW_STATUSES: [&str; 3] = ["inherited", "reviewed", "to_confirm"]; + +/// `countBy`: the listed keys first (zero when absent), then any other value met. +pub type Counts = Map; + +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DocumentStats { + pub views: usize, + pub assets: usize, + pub annotations: usize, + pub annotations_by_kind: Counts, + pub annotation_categories: usize, + pub finding_zones: usize, + pub finding_categories: usize, + pub nodes: usize, + pub leaves: usize, + pub vet_referrals: usize, + pub descriptions: usize, + pub descriptions_fr_only: usize, + pub cited_nodes: usize, + pub nodes_by_review_status: Counts, + pub references: usize, + pub annotations_by_review_status: Counts, + pub regions_with_count_range: usize, +} + +fn count_by<'a>( + items: impl Iterator, + keys: &[&str], + key: impl Fn(&Value) -> String, +) -> Counts { + let mut counts = Map::new(); + for name in keys { + counts.insert((*name).to_owned(), Value::from(0)); + } + for item in items { + let name = key(item); + let current = counts.get(&name).and_then(Value::as_u64).unwrap_or(0); + counts.insert(name, Value::from(current + 1)); + } + counts +} + +/// `Boolean(text.fr)`: a non-empty string, a non-zero number, true, a non-empty object. +fn truthy(value: Option<&Value>) -> bool { + match value { + None | Some(Value::Null) => false, + Some(Value::Bool(flag)) => *flag, + Some(Value::Number(number)) => number.as_f64().is_some_and(|n| n != 0.0), + Some(Value::String(text)) => !text.is_empty(), + Some(Value::Array(_) | Value::Object(_)) => true, + } +} + +fn description(item: &Value) -> (bool, bool) { + let text = item.get("description"); + ( + truthy(text.and_then(|t| t.get("fr"))), + truthy(text.and_then(|t| t.get("en"))), + ) +} + +fn is_leaf(item: &Value) -> bool { + item.get("children") + .and_then(Value::as_array) + .is_none_or(Vec::is_empty) +} + +fn is_cited(item: &Value) -> bool { + item.get("reference_ids") + .and_then(Value::as_array) + .is_some_and(|ids| !ids.is_empty()) +} + +/// `String(item.review_status ?? 'inherited')`. +fn review_status(item: &Value) -> String { + match item.get("review_status") { + None | Some(Value::Null) => "inherited".to_owned(), + Some(value) => js_string(Some(value)), + } +} + +fn list<'a>(doc: &'a Value, key: &str) -> &'a [Value] { + doc.get(key) + .and_then(Value::as_array) + .map_or(&[], Vec::as_slice) +} + +struct FindingStats { + categories: usize, + nodes: usize, + leaves: usize, + vet_referrals: usize, + descriptions: usize, + descriptions_fr_only: usize, + cited: usize, + by_review_status: Counts, +} + +fn finding_stats(doc: &Value, entries: &[FindingEntry]) -> Result { + let items: Vec<&Value> = entries + .iter() + .map(|entry| at(doc, &entry.path)) + .collect::>()?; + let texts: Vec<(bool, bool)> = items.iter().map(|item| description(item)).collect(); + Ok(FindingStats { + categories: entries.iter().filter(|entry| entry.is_category).count(), + nodes: items.len(), + leaves: items.iter().filter(|item| is_leaf(item)).count(), + vet_referrals: items + .iter() + .filter(|item| item.get("requires_vet_referral") == Some(&Value::Bool(true))) + .count(), + descriptions: texts.iter().filter(|(fr, en)| *fr || *en).count(), + descriptions_fr_only: texts.iter().filter(|(fr, en)| *fr && !*en).count(), + cited: items.iter().filter(|item| is_cited(item)).count(), + by_review_status: count_by(items.iter().copied(), &REVIEW_STATUSES, review_status), + }) +} + +pub fn document_stats(doc: &Value) -> Result { + let views = list(doc, "views"); + let mut assets: Vec<&Value> = Vec::new(); + for view in views { + let asset = view.get("svg_asset_id"); + if truthy(asset) && !assets.contains(&asset.unwrap_or(&Value::Null)) { + assets.push(asset.unwrap_or(&Value::Null)); + } + } + let annotations = list(doc, "annotations"); + let findings = finding_stats(doc, &all_findings(doc)?)?; + let regions = doc + .get("vertebral_config") + .map(|config| list(config, "regions")) + .unwrap_or(&[]); + Ok(DocumentStats { + views: views.len(), + assets: assets.len(), + annotations: annotations.len(), + annotations_by_kind: count_by(annotations.iter(), &ANNOTATION_KINDS, |a| { + js_string(a.get("kind")) + }), + annotation_categories: list(doc, "categories").len(), + finding_zones: list(doc, "finding_zones").len(), + finding_categories: findings.categories, + nodes: findings.nodes, + leaves: findings.leaves, + vet_referrals: findings.vet_referrals, + descriptions: findings.descriptions, + descriptions_fr_only: findings.descriptions_fr_only, + cited_nodes: findings.cited, + nodes_by_review_status: findings.by_review_status, + references: list(doc, "references").len(), + annotations_by_review_status: count_by(annotations.iter(), &REVIEW_STATUSES, review_status), + regions_with_count_range: regions + .iter() + .filter(|region| truthy(region.get("count_range"))) + .count(), + }) +} + +fn count_rows(label: &str, counts: &Counts) -> Vec<(String, usize)> { + counts + .iter() + .map(|(key, value)| { + let count = value + .as_u64() + .map_or(0, |n| usize::try_from(n).unwrap_or(usize::MAX)); + (format!("{label} ({key})"), count) + }) + .collect() +} + +/// `statRows`: labelled rows, fixed order, French labels. +pub fn stat_rows(stats: &DocumentStats) -> Vec<(String, usize)> { + let row = |label: &str, value: usize| vec![(label.to_owned(), value)]; + [ + row("Vues", stats.views), + row("Dessins SVG distincts", stats.assets), + row("Annotations", stats.annotations), + count_rows("Annotations", &stats.annotations_by_kind), + count_rows("Annotations, revue", &stats.annotations_by_review_status), + row("Catégories d'annotation", stats.annotation_categories), + row("Zones de constats", stats.finding_zones), + row("Catégories de constats", stats.finding_categories), + row("Nœuds (catégories incluses)", stats.nodes), + row("Feuilles", stats.leaves), + row("Renvois vétérinaires", stats.vet_referrals), + count_rows("Nœuds, revue", &stats.nodes_by_review_status), + row("Descriptions", stats.descriptions), + row( + "Descriptions en français seulement", + stats.descriptions_fr_only, + ), + row("Références bibliographiques", stats.references), + row("Nœuds cités", stats.cited_nodes), + row( + "Régions vertébrales avec plage documentée", + stats.regions_with_count_range, + ), + ] + .concat() +} diff --git a/crates/core/src/curation/draft/svg_compare.rs b/crates/core/src/curation/draft/svg_compare.rs new file mode 100644 index 00000000..aad10002 --- /dev/null +++ b/crates/core/src/curation/draft/svg_compare.rs @@ -0,0 +1,146 @@ +//! How a produced review drawing is compared with the committed xmldom file: byte for byte, +//! else byte for byte after a declared rule applied to the committed file's tree (strict: the +//! committed file must rebuild to itself from its tree, so nothing outside the tree can hide). One rule exists: the R3 owner decision +//! (2026-10-15) that a trigger without a name of its own carries the opened view's name in +//! each language, where the TypeScript renderer wrote the French name twice. It is applied to +//! the committed tree (the frozen file stays as it is): on an element that opens a view, a +//! `data-anno-name-en` equal to the view's French name takes its English name, and a title +//! `FR / FR` under it reads `FR / EN`. Any other difference is reported. + +use crate::anatomy::svg::serialize::serialize; +use crate::anatomy::svg::tree::parse_svg; +use crate::anatomy::svg::{Element, Node}; +use crate::domain::sheet::AnatomicalSheetDocument; + +/// (view id, French name, English name) of every view of the produced document. +pub struct TriggerNames { + views: Vec<(String, String, String)>, +} + +impl TriggerNames { + pub fn of(document: &AnatomicalSheetDocument) -> Self { + let views = document + .views + .iter() + .map(|view| { + ( + view.id().to_owned(), + view.name().fr.clone(), + view.name().en.clone(), + ) + }) + .collect(); + Self { views } + } + + fn apply(&self, element: &mut Element) { + let opened = element.attr("data-anno-opens-view").map(str::to_owned); + let view = opened.and_then(|id| self.views.iter().find(|(v, _, _)| *v == id)); + if let Some((_, fr, en)) = view { + if element.attr("data-anno-name-en") == Some(fr.as_str()) { + element.set_attr("data-anno-name-en", en.clone()); + } + rename_titles(element, &format!("{fr} / {fr}"), &format!("{fr} / {en}")); + } + for child in &mut element.children { + if let Node::Element(child) = child { + self.apply(child); + } + } + } +} + +fn rename_titles(element: &mut Element, from: &str, to: &str) { + for child in &mut element.children { + let Node::Element(child) = child else { + continue; + }; + if child.local_name() == "title" { + for text in &mut child.children { + if let Node::Text(value) = text + && value == from + { + *value = to.to_owned(); + } + } + } + } +} + +/// How two drawings were found equal. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Match { + Bytes, + TreeAfterRule, +} + +/// The first place two trees differ, as a path of element names. +fn first_difference(a: &Element, b: &Element, path: &str) -> Option { + let here = format!("{path}/{}", a.qname); + if a.qname != b.qname || a.namespace != b.namespace { + return Some(format!("{here}: element {} vs {}", a.qname, b.qname)); + } + if a.attrs != b.attrs { + return Some(format!("{here}: attributes differ")); + } + if a.children.len() != b.children.len() { + return Some(format!( + "{here}: {} vs {} children", + a.children.len(), + b.children.len() + )); + } + a.children + .iter() + .zip(&b.children) + .enumerate() + .find_map(|(index, pair)| match pair { + (Node::Element(x), Node::Element(y)) => { + first_difference(x, y, &format!("{here}[{index}]")) + } + (Node::Text(x), Node::Text(y)) if x == y => None, + _ => Some(format!("{here}[{index}]: text or node kind differs")), + }) +} + +/// The prolog (the bytes before the root element) and the text after it. +fn outside_root(text: &str) -> Result<(&str, &str), String> { + let document = roxmltree::Document::parse(text).map_err(|error| error.to_string())?; + let range = document.root_element().range(); + Ok((&text[..range.start], &text[range.end..])) +} + +/// Compares a produced drawing with the committed one: byte identity, else the committed file +/// rebuilt from its tree must be byte-identical to itself (so the tree carries all of it: no +/// comment, processing instruction, encoding or entity form the comparison could miss), the +/// rule must change that tree, and the rebuilt text after the rule must be byte-identical to +/// the produced one. +pub fn compare_drawing( + produced: &str, + committed: &str, + rule: Option<&TriggerNames>, +) -> Result { + if produced == committed { + return Ok(Match::Bytes); + } + let Some(rule) = rule else { + return Err("bytes differ and no tree rule is declared".to_owned()); + }; + // The core reader first: its prescan bounds the depth before any recursive parse. + let tree = parse_svg(committed).map_err(|e| format!("committed: {}", e.reason()))?; + let (prolog, epilog) = outside_root(committed).map_err(|e| format!("committed: {e}"))?; + if format!("{prolog}{}{epilog}", serialize(&tree)) != committed { + return Err("the committed file holds what its tree does not carry".to_owned()); + } + let mut ruled = tree.clone(); + rule.apply(&mut ruled); + if ruled == tree { + return Err("bytes differ and the declared rule changes nothing".to_owned()); + } + if format!("{prolog}{}{epilog}", serialize(&ruled)) == produced { + return Ok(Match::TreeAfterRule); + } + let produced_tree = parse_svg(produced).map_err(|e| format!("produced: {}", e.reason()))?; + Err(first_difference(&produced_tree, &ruled, "") + .unwrap_or_else(|| "the texts differ outside the trees".to_owned())) +} diff --git a/crates/core/src/curation/draft/targets.rs b/crates/core/src/curation/draft/targets.rs new file mode 100644 index 00000000..16920508 --- /dev/null +++ b/crates/core/src/curation/draft/targets.rs @@ -0,0 +1,424 @@ +//! Target grammar of the changeset (`packages/anatomy/src/curation/targets.ts`), one string +//! per target: +//! +//! document | region: | reference: | category: | view: +//! annotation: | zone: | finding:/[/…] +//! +//! A finding path walks ids from the zone down; ids are unique among siblings, so the path +//! names one category or node. Resolution works on the plain JSON form of the document +//! (`serde_json::Value`, insertion order kept): the changeset reaches any field without one +//! accessor per type, and the final strict parse checks the shape. +//! +//! The TypeScript held object references; here a located item is a path of keys and indices +//! into the document, resolved again at each use (`item_mut`, `siblings_mut`). + +use serde_json::{Map, Value}; + +use crate::curation::PipelineError; + +pub type Item = Map; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum TargetKind { + Document, + Region, + Reference, + Category, + View, + Annotation, + Zone, + Finding, +} + +impl TargetKind { + pub fn name(self) -> &'static str { + match self { + Self::Document => "document", + Self::Region => "region", + Self::Reference => "reference", + Self::Category => "category", + Self::View => "view", + Self::Annotation => "annotation", + Self::Zone => "zone", + Self::Finding => "finding", + } + } + + fn collection(name: &str) -> Option { + Some(match name { + "region" => Self::Region, + "reference" => Self::Reference, + "category" => Self::Category, + "view" => Self::View, + "annotation" => Self::Annotation, + "zone" => Self::Zone, + "finding" => Self::Finding, + _ => return None, + }) + } + + /// Regions are keyed by their free code, everything else by a stable id. + pub fn key_field(self) -> &'static str { + if self == Self::Region { "code" } else { "id" } + } +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ParsedTarget { + pub kind: TargetKind, + pub ids: Vec, +} + +/// One step into the document: an object key or an array index. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Step { + Key(&'static str), + Index(usize), +} + +pub type Path = Vec; + +/// A resolved target: the path of the list that holds the item (None: the document root) and +/// the item's index in it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Located { + pub target: ParsedTarget, + pub list: Option, + pub index: usize, +} + +impl Located { + pub fn item_path(&self) -> Path { + let mut path = self.list.clone().unwrap_or_default(); + if self.list.is_some() { + path.push(Step::Index(self.index)); + } + path + } +} + +/// One finding category or node met while walking a zone's tree. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FindingEntry { + pub target: String, + pub path: Path, + pub is_category: bool, +} + +pub fn fail(message: impl Into) -> PipelineError { + PipelineError::Guard(message.into()) +} + +pub fn parse_target(target: &str) -> Result { + if target == "document" { + return Ok(ParsedTarget { + kind: TargetKind::Document, + ids: Vec::new(), + }); + } + let unknown = || fail(format!("unknown target \"{target}\"")); + let colon = target.find(':').ok_or_else(unknown)?; + let (kind, rest) = (&target[..colon], &target[colon + 1..]); + if colon < 1 || rest.is_empty() { + return Err(unknown()); + } + let kind = TargetKind::collection(kind).ok_or_else(unknown)?; + let ids: Vec = if kind == TargetKind::Finding { + rest.split('/').map(str::to_owned).collect() + } else { + vec![rest.to_owned()] + }; + if ids.iter().any(String::is_empty) || (kind == TargetKind::Finding && ids.len() < 2) { + return Err(fail(format!("malformed target \"{target}\""))); + } + Ok(ParsedTarget { kind, ids }) +} + +pub fn format_target(target: &ParsedTarget) -> String { + if target.kind == TargetKind::Document { + return "document".to_owned(); + } + format!("{}:{}", target.kind.name(), target.ids.join("/")) +} + +/// Path of the top-level list holding the items of a target kind. +pub fn top_collection_path(kind: TargetKind) -> Path { + match kind { + TargetKind::Region => vec![Step::Key("vertebral_config"), Step::Key("regions")], + TargetKind::Reference => vec![Step::Key("references")], + TargetKind::Category => vec![Step::Key("categories")], + TargetKind::View => vec![Step::Key("views")], + TargetKind::Annotation => vec![Step::Key("annotations")], + TargetKind::Zone | TargetKind::Finding | TargetKind::Document => { + vec![Step::Key("finding_zones")] + } + } +} + +fn describe(step: &Step) -> String { + match step { + Step::Key(key) => (*key).to_owned(), + Step::Index(index) => index.to_string(), + } +} + +/// The value at a path. +pub fn at<'a>(doc: &'a Value, path: &[Step]) -> Result<&'a Value, PipelineError> { + let mut value = doc; + for step in path { + value = match step { + Step::Key(key) => value.get(key), + Step::Index(index) => value.get(index), + } + .ok_or_else(|| fail(format!("document has no \"{}\"", describe(step))))?; + } + Ok(value) +} + +pub fn at_mut<'a>(doc: &'a mut Value, path: &[Step]) -> Result<&'a mut Value, PipelineError> { + let mut value = doc; + for step in path { + value = match step { + Step::Key(key) => value.get_mut(key), + Step::Index(index) => value.get_mut(index), + } + .ok_or_else(|| fail(format!("document has no \"{}\"", describe(step))))?; + } + Ok(value) +} + +/// `listAt`: the array at a path, or "document has no list". +pub fn list_at<'a>(doc: &'a Value, path: &[Step]) -> Result<&'a Vec, PipelineError> { + let last = path.last().map(describe).unwrap_or_default(); + let no_list = || fail(format!("document has no list \"{last}\"")); + at(doc, path) + .map_err(|_| no_list())? + .as_array() + .ok_or_else(no_list) +} + +pub fn list_at_mut<'a>( + doc: &'a mut Value, + path: &[Step], +) -> Result<&'a mut Vec, PipelineError> { + let last = path.last().map(describe).unwrap_or_default(); + let no_list = || fail(format!("document has no list \"{last}\"")); + at_mut(doc, path) + .map_err(|_| no_list())? + .as_array_mut() + .ok_or_else(no_list) +} + +pub fn item_at<'a>(doc: &'a Value, path: &[Step]) -> Result<&'a Item, PipelineError> { + at(doc, path)? + .as_object() + .ok_or_else(|| fail("target is not an object")) +} + +pub fn item_at_mut<'a>(doc: &'a mut Value, path: &[Step]) -> Result<&'a mut Item, PipelineError> { + at_mut(doc, path)? + .as_object_mut() + .ok_or_else(|| fail("target is not an object")) +} + +/// `entry[key] === id` on an element of a list. +pub fn has_key(entry: &Value, key: &str, id: &str) -> bool { + entry.get(key).and_then(Value::as_str) == Some(id) +} + +/// `findIn`: the index of the sibling whose key is `id`. +fn find_in(list: &[Value], key: &str, id: &str, raw: &str) -> Result { + list.iter() + .position(|entry| has_key(entry, key, id)) + .ok_or_else(|| fail(format!("unknown target \"{raw}\" (no \"{id}\")"))) +} + +fn with(path: &[Step], step: Step) -> Path { + let mut next = path.to_vec(); + next.push(step); + next +} + +/// `childrenOf`: children of a finding item; a lean leaf gets an empty list on demand (the key +/// is appended to the item, as the TypeScript did); a present value that is not a list is +/// refused, never replaced. +pub fn children_path(doc: &mut Value, item: &[Step]) -> Result { + let holder = item_at_mut(doc, item)?; + match holder.get("children") { + None => { + holder.insert("children".into(), Value::Array(Vec::new())); + } + Some(Value::Array(_)) => {} + // Never replaced: the author's value would be lost (refused at the add already). + Some(_) => return Err(fail("\"children\" is not a list")), + } + Ok(with(item, Step::Key("children"))) +} + +fn locate_finding(doc: &Value, target: ParsedTarget, raw: &str) -> Result { + let zones = top_collection_path(TargetKind::Zone); + let zone = find_in(list_at(doc, &zones)?, "id", &target.ids[0], raw)?; + let mut list = with(&with(&zones, Step::Index(zone)), Step::Key("categories")); + let mut index = find_in(list_at(doc, &list)?, "id", &target.ids[1], raw)?; + for id in &target.ids[2..] { + list = with(&with(&list, Step::Index(index)), Step::Key("children")); + let siblings = at(doc, &list).ok().and_then(Value::as_array); + index = find_in(siblings.map_or(&[][..], Vec::as_slice), "id", id, raw)?; + } + Ok(Located { + target, + list: Some(list), + index, + }) +} + +/// Resolves a target string or refuses with "unknown target". +pub fn locate(doc: &Value, raw: &str) -> Result { + let target = parse_target(raw)?; + if target.kind == TargetKind::Document { + return Ok(Located { + target, + list: None, + index: 0, + }); + } + if target.kind == TargetKind::Finding { + return locate_finding(doc, target, raw); + } + let list = top_collection_path(target.kind); + let index = find_in( + list_at(doc, &list)?, + target.kind.key_field(), + &target.ids[0], + raw, + )?; + Ok(Located { + target, + list: Some(list), + index, + }) +} + +/// `String(child.id)` of a finding item. +pub fn id_text(item: &Value) -> String { + super::records::js_string(item.get("id")) +} + +/// The item and every descendant node, depth first, in document order. +fn walk(doc: &Value, path: &Path, target: &str, depth: usize, out: &mut Vec) { + out.push(FindingEntry { + target: target.to_owned(), + path: path.clone(), + is_category: depth == 0, + }); + let children = at(doc, path) + .ok() + .and_then(|item| item.get("children")) + .and_then(Value::as_array); + let Some(children) = children else { + return; + }; + let list = with(path, Step::Key("children")); + for (index, child) in children.iter().enumerate() { + let next = with(&list, Step::Index(index)); + walk( + doc, + &next, + &format!("{target}/{}", id_text(child)), + depth + 1, + out, + ); + } +} + +/// Every finding category and node of a zone, depth first. +pub fn zone_findings(doc: &Value, zone: &Path) -> Result, PipelineError> { + let zone_id = id_text(at(doc, zone)?); + let categories = with(zone, Step::Key("categories")); + let mut out = Vec::new(); + for (index, category) in list_at(doc, &categories)?.iter().enumerate() { + let target = format!("finding:{zone_id}/{}", id_text(category)); + walk( + doc, + &with(&categories, Step::Index(index)), + &target, + 0, + &mut out, + ); + } + Ok(out) +} + +/// Every finding category and node of the document. +pub fn all_findings(doc: &Value) -> Result, PipelineError> { + let zones = top_collection_path(TargetKind::Zone); + let mut out = Vec::new(); + for index in 0..list_at(doc, &zones)?.len() { + out.extend(zone_findings(doc, &with(&zones, Step::Index(index)))?); + } + Ok(out) +} + +/// Finding items an op touches. A finding target alone (self) or with its descendants +/// (subtree); a zone target stands for its categories alone (self) or its whole tree +/// (subtree): a zone carries no citation. +pub fn finding_scope( + doc: &Value, + located: &Located, + subtree: bool, +) -> Result, PipelineError> { + let item = located.item_path(); + match located.target.kind { + TargetKind::Zone => { + let entries = zone_findings(doc, &item)?; + Ok(if subtree { + entries + } else { + entries.into_iter().filter(|e| e.is_category).collect() + }) + } + TargetKind::Finding => { + let depth = usize::from(located.target.ids.len() != 2); + let mut entries = Vec::new(); + walk( + doc, + &item, + &format_target(&located.target), + depth, + &mut entries, + ); + if !subtree { + entries.truncate(1); + } + Ok(entries) + } + _ => Err(fail(format!( + "\"{}\" is not a finding or a zone", + format_target(&located.target) + ))), + } +} + +/// The list an add or a move inserts into under a zone or a finding. +pub fn child_list(doc: &mut Value, parent: &Located) -> Result { + match parent.target.kind { + TargetKind::Zone => { + let path = with(&parent.item_path(), Step::Key("categories")); + list_at(doc, &path)?; + Ok(path) + } + TargetKind::Finding => children_path(doc, &parent.item_path()), + _ => Err(fail(format!( + "\"{}\" holds no findings", + format_target(&parent.target) + ))), + } +} + +/// Target prefix of the items of `child_list(parent)`. +pub fn child_prefix(parent: &Located) -> String { + if parent.target.kind == TargetKind::Zone { + return format!("finding:{}/", parent.target.ids[0]); + } + format!("{}/", format_target(&parent.target)) +} diff --git a/crates/core/src/curation/ids.rs b/crates/core/src/curation/ids.rs new file mode 100644 index 00000000..6f52ce1c --- /dev/null +++ b/crates/core/src/curation/ids.rs @@ -0,0 +1,40 @@ +//! Deterministic identifiers of `packages/anatomy/src/legacy/ids.ts`: nothing random or +//! time-based, so the importer emits the same bytes on every run. + +use sha2::{Digest, Sha256}; + +/// Lowercase hex sha256 of bytes (a string hashes as its UTF-8 bytes, as `createHash` does). +pub fn sha256_hex(data: &[u8]) -> String { + Sha256::digest(data) + .iter() + .map(|byte| format!("{byte:02x}")) + .collect() +} + +/// RFC 4122 version 5 style with SHA-256 in place of SHA-1: the first 16 bytes of +/// sha256(name), the version nibble forced to 5, the variant bits to 10xx. +pub fn deterministic_uuid(name: &str) -> String { + let digest = Sha256::digest(name.as_bytes()); + let mut bytes = [0u8; 16]; + bytes.copy_from_slice(&digest[..16]); + bytes[6] = (bytes[6] & 0x0f) | 0x50; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + let hex: String = bytes.iter().map(|byte| format!("{byte:02x}")).collect(); + format!( + "{}-{}-{}-{}-{}", + &hex[0..8], + &hex[8..12], + &hex[12..16], + &hex[16..20], + &hex[20..32] + ) +} + +/// Same bytes, same asset id. +pub fn asset_id_from_sha256(file_sha256: &str) -> String { + deterministic_uuid(&format!("faunosteo:asset:{file_sha256}")) +} + +pub fn sheet_id_for(species_id: &str, version: u32) -> String { + deterministic_uuid(&format!("faunosteo:sheet:{species_id}:v{version}")) +} diff --git a/crates/core/src/curation/legacy/annotations.rs b/crates/core/src/curation/legacy/annotations.rs new file mode 100644 index 00000000..6eeae7aa --- /dev/null +++ b/crates/core/src/curation/legacy/annotations.rs @@ -0,0 +1,212 @@ +//! Legacy SVG annotation → canonical annotation (`packages/anatomy/src/legacy/annotations.ts`). +//! The finding zone link is resolved here, once, by exact FR + EN equality with the catalog; +//! the document then carries `finding_zone_id` and nothing matches labels at runtime. + +use std::collections::HashMap; + +use serde_json::{Value, json}; + +use super::categories::normalise_category_id; +use super::regions::infer_region_code; +use super::svg::{LegacyAnnotation, LegacyGeometry}; +use super::types::{AnnotationRow, Anomaly, RegionInference}; +use crate::curation::text::slugify; + +pub struct AnnotationContext<'a> { + pub view_id: &'a str, + /// `${name_fr}\n${name_en}` → catalog zone key (a JavaScript `Map`: the last zone wins). + pub zone_by_names: &'a HashMap, +} + +pub struct MappedAnnotation { + pub annotation: Value, + pub row: AnnotationRow, + pub region: Option, + pub anomalies: Vec, +} + +pub fn zone_name_key(fr: &str, en: &str) -> String { + format!("{fr}\n{en}") +} + +fn laterality(a: &LegacyAnnotation, out: &mut Vec) -> &'static str { + match a.lateral.as_deref() { + Some("bilateral") => "bilateral", + None | Some("unpaired") => "unpaired", + Some(other) => { + out.push(Anomaly::to_validate( + "annotation.laterality.unknown", + a.id.clone(), + format!("Latéralité « {other} » inconnue, importée en « unpaired »."), + )); + "unpaired" + } + } +} + +fn region_of(a: &LegacyAnnotation, out: &mut Vec) -> Option { + let special = a.special.as_deref()?; + if special != "vertebral-precision" { + out.push(Anomaly::to_validate( + "annotation.special.unknown", + a.id.clone(), + format!("special « {special} » ignoré."), + )); + return None; + } + let found = infer_region_code(a.name_fr.as_deref(), a.name_en.as_deref()); + if found.is_none() { + out.push(Anomaly::to_validate( + "annotation.region.unknown", + a.id.clone(), + "Région vertébrale non déduite.", + )); + } + let fallback = a + .name_fr + .clone() + .or_else(|| a.name_en.clone()) + .unwrap_or_else(|| a.id.clone()); + Some(RegionInference { + annotation_id: a.id.clone(), + label: found.as_ref().map_or(fallback, |m| m.label.clone()), + root: found.as_ref().map(|m| m.root.clone()), + code: found.map(|m| m.code), + }) +} + +fn geometry(a: &LegacyAnnotation) -> Value { + a.geometry + .as_ref() + .map_or(Value::Null, LegacyGeometry::to_value) +} + +fn category_id(a: &LegacyAnnotation) -> String { + normalise_category_id(a.category.as_deref().unwrap_or("")) +} + +fn trigger_name(a: &LegacyAnnotation, out: &mut Vec) -> Value { + match (a.name_fr.as_deref(), a.name_en.as_deref()) { + (Some(fr), Some(en)) if !fr.is_empty() && !en.is_empty() => json!({ "fr": fr, "en": en }), + _ => { + out.push(Anomaly::informative( + "annotation.trigger.unnamed", + a.id.clone(), + "Déclencheur de vue détail sans nom (name null), comme dans le SVG.", + )); + Value::Null + } + } +} + +fn map_trigger(a: &LegacyAnnotation, ctx: &AnnotationContext, out: &mut Vec) -> Value { + let opens = a.opens_detail.clone().unwrap_or_default(); + let laterality = laterality(a, out); + let name = trigger_name(a, out); + json!({ + "id": format!("{opens}-trigger"), + "kind": "detail_trigger", + "view_id": ctx.view_id, + "category_id": category_id(a), + "laterality": laterality, + "geometry": geometry(a), + "name": name, + "opens_view_id": opens, + }) +} + +/// Missing labels fall back to the other language, never silently. +fn observable_name(a: &LegacyAnnotation, out: &mut Vec) -> (String, String) { + let fr = a + .name_fr + .clone() + .or_else(|| a.name_en.clone()) + .unwrap_or_else(|| a.id.clone()); + if a.name_fr.is_none() { + out.push(Anomaly::to_validate( + "annotation.name_fr.missing", + a.id.clone(), + format!("data-anno-name-fr absent : nom FR repris de « {fr} »."), + )); + } + if a.name_en.is_none() { + out.push(Anomaly::to_validate( + "annotation.name_en.missing", + a.id.clone(), + format!("data-anno-name-en absent : nom EN copié du FR « {fr} », à traduire."), + )); + } + let en = a.name_en.clone().unwrap_or_else(|| fr.clone()); + (fr, en) +} + +fn map_observable( + a: &LegacyAnnotation, + ctx: &AnnotationContext, + out: &mut Vec, +) -> (Value, Option) { + let (fr, en) = observable_name(a, out); + let zone_id = ctx.zone_by_names.get(&zone_name_key(&fr, &en)).cloned(); + if zone_id.is_none() { + out.push(Anomaly::to_validate( + "annotation.unmapped", + a.id.clone(), + "Annotation non reliée à une zone de constats.", + )); + } + let region = region_of(a, out); + let laterality = laterality(a, out); + let annotation = json!({ + "id": zone_id.clone().unwrap_or_else(|| slugify(&en)), + "kind": if a.tag_name == "circle" { "point" } else { "zone" }, + "view_id": ctx.view_id, + "category_id": category_id(a), + "laterality": laterality, + "geometry": geometry(a), + "name": { "fr": fr, "en": en }, + "finding_zone_id": zone_id, + "vertebral_region_code": region.as_ref().and_then(|r| r.code.clone()), + }); + (annotation, region) +} + +fn text(value: &Value, key: &str) -> Option { + value.get(key).and_then(Value::as_str).map(str::to_owned) +} + +pub fn map_annotation(a: &LegacyAnnotation, ctx: &AnnotationContext) -> MappedAnnotation { + let mut anomalies = Vec::new(); + let is_trigger = a + .opens_detail + .as_deref() + .is_some_and(|opens| !opens.is_empty()); + let (annotation, region) = if is_trigger { + (map_trigger(a, ctx, &mut anomalies), None) + } else { + map_observable(a, ctx, &mut anomalies) + }; + let row = AnnotationRow { + legacy_id: a.id.clone(), + new_id: text(&annotation, "id").unwrap_or_default(), + view_id: ctx.view_id.to_owned(), + kind: text(&annotation, "kind").unwrap_or_default(), + laterality: text(&annotation, "laterality").unwrap_or_default(), + region_code: if is_trigger { + None + } else { + text(&annotation, "vertebral_region_code") + }, + finding_zone_id: if is_trigger { + None + } else { + text(&annotation, "finding_zone_id") + }, + geometry: LegacyGeometry::describe(a.geometry.as_ref()), + }; + MappedAnnotation { + annotation, + row, + region, + anomalies, + } +} diff --git a/crates/core/src/curation/legacy/authored_labels.rs b/crates/core/src/curation/legacy/authored_labels.rs new file mode 100644 index 00000000..ad018b91 --- /dev/null +++ b/crates/core/src/curation/legacy/authored_labels.rs @@ -0,0 +1,58 @@ +//! Every FR/EN text the importer writes itself, derived from the document so the list can +//! never drift from what is written (`packages/anatomy/src/legacy/authored-labels.ts`). + +use serde_json::Value; + +use super::types::Anomaly; + +pub const AUTHORED_LABEL_CODE: &str = "label.authored"; + +/// `${value}` of a JavaScript template literal for a JSON value read from the document. +fn template(value: &Value) -> String { + match value { + Value::String(text) => text.clone(), + other => other.to_string(), + } +} + +fn authored(subject: String, text: Option<&Value>) -> Anomaly { + let parts: Vec = [("FR", "fr"), ("EN", "en")] + .into_iter() + .filter_map(|(label, key)| { + text.and_then(|t| t.get(key)) + .map(|value| format!("{label} « {} »", template(value))) + }) + .collect(); + Anomaly::to_validate( + AUTHORED_LABEL_CODE, + subject, + format!("Libellé écrit par l'importateur : {}.", parts.join(", ")), + ) +} + +pub fn region_label_subject(code: &str) -> String { + format!("vertebral_config.{code}") +} + +fn items<'a>(document: &'a Value, pointer: &str) -> &'a [Value] { + document + .pointer(pointer) + .and_then(Value::as_array) + .map_or(&[], Vec::as_slice) +} + +pub fn authored_label_anomalies(document: &Value) -> Vec { + let mut out = vec![ + authored("name".into(), document.get("name")), + authored("description".into(), document.get("description")), + ]; + for view in items(document, "/views") { + let id = view.get("id").map(template).unwrap_or_default(); + out.push(authored(format!("views.{id}"), view.get("name"))); + } + for region in items(document, "/vertebral_config/regions") { + let code = region.get("code").map(template).unwrap_or_default(); + out.push(authored(region_label_subject(&code), region.get("name"))); + } + out +} diff --git a/crates/core/src/curation/legacy/catalog.rs b/crates/core/src/curation/legacy/catalog.rs new file mode 100644 index 00000000..d612af6c --- /dev/null +++ b/crates/core/src/curation/legacy/catalog.rs @@ -0,0 +1,353 @@ +//! The legacy findings catalog (`pathologies.json`, schema 2.0) → canonical finding zones in +//! the lean authoring form (`packages/anatomy/src/legacy/catalog.ts`): optional keys are +//! written only when the source carries them. +//! +//! The catalog is read as `JSON.parse` reads it (`domain::js::parse_json`, zones in +//! `Object.entries` order) and its values are copied as they are. Declared difference: where +//! JavaScript would coerce or crash on a wrong type (an id or a `children` that is not what +//! the format says), the port refuses the catalog with a message naming the node. + +use serde_json::{Map, Value, json}; + +use super::types::{Anomaly, ZoneStats}; +use crate::curation::PipelineError; +use crate::curation::text::{js_keys, js_object, slugify}; +use crate::domain::js::{is_stable_id, parse_json}; + +/// A parsed catalog: the zones in `Object.entries` order, and the other top-level values. +#[derive(Debug, Clone)] +pub struct LegacyCatalog { + pub root: Map, + pub zones: Vec<(String, Map)>, +} + +impl LegacyCatalog { + pub fn get(&self, key: &str) -> Option<&Value> { + self.root.get(key) + } +} + +pub fn parse_legacy_catalog(text: &str) -> Result { + let source = |why: &str| PipelineError::Source(format!("pathologies.json: {why}")); + let value = parse_json(text).map_err(|error| source(&error.to_string()))?; + let Value::Object(root) = value else { + return Err(source("\"zones\" object missing")); + }; + let Some(Value::Object(zones)) = root.get("zones") else { + return Err(source("\"zones\" object missing")); + }; + let mut ordered = Vec::with_capacity(zones.len()); + for key in js_keys(zones) { + let Some(Value::Object(zone)) = zones.get(key) else { + return Err(source(&format!("zone {key} is not an object"))); + }; + ordered.push((key.clone(), zone.clone())); + } + Ok(LegacyCatalog { + root, + zones: ordered, + }) +} + +/// A node's string field, refused when absent or not a string. +pub fn text_field<'a>(node: &'a Map, key: &str) -> Result<&'a str, PipelineError> { + node.get(key).and_then(Value::as_str).ok_or_else(|| { + PipelineError::Source(format!("pathologies.json: \"{key}\" is not a string")) + }) +} + +/// A node's child list (`node.children ?? []`), refused when it is not an array. +pub fn children(node: &Map) -> Result>, PipelineError> { + match node.get("children") { + None | Some(Value::Null) => Ok(Vec::new()), + Some(Value::Array(items)) => items.iter().map(as_node).collect(), + Some(_) => Err(PipelineError::Source( + "pathologies.json: \"children\" is not an array".into(), + )), + } +} + +/// A zone's categories, refused when not an array of objects. +pub fn categories(zone: &Map) -> Result>, PipelineError> { + match zone.get("categories") { + Some(Value::Array(items)) => items.iter().map(as_node).collect(), + _ => Err(PipelineError::Source( + "pathologies.json: \"categories\" is not an array".into(), + )), + } +} + +fn as_node(value: &Value) -> Result<&Map, PipelineError> { + value + .as_object() + .ok_or_else(|| PipelineError::Source("pathologies.json: a node is not an object".into())) +} + +pub fn category_kind(category_id: &str) -> &'static str { + if category_id.ends_with("-dysfunctions") { + "dysfunction" + } else if category_id.ends_with("-observations") { + "consultation_reason" + } else if category_id == "anamnesis" { + "anamnesis" + } else { + "custom" + } +} + +/// JavaScript truthiness of a JSON value. +pub fn truthy(value: Option<&Value>) -> bool { + match value { + None | Some(Value::Null) => false, + Some(Value::Bool(flag)) => *flag, + Some(Value::Number(number)) => number.as_f64().is_some_and(|n| n != 0.0 && !n.is_nan()), + Some(Value::String(text)) => !text.is_empty(), + Some(_) => true, + } +} + +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] +pub struct TreeCounts { + pub nodes: usize, + pub leaves: usize, + pub vet_referrals: usize, +} + +/// Counts categories as nodes, as the audit does (792 = 78 + 714). Works on the legacy and +/// on the canonical form: both say `children` and `requires_vet_referral`. +pub fn count_tree(nodes: &[&Map]) -> Result { + let mut total = TreeCounts::default(); + for node in nodes { + let kids = children(node)?; + let sub = count_tree(&kids)?; + total.nodes += 1 + sub.nodes; + total.leaves += sub.leaves + usize::from(kids.is_empty()); + total.vet_referrals += + sub.vet_referrals + usize::from(truthy(node.get("requires_vet_referral"))); + } + Ok(total) +} + +#[derive(Debug, Clone, PartialEq)] +pub struct MappedCatalog { + pub zones: Vec, + pub zone_stats: Vec, + pub node_id_map: Map, + pub missing_description_en: usize, + pub sources: usize, + pub anomalies: Vec, +} + +/// Tallies of one catalog walk. +#[derive(Default)] +struct WalkState { + node_ids: Vec<(String, Value)>, + anomalies: Vec, + missing_description_en: usize, + sources: usize, +} + +/// `{ fr?, en? }` from `description_fr` / `description_en`, when either is present. +fn description(node: &Map) -> Option { + let fr = node.get("description_fr"); + let en = node.get("description_en"); + if fr.is_none() && en.is_none() { + return None; + } + let mut text = Map::new(); + if let Some(fr) = fr { + text.insert("fr".into(), fr.clone()); + } + if let Some(en) = en { + text.insert("en".into(), en.clone()); + } + Some(Value::Object(text)) +} + +/// `{ fr: name_fr, en: name_en }`, an absent key left out as `JSON.stringify` leaves out +/// `undefined`. +fn name(node: &Map) -> Value { + let mut text = Map::new(); + for (from, to) in [("name_fr", "fr"), ("name_en", "en")] { + if let Some(value) = node.get(from) { + text.insert(to.into(), value.clone()); + } + } + Value::Object(text) +} + +fn stable_node_id(id: &str, path: &[&str], state: &mut WalkState) -> String { + if is_stable_id(id) { + return id.to_owned(); + } + let slug = slugify(id); + let next = if slug.is_empty() { + "node".to_owned() + } else { + slug + }; + let key = [path, &[id]].concat().join("/"); + state + .node_ids + .push((key.clone(), Value::from(next.clone()))); + state.anomalies.push(Anomaly::to_validate( + "finding.id.slugified", + key, + format!("Identifiant hors motif stable, remplacé par « {next} »."), + )); + next +} + +fn tally_node(node: &Map, state: &mut WalkState) -> Result<(), PipelineError> { + if node.contains_key("description_fr") && !node.contains_key("description_en") { + state.missing_description_en += 1; + } + state.sources += match node.get("sources") { + None | Some(Value::Null) => 0, + Some(Value::Array(items)) => items.len(), + Some(_) => { + return Err(PipelineError::Source( + "pathologies.json: \"sources\" is not an array".into(), + )); + } + }; + Ok(()) +} + +fn map_node( + node: &Map, + path: &[&str], + state: &mut WalkState, +) -> Result { + tally_node(node, state)?; + let legacy_id = text_field(node, "id")?; + let id = stable_node_id(legacy_id, path, state); + let mut out = Map::new(); + out.insert("id".into(), Value::from(id)); + out.insert("name".into(), name(node)); + if let Some(text) = description(node) { + out.insert("description".into(), text); + } + if node.get("requires_vet_referral") == Some(&Value::Bool(true)) { + out.insert("requires_vet_referral".into(), Value::Bool(true)); + } + if truthy(node.get("children")) { + let child_path = [path, &[legacy_id]].concat(); + let mapped: Result, PipelineError> = children(node)? + .into_iter() + .map(|child| map_node(child, &child_path, state)) + .collect(); + out.insert("children".into(), Value::Array(mapped?)); + } + Ok(Value::Object(out)) +} + +fn map_category( + zone_id: &str, + category: &Map, + state: &mut WalkState, +) -> Result { + tally_node(category, state)?; + let category_id = text_field(category, "id")?; + let kind = category_kind(category_id); + if kind == "custom" { + state.anomalies.push(Anomaly::to_validate( + "finding.category.kind_unknown", + format!("{zone_id}/{category_id}"), + "Type de catégorie non reconnu, importé en « custom ».", + )); + } + let id = stable_node_id(category_id, &[zone_id], state); + let path = [zone_id, category_id]; + let mapped: Result, PipelineError> = children(category)? + .into_iter() + .map(|child| map_node(child, &path, state)) + .collect(); + let mut out = json!({ "id": id, "kind": kind, "name": name(category), "children": mapped? }); + if let (Some(text), Some(map)) = (description(category), out.as_object_mut()) { + map.insert("description".into(), text); + } + Ok(out) +} + +fn zone_stats_of(key: &str, zone: &Map) -> Result { + let cats = categories(zone)?; + let counts = count_tree(&cats)?; + let mut category_leaves = 0; + for category in &cats { + category_leaves += usize::from(children(category)?.is_empty()); + } + let zone_id = zone.get("id").and_then(Value::as_str).unwrap_or(key); + Ok(ZoneStats { + zone_id: zone_id.to_owned(), + nodes: counts.nodes, + leaves: counts.leaves - category_leaves, + vet_referrals: counts.vet_referrals, + }) +} + +/// Fails when the output tree does not hold exactly the input tree. +pub fn assert_nothing_dropped( + zone_id: &str, + before: TreeCounts, + after: TreeCounts, +) -> Result<(), PipelineError> { + let pairs = [ + ("nodes", before.nodes, after.nodes), + ("leaves", before.leaves, after.leaves), + ("vetReferrals", before.vet_referrals, after.vet_referrals), + ]; + let detail: Vec = pairs + .iter() + .filter(|(_, b, a)| b != a) + .map(|(key, b, a)| format!("{key} {b} in, {a} out")) + .collect(); + if detail.is_empty() { + return Ok(()); + } + Err(PipelineError::Guard(format!( + "zone {zone_id}: {}", + detail.join("; ") + ))) +} + +fn map_zone( + key: &str, + zone: &Map, + state: &mut WalkState, +) -> Result { + let zone_id = text_field(zone, "id")?; + if zone_id != key { + return Err(PipelineError::Guard(format!( + "zone key {key} ≠ id {zone_id}" + ))); + } + let cats = categories(zone)?; + let mut mapped = Vec::with_capacity(cats.len()); + for category in &cats { + mapped.push(map_category(key, category, state)?); + } + let out_nodes: Vec<&Map> = mapped.iter().filter_map(Value::as_object).collect(); + assert_nothing_dropped(key, count_tree(&cats)?, count_tree(&out_nodes)?)?; + Ok(json!({ "id": key, "name": name(zone), "categories": mapped })) +} + +pub fn map_catalog(catalog: &LegacyCatalog) -> Result { + let mut state = WalkState::default(); + let mut zones = Vec::with_capacity(catalog.zones.len()); + let mut zone_stats = Vec::with_capacity(catalog.zones.len()); + for (key, zone) in &catalog.zones { + zones.push(map_zone(key, zone, &mut state)?); + } + for (key, zone) in &catalog.zones { + zone_stats.push(zone_stats_of(key, zone)?); + } + Ok(MappedCatalog { + zones, + zone_stats, + node_id_map: js_object(state.node_ids), + missing_description_en: state.missing_description_en, + sources: state.sources, + anomalies: state.anomalies, + }) +} diff --git a/crates/core/src/curation/legacy/catalog_checks.rs b/crates/core/src/curation/legacy/catalog_checks.rs new file mode 100644 index 00000000..2cb75332 --- /dev/null +++ b/crates/core/src/curation/legacy/catalog_checks.rs @@ -0,0 +1,140 @@ +//! Catalog-wide findings that need a business decision or an explanation +//! (`packages/anatomy/src/legacy/catalog-checks.ts`). Nothing here alters the data. + +use std::collections::HashSet; + +use serde_json::{Map, Value}; + +use super::catalog::{LegacyCatalog, categories, children, text_field}; +use super::types::Anomaly; +use crate::curation::PipelineError; +use crate::curation::text::utf16_cmp; + +/// `/^(.+)-(dysfunctions|observations)$/`: the prefix and the suffix (`.` stops at a line +/// terminator, as in JavaScript). +fn prefixed(id: &str) -> Option<(&str, &str)> { + ["dysfunctions", "observations"] + .into_iter() + .find_map(|suffix| { + let prefix = id.strip_suffix(suffix)?.strip_suffix('-')?; + let terminators = ['\n', '\r', '\u{2028}', '\u{2029}']; + (!prefix.is_empty() && !prefix.contains(terminators)).then_some((prefix, suffix)) + }) +} + +/// A prefixed category id that names another zone (sphenoid → ssb-…). +fn foreign_prefix_anomalies(catalog: &LegacyCatalog) -> Result, PipelineError> { + let zone_ids: Vec<&str> = catalog.zones.iter().map(|(key, _)| key.as_str()).collect(); + let mut out = Vec::new(); + for (zone_id, zone) in &catalog.zones { + for category in categories(zone)? { + let category_id = text_field(category, "id")?; + let Some((prefix, suffix)) = prefixed(category_id) else { + continue; + }; + if prefix == zone_id || !zone_ids.contains(&prefix) { + continue; + } + out.push(Anomaly::to_validate( + "finding.category.foreign_prefix", + format!("{zone_id}/{category_id}"), + format!( + "Identifiant de catégorie dupliqué entre {zone_id} et {prefix} ; \ + {zone_id}-{suffix} attendu ; décision ostéopathe requise. \ + Importé tel quel (non renommé)." + ), + )); + } + } + Ok(out) +} + +fn child_ids(category: &Map) -> Result { + let ids: Result, PipelineError> = children(category)? + .into_iter() + .map(|child| text_field(child, "id")) + .collect(); + Ok(ids?.join(", ")) +} + +/// Same `anamnesis` id everywhere, different content per zone family. +fn anamnesis_variants(catalog: &LegacyCatalog) -> Result, PipelineError> { + let mut variants: Vec<(String, Vec)> = Vec::new(); + for (zone_id, zone) in &catalog.zones { + let found = categories(zone)? + .into_iter() + .find(|c| c.get("id").and_then(Value::as_str) == Some("anamnesis")); + let Some(category) = found else { continue }; + let key = child_ids(category)?; + match variants.iter_mut().find(|(known, _)| *known == key) { + Some((_, zones)) => zones.push(zone_id.clone()), + None => variants.push((key, vec![zone_id.clone()])), + } + } + let total = variants.len(); + Ok(variants + .into_iter() + .enumerate() + .map(|(index, (children, zones))| { + Anomaly::informative( + "finding.anamnesis.variant", + format!("anamnesis variante {}/{total}", index + 1), + format!("Zones {} : {children}.", zones.join(", ")), + ) + }) + .collect()) +} + +fn collect_ids( + nodes: &[&Map], + into: &mut Vec, + seen: &mut HashSet, +) -> Result<(), PipelineError> { + for node in nodes { + let id = text_field(node, "id")?; + if seen.insert(id.to_owned()) { + into.push(id.to_owned()); + } + collect_ids(&children(node)?, into, seen)?; + } + Ok(()) +} + +/// Node ids are unique among siblings only; a finding is (zone, path). +fn cross_zone_duplicates(catalog: &LegacyCatalog) -> Result, PipelineError> { + let mut zones_by_id: Vec<(String, usize)> = Vec::new(); + for (_, zone) in &catalog.zones { + let (mut ids, mut seen) = (Vec::new(), HashSet::new()); + collect_ids(&categories(zone)?, &mut ids, &mut seen)?; + for id in ids { + match zones_by_id.iter_mut().find(|(known, _)| *known == id) { + Some((_, count)) => *count += 1, + None => zones_by_id.push((id, 1)), + } + } + } + let shared: Vec<(String, usize)> = zones_by_id.into_iter().filter(|(_, n)| *n > 1).collect(); + let mut top = shared.clone(); + top.sort_by(|a, b| b.1.cmp(&a.1).then_with(|| utf16_cmp(&a.0, &b.0))); + let listed: Vec = top + .iter() + .take(8) + .map(|(id, n)| format!("{id} ({n})")) + .collect(); + Ok(vec![Anomaly::informative( + "finding.id.shared_across_zones", + format!("{} identifiants", shared.len()), + format!( + "Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, \ + adressage par zone + chemin). Les plus fréquents : {}.", + listed.join(", ") + ), + )]) +} + +pub fn catalog_anomalies(catalog: &LegacyCatalog) -> Result, PipelineError> { + let mut out = foreign_prefix_anomalies(catalog)?; + out.extend(anamnesis_variants(catalog)?); + out.extend(cross_zone_duplicates(catalog)?); + Ok(out) +} diff --git a/crates/core/src/curation/legacy/categories.rs b/crates/core/src/curation/legacy/categories.rs new file mode 100644 index 00000000..9e0ed755 --- /dev/null +++ b/crates/core/src/curation/legacy/categories.rs @@ -0,0 +1,96 @@ +//! SVG annotation categories → canonical categories (`packages/anatomy/src/legacy/categories.ts`). +//! The legacy editor slugified labels byte-wise, so accented letters became `-`; those slugs +//! are normalised here and every change is reported; labels the importer writes are reported +//! as "to validate". + +use serde_json::{Map, Value, json}; + +use super::svg::LegacyAnnotation; +use super::types::Anomaly; +use crate::curation::text::js_object; + +/// Degraded legacy slug → real slug; other slugs are kept. +pub fn normalise_category_id(legacy: &str) -> String { + match legacy { + "charni-res-vert-brales" => "charnieres-vertebrales", + "cadrans-du-cr-ne" => "cadrans-du-crane", + other => other, + } + .to_owned() +} + +/// Labels authored by the importer, keyed by normalised slug. +fn label(id: &str) -> Option<(&'static str, &'static str)> { + Some(match id { + "articulations" => ("Articulations", "Joints"), + "os" => ("Os", "Bones"), + "zone-colonne" => ("Zone colonne", "Spine"), + "charnieres-vertebrales" => ("Charnières vertébrales", "Vertebral hinges"), + "cadrans-du-crane" => ("Cadrans du crâne", "Skull quadrants"), + _ => return None, + }) +} + +#[derive(Debug, Clone, PartialEq)] +pub struct MappedCategories { + pub categories: Vec, + pub id_map: Map, + pub anomalies: Vec, +} + +/// `data-anno-category-name` is used only when it is a real label (it repeats the slug in +/// the equine SVGs). +fn french_name(legacy: &str, category_name: Option<&str>) -> String { + let id = normalise_category_id(legacy); + match category_name { + Some(name) if !name.is_empty() && name != legacy => name.to_owned(), + _ => label(&id).map_or(id, |(fr, _)| fr.to_owned()), + } +} + +/// Category → its first non-null name, in order of first appearance (a JavaScript `Map`). +fn first_seen(annotations: &[&LegacyAnnotation]) -> Vec<(String, Option)> { + let mut seen: Vec<(String, Option)> = Vec::new(); + for a in annotations { + let Some(category) = &a.category else { + continue; + }; + match seen.iter_mut().find(|(key, _)| key == category) { + Some((_, name @ None)) => name.clone_from(&a.category_name), + Some(_) => {} + None => seen.push((category.clone(), a.category_name.clone())), + } + } + seen +} + +/// Categories in order of first appearance across the SVGs. +pub fn map_categories(annotations: &[&LegacyAnnotation]) -> MappedCategories { + let mut categories = Vec::new(); + let mut ids = Vec::new(); + let mut anomalies = Vec::new(); + for (legacy, category_name) in first_seen(annotations) { + let id = normalise_category_id(&legacy); + let fr = french_name(&legacy, category_name.as_deref()); + let en = label(&id).map_or_else(|| id.clone(), |(_, en)| en.to_owned()); + categories.push(json!({ "id": id, "name": { "fr": fr, "en": en }, "color": null })); + ids.push((legacy.clone(), Value::from(id.clone()))); + if id != legacy { + anomalies.push(Anomaly::to_validate( + "category.slug.normalised", + legacy, + format!("Slug technique dégradé (accents perdus) normalisé en « {id} »."), + )); + } + anomalies.push(Anomaly::to_validate( + "category.label.authored", + id, + format!("Libellé écrit par l'importateur : FR « {fr} », EN « {en} »."), + )); + } + MappedCategories { + categories, + id_map: js_object(ids), + anomalies, + } +} diff --git a/crates/core/src/curation/legacy/importer.rs b/crates/core/src/curation/legacy/importer.rs new file mode 100644 index 00000000..69e71a0c --- /dev/null +++ b/crates/core/src/curation/legacy/importer.rs @@ -0,0 +1,370 @@ +//! The one-off, deterministic import of the historical equine assets into the first +//! canonical sheet document (`packages/anatomy/src/legacy/importer.ts`). The result is a +//! DRAFT for business review: every correction is listed in `anomalies`, nothing is +//! published. + +use std::collections::HashMap; + +use serde_json::{Map, Value, json}; + +use super::annotations::{AnnotationContext, MappedAnnotation, map_annotation, zone_name_key}; +use super::authored_labels::authored_label_anomalies; +use super::catalog::{LegacyCatalog, MappedCatalog, map_catalog, parse_legacy_catalog}; +use super::catalog_checks::catalog_anomalies; +use super::categories::{MappedCategories, map_categories}; +use super::svg::{ParsedSvg, parse_annotated_svg}; +use super::types::{ + AnnotationsByView, Anomaly, AssetRecord, EquineLegacyInput, ImportResult, ImportStats, + SourceDigest, SvgSource, +}; +use super::vertebrae::{VertebralFormula, parse_vertebral_formula, vertebral_regions}; +use crate::curation::PipelineError; +use crate::curation::ids::{asset_id_from_sha256, sha256_hex, sheet_id_for}; +use crate::curation::text::js_object; +use crate::domain::sheet::{ + AnatomicalSheetDocument, SHEET_DOCUMENT_SCHEMA_VERSION, validate_sheet_document, +}; + +pub const EQUINE_SPECIES_ID: &str = "equine"; +pub const EQUINE_SHEET_VERSION: u32 = 1; +pub const MAIN_VIEW_ID: &str = "main"; +pub const HEAD_VIEW_ID: &str = "head"; + +struct ParsedSources { + assets: Vec, + main: ParsedSvg, + head: ParsedSvg, + catalog: LegacyCatalog, + formula: VertebralFormula, +} + +struct Mapped { + annotations: Vec, + categories: MappedCategories, + catalog: MappedCatalog, +} + +fn asset_record(source: &SvgSource) -> AssetRecord { + let sha256 = sha256_hex(&source.bytes); + AssetRecord { + file: source.file_name.clone(), + svg_asset_id: asset_id_from_sha256(&sha256), + sha256, + byte_size: source.bytes.len(), + } +} + +/// `Buffer.toString('utf8')`: invalid bytes become U+FFFD, a BOM is kept. +fn lossy_text(bytes: &[u8]) -> String { + String::from_utf8_lossy(bytes).into_owned() +} + +fn text_digest(file: &str, text: &str) -> SourceDigest { + SourceDigest { + file: file.to_owned(), + sha256: sha256_hex(text.as_bytes()), + byte_size: text.len(), + } +} + +/// `new TextDecoder('utf-8', { fatal: true })`: invalid UTF-8 refused, one BOM removed. +fn svg_text(source: &SvgSource) -> Result<&str, PipelineError> { + let text = std::str::from_utf8(&source.bytes) + .map_err(|_| PipelineError::Source(format!("{}: invalid UTF-8", source.file_name)))?; + Ok(text.strip_prefix('\u{FEFF}').unwrap_or(text)) +} + +fn parse_sources(input: &EquineLegacyInput) -> Result { + Ok(ParsedSources { + assets: vec![asset_record(&input.main_svg), asset_record(&input.head_svg)], + main: parse_annotated_svg(svg_text(&input.main_svg)?, &input.main_svg.file_name)?, + head: parse_annotated_svg(svg_text(&input.head_svg)?, &input.head_svg.file_name)?, + catalog: parse_legacy_catalog(&lossy_text(&input.catalog))?, + formula: parse_vertebral_formula(&lossy_text(&input.vertebrae))?, + }) +} + +/// `${value}` of a zone name part. +fn template(value: Option<&Value>) -> String { + match value { + None => "undefined".to_owned(), + Some(Value::String(text)) => text.clone(), + Some(other) => other.to_string(), + } +} + +fn zone_names(zones: &[Value]) -> HashMap { + let mut names = HashMap::new(); + for zone in zones { + let fr = template(zone.pointer("/name/fr")); + let en = template(zone.pointer("/name/en")); + let id = zone.get("id").and_then(Value::as_str).unwrap_or_default(); + names.insert(zone_name_key(&fr, &en), id.to_owned()); + } + names +} + +fn map_sources(sources: &ParsedSources) -> Result { + let catalog = map_catalog(&sources.catalog)?; + let zone_by_names = zone_names(&catalog.zones); + let views = [(MAIN_VIEW_ID, &sources.main), (HEAD_VIEW_ID, &sources.head)]; + let mut annotations = Vec::new(); + for (view_id, svg) in views { + let ctx = AnnotationContext { + view_id, + zone_by_names: &zone_by_names, + }; + annotations.extend(svg.annotations.iter().map(|a| map_annotation(a, &ctx))); + } + let legacy: Vec<_> = sources + .main + .annotations + .iter() + .chain(&sources.head.annotations) + .collect(); + Ok(Mapped { + annotations, + categories: map_categories(&legacy), + catalog, + }) +} + +fn build_views(assets: &[AssetRecord]) -> Value { + json!([ + { + "id": MAIN_VIEW_ID, "kind": "main", + "name": { "fr": "Vue générale", "en": "Overview" }, + "svg_asset_id": assets[0].svg_asset_id, "view_box": null, + }, + { + "id": HEAD_VIEW_ID, "kind": "detail", "parent_view_id": MAIN_VIEW_ID, + "name": { "fr": "Tête", "en": "Head" }, + "svg_asset_id": assets[1].svg_asset_id, "view_box": null, + }, + ]) +} + +fn build_document(sources: &ParsedSources, mapped: &Mapped) -> Value { + let disclaimer = sources.catalog.get("scope_disclaimer"); + let notes = format!( + "Import des données historiques: Horse.svg, Horse_head.svg, pathologies.json (schema {})", + template(sources.catalog.get("schema_version")) + ); + let annotations: Vec<&Value> = mapped.annotations.iter().map(|m| &m.annotation).collect(); + json!({ + "schema_version": SHEET_DOCUMENT_SCHEMA_VERSION, + "species_id": EQUINE_SPECIES_ID, + "name": { "fr": "Cheval", "en": "Horse" }, + "description": { + "fr": "Fiche anatomique officielle Faunosteo", + "en": "Official Faunosteo anatomical sheet", + }, + "scope_disclaimer": disclaimer.map_or_else(|| json!({}), |text| json!({ "fr": text })), + "attribution": { "authors": ["Faunosteo"], "license": null, "notes": notes }, + "vertebral_config": { "regions": vertebral_regions(&sources.formula) }, + "references": [], + "categories": mapped.categories.categories, + "views": build_views(&sources.assets), + "annotations": annotations, + "finding_zones": mapped.catalog.zones, + }) +} + +fn build_id_map(sources: &ParsedSources, mapped: &Mapped) -> Map { + let annotations = mapped + .annotations + .iter() + .map(|m| (m.row.legacy_id.clone(), Value::from(m.row.new_id.clone()))); + let assets = sources + .assets + .iter() + .map(|a| (a.file.clone(), Value::from(a.svg_asset_id.clone()))); + let mut map = Map::new(); + map.insert("views".into(), json!({ "head": "head" })); + map.insert("annotations".into(), Value::Object(js_object(annotations))); + map.insert( + "categories".into(), + Value::Object(mapped.categories.id_map.clone()), + ); + map.insert( + "finding_nodes".into(), + Value::Object(mapped.catalog.node_id_map.clone()), + ); + map.insert("assets".into(), Value::Object(js_object(assets))); + map +} + +fn count(annotations: &[Value], test: impl Fn(&Value) -> bool) -> usize { + annotations.iter().filter(|a| test(a)).count() +} + +fn is(annotation: &Value, key: &str, value: &str) -> bool { + annotation.get(key).and_then(Value::as_str) == Some(value) +} + +fn present(annotation: &Value, key: &str) -> bool { + !is(annotation, "kind", "detail_trigger") && annotation.get(key).is_some_and(|v| !v.is_null()) +} + +fn build_stats(sources: &ParsedSources, document: &Value, mapped: &Mapped) -> ImportStats { + let annotations = document["annotations"] + .as_array() + .map_or(&[][..], Vec::as_slice); + let totals = &mapped.catalog.zone_stats; + ImportStats { + legacy_annotations: sources.main.annotations.len() + sources.head.annotations.len(), + annotations: annotations.len(), + annotations_by_view: AnnotationsByView { + main: count(annotations, |a| is(a, "view_id", MAIN_VIEW_ID)), + head: count(annotations, |a| is(a, "view_id", HEAD_VIEW_ID)), + }, + linked_annotations: count(annotations, |a| present(a, "finding_zone_id")), + triggers: count(annotations, |a| is(a, "kind", "detail_trigger")), + views: document["views"].as_array().map_or(0, Vec::len), + vertebral_annotations: count(annotations, |a| present(a, "vertebral_region_code")), + bilateral: count(annotations, |a| is(a, "laterality", "bilateral")), + finding_zones: document["finding_zones"].as_array().map_or(0, Vec::len), + nodes: totals.iter().map(|z| z.nodes).sum(), + leaves: totals.iter().map(|z| z.leaves).sum(), + vet_referrals: totals.iter().map(|z| z.vet_referrals).sum(), + missing_description_en: mapped.catalog.missing_description_en, + sources: mapped.catalog.sources, + } +} + +/// Every `data-anno-id` read must be written once; no inline legacy source may be dropped. +fn assert_guards(stats: &ImportStats) -> Result<(), PipelineError> { + if stats.legacy_annotations != stats.annotations { + return Err(PipelineError::Guard(format!( + "{} annotations read, {} written", + stats.legacy_annotations, stats.annotations + ))); + } + if stats.sources != 0 { + return Err(PipelineError::Guard(format!( + "{} inline legacy sources found: map them to references", + stats.sources + ))); + } + Ok(()) +} + +fn source_anomalies(sources: &ParsedSources, stats: &ImportStats) -> Vec { + let mut out = Vec::new(); + if stats.missing_description_en > 0 { + out.push(Anomaly::to_validate( + "finding.description_en.missing", + "pathologies.json", + format!( + "{} descriptions sans traduction anglaise (clé « en » absente, rien d'inventé).", + stats.missing_description_en + ), + )); + } + if sources.catalog.get("scope_disclaimer").is_some() { + out.push(Anomaly::to_validate( + "document.scope_disclaimer.no_en", + "scope_disclaimer", + "Texte de périmètre légal en français seulement : traduction anglaise à rédiger.", + )); + } + out.push(capped_anomaly(&sources.formula)); + if stats.sources == 0 { + out.push(Anomaly::to_validate( + "finding.sources.none", + "pathologies.json", + "Aucune source bibliographique sur les nœuds, alors que la règle projet en demande \ + au moins une par entrée.", + )); + } + out +} + +fn capped_anomaly(formula: &VertebralFormula) -> Anomaly { + let range = formula.varies_range.as_deref().unwrap_or("non précisée"); + let caudal = formula.counts.get("Cd").copied().unwrap_or(f64::NAN); + Anomaly::to_validate( + "vertebral.cd.capped", + "Cd", + format!( + "Caudales plafonnées à {} pour le sélecteur, alors que l'espèce varie ({range}) \ + selon le commentaire source.", + super::svg::js_text(caudal) + ), + ) +} + +fn informative_notes() -> Anomaly { + Anomaly::informative( + "annotation.geometry.hitbox", + "géométrie", + "Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur \ + visuel n'est pas importé.", + ) +} + +fn collect_anomalies( + sources: &ParsedSources, + mapped: &Mapped, + stats: &ImportStats, + document: &Value, +) -> Result, PipelineError> { + let mut out = authored_label_anomalies(document); + out.extend(sources.main.anomalies.iter().cloned()); + out.extend(sources.head.anomalies.iter().cloned()); + out.extend( + mapped + .annotations + .iter() + .flat_map(|m| m.anomalies.iter().cloned()), + ); + out.extend(mapped.categories.anomalies.iter().cloned()); + out.extend(mapped.catalog.anomalies.iter().cloned()); + out.extend(catalog_anomalies(&sources.catalog)?); + out.extend(source_anomalies(sources, stats)); + out.push(informative_notes()); + Ok(out) +} + +/// `AnatomicalSheetDocumentSchema.parse`: the document must be a valid sheet document. +fn parse_document(document: &Value) -> Result { + serde_json::from_value(document.clone()) + .map_err(|error| PipelineError::Guard(format!("document schema: {error}"))) +} + +pub fn import_equine_legacy(input: &EquineLegacyInput) -> Result { + let sources = parse_sources(input)?; + let mapped = map_sources(&sources)?; + let document = build_document(&sources, &mapped); + let parsed = parse_document(&document)?; + let stats = build_stats(&sources, &document, &mapped); + assert_guards(&stats)?; + Ok(ImportResult { + legacy_id_map: build_id_map(&sources, &mapped), + source_digests: vec![ + text_digest("pathologies.json", &lossy_text(&input.catalog)), + text_digest("vertebrae.ts", &lossy_text(&input.vertebrae)), + ], + sheet_id: sheet_id_for(EQUINE_SPECIES_ID, EQUINE_SHEET_VERSION), + view_boxes: view_boxes(&sources), + annotation_rows: mapped.annotations.iter().map(|m| m.row.clone()).collect(), + region_inferences: mapped + .annotations + .iter() + .filter_map(|m| m.region.clone()) + .collect(), + zone_stats: mapped.catalog.zone_stats.clone(), + anomalies: collect_anomalies(&sources, &mapped, &stats, &document)?, + issues: validate_sheet_document(&parsed), + assets: sources.assets, + stats, + document, + }) +} + +fn view_boxes(sources: &ParsedSources) -> Map { + let mut map = Map::new(); + map.insert(MAIN_VIEW_ID.into(), json!(sources.main.view_box)); + map.insert(HEAD_VIEW_ID.into(), json!(sources.head.view_box)); + map +} diff --git a/crates/core/src/curation/legacy/mod.rs b/crates/core/src/curation/legacy/mod.rs new file mode 100644 index 00000000..71e61201 --- /dev/null +++ b/crates/core/src/curation/legacy/mod.rs @@ -0,0 +1,42 @@ +//! The legacy importer (R5.2): the historical equine files → the generated +//! `legacy-import/` folder (`packages/anatomy/src/legacy`). Parity with the TypeScript is +//! proven by `tests/curation_legacy.rs` against the committed folder and `oracles/r5`. + +pub mod annotations; +pub mod authored_labels; +pub mod catalog; +pub mod catalog_checks; +pub mod categories; +pub mod importer; +pub mod regions; +pub mod report; +pub mod svg; +pub mod types; +pub mod vertebrae; + +use serde_json::Value; + +use super::PipelineError; +use super::markdown::format_markdown; +use super::prettier_json::format_json; +pub use importer::{HEAD_VIEW_ID, MAIN_VIEW_ID, import_equine_legacy}; +pub use types::{EquineLegacyInput, ImportResult, SvgSource}; + +/// The text files of `legacy-import/`, in the order the TypeScript wrote them +/// (`renderArtifacts`); the two SVG copies are byte copies the caller makes. +pub fn render_artifacts(result: &ImportResult) -> Result, PipelineError> { + let assets = serde_json::to_value(&result.assets) + .map_err(|error| PipelineError::Source(format!("assets.json: {error}")))?; + Ok(vec![ + ("document.json".into(), format_json(&result.document)?), + ( + "legacy-id-map.json".into(), + format_json(&Value::Object(result.legacy_id_map.clone()))?, + ), + ("assets.json".into(), format_json(&assets)?), + ( + "IMPORT-REPORT.md".into(), + format_markdown(&report::render_import_report(result)?)?, + ), + ]) +} diff --git a/crates/core/src/curation/legacy/regions.rs b/crates/core/src/curation/legacy/regions.rs new file mode 100644 index 00000000..80a20480 --- /dev/null +++ b/crates/core/src/curation/legacy/regions.rs @@ -0,0 +1,43 @@ +//! Spine region inference from legacy labels (`packages/anatomy/src/legacy/regions.ts`), +//! kept in the importer only: FR label first, then EN, first root in test order wins. + +use crate::curation::text::fold; + +const REGION_ROOTS: [(&str, &[&str]); 5] = [ + ("C", &["cervic"]), + ("T", &["thorac", "dors"]), + ("L", &["lombair", "lumbar"]), + ("S", &["sacral", "sacre"]), + ("Cd", &["caudal", "coccyg"]), +]; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RegionMatch { + pub code: String, + pub root: String, + pub label: String, +} + +fn match_label(label: &str) -> Option { + let text = fold(label); + REGION_ROOTS.iter().find_map(|(code, roots)| { + roots + .iter() + .find(|root| text.contains(*root)) + .map(|root| RegionMatch { + code: (*code).to_owned(), + root: (*root).to_owned(), + label: label.to_owned(), + }) + }) +} + +/// `None` when neither label carries a known root; an empty label is skipped, as `Boolean` +/// filters it. +pub fn infer_region_code(name_fr: Option<&str>, name_en: Option<&str>) -> Option { + [name_fr, name_en] + .into_iter() + .flatten() + .filter(|label| !label.is_empty()) + .find_map(match_label) +} diff --git a/crates/core/src/curation/legacy/report.rs b/crates/core/src/curation/legacy/report.rs new file mode 100644 index 00000000..99a10da2 --- /dev/null +++ b/crates/core/src/curation/legacy/report.rs @@ -0,0 +1,524 @@ +//! The French Markdown import report (`packages/anatomy/src/legacy/report.ts`), written for +//! an osteopath (what to validate) and for the developer (what was mapped and how). No dates +//! and no environment data: a committed, byte-stable artifact. Returns the raw text; the +//! artifact step aligns its tables as Prettier did. + +use std::collections::{HashMap, HashSet}; + +use serde_json::{Map, Value}; + +use super::authored_labels::{AUTHORED_LABEL_CODE, region_label_subject}; +use super::catalog::count_tree; +use super::types::{Anomaly, ImportResult}; +use crate::curation::PipelineError; +use crate::curation::markdown::{Cell, code, table}; +use crate::domain::sheet::{SHEET_DOCUMENT_SCHEMA_VERSION, SheetIssueSeverity}; + +fn intro(result: &ImportResult) -> String { + let species = result.document["species_id"].as_str().unwrap_or_default(); + [ + "# Rapport d'import : fiche anatomique équine v1".to_owned(), + String::new(), + "Généré par `pnpm import:equine` à partir des données historiques. Ne pas modifier à \ + la main : relancer la commande." + .to_owned(), + String::new(), + format!( + "Statut : **brouillon** (version 1 en `draft`), jamais publié par le seed. Fiche \ + `{}`, espèce `{species}`.", + result.sheet_id + ), + String::new(), + "Les éléments de la section « Anomalies à valider » demandent une décision métier \ + avant toute publication." + .to_owned(), + ] + .join("\n") +} + +fn sources_section(result: &ImportResult) -> String { + let mut rows: Vec> = result + .assets + .iter() + .map(|a| { + vec![ + code(Some(&a.file)).into(), + a.byte_size.into(), + code(Some(&a.sha256)).into(), + code(Some(&a.svg_asset_id)).into(), + ] + }) + .collect(); + rows.extend(result.source_digests.iter().map(|d| { + vec![ + code(Some(&d.file)).into(), + d.byte_size.into(), + code(Some(&d.sha256)).into(), + "-".into(), + ] + })); + let mut lines = vec![ + "## 1. Sources et empreintes".to_owned(), + String::new(), + table(&["Fichier", "Octets", "sha256", "Id d'asset"], &rows), + String::new(), + "Les ids d'asset sont dérivés du sha256 du fichier (UUID déterministe), les deux SVG \ + sont copiés à l'identique dans `assets/`." + .to_owned(), + String::new(), + ]; + for (view, view_box) in &result.view_boxes { + let view_box = view_box.as_str().unwrap_or("absent"); + lines.push(format!( + "- vue `{view}` : viewBox `{view_box}` (view_box du document laissé à null, le SVG \ + porte le sien)" + )); + } + lines.join("\n") +} + +fn categories_of(document: &Value) -> Vec<&Map> { + let zones = document["finding_zones"] + .as_array() + .map_or(&[][..], Vec::as_slice); + zones + .iter() + .filter_map(|zone| zone["categories"].as_array()) + .flatten() + .filter_map(Value::as_object) + .collect() +} + +fn volumes_section(result: &ImportResult) -> Result { + let s = &result.stats; + let out = count_tree(&categories_of(&result.document))?; + let rows: Vec> = [ + ("Annotations", s.annotations), + ("dont vue `main` (Horse.svg)", s.annotations_by_view.main), + ( + "dont vue `head` (Horse_head.svg)", + s.annotations_by_view.head, + ), + ( + "Annotations reliées à une zone de constats", + s.linked_annotations, + ), + ("Déclencheurs de vue détail", s.triggers), + ("Vues", s.views), + ( + "Zones vertébrales avec code de région", + s.vertebral_annotations, + ), + ("Annotations bilatérales", s.bilateral), + ("Zones de constats (catalogue)", s.finding_zones), + ("Nœuds (catégories incluses)", s.nodes), + ("Feuilles", s.leaves), + ("Orientations vétérinaires", s.vet_referrals), + ] + .into_iter() + .map(|(label, value)| vec![label.into(), value.into()]) + .collect(); + let checks: Vec> = [ + ( + "Annotations (data-anno-id distincts)", + s.legacy_annotations, + s.annotations, + ), + ("Nœuds (catégories incluses)", s.nodes, out.nodes), + ("Feuilles", s.leaves, out.leaves), + ( + "Orientations vétérinaires", + s.vet_referrals, + out.vet_referrals, + ), + ] + .into_iter() + .map(|(label, read, written)| vec![label.into(), read.into(), written.into()]) + .collect(); + Ok([ + "## 2. Volumes".to_owned(), + String::new(), + table(&["Mesure", "Valeur"], &rows), + String::new(), + "Contrôle entrée = sortie, compté des deux côtés (sources lues, document écrit). \ + L'importateur s'arrête au moindre écart :" + .to_owned(), + String::new(), + table(&["Contrôle", "Lu (sources)", "Écrit (document)"], &checks), + ] + .join("\n")) +} + +fn annotations_section(result: &ImportResult) -> String { + let rows: Vec> = result + .annotation_rows + .iter() + .map(|r| { + vec![ + code(Some(&r.legacy_id)).into(), + code(Some(&r.new_id)).into(), + r.view_id.as_str().into(), + r.kind.as_str().into(), + r.laterality.as_str().into(), + r.region_code.clone().into(), + code(r.finding_zone_id.as_deref()).into(), + r.geometry.as_str().into(), + ] + }) + .collect(); + let head = [ + "Id historique", + "Nouvel id", + "Vue", + "Type", + "Latéralité", + "Région", + "Zone de constats", + "Géométrie", + ]; + [ + "## 3. Annotations".to_owned(), + String::new(), + table(&head, &rows), + ] + .join("\n") +} + +fn authored_subjects<'a>(anomalies: &'a [Anomaly], code: &str) -> HashSet<&'a str> { + anomalies + .iter() + .filter(|a| a.code == code) + .map(|a| a.subject.as_str()) + .collect() +} + +fn text_at<'a>(value: &'a Value, pointer: &str) -> &'a str { + value + .pointer(pointer) + .and_then(Value::as_str) + .unwrap_or_default() +} + +fn categories_section(result: &ImportResult) -> String { + let legacy_of: HashMap<&str, &str> = result + .legacy_id_map + .get("categories") + .and_then(Value::as_object) + .map(|map| { + map.iter() + .filter_map(|(k, v)| Some((v.as_str()?, k.as_str()))) + .collect() + }) + .unwrap_or_default(); + let authored = authored_subjects(&result.anomalies, "category.label.authored"); + let categories = result.document["categories"] + .as_array() + .map_or(&[][..], Vec::as_slice); + let rows: Vec> = categories + .iter() + .map(|c| { + let id = text_at(c, "/id"); + vec![ + code(Some(legacy_of.get(id).copied().unwrap_or(id))).into(), + code(Some(id)).into(), + text_at(c, "/name/fr").into(), + text_at(c, "/name/en").into(), + if authored.contains(id) { + "importateur, à valider" + } else { + "SVG" + } + .into(), + ] + }) + .collect(); + [ + "## 4. Catégories d'annotation".to_owned(), + String::new(), + table( + &[ + "Id SVG", + "Id", + "Libellé FR", + "Libellé EN", + "Origine du libellé", + ], + &rows, + ), + String::new(), + "Couleur : `null` partout (les couleurs du SVG restent dans l'asset). Dans les SVG, \ + `data-anno-category-name` répète le slug (`articulations`, `os`) : ce n'est pas un \ + libellé, le libellé lisible de la table de l'importateur est utilisé." + .to_owned(), + ] + .join("\n") +} + +fn region_rows(result: &ImportResult) -> Vec> { + let authored = authored_subjects(&result.anomalies, AUTHORED_LABEL_CODE); + let regions = result + .document + .pointer("/vertebral_config/regions") + .and_then(Value::as_array) + .map_or(&[][..], Vec::as_slice); + regions + .iter() + .map(|r| { + let code_text = text_at(r, "/code"); + let count = r["count"].as_f64().map_or(Cell::Null, Cell::Number); + let origin = authored.contains(region_label_subject(code_text).as_str()); + vec![ + code(Some(code_text)).into(), + text_at(r, "/name/fr").into(), + text_at(r, "/name/en").into(), + count, + if origin { + "importateur, à valider" + } else { + "source" + } + .into(), + ] + }) + .collect() +} + +fn vertebral_section(result: &ImportResult) -> String { + let inferences: Vec> = result + .region_inferences + .iter() + .map(|i| { + let new_id = result + .legacy_id_map + .get("annotations") + .and_then(|map| map.get(&i.annotation_id)) + .and_then(Value::as_str); + vec![ + code(Some(new_id.unwrap_or(&i.annotation_id))).into(), + i.label.as_str().into(), + code(i.root.as_deref()).into(), + code(i.code.as_deref()).into(), + ] + }) + .collect(); + [ + "## 5. Configuration vertébrale".to_owned(), + String::new(), + table( + &[ + "Code", + "Nom FR", + "Nom EN", + "Vertèbres", + "Origine du libellé", + ], + ®ion_rows(result), + ), + String::new(), + "Nombres de vertèbres : `vertebrae.ts`. Noms de région : écrits par l'importateur \ + (aucune source ne les porte)." + .to_owned(), + String::new(), + "Codes de région déduits des libellés (racines `cervic`, `thorac`/`dors`, \ + `lombair`/`lumbar`, `sacral`/`sacre`, `caudal`/`coccyg`, FR puis EN). Déduction faite \ + une fois ici, le document porte le code :" + .to_owned(), + String::new(), + table(&["Annotation", "Libellé lu", "Racine", "Code"], &inferences), + ] + .join("\n") +} + +fn findings_section(result: &ImportResult) -> String { + let zones = result.document["finding_zones"] + .as_array() + .map_or(&[][..], Vec::as_slice); + let names: HashMap<&str, &str> = zones + .iter() + .map(|z| (text_at(z, "/id"), text_at(z, "/name/fr"))) + .collect(); + let mut rows: Vec> = result + .zone_stats + .iter() + .map(|z| { + vec![ + code(Some(&z.zone_id)).into(), + names.get(z.zone_id.as_str()).copied().unwrap_or("-").into(), + z.nodes.into(), + z.leaves.into(), + z.vet_referrals.into(), + ] + }) + .collect(); + let s = &result.stats; + rows.push(vec![ + "**Total**".into(), + "".into(), + s.nodes.into(), + s.leaves.into(), + s.vet_referrals.into(), + ]); + [ + "## 6. Arbre de constats par zone".to_owned(), + String::new(), + "Copie fidèle du catalogue : ids, libellés, descriptions présentes, orientations \ + vétérinaires et sources. Ordre des zones et des catégories conservé. Nœuds = \ + catégories incluses." + .to_owned(), + String::new(), + table( + &["Zone", "Nom", "Nœuds", "Feuilles", "Orientations vét."], + &rows, + ), + ] + .join("\n") +} + +fn anomaly_rows(anomalies: &[&Anomaly]) -> Vec> { + anomalies + .iter() + .map(|a| { + vec![ + code(Some(&a.code)).into(), + a.subject.as_str().into(), + a.message.as_str().into(), + ] + }) + .collect() +} + +fn anomalies_section(result: &ImportResult) -> String { + let of_level = |level: &str| -> Vec<&Anomaly> { + result + .anomalies + .iter() + .filter(|a| a.level == level) + .collect() + }; + let (to_validate, informative) = (of_level("a_valider"), of_level("informatif")); + let head = ["Code", "Objet", "Détail"]; + [ + "## 7. Anomalies à valider".to_owned(), + String::new(), + format!( + "{} points demandent une décision, {} sont informatifs.", + to_validate.len(), + informative.len() + ), + String::new(), + "### À valider".to_owned(), + String::new(), + table(&head, &anomaly_rows(&to_validate)), + String::new(), + "### Informatif".to_owned(), + String::new(), + table(&head, &anomaly_rows(&informative)), + ] + .join("\n") +} + +/// Source keys the document does not carry, and where they live now. +fn not_carried_over() -> [String; 4] { + [ + format!( + "`schema_version` du catalogue (`2.0`) : version du format historique, remplacée \ + par `schema_version: {SHEET_DOCUMENT_SCHEMA_VERSION}` du document canonique ; la \ + valeur d'origine est citée dans `attribution.notes`." + ), + "bloc `species` du catalogue (`equine`, Cheval / Horse) : porté par `species_id` du \ + document et par la table `public.species` ; le nom de la fiche est écrit séparément \ + (voir anomalies `label.authored`)." + .to_owned(), + "second élément graphique de chaque annotation (marqueur visuel) : reste dans l'asset \ + SVG copié à l'identique, le document ne garde que la zone de clic." + .to_owned(), + "`data-anno-category-name` : répète le slug technique (`articulations`, `os`), ce \ + n'est pas un libellé ; le libellé de catégorie vient de la table de l'importateur \ + (section 4)." + .to_owned(), + ] +} + +fn not_imported_section(result: &ImportResult) -> String { + let dropped: Vec = result + .annotation_rows + .iter() + .filter(|r| r.geometry == "aucune") + .map(|r| { + format!( + "- géométrie de `{}` (forme non prise en charge)", + r.legacy_id + ) + }) + .collect(); + let mut lines = vec!["## 8. Données non importées".to_owned(), String::new()]; + if dropped.is_empty() { + lines.push("Aucune donnée métier écartée.".to_owned()); + } + lines.extend(dropped); + lines.extend([ + String::new(), + "Non repris par construction :".to_owned(), + String::new(), + ]); + lines.extend(not_carried_over().iter().map(|line| format!("- {line}"))); + lines.join("\n") +} + +fn validation_section(result: &ImportResult) -> String { + let count = |severity: SheetIssueSeverity| { + result + .issues + .iter() + .filter(|i| i.severity == severity) + .count() + }; + let rows: Vec> = result + .issues + .iter() + .map(|i| { + let severity = match i.severity { + SheetIssueSeverity::Error => "error", + SheetIssueSeverity::Warning => "warning", + }; + vec![ + severity.into(), + code(Some(&i.code)).into(), + code(Some(&i.path)).into(), + i.message.as_str().into(), + ] + }) + .collect(); + let mut lines = vec![ + "## 9. Résultat de validation".to_owned(), + String::new(), + "- Forme (`AnatomicalSheetDocumentSchema`) : conforme.".to_owned(), + format!( + "- Intégrité (`validateSheetDocument`) : {} erreur(s), {} avertissement(s).", + count(SheetIssueSeverity::Error), + count(SheetIssueSeverity::Warning) + ), + ]; + if !rows.is_empty() { + lines.push(String::new()); + lines.push(table(&["Gravité", "Code", "Chemin", "Message"], &rows)); + } + lines.join("\n") +} + +/// `renderImportReport`: the raw report, before Prettier aligns its tables. +pub fn render_import_report(result: &ImportResult) -> Result { + let sections = [ + intro(result), + sources_section(result), + volumes_section(result)?, + annotations_section(result), + categories_section(result), + vertebral_section(result), + findings_section(result), + anomalies_section(result), + not_imported_section(result), + validation_section(result), + ]; + Ok(format!("{}\n", sections.join("\n\n"))) +} diff --git a/crates/core/src/curation/legacy/svg.rs b/crates/core/src/curation/legacy/svg.rs new file mode 100644 index 00000000..d47ff801 --- /dev/null +++ b/crates/core/src/curation/legacy/svg.rs @@ -0,0 +1,192 @@ +//! The annotation layer of a legacy SVG (`packages/anatomy/src/legacy/svg.ts`): the +//! `data-anno-*` attributes of the historical files. Each annotation is drawn by one or two +//! elements sharing a `data-anno-id`; one record per id, attributes and geometry from the +//! first element, document order kept. +//! +//! Declared difference: xmldom parsed leniently; the text is checked here by the core's SVG +//! caps (no DTD, bounded depth and size) and parsed by roxmltree, so a malformed file is +//! refused instead of read partially. + +use std::collections::HashMap; + +use serde_json::{Value, json}; + +use super::types::Anomaly; +use crate::anatomy::svg::number::{js_number_of, js_split_list}; +use crate::anatomy::svg::prescan::{SVG_CAPS, prescan}; +use crate::curation::PipelineError; +use crate::json::js_number; + +/// A legacy geometry: circle and polygon are the only shapes the legacy editor produces. +#[derive(Debug, Clone, PartialEq)] +pub enum LegacyGeometry { + Circle { cx: f64, cy: f64, r: f64 }, + Polygon { points: Vec<(f64, f64)> }, +} + +impl LegacyGeometry { + /// The document form; a value JSON cannot hold (NaN, ±Infinity) becomes `null`, as + /// `JSON.stringify` writes it. + pub fn to_value(&self) -> Value { + match self { + Self::Circle { cx, cy, r } => json!({ + "type": "circle", "cx": number(*cx), "cy": number(*cy), "r": number(*r) + }), + Self::Polygon { points } => { + let pairs: Vec = points + .iter() + .map(|&(x, y)| Value::Array(vec![number(x), number(y)])) + .collect(); + json!({ "type": "polygon", "points": pairs }) + } + } + } + + /// `describeGeometry` of the annotation rows. + pub fn describe(geometry: Option<&Self>) -> String { + match geometry { + None => "aucune".to_owned(), + Some(Self::Circle { cx, cy, r }) => { + format!( + "cercle ({}, {}) r {}", + js_text(*cx), + js_text(*cy), + js_text(*r) + ) + } + Some(Self::Polygon { points }) => format!("polygone {} points", points.len()), + } + } +} + +fn number(value: f64) -> Value { + serde_json::Number::from_f64(value).map_or(Value::Null, Value::Number) +} + +/// `String(number)`, NaN and the infinities included. +pub fn js_text(value: f64) -> String { + match value { + v if v.is_nan() => "NaN".to_owned(), + v if v == f64::INFINITY => "Infinity".to_owned(), + v if v == f64::NEG_INFINITY => "-Infinity".to_owned(), + v => js_number(v), + } +} + +#[derive(Debug, Clone, PartialEq)] +pub struct LegacyAnnotation { + pub id: String, + pub tag_name: String, + pub element_count: usize, + pub name_fr: Option, + pub name_en: Option, + pub category: Option, + pub category_name: Option, + pub lateral: Option, + pub special: Option, + pub opens_detail: Option, + pub geometry: Option, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct ParsedSvg { + pub view_box: Option, + pub annotations: Vec, + pub anomalies: Vec, +} + +/// `parseAnnotatedSvg`: every element in document order, the first of each id kept. +pub fn parse_annotated_svg(text: &str, file_name: &str) -> Result { + let refuse = |why: String| PipelineError::Source(format!("{file_name}: {why}")); + prescan(text, &SVG_CAPS).map_err(|error| refuse(format!("{error:?}")))?; + let document = roxmltree::Document::parse(text).map_err(|error| refuse(error.to_string()))?; + let mut index_of: HashMap = HashMap::new(); + let mut records: Vec = Vec::new(); + for element in document.descendants().filter(roxmltree::Node::is_element) { + let Some(id) = element.attribute("data-anno-id") else { + continue; + }; + if let Some(&index) = index_of.get(id) { + records[index].element_count += 1; + } else { + index_of.insert(id.to_owned(), records.len()); + records.push(read_annotation(&element, id, text)); + } + } + let anomalies = records + .iter() + .filter(|a| a.geometry.is_none()) + .map(|a| geometry_anomaly(file_name, a)) + .collect(); + let view_box = document + .root_element() + .attribute("viewBox") + .map(str::to_owned); + Ok(ParsedSvg { + view_box, + annotations: records, + anomalies, + }) +} + +fn read_annotation(element: &roxmltree::Node, id: &str, text: &str) -> LegacyAnnotation { + let attr = |name: &str| element.attribute(name).map(str::to_owned); + let tag_name = qualified_name(element, text); + LegacyAnnotation { + id: id.to_owned(), + geometry: read_geometry(element, &tag_name), + tag_name, + element_count: 1, + name_fr: attr("data-anno-name-fr"), + name_en: attr("data-anno-name-en"), + category: attr("data-anno-category"), + category_name: attr("data-anno-category-name"), + lateral: attr("data-anno-lateral"), + special: attr("data-anno-special"), + opens_detail: attr("data-anno-opens-detail"), + } +} + +/// `element.tagName`: the name as written, prefix included. +fn qualified_name(element: &roxmltree::Node, text: &str) -> String { + let start = element.range().start + 1; + text[start..] + .split(|c: char| c.is_whitespace() || c == '/' || c == '>') + .next() + .unwrap_or_default() + .to_owned() +} + +fn read_geometry(element: &roxmltree::Node, tag_name: &str) -> Option { + // `Number(null)` is 0: a missing attribute reads as 0, as in JavaScript. + let number_of = |name: &str| js_number_of(element.attribute(name).unwrap_or("")); + match tag_name { + "circle" => Some(LegacyGeometry::Circle { + cx: number_of("cx"), + cy: number_of("cy"), + r: number_of("r"), + }), + "polygon" => Some(LegacyGeometry::Polygon { + points: parse_points(element.attribute("points").unwrap_or("")), + }), + _ => None, + } +} + +/// `raw.trim().split(/[\s,]+/).map(Number)`, read by pairs; an odd last number is dropped. +fn parse_points(raw: &str) -> Vec<(f64, f64)> { + let numbers: Vec = js_split_list(raw).into_iter().map(js_number_of).collect(); + let (pairs, _odd) = numbers.as_chunks::<2>(); + pairs.iter().map(|&[x, y]| (x, y)).collect() +} + +fn geometry_anomaly(file_name: &str, a: &LegacyAnnotation) -> Anomaly { + Anomaly::to_validate( + "svg.geometry.unsupported", + format!("{file_name} {}", a.id), + format!( + "Élément <{}> non pris en charge : géométrie non importée (null).", + a.tag_name + ), + ) +} diff --git a/crates/core/src/curation/legacy/types.rs b/crates/core/src/curation/legacy/types.rs new file mode 100644 index 00000000..a7dea447 --- /dev/null +++ b/crates/core/src/curation/legacy/types.rs @@ -0,0 +1,140 @@ +//! Shapes of `packages/anatomy/src/legacy/types.ts`. Field order is the TypeScript object +//! order, so the serialised values compare with the frozen `oracles/r5/pipeline.json`. + +use serde::Serialize; +use serde_json::{Map, Value}; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct Anomaly { + pub code: String, + pub level: &'static str, + pub subject: String, + pub message: String, +} + +impl Anomaly { + /// An anomaly the business must decide on (`a_valider`). + pub fn to_validate(code: &str, subject: impl Into, message: impl Into) -> Self { + Self::new(code, "a_valider", subject.into(), message.into()) + } + + /// An informative note (`informatif`). + pub fn informative(code: &str, subject: impl Into, message: impl Into) -> Self { + Self::new(code, "informatif", subject.into(), message.into()) + } + + fn new(code: &str, level: &'static str, subject: String, message: String) -> Self { + Self { + code: code.to_owned(), + level, + subject, + message, + } + } +} + +/// One SVG source: its file name and bytes. +#[derive(Debug, Clone)] +pub struct SvgSource { + pub file_name: String, + pub bytes: Vec, +} + +/// The four historical files, as bytes (the binary reads them). +#[derive(Debug, Clone)] +pub struct EquineLegacyInput { + pub main_svg: SvgSource, + pub head_svg: SvgSource, + pub catalog: Vec, + pub vertebrae: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct AssetRecord { + pub file: String, + pub sha256: String, + pub byte_size: usize, + pub svg_asset_id: String, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct SourceDigest { + pub file: String, + pub sha256: String, + pub byte_size: usize, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct RegionInference { + pub annotation_id: String, + pub label: String, + pub root: Option, + pub code: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AnnotationRow { + pub legacy_id: String, + pub new_id: String, + pub view_id: String, + pub kind: String, + pub laterality: String, + pub region_code: Option, + pub finding_zone_id: Option, + pub geometry: String, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ZoneStats { + pub zone_id: String, + pub nodes: usize, + pub leaves: usize, + pub vet_referrals: usize, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct AnnotationsByView { + pub main: usize, + pub head: usize, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ImportStats { + pub legacy_annotations: usize, + pub annotations: usize, + pub annotations_by_view: AnnotationsByView, + pub linked_annotations: usize, + pub triggers: usize, + pub views: usize, + pub vertebral_annotations: usize, + pub bilateral: usize, + pub finding_zones: usize, + pub nodes: usize, + pub leaves: usize, + pub vet_referrals: usize, + pub missing_description_en: usize, + pub sources: usize, +} + +/// `ImportResult`: the document in its input form (the JSON value the TypeScript built, key +/// order kept) and everything the reports and the draft need. +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ImportResult { + pub document: Value, + pub legacy_id_map: Map, + pub assets: Vec, + pub source_digests: Vec, + pub sheet_id: String, + pub view_boxes: Map, + pub annotation_rows: Vec, + pub region_inferences: Vec, + pub zone_stats: Vec, + pub stats: ImportStats, + pub anomalies: Vec, + pub issues: Vec, +} diff --git a/crates/core/src/curation/legacy/vertebrae.rs b/crates/core/src/curation/legacy/vertebrae.rs new file mode 100644 index 00000000..8fbaa111 --- /dev/null +++ b/crates/core/src/curation/legacy/vertebrae.rs @@ -0,0 +1,127 @@ +//! The legacy vertebral formula, read from the source text of `vertebrae.ts` +//! (`packages/anatomy/src/legacy/vertebrae.ts`): the object after the first `= {`, its +//! `name: digits` pairs, and the "varies A–B" range of the comment. The JavaScript regular +//! expressions are reproduced by hand: `\s` is the JavaScript space set, `\w` and `\d` ASCII. + +use std::collections::HashMap; + +use serde_json::{Value, json}; + +use crate::anatomy::svg::number::is_js_space; +use crate::curation::PipelineError; + +pub const REGION_ORDER: [&str; 5] = ["C", "T", "L", "S", "Cd"]; + +#[derive(Debug, Clone, PartialEq)] +pub struct VertebralFormula { + pub counts: HashMap, + /// "varies A–B" range from the source comment, when stated. + pub varies_range: Option, +} + +pub fn parse_vertebral_formula(source: &str) -> Result { + let body = formula_body(source) + .ok_or_else(|| PipelineError::Source("vertebrae.ts: formula object not found".into()))?; + let mut counts = HashMap::new(); + for (key, digits) in pairs(body) { + counts.insert(key.to_owned(), digits.parse::().unwrap_or(f64::NAN)); + } + for code in REGION_ORDER { + if !counts.contains_key(code) { + return Err(PipelineError::Source(format!( + "vertebrae.ts: region {code} missing" + ))); + } + } + Ok(VertebralFormula { + counts, + varies_range: varies_range(source), + }) +} + +/// `/=\s*\{([^}]*)\}/`: the first `=` followed by spaces, a brace, and a closing brace. +fn formula_body(source: &str) -> Option<&str> { + source.match_indices('=').find_map(|(at, _)| { + let rest = source[at + 1..].trim_start_matches(is_js_space); + let inner = rest.strip_prefix('{')?; + inner.find('}').map(|end| &inner[..end]) + }) +} + +/// `/(\w+)\s*:\s*(\d+)/g`: the name and the digits of every match, left to right. +fn pairs(body: &str) -> Vec<(&str, &str)> { + let bytes = body.as_bytes(); + let mut found = Vec::new(); + let mut at = 0; + while at < bytes.len() { + match pair_at(body, at) { + Some((key, digits, end)) => { + found.push((key, digits)); + at = end; + } + None => at += body[at..].chars().next().map_or(1, char::len_utf8), + } + } + found +} + +fn pair_at(body: &str, start: usize) -> Option<(&str, &str, usize)> { + let word_end = start + run(&body[start..], |c| c.is_ascii_alphanumeric() || c == '_'); + if word_end == start { + return None; + } + let after = body[word_end..].trim_start_matches(is_js_space); + let after = after.strip_prefix(':')?.trim_start_matches(is_js_space); + let digits = run(after, |c| c.is_ascii_digit()); + if digits == 0 { + return None; + } + let end = body.len() - after.len() + digits; + Some((&body[start..word_end], &after[..digits], end)) +} + +fn run(text: &str, accept: impl Fn(char) -> bool) -> usize { + text.char_indices() + .find(|&(_, c)| !accept(c)) + .map_or(text.len(), |(at, _)| at) +} + +/// `/varies\s+(\d+)\s*[–-]\s*(\d+)/`, formatted `A–B`. +fn varies_range(source: &str) -> Option { + source.match_indices("varies").find_map(|(at, word)| { + let rest = &source[at + word.len()..]; + let spaced = rest.trim_start_matches(is_js_space); + if spaced.len() == rest.len() { + return None; + } + let low = run(spaced, |c| c.is_ascii_digit()); + let rest = spaced[low..].trim_start_matches(is_js_space); + let rest = rest + .strip_prefix(['–', '-'])? + .trim_start_matches(is_js_space); + let high = run(rest, |c| c.is_ascii_digit()); + (low > 0 && high > 0).then(|| format!("{}–{}", &spaced[..low], &rest[..high])) + }) +} + +fn region_name(code: &str) -> (&'static str, &'static str) { + match code { + "C" => ("Cervicales", "Cervical"), + "T" => ("Thoraciques", "Thoracic"), + "L" => ("Lombaires", "Lumbar"), + "S" => ("Sacrales", "Sacral"), + _ => ("Caudales", "Caudal"), + } +} + +/// The regions C → Cd, the order of the legacy picker tabs. +pub fn vertebral_regions(formula: &VertebralFormula) -> Vec { + REGION_ORDER + .iter() + .map(|&code| { + let (fr, en) = region_name(code); + let count = formula.counts.get(code).copied().unwrap_or(f64::NAN); + json!({ "code": code, "name": { "fr": fr, "en": en }, "count": count }) + }) + .collect() +} diff --git a/crates/core/src/curation/markdown.rs b/crates/core/src/curation/markdown.rs new file mode 100644 index 00000000..3a436a1a --- /dev/null +++ b/crates/core/src/curation/markdown.rs @@ -0,0 +1,215 @@ +//! Markdown of the generated French reports: the building blocks of +//! `packages/anatomy/src/markdown.ts` and the one change Prettier makes to those reports, +//! the alignment of the tables (measured on the three reports: no other line changes). +//! Pinned by `oracles/r5/markdown-tables.json` and the committed reports. + +use super::PipelineError; +use super::text::display_width; +use crate::json::js_number; + +/// A table cell value: text, a number (printed as `String(number)`) or nothing (`-`). +#[derive(Debug, Clone, PartialEq)] +pub enum Cell { + Text(String), + Number(f64), + Null, +} + +impl From<&str> for Cell { + fn from(text: &str) -> Self { + Self::Text(text.to_owned()) + } +} + +impl From for Cell { + fn from(text: String) -> Self { + Self::Text(text) + } +} + +impl From for Cell { + fn from(count: usize) -> Self { + Self::Number(count as f64) + } +} + +impl From> for Cell { + fn from(value: Option) -> Self { + value.map_or(Self::Null, Self::Text) + } +} + +/// `cell()`: `-` for null; pipes escaped, newlines turned into spaces. +pub fn cell(value: &Cell) -> String { + match value { + Cell::Null => "-".to_owned(), + Cell::Number(number) => js_number(*number), + Cell::Text(text) => text.replace('|', "\\|").replace('\n', " "), + } +} + +/// Refuses tables whose alignment would pass `MAX_TABLE_COLUMNS_TOTAL` together (`spent` carries +/// the projections of the report's earlier tables), from their cells, before the raw table is +/// joined: a cell's UTF-8 bytes bound its display width (a wide glyph takes three or four bytes +/// for two columns), so the projection never under-counts. +pub fn assert_table_bound( + head: &[&str], + rows: &[Vec], + spent: &mut usize, +) -> Result<(), PipelineError> { + let mut widths: Vec = head.iter().map(|text| text.len().max(3)).collect(); + for row in rows { + for (width, value) in widths.iter_mut().zip(row) { + let bytes = match value { + Cell::Text(text) => text.len() + text.matches('|').count(), + Cell::Number(_) => 25, + Cell::Null => 1, + }; + *width = (*width).max(bytes); + } + } + let row_width = widths.iter().sum::() + 3 * widths.len() + 1; + *spent = spent.saturating_add(row_width.saturating_mul(rows.len() + 2)); + if *spent > MAX_TABLE_COLUMNS_TOTAL { + return Err(PipelineError::Guard(format!( + "an aligned table of {} rows × {row_width} columns exceeds the {MAX_TABLE_COLUMNS_TOTAL} bound", + rows.len() + 2 + ))); + } + Ok(()) +} + +/// `table()`: the raw table the TypeScript wrote before Prettier aligned it. +pub fn table(head: &[&str], rows: &[Vec]) -> String { + let mut lines = vec![head.join(" | "), vec!["---"; head.len()].join(" | ")]; + for row in rows { + let cells: Vec = row.iter().map(cell).collect(); + lines.push(cells.join(" | ")); + } + lines + .iter() + .map(|line| format!("| {line} |")) + .collect::>() + .join("\n") +} + +/// `code()`: an inline code span, `-` for nothing. +pub fn code(value: Option<&str>) -> String { + value.map_or_else(|| "-".to_owned(), |text| format!("`{text}`")) +} + +/// What `formatMarkdown` does to a report written by `table()`: every table aligned (cells +/// padded to the widest of their column, three at least, separator dashes to the same +/// width), every other line kept. Prettier's other rewrites of authored text are not +/// reproduced: the draft's reports go through `report_guard::format_report`, which refuses them. +pub fn format_markdown(raw: &str) -> Result { + let lines: Vec<&str> = raw.split('\n').collect(); + let mut out: Vec = Vec::with_capacity(lines.len()); + let mut index = 0; + while index < lines.len() { + if is_table_start(&lines, index) { + let end = table_end(&lines, index); + out.extend(align(&lines[index..end])?); + index = end; + } else { + out.push(lines[index].to_owned()); + index += 1; + } + } + Ok(out.join("\n")) +} + +fn is_table_start(lines: &[&str], index: usize) -> bool { + lines[index].starts_with('|') + && lines + .get(index + 1) + .is_some_and(|next| split_row(next).iter().all(|c| is_separator(c))) +} + +fn is_separator(cell: &str) -> bool { + cell.len() >= 3 && cell.bytes().all(|b| b == b'-') +} + +fn table_end(lines: &[&str], start: usize) -> usize { + let mut end = start; + while end < lines.len() && lines[end].starts_with('|') { + end += 1; + } + end +} + +/// The cells of a row: split on the pipes no backslash escapes, trimmed as GFM trims them. +pub(crate) fn split_row(line: &str) -> Vec { + let inner = line.trim_end_matches([' ', '\t']); + let inner = inner.strip_prefix('|').unwrap_or(inner); + let inner = inner.strip_suffix('|').unwrap_or(inner); + let mut cells = Vec::new(); + let mut current = String::new(); + let mut escaped = false; + for c in inner.chars() { + if c == '|' && !escaped { + cells.push(std::mem::take(&mut current)); + } else { + current.push(c); + } + escaped = c == '\\' && !escaped; + } + cells.push(current); + cells + .into_iter() + .map(|cell| cell.trim_matches([' ', '\t']).to_owned()) + .collect() +} + +/// The largest aligned table written, in display columns (rows × padded row width): every row +/// is padded to the widest cell of each column, so one long authored cell multiplies by the row +/// count (an 80 KB rationale over 14,000 records asked for 1 GB). The equine CHANGELOG's widest +/// table holds about 0.5 MB. +pub const MAX_TABLE_COLUMNS_TOTAL: usize = 32 * 1024 * 1024; + +fn align(lines: &[&str]) -> Result, PipelineError> { + let rows: Vec> = lines.iter().map(|line| split_row(line)).collect(); + let columns = rows.first().map_or(0, Vec::len); + // A row with another cell count would lose or invent a cell where Prettier keeps it. + if let Some(index) = rows.iter().position(|row| row.len() != columns) { + return Err(PipelineError::UnsupportedMarkdown(lines[index].to_owned())); + } + let mut widths = vec![3; columns]; + let content = rows.iter().enumerate().filter(|&(index, _)| index != 1); + for (_, row) in content { + for (column, text) in row.iter().enumerate().take(columns) { + widths[column] = widths[column].max(display_width(text)?); + } + } + let row_width = widths.iter().sum::() + 3 * columns + 1; + if row_width.saturating_mul(rows.len()) > MAX_TABLE_COLUMNS_TOTAL { + return Err(PipelineError::Guard(format!( + "an aligned table of {} rows × {row_width} columns exceeds the {MAX_TABLE_COLUMNS_TOTAL} bound", + rows.len() + ))); + } + let mut out = Vec::with_capacity(rows.len()); + for (index, row) in rows.iter().enumerate() { + out.push(if index == 1 { + separator(&widths) + } else { + padded(row, &widths)? + }); + } + Ok(out) +} + +fn separator(widths: &[usize]) -> String { + let cells: Vec = widths.iter().map(|&width| "-".repeat(width)).collect(); + format!("| {} |", cells.join(" | ")) +} + +fn padded(row: &[String], widths: &[usize]) -> Result { + let mut cells = Vec::with_capacity(widths.len()); + for (column, &width) in widths.iter().enumerate() { + let text = row.get(column).map_or("", String::as_str); + let pad = width.saturating_sub(display_width(text)?); + cells.push(format!("{text}{}", " ".repeat(pad))); + } + Ok(format!("| {} |", cells.join(" | "))) +} diff --git a/crates/core/src/curation/mod.rs b/crates/core/src/curation/mod.rs new file mode 100644 index 00000000..4c28e910 --- /dev/null +++ b/crates/core/src/curation/mod.rs @@ -0,0 +1,53 @@ +//! The anatomical pipeline (R5, plan 2026-10-22): the legacy importer, the curated draft +//! (changeset applier, migration map, stats, seed SQL) and the formatting of the generated seed +//! files, ported from `packages/anatomy` with its outputs frozen as oracles +//! (`crates/core/tests/oracles/r5`). Inputs are bytes and texts, outputs are texts; the +//! `import-equine` binary owns the file system. The TypeScript package was deleted at R5.7: +//! the `packages/anatomy/...` paths the module docs cite resolve at commit 756b7ef +//! (`crates/core/tests/curation/FILES.tsv`, RUST.md §11.23). +//! +//! JavaScript behaviours the TypeScript pipeline depended on are reproduced here and pinned +//! by `oracles/r5/js-semantics.json`: object key order, `Number()`, `toLowerCase` after NFD, +//! UTF-16 ordering; the Prettier layout of the JSON and Markdown files by +//! `oracles/r5/prettier-json.json` and `markdown-tables.json`. + +pub mod draft; +pub mod ids; +pub mod legacy; +pub mod markdown; +pub mod prettier_json; +pub mod report_guard; +pub mod text; +pub mod upload; + +/// Why the pipeline refuses to produce a file. The TypeScript accepted some of these inputs +/// and wrote whatever JavaScript made of them; the port refuses instead (declared in +/// `docs/development/RUST.md` §11). +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum PipelineError { + /// A source cannot be read as the pipeline expects (message names the source). + Source(String), + /// A guard of the importer failed (nothing dropped, nothing invented). + Guard(String), + /// A text holds a character whose Prettier display width is not reproduced (emoji + /// sequences): the layout would differ, so nothing is written. + UnsupportedWidth(String), + /// A report text holds Markdown Prettier would rewrite (emphasis, escapes, whitespace + /// runs, line breaks in a list item…), which the port does not reproduce: nothing is + /// written rather than a report that differs silently. + UnsupportedMarkdown(String), +} + +impl std::fmt::Display for PipelineError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Source(message) | Self::Guard(message) => f.write_str(message), + Self::UnsupportedWidth(text) => { + write!(f, "display width not reproduced for {text:?} (emoji)") + } + Self::UnsupportedMarkdown(text) => { + write!(f, "Markdown formatting not reproduced for {text:?}") + } + } + } +} diff --git a/crates/core/src/curation/prettier_json.rs b/crates/core/src/curation/prettier_json.rs new file mode 100644 index 00000000..d586f818 --- /dev/null +++ b/crates/core/src/curation/prettier_json.rs @@ -0,0 +1,183 @@ +//! `formatJson` of `packages/anatomy/src/format.ts`: Prettier 3 (parser `json`, print width +//! 80, two-space indent) over `JSON.stringify(value, null, 2)`, reproduced for the values the +//! pipeline writes. Pinned by `oracles/r5/prettier-json.json` and by every generated JSON +//! file of the seed. +//! +//! The rules, as Prettier applies them to that input: +//! - a non-empty object is always expanded (JSON.stringify put a newline after its brace), +//! and an expanded object breaks every array that holds it; +//! - an array breaks when it holds more than one element and every element is an array of +//! more than one element, when an element breaks, or when it does not fit flat on the line +//! (the trailing comma of its parent counted); +//! - a broken array of more than one number fills its lines; any other broken array puts one +//! element per line; +//! - strings print as JSON.stringify writes them, numbers as `String(number)`. + +use serde_json::{Map, Value}; + +use super::PipelineError; +use super::text::display_width; +use crate::json::js_number; + +const PRINT_WIDTH: usize = 80; + +/// The file text: the formatted value and a final newline. +pub fn format_json(value: &Value) -> Result { + let printer = Printer { + level: 0, + column: 0, + trailing: 0, + }; + Ok(format!("{}\n", printer.value(value)?)) +} + +/// Where a value starts: its indentation level, its column, and how many characters follow +/// it on the same line (a comma, or nothing). +#[derive(Clone, Copy)] +struct Printer { + level: usize, + column: usize, + trailing: usize, +} + +impl Printer { + fn value(self, value: &Value) -> Result { + match value { + Value::Object(map) if !map.is_empty() => self.object(map), + Value::Array(items) if !items.is_empty() => self.array(items), + _ => scalar(value), + } + } + + fn object(self, map: &Map) -> Result { + let inner = indent(self.level + 1); + let mut lines = Vec::with_capacity(map.len()); + for (index, (key, value)) in map.iter().enumerate() { + let key = string(key); + let child = Printer { + level: self.level + 1, + column: inner.len() + display_width(&key)? + 2, + trailing: usize::from(index + 1 < map.len()), + }; + lines.push(format!("{inner}{key}: {}", child.value(value)?)); + } + Ok(format!( + "{{\n{}\n{}}}", + lines.join(",\n"), + indent(self.level) + )) + } + + fn array(self, items: &[Value]) -> Result { + if !must_break(items) { + let flat = flat(&Value::Array(items.to_vec()))?; + if self.column + display_width(&flat)? + self.trailing <= PRINT_WIDTH { + return Ok(flat); + } + } + let body = if is_concise(items) { + self.fill(items)? + } else { + self.one_per_line(items)? + }; + Ok(format!("[\n{body}\n{}]", indent(self.level))) + } + + /// Prettier's `fill`: an element joins the line when it and its separator still fit. + fn fill(self, items: &[Value]) -> Result { + let inner = indent(self.level + 1); + let mut out = inner.clone(); + let mut column = inner.len(); + for (index, item) in items.iter().enumerate() { + let comma = if index + 1 < items.len() { "," } else { "" }; + let text = format!("{}{comma}", scalar(item)?); + let width = display_width(&text)?; + if index > 0 && column + 1 + width <= PRINT_WIDTH { + out.push(' '); + column += 1; + } else if index > 0 { + out.push('\n'); + out.push_str(&inner); + column = inner.len(); + } + out.push_str(&text); + column += width; + } + Ok(out) + } + + fn one_per_line(self, items: &[Value]) -> Result { + let inner = indent(self.level + 1); + let mut lines = Vec::with_capacity(items.len()); + for (index, item) in items.iter().enumerate() { + let child = Printer { + level: self.level + 1, + column: inner.len(), + trailing: usize::from(index + 1 < items.len()), + }; + lines.push(format!("{inner}{}", child.value(item)?)); + } + Ok(lines.join(",\n")) + } +} + +/// A group that breaks whatever the width: an expanded object inside, or Prettier's rule for +/// an array of several arrays of several elements; a breaking element breaks its parent. +fn must_break(items: &[Value]) -> bool { + let all_long_arrays = items.len() > 1 + && items + .iter() + .all(|item| matches!(item, Value::Array(inner) if inner.len() > 1)); + all_long_arrays || items.iter().any(breaks) +} + +fn breaks(value: &Value) -> bool { + match value { + Value::Object(map) => !map.is_empty(), + Value::Array(items) => must_break(items), + _ => false, + } +} + +/// Prettier's `isConciselyPrintedArray`: more than one element, all numbers. +fn is_concise(items: &[Value]) -> bool { + items.len() > 1 && items.iter().all(Value::is_number) +} + +/// The flat form of a value that does not break (arrays of scalars and arrays, `{}`). +fn flat(value: &Value) -> Result { + match value { + Value::Array(items) if !items.is_empty() => { + let parts: Result, PipelineError> = items.iter().map(flat).collect(); + Ok(format!("[{}]", parts?.join(", "))) + } + _ => scalar(value), + } +} + +fn scalar(value: &Value) -> Result { + Ok(match value { + Value::Null => "null".to_owned(), + Value::Bool(flag) => flag.to_string(), + Value::Number(number) => prettier_number(number.as_f64().unwrap_or(f64::NAN)), + Value::String(text) => string(text), + Value::Array(_) => "[]".to_owned(), + Value::Object(_) => "{}".to_owned(), + }) +} + +/// JSON.parse reads every number as a double, JSON.stringify prints it as `String(number)`, +/// then Prettier's `printNumber` drops the `+` of an exponent (`1e+21` → `1e21`); its other +/// rewrites (case, zeros, dots) never apply to a JavaScript-printed number. +fn prettier_number(value: f64) -> String { + js_number(value).replacen("e+", "e", 1) +} + +/// `JSON.stringify` of a string (serde_json escapes the same set). +fn string(text: &str) -> String { + serde_json::to_string(text).unwrap_or_default() +} + +fn indent(level: usize) -> String { + " ".repeat(level) +} diff --git a/crates/core/src/curation/report_guard.rs b/crates/core/src/curation/report_guard.rs new file mode 100644 index 00000000..4ee6ea2c --- /dev/null +++ b/crates/core/src/curation/report_guard.rs @@ -0,0 +1,258 @@ +//! The guard of the draft's two Markdown reports (CHANGELOG.md, REVIEW-REPORT.md). The port +//! reproduces only Prettier's table alignment (`markdown::format_markdown`); Prettier also +//! rewrites Markdown in authored text (escapes, emphasis, whitespace, links). Rather than +//! chase every such rewrite, the guard admits an allowlist proven identical by the TypeScript +//! sweep (`oracles/r5/markdown-sweep.json`, hand-picked and seeded random probes) and by the +//! equine reports, and refuses everything else with `UnsupportedMarkdown`. Within what the probes +//! cover, a report is either byte for byte the TypeScript's or not written; a combination of +//! admitted characters no rule names and no probe covers could still differ (RUST.md §11.15). +//! +//! Admitted outside code spans: letters and digits, single spaces (none at a line end), the +//! punctuation of `PUNCTUATION`, an underscore between two ASCII letters or digits and not +//! glued to a URL, a backslash before `"` or `|` (a JSON quote, the cell escape), `**word**` +//! (one run of letters between spaces or line edges, the import report's form), no inline +//! construct (`rewritten_construct`). Inside code spans (the generated ids, targets, field +//! names and file paths): only `[A-Za-z0-9_:/. -]`, never empty, no outer space; an authored text holds +//! no backtick (`assert_authored`), and a plain underscore is never followed by another one on its +//! line. + +use super::PipelineError; +use super::markdown::{format_markdown, split_row}; + +/// Punctuation Prettier writes as is in the probed positions (the sweep's characters and the +/// equine reports'); any other character outside letters and digits is refused. +const PUNCTUATION: &str = ".,;:!?'\"«»()[]{}/-–—…%°≠=+#&<>’‘“”±→×≤≥|"; + +/// The starts of a bare URL literal Prettier links. +const URL_STARTS: [&str; 3] = ["http://", "https://", "www."]; + +fn refuse(line: &str) -> PipelineError { + PipelineError::UnsupportedMarkdown(line.to_owned()) +} + +/// HTML's legacy character references, the names a browser and Prettier decode without a `;` +/// (and as a prefix of a longer word): an `&` before one of them is never admitted. +const LEGACY_ENTITIES: [&str; 106] = [ + "AElig", "AMP", "Aacute", "Acirc", "Agrave", "Aring", "Atilde", "Auml", "COPY", "Ccedil", + "ETH", "Eacute", "Ecirc", "Egrave", "Euml", "GT", "Iacute", "Icirc", "Igrave", "Iuml", "LT", + "Ntilde", "Oacute", "Ocirc", "Ograve", "Oslash", "Otilde", "Ouml", "QUOT", "REG", "THORN", + "Uacute", "Ucirc", "Ugrave", "Uuml", "Yacute", "aacute", "acirc", "acute", "aelig", "agrave", + "amp", "aring", "atilde", "auml", "brvbar", "ccedil", "cedil", "cent", "copy", "curren", "deg", + "divide", "eacute", "ecirc", "egrave", "eth", "euml", "frac12", "frac14", "frac34", "gt", + "iacute", "icirc", "iexcl", "igrave", "iquest", "iuml", "laquo", "lt", "macr", "micro", + "middot", "nbsp", "not", "ntilde", "oacute", "ocirc", "ograve", "ordf", "ordm", "oslash", + "otilde", "ouml", "para", "plusmn", "pound", "quot", "raquo", "reg", "sect", "shy", "sup1", + "sup2", "sup3", "szlig", "thorn", "times", "uacute", "ucirc", "ugrave", "uml", "uuml", + "yacute", "yen", "yuml", +]; + +/// Inline constructs Prettier re-prints: a link, image or reference (`](`, `][`), an image +/// reference (`![`), a wiki link padded inside (`[[` before a space, a space before `]]`), an +/// HTML tag or an autolink (`<` before a letter, `/`, `!` or `?`), a character reference +/// (`&name;`, `&#n;`); a bare `&` is ruled in `admitted_char`. +fn rewritten_construct(plain: &str) -> bool { + // A `[[` padded inside with a `]]` after it, or a `]]` padded inside with a `[[` before it + // (the last `]]` and the first `[[` found once: linear). + let last_close = plain.rfind("]]"); + let first_open = plain.find("[["); + let padded_wiki = plain.match_indices("[[").any(|(at, _)| { + plain[at + 2..].starts_with(char::is_whitespace) && last_close.is_some_and(|c| c > at + 1) + }) || plain.match_indices("]]").any(|(at, _)| { + plain[..at].ends_with(char::is_whitespace) && first_open.is_some_and(|o| o + 1 < at) + }); + let liquid = plain.contains("{%") || plain.contains("%}"); + let tag = plain + .split('<') + .skip(1) + .any(|after| after.starts_with(|c: char| c.is_ascii_alphabetic() || "/!?".contains(c))); + let reference = plain.split('&').skip(1).any(|after| { + let name = after.split(';').next().unwrap_or_default(); + after.contains(';') + && !name.is_empty() + && name.len() <= 32 + && name + .trim_start_matches('#') + .chars() + .all(|c| c.is_ascii_alphanumeric()) + }); + plain.contains("](") + || plain.contains("][") + || plain.contains("![") + || padded_wiki + || liquid + || tag + || reference +} + +/// The `**word**` spans removed (their word kept); `None` when a `*` stays outside one. +fn outside_strong(plain: &str) -> Option { + let mut out = String::new(); + let mut rest = plain; + while let Some(open) = rest.find("**") { + let inside = &rest[open + 2..]; + let close = inside.find("**")?; + let word = &inside[..close]; + let before = rest[..open].chars().next_back(); + let after = inside[close + 2..].chars().next(); + let valid = !word.is_empty() + && word.chars().all(char::is_alphabetic) + && before.is_none_or(|c| c == ' ') + && after.is_none_or(|c| c == ' '); + if !valid { + return None; + } + out.push_str(&rest[..open]); + out.push_str(word); + rest = &inside[close + 2..]; + } + out.push_str(rest); + (!out.contains('*')).then_some(out) +} + +/// Whether `chars[from..]` starts with `text` (no allocation). +fn starts_with(chars: &[char], from: usize, text: &str) -> bool { + (from..) + .zip(text.chars()) + .all(|(index, c)| chars.get(index) == Some(&c)) +} + +/// For each position, whether it lies in a bare URL token (a run of non-space characters +/// holding a URL literal before it), computed in one pass. +fn url_tokens(chars: &[char]) -> Vec { + let mut inside = Vec::with_capacity(chars.len()); + let mut seen = false; + for (k, c) in chars.iter().enumerate() { + if c.is_whitespace() { + seen = false; + } + inside.push(seen); + if URL_STARTS.iter().any(|url| starts_with(chars, k, url)) { + seen = true; + } + } + inside +} + +/// An `&` Prettier writes as is: before a space, or a URL's query separator (`&name=`, the name +/// not starting with a legacy reference). Anything else may start a character reference. +fn admitted_ampersand(chars: &[char], urls: &[bool], i: usize) -> bool { + match chars.get(i + 1) { + Some(' ') => true, + Some(c) if c.is_ascii_lowercase() && urls[i] => { + let name: String = chars[i + 1..] + .iter() + .take_while(|c| c.is_ascii_alphanumeric()) + .collect(); + chars.get(i + 1 + name.chars().count()) == Some(&'=') + && !LEGACY_ENTITIES + .iter() + .any(|legacy| name.starts_with(legacy)) + } + _ => false, + } +} + +fn admitted_char(chars: &[char], urls: &[bool], i: usize) -> bool { + let at = |k: usize| chars.get(k).copied(); + let previous = i.checked_sub(1).and_then(at); + match chars[i] { + c if c.is_alphanumeric() => true, + ' ' => at(i + 1) != Some(' '), + '&' => admitted_ampersand(chars, urls, i), + '_' => { + previous.is_some_and(|c| c.is_ascii_alphanumeric()) + && at(i + 1).is_some_and(|c| c.is_ascii_alphanumeric()) + && !URL_STARTS.iter().any(|url| starts_with(chars, i + 1, url)) + } + '\\' => matches!(at(i + 1), Some('"' | '|')) && previous != Some('\\'), + c => PUNCTUATION.contains(c), + } +} + +fn admitted_plain(plain: &str) -> bool { + if rewritten_construct(plain) { + return false; + } + let Some(plain) = outside_strong(plain) else { + return false; + }; + let chars: Vec = plain.chars().collect(); + let urls = url_tokens(&chars); + (0..chars.len()).all(|i| admitted_char(&chars, &urls, i)) +} + +/// A code span as the generator writes one: ids, targets, field names, file paths and the +/// template's `pnpm import:equine` (the alphabet `[A-Za-z0-9_:/. -]`), never empty, no outer space. +fn generated_code(code: &str) -> bool { + !code.is_empty() + && !code.starts_with(' ') + && !code.ends_with(' ') + && code + .chars() + .all(|c| c.is_ascii_alphanumeric() || "_:/. -".contains(c)) +} + +/// A text outside table delimiters: its code spans and its plain parts. +fn guard_text(text: &str) -> bool { + let parts: Vec<&str> = text.split('`').collect(); + if parts.len().is_multiple_of(2) || text.contains(['\r', '\t']) || text.ends_with(' ') { + return false; + } + let admitted = parts.iter().enumerate().all(|(index, part)| { + if index % 2 == 1 { + generated_code(part) + } else { + admitted_plain(part) + } + }); + admitted && !underscore_pairs_later(&parts) +} + +/// Prettier's parser pairs a plain-text underscore with a later underscore that can close an +/// emphasis: one inside a later code span followed by anything but an ASCII letter or digit, +/// the span's closing backtick included (`to_do … \`ref_\`` became `to*do … \`ref*\``). A +/// plain underscore is always between ASCII letters or digits here, so it never closes; the +/// equine `{"min_x":60,"min_y":100,…}` stays admitted. +fn underscore_pairs_later(parts: &[&str]) -> bool { + let closes = |code: &str| { + let chars: Vec = code.chars().collect(); + (0..chars.len()) + .any(|i| chars[i] == '_' && chars.get(i + 1).is_none_or(|c| !c.is_ascii_alphanumeric())) + }; + parts.iter().enumerate().any(|(index, part)| { + index % 2 == 0 + && part.contains('_') + && parts[index + 1..] + .iter() + .enumerate() + .any(|(offset, later)| (index + 1 + offset) % 2 == 1 && closes(later)) + }) +} + +/// An authored text the reports write must carry no backtick: code spans come from the +/// generator alone (ids, targets, field names), never from an author (a backtick there let a +/// link or a URL run into a code span, Prettier rewriting both). +pub fn assert_authored(text: &str) -> Result<(), PipelineError> { + if text.contains('`') { + return Err(refuse(text)); + } + Ok(()) +} + +/// Refuses a raw report line outside the allowlist, cell by cell in a table row. +fn guard_line(line: &str) -> Result<(), PipelineError> { + let admitted = if line.starts_with('|') { + split_row(line).iter().all(|cell| guard_text(cell)) + } else { + guard_text(line) + }; + if admitted { Ok(()) } else { Err(refuse(line)) } +} + +/// Every line of a raw report checked, then the tables aligned. +pub fn format_report(raw: &str) -> Result { + for line in raw.split('\n') { + guard_line(line)?; + } + format_markdown(raw) +} diff --git a/crates/core/src/curation/text.rs b/crates/core/src/curation/text.rs new file mode 100644 index 00000000..678929ee --- /dev/null +++ b/crates/core/src/curation/text.rs @@ -0,0 +1,359 @@ +//! Text rules of the TypeScript pipeline: Prettier's display width, the NFD folding of +//! `slugify` and of the region roots, UTF-16 ordering, `Object.entries` key order. + +use std::cmp::Ordering; + +use icu_normalizer::DecomposingNormalizerBorrowed; +use serde_json::{Map, Value}; + +use super::PipelineError; + +/// Prettier 3's `getStringWidth` (the markdown and JSON printers): ASCII counts its length; +/// otherwise controls, U+0300 to U+036F and U+FE00 to U+FE0F count 0, East Asian wide and +/// fullwidth characters 2, everything else 1. Prettier first replaces RGI emoji sequences by +/// one or two spaces; that table is not reproduced, so a text holding an emoji candidate is +/// refused rather than measured differently. +pub fn display_width(text: &str) -> Result { + // Prettier's fast path: every character in U+0020 to U+007F. + if text.bytes().all(|byte| (0x20..=0x7F).contains(&byte)) { + return Ok(text.len()); + } + let mut width = 0; + for c in text.chars() { + if is_emoji_candidate(c) { + return Err(PipelineError::UnsupportedWidth(text.to_owned())); + } + width += char_width(u32::from(c)); + } + Ok(width) +} + +fn char_width(code: u32) -> usize { + if code <= 0x1F || (0x7F..=0x9F).contains(&code) || (0x300..=0x36F).contains(&code) { + return 0; + } + if (0xFE00..=0xFE0F).contains(&code) { + return 0; + } + if is_fullwidth(code) || is_wide(code) { + 2 + } else { + 1 + } +} + +/// Prettier's `isFullWidth`. +fn is_fullwidth(code: u32) -> bool { + code == 0x3000 || (0xFF01..=0xFF60).contains(&code) || (0xFFE0..=0xFFE6).contains(&code) +} + +/// Prettier 3.8.3's `isWide` (get-east-asian-width), transcribed row for row from +/// `prettier/index.mjs` (the markdown plugin carries the same table). +const WIDE: &[(u32, u32)] = &[ + (0x1100, 0x115F), + (0x231A, 0x231A), + (0x231B, 0x231B), + (0x2329, 0x2329), + (0x232A, 0x232A), + (0x23E9, 0x23EC), + (0x23F0, 0x23F0), + (0x23F3, 0x23F3), + (0x25FD, 0x25FD), + (0x25FE, 0x25FE), + (0x2614, 0x2614), + (0x2615, 0x2615), + (0x2630, 0x2637), + (0x2648, 0x2653), + (0x267F, 0x267F), + (0x268A, 0x268F), + (0x2693, 0x2693), + (0x26A1, 0x26A1), + (0x26AA, 0x26AA), + (0x26AB, 0x26AB), + (0x26BD, 0x26BD), + (0x26BE, 0x26BE), + (0x26C4, 0x26C4), + (0x26C5, 0x26C5), + (0x26CE, 0x26CE), + (0x26D4, 0x26D4), + (0x26EA, 0x26EA), + (0x26F2, 0x26F2), + (0x26F3, 0x26F3), + (0x26F5, 0x26F5), + (0x26FA, 0x26FA), + (0x26FD, 0x26FD), + (0x2705, 0x2705), + (0x270A, 0x270A), + (0x270B, 0x270B), + (0x2728, 0x2728), + (0x274C, 0x274C), + (0x274E, 0x274E), + (0x2753, 0x2755), + (0x2757, 0x2757), + (0x2795, 0x2797), + (0x27B0, 0x27B0), + (0x27BF, 0x27BF), + (0x2B1B, 0x2B1B), + (0x2B1C, 0x2B1C), + (0x2B50, 0x2B50), + (0x2B55, 0x2B55), + (0x2E80, 0x2E99), + (0x2E9B, 0x2EF3), + (0x2F00, 0x2FD5), + (0x2FF0, 0x2FFF), + (0x3001, 0x303E), + (0x3041, 0x3096), + (0x3099, 0x30FF), + (0x3105, 0x312F), + (0x3131, 0x318E), + (0x3190, 0x31E5), + (0x31EF, 0x321E), + (0x3220, 0x3247), + (0x3250, 0xA48C), + (0xA490, 0xA4C6), + (0xA960, 0xA97C), + (0xAC00, 0xD7A3), + (0xF900, 0xFAFF), + (0xFE10, 0xFE19), + (0xFE30, 0xFE52), + (0xFE54, 0xFE66), + (0xFE68, 0xFE6B), + (0x16FE0, 0x16FE4), + (0x16FF0, 0x16FF6), + (0x17000, 0x18CD5), + (0x18CFF, 0x18D1E), + (0x18D80, 0x18DF2), + (0x1AFF0, 0x1AFF3), + (0x1AFF5, 0x1AFFB), + (0x1AFFD, 0x1AFFD), + (0x1AFFE, 0x1AFFE), + (0x1B000, 0x1B122), + (0x1B132, 0x1B132), + (0x1B150, 0x1B152), + (0x1B155, 0x1B155), + (0x1B164, 0x1B167), + (0x1B170, 0x1B2FB), + (0x1D300, 0x1D356), + (0x1D360, 0x1D376), + (0x1F004, 0x1F004), + (0x1F0CF, 0x1F0CF), + (0x1F18E, 0x1F18E), + (0x1F191, 0x1F19A), + (0x1F200, 0x1F202), + (0x1F210, 0x1F23B), + (0x1F240, 0x1F248), + (0x1F250, 0x1F250), + (0x1F251, 0x1F251), + (0x1F260, 0x1F265), + (0x1F300, 0x1F320), + (0x1F32D, 0x1F335), + (0x1F337, 0x1F37C), + (0x1F37E, 0x1F393), + (0x1F3A0, 0x1F3CA), + (0x1F3CF, 0x1F3D3), + (0x1F3E0, 0x1F3F0), + (0x1F3F4, 0x1F3F4), + (0x1F3F8, 0x1F43E), + (0x1F440, 0x1F440), + (0x1F442, 0x1F4FC), + (0x1F4FF, 0x1F53D), + (0x1F54B, 0x1F54E), + (0x1F550, 0x1F567), + (0x1F57A, 0x1F57A), + (0x1F595, 0x1F595), + (0x1F596, 0x1F596), + (0x1F5A4, 0x1F5A4), + (0x1F5FB, 0x1F64F), + (0x1F680, 0x1F6C5), + (0x1F6CC, 0x1F6CC), + (0x1F6D0, 0x1F6D2), + (0x1F6D5, 0x1F6D8), + (0x1F6DC, 0x1F6DF), + (0x1F6EB, 0x1F6EB), + (0x1F6EC, 0x1F6EC), + (0x1F6F4, 0x1F6FC), + (0x1F7E0, 0x1F7EB), + (0x1F7F0, 0x1F7F0), + (0x1F90C, 0x1F93A), + (0x1F93C, 0x1F945), + (0x1F947, 0x1F9FF), + (0x1FA70, 0x1FA7C), + (0x1FA80, 0x1FA8A), + (0x1FA8E, 0x1FAC6), + (0x1FAC8, 0x1FAC8), + (0x1FACD, 0x1FADC), + (0x1FADF, 0x1FAEA), + (0x1FAEF, 0x1FAF8), + (0x20000, 0x2FFFD), + (0x30000, 0x3FFFD), +]; + +fn is_wide(code: u32) -> bool { + WIDE.iter().any(|&(low, high)| (low..=high).contains(&code)) +} + +/// Characters that start, join or modify an emoji sequence in Prettier's emoji pattern, and +/// the pictographs Prettier's wide table lists. +fn is_emoji_candidate(c: char) -> bool { + let code = u32::from(c); + matches!( + code, + 0xA9 | 0xAE + | 0x200D + | 0x203C + | 0x2049 + | 0x20E3 + | 0x2122 + | 0x2139 + | 0x2194..=0x21AA + | 0x231A..=0x23FF + | 0x24C2 + | 0x25AA..=0x25FE + | 0x2600..=0x27BF + | 0x2934 + | 0x2935 + | 0x2B05..=0x2B55 + | 0x3030 + | 0x303D + | 0x3297 + | 0x3299 + | 0x1F000..=0x1FAFF + | 0xE0020..=0xE007F + ) +} + +/// `label.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase()`. +pub fn fold(label: &str) -> String { + let decomposed = DecomposingNormalizerBorrowed::new_nfd().normalize(label); + let stripped: String = decomposed + .chars() + .filter(|c| !('\u{300}'..='\u{36F}').contains(c)) + .collect(); + stripped.to_lowercase() +} + +/// `slugify` of `packages/anatomy/src/legacy/ids.ts`: folded, every run outside `[a-z0-9]` +/// replaced by `-`, dashes trimmed at both ends, then cut to 64 characters (the cut can leave +/// a trailing dash, as in JavaScript). +pub fn slugify(label: &str) -> String { + let mut slug = String::new(); + let mut in_run = false; + for c in fold(label).chars() { + if c.is_ascii_lowercase() || c.is_ascii_digit() { + slug.push(c); + in_run = false; + } else if !in_run { + slug.push('-'); + in_run = true; + } + } + let trimmed = slug.trim_matches('-'); + trimmed.chars().take(64).collect() +} + +/// JavaScript's default string comparison: UTF-16 code units. +pub fn utf16_cmp(a: &str, b: &str) -> Ordering { + a.encode_utf16().cmp(b.encode_utf16()) +} + +/// An array index key (`"0"` to `"4294967294"`, canonical form): JavaScript lists these +/// first, in ascending order, whatever the insertion order. +fn array_index(key: &str) -> Option { + let index: u32 = key.parse().ok()?; + (index != u32::MAX && index.to_string() == key).then_some(index) +} + +/// The keys of a parsed object in `Object.keys` order. +pub fn js_keys(map: &Map) -> Vec<&String> { + let mut indexed: Vec<(u32, &String)> = map + .keys() + .filter_map(|key| array_index(key).map(|index| (index, key))) + .collect(); + indexed.sort_by_key(|&(index, _)| index); + let named = map.keys().filter(|key| array_index(key).is_none()); + indexed + .into_iter() + .map(|(_, key)| key) + .chain(named) + .collect() +} + +/// An object built from entries the way JavaScript would hold it: a repeated key keeps its +/// first position and its last value, array index keys come first. +pub fn js_object>(entries: I) -> Map { + let mut map = Map::new(); + for (key, value) in entries { + map.insert(key, value); + } + let order: Vec = js_keys(&map).into_iter().cloned().collect(); + let mut sorted = Map::new(); + for key in order { + if let Some(value) = map.remove(&key) { + sorted.insert(key, value); + } + } + sorted +} + +/// `object[key] = value` on an object JavaScript holds: an existing key keeps its place, a new +/// array index key goes among the leading index keys in ascending order, any other key last. +pub fn js_insert(map: &mut Map, key: &str, value: Value) { + if map.contains_key(key) { + map.insert(key.to_owned(), value); + return; + } + let Some(index) = array_index(key) else { + map.insert(key.to_owned(), value); + return; + }; + let position = map + .keys() + .take_while(|k| array_index(k).is_some_and(|other| other < index)) + .count(); + map.shift_insert(position, key.to_owned(), value); +} + +/// What `JSON.parse` makes of a parsed value: every object in `Object.keys` order (array index +/// keys first), every integer beyond 2^53 rounded to the nearest double, as a JavaScript number +/// holds it. Recursion bounded by the parser's depth limit (128). +pub fn js_normalize(value: &mut Value) { + match value { + Value::Object(map) => { + let ordered = js_object(std::mem::take(map)); + *map = ordered; + map.values_mut().for_each(js_normalize); + } + Value::Array(items) => items.iter_mut().for_each(js_normalize), + Value::Number(number) if !number.is_f64() => { + let exact = number + .as_i64() + .map(i128::from) + .or_else(|| number.as_u64().map(i128::from)); + if exact.is_some_and(|n| n.unsigned_abs() > 1u128 << 53) + && let Some(rounded) = number.as_f64().and_then(serde_json::Number::from_f64) + { + *number = rounded; + } + } + _ => {} + } +} + +/// `Math.round`: the nearest integer, a half rounding toward +∞; −0 for −0 and for values in +/// [−0.5, 0). +pub fn js_round(value: f64) -> f64 { + if !value.is_finite() || value == value.trunc() { + return value; + } + let floor = value.floor(); + let rounded = if value - floor >= 0.5 { + floor + 1.0 + } else { + floor + }; + if rounded == 0.0 && value < 0.0 { + -0.0 + } else { + rounded + } +} diff --git a/crates/core/src/curation/upload.rs b/crates/core/src/curation/upload.rs new file mode 100644 index 00000000..c940854c --- /dev/null +++ b/crates/core/src/curation/upload.rs @@ -0,0 +1,287 @@ +//! The rules of the sheet-asset upload (R5.5): the manifest, the destination, the bytes, and +//! what to do given what the destination already holds. Values in, values out; the +//! `upload-sheet-assets` binary owns the file system, the environment and the network. + +use std::net::{IpAddr, Ipv4Addr}; + +use serde::Deserialize; +use url::{Host, Url}; + +use crate::anatomy::svg::read_svg; +use crate::curation::ids::sha256_hex; + +/// The private Storage bucket of the sheet drawings (`20261009100000_sheet_asset_storage`). +pub const BUCKET: &str = "anatomical-sheet-assets"; +/// The manifest of a generated seed folder, a few hundred bytes today. +pub const MAX_MANIFEST_BYTES: usize = 1024 * 1024; +/// Entries one run handles (a seed holds a handful of drawings). +pub const MAX_ENTRIES: usize = 64; +/// One drawing; the bucket itself refuses beyond 20 MiB. +pub const MAX_ASSET_BYTES: usize = 16 * 1024 * 1024; + +/// The closed kinds a refusal falls into; the message names the file or the value. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum UploadKind { + /// `assets.json` is malformed, too large, or lists a bad or repeated entry. + Manifest, + /// The destination is not a local stack the tool is allowed to write to. + Destination, + /// A local file does not match its entry, or is not a drawing the product accepts. + Content, + /// The destination answered something other than the expected local stack. + Handshake, + /// The destination holds different bytes under a content-addressed key, or no row for the + /// asset: nothing is overwritten, nothing is invented. + State, + /// The destination refused the key (401, 403). + Access, + /// The destination could not be reached, or answered with a server error. + Network, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct UploadError { + pub kind: UploadKind, + pub message: String, +} + +impl std::fmt::Display for UploadError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}: {}", self.kind, self.message) + } +} + +pub fn refuse(kind: UploadKind, message: impl Into) -> UploadError { + UploadError { + kind, + message: message.into(), + } +} + +/// One line of `assets.json`, as the generated seed writes it. +#[derive(Debug, Clone, PartialEq, Eq, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct AssetEntry { + pub file: String, + pub sha256: String, + pub byte_size: usize, + pub svg_asset_id: String, +} + +impl AssetEntry { + /// The Storage object key: content-addressed, so the same bytes are the same object. + pub fn object_key(&self) -> String { + format!("{}.svg", self.sha256) + } +} + +fn is_lower_hex(text: &str, length: usize) -> bool { + text.len() == length && text.bytes().all(|b| matches!(b, b'0'..=b'9' | b'a'..=b'f')) +} + +fn is_uuid(text: &str) -> bool { + let parts: Vec<&str> = text.split('-').collect(); + let lengths = [8, 4, 4, 4, 12]; + parts.len() == 5 + && parts + .iter() + .zip(lengths) + .all(|(part, length)| is_lower_hex(part, length)) +} + +/// A plain file name of a drawing: no separator, no leading dot, `.svg`. +fn is_plain_svg_name(name: &str) -> bool { + name.len() <= 100 + && name.ends_with(".svg") + && !name.starts_with('.') + && name + .bytes() + .all(|b| b.is_ascii_alphanumeric() || matches!(b, b'.' | b'_' | b'-')) +} + +fn check_entry(entry: &AssetEntry) -> Result<(), UploadError> { + let bad = |what: &str| refuse(UploadKind::Manifest, format!("{}: {what}", entry.file)); + if !is_plain_svg_name(&entry.file) { + return Err(refuse( + UploadKind::Manifest, + "file must be a plain .svg name", + )); + } + if !is_lower_hex(&entry.sha256, 64) { + return Err(bad("sha256 must be 64 lowercase hex digits")); + } + if !is_uuid(&entry.svg_asset_id) { + return Err(bad("svg_asset_id must be a lowercase uuid")); + } + if entry.byte_size == 0 || entry.byte_size > MAX_ASSET_BYTES { + return Err(bad("byte_size out of range")); + } + Ok(()) +} + +fn repeated(entries: &[AssetEntry]) -> Option { + for (index, entry) in entries.iter().enumerate() { + let twin = entries[..index].iter().any(|other| { + other.file == entry.file + || other.sha256 == entry.sha256 + || other.svg_asset_id == entry.svg_asset_id + }); + if twin { + return Some(entry.file.clone()); + } + } + None +} + +/// Reads `assets.json`: size-bounded before the parse, strict on keys, every entry checked, +/// no repeated file, hash or asset id. +pub fn parse_manifest(text: &str) -> Result, UploadError> { + if text.len() > MAX_MANIFEST_BYTES { + return Err(refuse(UploadKind::Manifest, "assets.json is too large")); + } + let entries: Vec = serde_json::from_str(text) + .map_err(|error| refuse(UploadKind::Manifest, format!("assets.json: {error}")))?; + if entries.is_empty() || entries.len() > MAX_ENTRIES { + return Err(refuse(UploadKind::Manifest, "assets.json: 1 to 64 entries")); + } + entries.iter().try_for_each(check_entry)?; + if let Some(file) = repeated(&entries) { + return Err(refuse( + UploadKind::Manifest, + format!("{file}: repeated entry"), + )); + } + Ok(entries) +} + +/// The bytes on disk are what the manifest recorded, and a drawing the product accepts: the +/// core's one SVG reader keeps every element (nothing removed), as a load of the sheet would. +pub fn verify_asset(entry: &AssetEntry, bytes: &[u8]) -> Result<(), UploadError> { + let bad = |what: &str| refuse(UploadKind::Content, format!("{}: {what}", entry.file)); + if bytes.len() != entry.byte_size || sha256_hex(bytes) != entry.sha256 { + return Err(bad("bytes differ from assets.json")); + } + let text = std::str::from_utf8(bytes).map_err(|_| bad("not UTF-8 text"))?; + match read_svg(text) { + Ok(read) if read.removed.is_empty() => Ok(()), + Ok(_) => Err(bad("the SVG reader would remove content")), + Err(error) => Err(bad(&format!("refused by the SVG reader: {error:?}"))), + } +} + +/// A local destination the tool may write to: `http`, an explicit port, no credentials, query +/// or path, and a host that is this machine (loopback) or the configured DEV address. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Destination { + origin: String, +} + +impl Destination { + /// `http://host:port`, no trailing slash. + pub fn origin(&self) -> &str { + &self.origin + } +} + +fn is_private_v4(ip: Ipv4Addr) -> bool { + ip.is_loopback() || ip.is_private() +} + +fn host_is_allowed(host: &Host<&str>, dev_host: Option<&str>) -> bool { + match host { + Host::Domain(name) => name.eq_ignore_ascii_case("localhost"), + Host::Ipv6(ip) => ip.is_loopback(), + Host::Ipv4(ip) => { + ip.is_loopback() + || (is_private_v4(*ip) + && dev_host.and_then(|d| d.parse::().ok()) == Some(IpAddr::V4(*ip))) + } + } +} + +/// Refuses anything but a local stack; there is no default to fall back to. +pub fn check_destination(raw: &str, dev_host: Option<&str>) -> Result { + let bad = |what: &str| refuse(UploadKind::Destination, what); + let url = Url::parse(raw).map_err(|_| bad("not a URL"))?; + if url.scheme() != "http" { + return Err(bad("only http to a local stack")); + } + if !url.username().is_empty() || url.password().is_some() { + return Err(bad("no credentials in the URL")); + } + if url.query().is_some() || url.fragment().is_some() || url.path() != "/" { + return Err(bad("an origin only: no path, query or fragment")); + } + let port = url + .port() + .ok_or_else(|| bad("an explicit port is required"))?; + let host = url.host().ok_or_else(|| bad("no host"))?; + if !host_is_allowed(&host, dev_host) { + return Err(bad( + "host is not this machine or the configured DEV address", + )); + } + Ok(Destination { + origin: format!("http://{}:{port}", host_text(&host)), + }) +} + +fn host_text(host: &Host<&str>) -> String { + match host { + Host::Ipv6(ip) => format!("[{ip}]"), + other => other.to_string(), + } +} + +/// What the Storage object `.svg` holds at the destination. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum ObjectState { + Absent, + /// Present, and its bytes hash to the key. + Verified, + /// Present under this key but with other bytes (the hash found). + Different(String), +} + +/// The `anatomical_sheet_assets` row of the entry, as the destination reports it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum RowState { + Unknown, + /// The row records another hash than the manifest. + OtherHash(String), + Pending, + Confirmed, +} + +/// What a run does for one entry; both false means nothing to do. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct Plan { + pub upload: bool, + pub confirm: bool, +} + +/// Decides the steps of one entry from what the destination holds, or refuses: nothing is +/// ever overwritten, and a row the seed did not create is not guessed at. +pub fn plan_entry( + entry: &AssetEntry, + object: &ObjectState, + row: &RowState, +) -> Result { + let bad = |what: String| refuse(UploadKind::State, format!("{}: {what}", entry.file)); + match row { + RowState::Unknown => return Err(bad("no asset row (apply the seed first)".into())), + RowState::OtherHash(found) => { + return Err(bad(format!("the asset row records sha256 {found}"))); + } + RowState::Pending | RowState::Confirmed => {} + } + if let ObjectState::Different(found) = object { + return Err(bad(format!( + "the object holds other bytes (sha256 {found})" + ))); + } + Ok(Plan { + upload: *object == ObjectState::Absent, + confirm: *row == RowState::Pending, + }) +} diff --git a/crates/core/src/domain/archive/read.rs b/crates/core/src/domain/archive/read.rs index 8f06b607..5419b9dd 100644 --- a/crates/core/src/domain/archive/read.rs +++ b/crates/core/src/domain/archive/read.rs @@ -12,7 +12,7 @@ use ts_rs::TS; use super::envelope::{ENVELOPE_VERSION, EnvelopeVersion1, EnvelopeWrapper, ReportArchiveEnvelope}; use super::snapshot::SheetSnapshot; use super::snapshot_rules::{SnapshotRejection, assert_snapshot}; -use crate::domain::report::read::{ReadFailure, read_report_document, version_of}; +use crate::domain::report::read::{ReadFailure, check_v3_shape, read_report_document, version_of}; use crate::domain::report::{Report, ReportMigrationMap}; #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] @@ -121,5 +121,11 @@ fn snapshot_matches(snapshot: &SheetSnapshot, report: &Report) -> bool { /// `ReportArchiveEnvelopeSchema.parse`: the shape of a whole envelope (the snapshot's shape /// only, no caps nor integrity), as the session keeps it. pub fn parse_envelope(data: &Value) -> Result { + // A positional envelope would carry its report past the check unseen. + if !data.is_object() { + return Err(serde::de::Error::custom("envelope: expected an object")); + } + let report = data.get("report").unwrap_or(&Value::Null); + check_v3_shape(report).map_err(serde::de::Error::custom)?; ReportArchiveEnvelope::deserialize(data) } diff --git a/crates/core/src/domain/archive/snapshot_rules.rs b/crates/core/src/domain/archive/snapshot_rules.rs index 6e00fb4a..ebdcb00a 100644 --- a/crates/core/src/domain/archive/snapshot_rules.rs +++ b/crates/core/src/domain/archive/snapshot_rules.rs @@ -51,13 +51,27 @@ impl SnapshotRejection { /// The snapshot of `sheet` that `report` needs: pure, deterministic (document order /// everywhere). A missing asset is left out and caught by `assert_snapshot`. +/// +/// M1 (owner 2026-10-25, R5.6): a report of this sheet stamped with the registered historical +/// value of its verified, recomputed content gets a snapshot carrying that same stamp, so its +/// archive holds one value and every reader (the frozen N-1 one, a rollback build) keeps it. +/// In every other case the snapshot carries the sheet's own value, and the export's strict +/// equality refuses a report that differs. pub fn build_sheet_snapshot(sheet: &LoadedSheet, report: &Report) -> SheetSnapshot { + let stamp = &report.sheet.document_sha256; + let document_sha256 = if report.sheet.sheet_id == sheet.reference.sheet_id + && sheet.recognises_historical_stamp(&report.sheet.sheet_id, stamp) + { + stamp.clone() + } else { + sheet.reference.document_sha256.clone() + }; SheetSnapshot { status: sheet.status, reference: SheetSnapshotRef { sheet_id: sheet.reference.sheet_id.clone(), version_id: sheet.reference.version_id.clone(), - document_sha256: sheet.reference.document_sha256.clone(), + document_sha256, schema_version: sheet.schema_version, species_id: sheet.species_id.clone(), }, diff --git a/crates/core/src/domain/mod.rs b/crates/core/src/domain/mod.rs index df3759df..e73e8de2 100644 --- a/crates/core/src/domain/mod.rs +++ b/crates/core/src/domain/mod.rs @@ -1,4 +1,6 @@ //! Data contracts and business rules of the core (R2: sheet, report, archive, editor rules). +//! `packages/domain`, the TypeScript original, was deleted at R5.7; its sources stay as the +//! frozen N-1 copy under `packages/core-wasm/tests/n-1/domain` (byte-identical). pub mod archive; pub mod editor; diff --git a/crates/core/src/domain/report/read.rs b/crates/core/src/domain/report/read.rs index e3fb57fe..e91685b1 100644 --- a/crates/core/src/domain/report/read.rs +++ b/crates/core/src/domain/report/read.rs @@ -49,6 +49,35 @@ pub fn version_of(data: &Value) -> Option { data.as_object()?.get("version")?.as_f64() } +/// The shapes Zod refused and serde's derives accept (owner go 2026-10-24, RUST.md §11.18): +/// `sheet` and `practitioner` written as positional arrays, a `severity` written as a one-key +/// map. Checked on the raw value before the typed read. The report and each observation must +/// be objects themselves, or a positional parent would carry those fields past the check +/// unseen; nothing else is widened or narrowed. +pub fn check_v3_shape(data: &Value) -> Result<(), String> { + if !data.is_object() { + return Err("report: expected an object".to_owned()); + } + for key in ["sheet", "practitioner"] { + if data.get(key).is_some_and(|value| !value.is_object()) { + return Err(format!("{key}: expected an object")); + } + } + let observations = data.get("observations").and_then(Value::as_array); + for (index, observation) in observations.into_iter().flatten().enumerate() { + if !observation.is_object() { + return Err(format!("observations[{index}]: expected an object")); + } + if observation + .get("severity") + .is_some_and(|value| !value.is_string()) + { + return Err(format!("observations[{index}].severity: expected a string")); + } + } + Ok(()) +} + /// Reads a report document of version 2 or 3 and returns it as v3. pub fn read_report_document( data: &Value, @@ -56,6 +85,7 @@ pub fn read_report_document( ) -> Result { let version = version_of(data); if version == Some(3.0) { + check_v3_shape(data).map_err(ReadFailure::Invalid)?; let report = Report::deserialize(data).map_err(ReadFailure::invalid)?; return Ok(MigrationOutcome { report, diff --git a/crates/core/src/domain/report/rebase.rs b/crates/core/src/domain/report/rebase.rs index 92816425..9df79eda 100644 --- a/crates/core/src/domain/report/rebase.rs +++ b/crates/core/src/domain/report/rebase.rs @@ -37,7 +37,13 @@ pub fn rebase_report_on_sheet( sheet: &LoadedSheet, archived: Option<&SheetSnapshot>, ) -> Result { - if report.sheet.document_sha256 == sheet.reference.document_sha256 { + // Same document: equal fingerprints, or the registered historical value of this very sheet, + // proven against its verified, recomputed `v1` value (R5.6). + let stamped = &report.sheet.document_sha256; + if *stamped == sheet.reference.document_sha256 + || (report.sheet.sheet_id == sheet.reference.sheet_id + && sheet.recognises_historical_stamp(&report.sheet.sheet_id, stamped)) + { return Ok(RebaseOutcome { report: report.clone(), unresolved_zones: 0, diff --git a/crates/core/src/domain/sheet/fingerprint.rs b/crates/core/src/domain/sheet/fingerprint.rs new file mode 100644 index 00000000..341b72fa --- /dev/null +++ b/crates/core/src/domain/sheet/fingerprint.rs @@ -0,0 +1,305 @@ +//! The sheet fingerprint convention `sha256-rfc8785-validated-v1` (D-R5.6, owner 2026-10-24, +//! active since R5.6, BDR-068, BDR-070) and the trusted alias registry (RUST.md §11.19 to §11.22). +//! +//! The value is the SHA-256 of the RFC 8785 (JCS) text of the validated document: the strict +//! typed reading of the R2 contract (`AnatomicalSheetDocument`, Zod's defaults filled, the +//! strict shape refusing unknown keys) with no integrity error (draft warnings allowed, as the +//! publish gate `is_publishable`), serialised back. JCS: members sorted recursively by the +//! UTF-16 code units of their names, numbers as ECMAScript `Number::toString`, strings with the +//! `JSON.stringify` escape set and every other character kept as is (no Unicode normalisation), +//! no whitespace, UTF-8, nesting bounded at `MAX_CANONICAL_DEPTH`. `v1` freezes these rules and +//! the validation. +//! +//! Trust boundary: a registered alias is honoured only through +//! `LoadedSheet::recognises_historical_stamp` (loader-verified `v1` value, recomputed from the +//! document at the decision); `equivalence` is crate-private. Equal fingerprints keep their +//! historical meaning everywhere (the same reference string), which is no proof of content: an +//! API that accepts caller-built data (an export input, a hand-made bundle) is trusted for what +//! it declares, as before R5.6. + +use serde_json::Value; + +use crate::json::js_number; + +/// The convention's name, as `sheet-ref.json` declares it (its `fingerprint` block). +pub const FINGERPRINT_CONVENTION: &str = "sha256-rfc8785-validated-v1"; +/// The pre-switch convention: SHA-256 of the Prettier-formatted `document.json` bytes. +pub const LEGACY_CONVENTION: &str = "sha256-prettier-file-bytes-v0"; + +/// One trusted equivalence: under `sheet_id`, the content whose canonical fingerprint is +/// `canonical` was stamped `alias` under `alias_convention`. Bound to the sheet and to that +/// content, never global; built from the frozen oracles, never from an archive, a bundle or the +/// database. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct TrustedAlias { + pub sheet_id: &'static str, + pub canonical: &'static str, + pub alias: &'static str, + pub alias_convention: &'static str, +} + +/// The registry, the only authority over equivalences. Equine draft: `alias` is the committed +/// `sheet-ref.json` value and `oracles/r5/fingerprints.json` `today_file_bytes`; `canonical` is +/// the same oracle's `b_rfc8785_validated`, recomputed by `sheet_fingerprint` (test). +pub const TRUSTED_ALIASES: &[TrustedAlias] = &[TrustedAlias { + sheet_id: "503dc301-a8b1-50d4-9e44-0919b2fc2916", + canonical: "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2", + alias: "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", + alias_convention: LEGACY_CONVENTION, +}]; + +/// How two fingerprints of one sheet relate. The raw values stay with the caller, so a +/// diagnostic can still print both. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Equivalence { + Identical, + /// Different values the registry binds to the same content of this sheet. + TrustedAlias, + Different, +} + +impl Equivalence { + pub fn same_document(self) -> bool { + self != Self::Different + } +} + +/// `stamped` (what a report or an archive carries) against `current` (the loaded sheet's +/// verified value), both for `sheet_id`: equal; the registered pair of that sheet in this one +/// direction (an old stamp against the canonical value, never the reverse, so a sheet that +/// declares no `v1` value recognises no `v1` stamp); or different. A real content change is +/// never registered, so it stays `Different` and rebases as before. +pub(crate) fn equivalence(sheet_id: &str, stamped: &str, current: &str) -> Equivalence { + if stamped == current { + return Equivalence::Identical; + } + let paired = TRUSTED_ALIASES.iter().any(|entry| { + entry.sheet_id == sheet_id && entry.alias == stamped && entry.canonical == current + }); + if paired { + Equivalence::TrustedAlias + } else { + Equivalence::Different + } +} + +/// Why declared metadata contradicts the registry. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum AliasRefusal { + /// The declared convention is not `v1`. + UnknownConvention(String), + /// A declared alias the registry does not bind to this sheet and canonical value. + Untrusted(String), + /// The value declared under `v1` is not a 64-hex value, or is itself a historical alias. + NotCanonical(String), + /// The declared `v1` value is not the document's (the value recomputed, or why it could + /// not be). + ContentMismatch(String), +} + +/// Checks what a `sheet-ref.json` declares (descriptive only): the convention must be `v1` and +/// every listed alias must be registered for this sheet and this canonical value. A +/// declaration never creates an equivalence. +pub fn check_declared( + sheet_id: &str, + canonical: &str, + convention: &str, + aliases: &[String], +) -> Result<(), AliasRefusal> { + if convention != FINGERPRINT_CONVENTION { + return Err(AliasRefusal::UnknownConvention(convention.to_owned())); + } + let hex = canonical.len() == 64 + && canonical + .bytes() + .all(|b| matches!(b, b'0'..=b'9' | b'a'..=b'f')); + if !hex || TRUSTED_ALIASES.iter().any(|entry| entry.alias == canonical) { + return Err(AliasRefusal::NotCanonical(canonical.to_owned())); + } + for alias in aliases { + let trusted = TRUSTED_ALIASES.iter().any(|entry| { + entry.sheet_id == sheet_id && entry.canonical == canonical && entry.alias == alias + }); + if !trusted { + return Err(AliasRefusal::Untrusted(alias.clone())); + } + } + Ok(()) +} + +/// The deepest nesting `canonical_json` writes: serde_json's own parse limit, so every value the +/// core parsed fits; a value built in code beyond it is refused, never a stack overflow. +pub const MAX_CANONICAL_DEPTH: usize = 128; + +/// Why a value has no RFC 8785 text. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum CanonicalError { + /// A number with no I-JSON form (never produced by the core's parser). + NonFinite, + /// Containers nested deeper than `MAX_CANONICAL_DEPTH`. + TooDeep, +} + +/// RFC 8785 text of a JSON value. +pub fn canonical_json(value: &Value) -> Result { + let mut out = String::new(); + write_value(value, 0, &mut out)?; + Ok(out) +} + +fn write_value(value: &Value, depth: usize, out: &mut String) -> Result<(), CanonicalError> { + let nested = matches!(value, Value::Array(_) | Value::Object(_)); + if nested && depth >= MAX_CANONICAL_DEPTH { + return Err(CanonicalError::TooDeep); + } + match value { + Value::Null => out.push_str("null"), + Value::Bool(flag) => out.push_str(if *flag { "true" } else { "false" }), + Value::Number(number) => { + let float = number + .as_f64() + .filter(|f| f.is_finite()) + .ok_or(CanonicalError::NonFinite)?; + out.push_str(&js_number(float)); + } + Value::String(text) => write_string(text, out), + Value::Array(items) => { + out.push('['); + for (index, item) in items.iter().enumerate() { + if index > 0 { + out.push(','); + } + write_value(item, depth + 1, out)?; + } + out.push(']'); + } + Value::Object(map) => write_object(map, depth, out)?, + } + Ok(()) +} + +fn write_object( + map: &serde_json::Map, + depth: usize, + out: &mut String, +) -> Result<(), CanonicalError> { + let mut entries: Vec<(Vec, &String, &Value)> = map + .iter() + .map(|(key, item)| (key.encode_utf16().collect(), key, item)) + .collect(); + entries.sort_by(|left, right| left.0.cmp(&right.0)); + out.push('{'); + for (index, (_, key, item)) in entries.iter().enumerate() { + if index > 0 { + out.push(','); + } + write_string(key, out); + out.push(':'); + write_value(item, depth + 1, out)?; + } + out.push('}'); + Ok(()) +} + +/// `JSON.stringify` of a string: `"` `\` and the controls escaped (short forms where JSON has +/// them, `\u00xx` lowercase otherwise), everything else verbatim. +fn write_string(text: &str, out: &mut String) { + out.push('"'); + for character in text.chars() { + match character { + '"' => out.push_str("\\\""), + '\\' => out.push_str("\\\\"), + '\u{8}' => out.push_str("\\b"), + '\u{c}' => out.push_str("\\f"), + '\n' => out.push_str("\\n"), + '\r' => out.push_str("\\r"), + '\t' => out.push_str("\\t"), + control if u32::from(control) < 0x20 => { + out.push_str(&format!("\\u{:04x}", u32::from(control))); + } + other => out.push(other), + } + } + out.push('"'); +} + +pub use hashing::{FingerprintError, document_fingerprint, sheet_fingerprint}; + +mod hashing { + use sha2::{Digest, Sha256}; + + use super::canonical_json; + use crate::domain::js::parse_json; + use crate::domain::sheet::schema::AnatomicalSheetDocument; + use crate::domain::sheet::validate::{is_publishable, validate_sheet_document}; + + /// Why a document has no fingerprint: an invalid sheet is never stamped. + #[derive(Debug, Clone, PartialEq, Eq)] + pub enum FingerprintError { + Parse(String), + Shape(String), + /// The integrity rules found errors (the count of every issue found). + Invalid(usize), + Canonical, + } + + /// `sha256-rfc8785-validated-v1` of a document text: strict parse, R2 shape, then + /// `document_fingerprint`. + pub fn sheet_fingerprint(text: &str) -> Result { + let value = parse_json(text).map_err(|e| FingerprintError::Parse(e.to_string()))?; + let document: AnatomicalSheetDocument = + serde_json::from_value(value).map_err(|e| FingerprintError::Shape(e.to_string()))?; + document_fingerprint(&document) + } + + /// The fingerprint of a typed document: no integrity error, then JCS of its reading + /// serialised back, then SHA-256 (the sheet load recomputes it, R5.6). + pub fn document_fingerprint( + document: &AnatomicalSheetDocument, + ) -> Result { + // Integrity errors refuse a fingerprint; warnings do not (`is_publishable`: a draft may + // hold an annotation with no finding zone or an unreferenced zone, R5.6 rehearsal). + let issues = validate_sheet_document(document); + if !is_publishable(&issues) { + return Err(FingerprintError::Invalid(issues.len())); + } + let validated = + serde_json::to_value(document).map_err(|e| FingerprintError::Shape(e.to_string()))?; + let canonical = canonical_json(&validated).map_err(|_| FingerprintError::Canonical)?; + Ok(Sha256::digest(canonical.as_bytes()) + .iter() + .map(|byte| format!("{byte:02x}")) + .collect()) + } +} + +#[cfg(test)] +mod tests { + use super::{Equivalence, TRUSTED_ALIASES, equivalence}; + + #[test] + fn the_registered_pair_holds_one_way_for_its_sheet_only() { + let pair = &TRUSTED_ALIASES[0]; + let (sheet, alias, canonical) = (pair.sheet_id, pair.alias, pair.canonical); + assert_eq!( + equivalence(sheet, canonical, canonical), + Equivalence::Identical + ); + assert_eq!( + equivalence(sheet, alias, canonical), + Equivalence::TrustedAlias + ); + assert_eq!(equivalence(sheet, canonical, alias), Equivalence::Different); + let other_sheet = "00000000-0000-0000-0000-000000000000"; + assert_eq!( + equivalence(other_sheet, alias, canonical), + Equivalence::Different + ); + let other = "a".repeat(64); + assert_eq!(equivalence(sheet, &other, alias), Equivalence::Different); + assert_eq!( + equivalence(sheet, &other, canonical), + Equivalence::Different + ); + } +} diff --git a/crates/core/src/domain/sheet/loaded.rs b/crates/core/src/domain/sheet/loaded.rs index 4065978c..afc7f33a 100644 --- a/crates/core/src/domain/sheet/loaded.rs +++ b/crates/core/src/domain/sheet/loaded.rs @@ -6,6 +6,9 @@ use std::collections::HashMap; use serde::Deserialize; +use super::fingerprint::{ + AliasRefusal, Equivalence, check_declared, document_fingerprint, equivalence, +}; use super::index::{IndexedDocument, NoMainView, SheetIndex}; use super::schema::AnatomicalSheetDocument; use crate::anatomy::svg::{Element, read_svg}; @@ -33,6 +36,24 @@ pub struct BundledRef { pub document_sha256: String, pub schema_version: JsInt, pub species_id: String, + /// Descriptive (R5.6): checked against the core's registry at load, never trusted alone. + /// Absent: a historical (v0) reference; present, it must be a valid block (`null` refused). + #[serde(default, deserialize_with = "present_block")] + pub fingerprint: Option, +} + +/// `fingerprint` present means a block: an explicit `null` is refused, not read as absent. +pub fn present_block<'de, D: serde::Deserializer<'de>>( + deserializer: D, +) -> Result, D::Error> { + DeclaredFingerprint::deserialize(deserializer).map(Some) +} + +#[derive(Debug, Clone, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct DeclaredFingerprint { + pub convention: String, + pub aliases: Vec, } /// A loaded, indexed sheet. @@ -49,6 +70,9 @@ pub struct LoadedSheet { /// sha256 by `svg_asset_id`; carried into an archive as provenance. pub asset_hashes: HashMap, pub migration_map: ReportMigrationMap, + /// The `v1` value the loader recomputed from the document and found declared (R5.6); `None` + /// for a historical reference (no block). Private: only `from_bundle` sets it. + verified_fingerprint: Option, index: SheetIndex, /// Each asset read once at load (R3): the sanitised tree, or why it cannot be drawn. A /// rejection only affects the views on that asset; `assets` keeps the raw texts (the @@ -76,6 +100,8 @@ pub enum LoadError { Shape(serde_json::Error), /// The document has no main view. NoMainView, + /// The declared fingerprint block contradicts the core's registry (R5.6). + Fingerprint(AliasRefusal), } impl From for LoadError { @@ -102,6 +128,9 @@ impl LoadedSheet { .map(|(id, text)| (id.clone(), read_drawing(text))) .collect(); let r = data.reference; + let verified_fingerprint = check_reference(&r, &document) + .map_err(LoadError::Fingerprint)? + .then(|| r.document_sha256.clone()); Ok(Self { status: data.status, reference: SheetRef { @@ -115,11 +144,32 @@ impl LoadedSheet { assets: data.assets, asset_hashes: data.asset_hashes, migration_map, + verified_fingerprint, index, drawings, }) } + /// Whether the loader verified a `v1` reference (no alias privilege otherwise). + pub fn is_fingerprint_verified(&self) -> bool { + self.verified_fingerprint.is_some() + } + + /// Whether `stamp`, carried by a report of this sheet, is the registered historical value of + /// this sheet's current content (R5.6, owner M1 rules): the loader verified a `v1` reference, + /// the document as it stands now recomputes to that same value, and the registry binds `stamp` + /// to it for this sheet. No declared or stored value stands in for the recomputation, so a + /// mutated document or reference, a v0 sheet, another sheet or a forged stamp never qualify. + pub fn recognises_historical_stamp(&self, sheet_id: &str, stamp: &str) -> bool { + let Some(verified) = &self.verified_fingerprint else { + return false; + }; + sheet_id == self.reference.sheet_id + && *verified == self.reference.document_sha256 + && equivalence(sheet_id, stamp, verified) == Equivalence::TrustedAlias + && document_fingerprint(&self.document).is_ok_and(|now| now == *verified) + } + pub fn indexed(&self) -> IndexedDocument<'_> { self.index.over(&self.document) } @@ -133,3 +183,28 @@ impl LoadedSheet { self.drawings.get(asset_id) } } + +/// The reference against the document (R5.6): `true` when a `v1` block, checked against the +/// registry, declares the value recomputed from the document. With no block the reference is a +/// historical one (v0): read as before, unverified (`false`), so an absent block never stands +/// for `v1` and never brings an alias. +fn check_reference( + reference: &BundledRef, + document: &AnatomicalSheetDocument, +) -> Result { + let value = &reference.document_sha256; + let Some(declared) = &reference.fingerprint else { + return Ok(false); + }; + check_declared( + &reference.sheet_id, + value, + &declared.convention, + &declared.aliases, + )?; + match document_fingerprint(document) { + Ok(computed) if computed == *value => Ok(true), + Ok(computed) => Err(AliasRefusal::ContentMismatch(computed)), + Err(error) => Err(AliasRefusal::ContentMismatch(format!("{error:?}"))), + } +} diff --git a/crates/core/src/domain/sheet/mod.rs b/crates/core/src/domain/sheet/mod.rs index 1a9348ff..225c7c00 100644 --- a/crates/core/src/domain/sheet/mod.rs +++ b/crates/core/src/domain/sheet/mod.rs @@ -3,6 +3,7 @@ pub mod check; pub mod create; +pub mod fingerprint; pub mod index; pub mod index_data; pub mod loaded; diff --git a/crates/core/src/facade.rs b/crates/core/src/facade.rs index f0c69970..7f73cffd 100644 --- a/crates/core/src/facade.rs +++ b/crates/core/src/facade.rs @@ -53,6 +53,7 @@ pub fn load_sheet(bundle: &str) -> Result { LoadedSheet::from_bundle(data).map_err(|error| match error { LoadError::Shape(error) => Failure::new("invalid_sheet", error), LoadError::NoMainView => Failure::new("invalid_sheet", "the sheet has no main view"), + LoadError::Fingerprint(refusal) => Failure::new("invalid_sheet", format!("{refusal:?}")), }) } diff --git a/crates/core/src/json.rs b/crates/core/src/json.rs index 3feb664e..28144ace 100644 --- a/crates/core/src/json.rs +++ b/crates/core/src/json.rs @@ -34,16 +34,23 @@ pub fn js_number(value: f64) -> String { /// Shortest round-trip digits of a positive finite value and the position `n` of the /// decimal point relative to the first digit (ECMAScript's `n`): value = 0.d₁d₂… × 10ⁿ. /// -/// Rust's `LowerExp` prints the shortest round-trip mantissa (`1.7154285714285713e3`), -/// chosen by the same rule as ECMAScript (shortest, then closest to the value). +/// The digits come from `zmij`, which picks among the shortest candidates the one closest to +/// the value and, on an exact tie, the even one: ECMAScript's rule. Rust's `{:e}` rounds a +/// tie upward (`840.16925048828125` → `…813`, R5.1b F1). zmij prints either a plain decimal +/// (`840.1692504882812`, `1523.0`, `0.001`) or a mantissa and an exponent (`1e21`, +/// `1.5e-7`); both read back the same way here. fn shortest_digits(value: f64) -> (String, i32) { - let scientific = format!("{value:e}"); - let (mantissa, exponent) = scientific - .split_once('e') - .unwrap_or((scientific.as_str(), "0")); + let mut buffer = zmij::Buffer::new(); + let printed = buffer.format_finite(value); + let (mantissa, exponent) = printed.split_once(['e', 'E']).unwrap_or((printed, "0")); let exponent: i32 = exponent.parse().unwrap_or(0); - let digits: String = mantissa.chars().filter(char::is_ascii_digit).collect(); - (digits, exponent + 1) + let (integer, fraction) = mantissa.split_once('.').unwrap_or((mantissa, "")); + let mut point = i32::try_from(integer.len()).unwrap_or(i32::MAX) + exponent; + let all: String = format!("{integer}{fraction}"); + let leading = all.len() - all.trim_start_matches('0').len(); + point -= i32::try_from(leading).unwrap_or(0); + let digits = all.trim_matches('0').to_owned(); + (digits, point) } /// ECMAScript Number::toString steps 6 to 10 for `k` digits and point position `n`. diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 028c5239..807b8c9f 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -6,6 +6,8 @@ //! first contract types; the business rules arrive with R2. pub mod anatomy; +#[cfg(feature = "curation")] +pub mod curation; pub mod domain; pub mod facade; pub mod json; diff --git a/crates/core/src/pdf/compare/lines.rs b/crates/core/src/pdf/compare/lines.rs index 35e8dd27..7a33db62 100644 --- a/crates/core/src/pdf/compare/lines.rs +++ b/crates/core/src/pdf/compare/lines.rs @@ -2,6 +2,7 @@ //! current label next to the archived one, `!! UNRESOLVED` with the reason where the sheet //! cannot place an item. Every untrusted string goes through [`esc`]. +use crate::domain::sheet::fingerprint::Equivalence; use serde::Deserialize; use serde_json::Value; @@ -346,13 +347,33 @@ fn archive_line(outcome: &ArchiveReadOutcome) -> Vec { fn sheet_line(report: &Report, sheet: &LoadedSheet) -> String { let reference = &sheet.reference; - let same_sheet = report.sheet.sheet_id == reference.sheet_id - && report.sheet.document_sha256 == reference.document_sha256; + let same = if report.sheet.document_sha256 == reference.document_sha256 { + Equivalence::Identical + } else if sheet + .recognises_historical_stamp(&report.sheet.sheet_id, &report.sheet.document_sha256) + { + // The registered historical value of this sheet's verified, recomputed content (R5.6). + Equivalence::TrustedAlias + } else { + Equivalence::Different + }; + let same_sheet = report.sheet.sheet_id == reference.sheet_id && same.same_document(); if same_sheet { let status = match sheet.status { SheetStatus::Draft => "draft", SheetStatus::Published => "published", }; + if same == Equivalence::TrustedAlias { + // Same content under the registered historical fingerprint: both raw values shown. + let stamped: String = report.sheet.document_sha256.chars().take(12).collect(); + let current: String = reference.document_sha256.chars().take(12).collect(); + return format!( + "sheet {} ({status}, matches the bundled sheet through the trusted alias: report sha {}…, sheet sha {}…)", + esc(&reference.sheet_id), + esc(&stamped), + esc(¤t) + ); + } return format!( "sheet {} ({status}, matches the bundled sheet)", esc(&reference.sheet_id) diff --git a/crates/core/tests/anatomy_compose.rs b/crates/core/tests/anatomy_compose.rs index 1ca69e8d..106efe2c 100644 --- a/crates/core/tests/anatomy_compose.rs +++ b/crates/core/tests/anatomy_compose.rs @@ -154,3 +154,27 @@ fn a_label_xml_cannot_carry_is_refused_never_replaced() { } assert!(compose_canvas(&draft, "main", &horse).is_err()); } + +fn count(element: &Element, matches: &dyn Fn(&Element) -> bool) -> usize { + usize::from(matches(element)) + + element + .element_children() + .map(|c| count(c, matches)) + .sum::() +} + +/// `render.compose.test.ts` "never duplicates the filter on a root that already holds it" +/// (R5.7): composing a drawing that already carries the halo filter adds no second filter and no +/// second `` (the TypeScript composed twice on one DOM root; the core takes the root it +/// returned). +#[test] +fn the_halo_filter_is_never_duplicated_on_a_root_that_holds_it() { + let draft = draft(); + let ids: HashSet<&str> = ["hip"].into_iter().collect(); + let horse = sanitized(&common::repo_file(HORSE)); + let once = compose_highlight(&draft, "main", horse, &ids, true).unwrap(); + let twice = compose_highlight(&draft, "main", once, &ids, true).unwrap(); + let halo = |e: &Element| e.qname == "filter" && e.attr("id") == Some("osteo-halo"); + assert_eq!(count(&twice, &halo), 1); + assert_eq!(count(&twice, &|e: &Element| e.qname == "defs"), 1); +} diff --git a/crates/core/tests/archive_rules.rs b/crates/core/tests/archive_rules.rs index 1b1b5146..d361345d 100644 --- a/crates/core/tests/archive_rules.rs +++ b/crates/core/tests/archive_rules.rs @@ -201,7 +201,7 @@ fn slice_snapshot() -> Value { } fn draft_full_report(draft: &LoadedSheet) -> Report { - let full = json_file("packages/domain/tests/fixtures/report-v2.full.json"); + let full = json_file("crates/core/tests/fixtures/report-v2.full.json"); read_report_document(&full, &draft.migration_map) .unwrap() .report @@ -599,9 +599,7 @@ fn envelope_reads_a_bare_v3_as_is() { fn envelope_migrates_a_bare_v2_with_the_counts_of_the_migration() { let f = EnvelopeFixture::new(); let outcome = f - .read(&json_file( - "packages/domain/tests/fixtures/report-v2.full.json", - )) + .read(&json_file("crates/core/tests/fixtures/report-v2.full.json")) .unwrap(); assert_eq!(outcome.origin, ArchiveOrigin::V2); assert!(outcome.migrated && outcome.archive.is_none() && outcome.snapshot_rejected.is_none()); @@ -798,7 +796,7 @@ fn envelope_migrates_a_wrapped_v2_report_and_still_checks_the_snapshot() { let env = with( f.envelope(), "report", - json_file("packages/domain/tests/fixtures/report-v2.full.json"), + json_file("crates/core/tests/fixtures/report-v2.full.json"), ); let outcome = f.read(&env).unwrap(); assert_eq!(outcome.origin, ArchiveOrigin::EnvelopeV1); @@ -817,7 +815,7 @@ fn restore_reads_a_draft_and_keeps_it_when_it_sits_on_the_loaded_sheet() { let restored = restore_draft(&f.draft, &text, None).unwrap(); assert_eq!(restored.rebase.report, f.report); assert!(!restored.rebase.rebased && restored.archive.is_none() && !restored.archive_rejected); - let v2 = common::repo_file("packages/domain/tests/fixtures/report-v2.full.json"); + let v2 = common::repo_file("crates/core/tests/fixtures/report-v2.full.json"); assert_eq!( restore_draft(&f.draft, &v2, None).unwrap().rebase.report, f.report @@ -908,7 +906,7 @@ fn a_draft_with_a_lone_surrogate_is_refused_as_content_never_rewritten() { "{escape}" ); } - let v2 = common::repo_file("packages/domain/tests/fixtures/report-v2.full.json").replace( + let v2 = common::repo_file("crates/core/tests/fixtures/report-v2.full.json").replace( "\"comment\": \"Réagit à la palpation du garrot.\"", "\"comment\": \"Réagit \\udc00\"", ); diff --git a/crates/core/tests/archive_support/mod.rs b/crates/core/tests/archive_support/mod.rs index 4d2335ba..91adcf15 100644 --- a/crates/core/tests/archive_support/mod.rs +++ b/crates/core/tests/archive_support/mod.rs @@ -78,8 +78,9 @@ pub fn draft_map() -> ReportMigrationMap { from(json_file(&format!("{DRAFT_DIR}/report-migration-map.json"))) } -/// 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). +/// The horse slice of `packages/domain/tests/fixtures/horse-slice.ts` (deleted at R5.7, kept at +/// 756b7ef), as Zod parsed it (the characterisation oracle carries it, written by the TypeScript +/// generator). pub fn horse_slice() -> Value { super::common::oracle_file("characterisation.json").1["sheets"]["slice"]["document"].clone() } diff --git a/crates/core/tests/characterisation_serde_tolerance.rs b/crates/core/tests/characterisation_serde_tolerance.rs new file mode 100644 index 00000000..ba16f047 --- /dev/null +++ b/crates/core/tests/characterisation_serde_tolerance.rs @@ -0,0 +1,130 @@ +//! The serde tolerance of the R2 report contract (RUST.md §11.16): serde's derives read a struct +//! from a positional array and a unit enum from a one-key map, where the frozen Zod reader +//! refused both. Owner go 2026-10-24: the three v3 shapes found are refused at the readers' +//! entry (`check_v3_shape`), with a controlled `ReadFailure::Invalid`; the canonical forms and +//! the non-strict unknown fields are read as before (RUST.md §11.18). +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::domain::archive::parse_envelope; +use faunosteo_core::domain::report::read::check_v3_shape; +use faunosteo_core::domain::report::{ReadFailure, ReportMigrationMap, read_report_document}; +use serde_json::{Value, json}; + +fn demo() -> Value { + serde_json::from_str(&common::repo_file( + "apps/app/tests/fixtures/report-v3.demo.json", + )) + .unwrap() +} + +fn map() -> ReportMigrationMap { + let (source, _) = common::zod_oracle("migration-map.draft.json"); + serde_json::from_str(&source).unwrap() +} + +fn read(value: &Value) -> Result<(), ReadFailure> { + read_report_document(value, &map()).map(|_| ()) +} + +fn sheet_as_array() -> Value { + let mut report = demo(); + let parts = [ + report["sheet"]["sheetId"].clone(), + Value::Null, + report["sheet"]["documentSha256"].clone(), + ]; + report["sheet"] = json!(parts); + report +} + +fn practitioner_as_array() -> Value { + let mut report = demo(); + let p = report["practitioner"].clone(); + report["practitioner"] = json!([p["name"], p["cabinet"], p["contact"], p["siret"]]); + report +} + +fn severity_as_map() -> Value { + let mut report = demo(); + report["observations"][0]["severity"] = json!({ "mild": null }); + report +} + +fn refused_with(value: &Value, what: &str) { + match read(value) { + Err(ReadFailure::Invalid(message)) => assert!(message.starts_with(what), "{message}"), + other => panic!("{what}: {other:?}"), + } +} + +#[test] +fn the_canonical_report_is_read() { + assert!(read(&demo()).is_ok()); + assert!(check_v3_shape(&demo()).is_ok()); +} + +#[test] +fn a_struct_written_as_a_positional_array_is_refused() { + refused_with(&sheet_as_array(), "sheet: expected an object"); + refused_with(&practitioner_as_array(), "practitioner: expected an object"); +} + +#[test] +fn a_unit_enum_written_as_a_one_key_map_is_refused() { + refused_with( + &severity_as_map(), + "observations[0].severity: expected a string", + ); +} + +#[test] +fn an_absent_severity_and_an_unknown_field_are_read_as_before() { + let mut report = demo(); + report["observations"][0] + .as_object_mut() + .unwrap() + .remove("severity"); + report["extra"] = json!(1); + assert!(read(&report).is_ok()); + // `severity` is optional, never nullable: null stays refused, as Zod refused it. + report["observations"][0]["severity"] = Value::Null; + refused_with(&report, "observations[0].severity: expected a string"); +} + +#[test] +fn the_envelope_entry_refuses_the_same_shapes() { + let envelope: Value = serde_json::from_str(&common::repo_file( + "apps/app/tests/fixtures/goldens/r2/envelope.demo.fr.nologos.json", + )) + .unwrap(); + assert!(parse_envelope(&envelope).is_ok()); + for bad in [sheet_as_array(), practitioner_as_array(), severity_as_map()] { + let mut wrapped = envelope.clone(); + wrapped["report"] = bad; + assert!(parse_envelope(&wrapped).is_err()); + } +} + +#[test] +fn a_positional_parent_does_not_carry_a_refused_shape_past_the_check() { + let mut report = demo(); + let o = report["observations"][0].clone(); + report["observations"][0] = json!([ + o["id"], o["zones"], o["findings"], o["freeTextFindings"], { "mild": null }, o["comment"] + ]); + refused_with(&report, "observations[0]: expected an object"); + let envelope: Value = serde_json::from_str(&common::repo_file( + "apps/app/tests/fixtures/goldens/r2/envelope.demo.fr.nologos.json", + )) + .unwrap(); + let fields = envelope.as_object().unwrap(); + let mut positional: Vec = fields.values().cloned().collect(); + let at = fields.keys().position(|key| key == "report").unwrap(); + positional[at] = sheet_as_array(); + assert!(parse_envelope(&Value::Array(positional)).is_err()); + let mut wrapped = envelope.clone(); + wrapped["report"] = json!([1, 2, 3]); + assert!(parse_envelope(&wrapped).is_err()); +} diff --git a/crates/core/tests/common/mod.rs b/crates/core/tests/common/mod.rs index 891b1165..c97b4216 100644 --- a/crates/core/tests/common/mod.rs +++ b/crates/core/tests/common/mod.rs @@ -12,6 +12,12 @@ pub mod svg_tree; use faunosteo_core::domain::js::{find_lone_surrogate, parse_json}; use serde_json::Value; +/// The absolute path of a repository file. +#[allow(dead_code)] +pub fn repo_path(relative: &str) -> String { + format!("{}/../../{relative}", env!("CARGO_MANIFEST_DIR")) +} + /// A repository file, by path from the repository root. pub fn repo_file(relative: &str) -> String { let path = format!("{}/../../{relative}", env!("CARGO_MANIFEST_DIR")); @@ -39,9 +45,19 @@ pub fn oracle_file(name: &str) -> (String, Value) { /// A Zod oracle (`crates/core/tests/oracles/`): its source file and the Zod output in /// the JavaScript pretty form. +/// +/// The expected text is printed here by `to_js_pretty`, the function under test; so the +/// oracle's own bytes, written by `JSON.stringify` in Node, are first checked against the +/// same value printed compactly: a number this side prints differently from V8 fails here +/// (R5.1b, F1), not silently on both sides of the comparison. pub fn zod_oracle(name: &str) -> (String, String) { - let oracle: Value = - serde_json::from_str(&repo_file(&format!("crates/core/tests/oracles/{name}"))).unwrap(); + let raw = repo_file(&format!("crates/core/tests/oracles/{name}")); + let oracle: Value = serde_json::from_str(&raw).unwrap(); + let reprinted = faunosteo_core::json::to_js_compact(&oracle).unwrap(); + assert!( + raw == format!("{reprinted}\n"), + "{name}: the core does not print the oracle's numbers as V8 wrote them" + ); let source = oracle["source"].as_str().unwrap().to_owned(); let output = faunosteo_core::json::to_js_pretty(&oracle["output"]).unwrap(); (repo_file(&source), output) diff --git a/crates/core/tests/curation/FILES.tsv b/crates/core/tests/curation/FILES.tsv new file mode 100644 index 00000000..e0eda295 --- /dev/null +++ b/crates/core/tests/curation/FILES.tsv @@ -0,0 +1,113 @@ +ts_file disposition counterpart note +packages/anatomy/eslint.config.js deleted - package tooling, deleted with the package +packages/anatomy/package.json deleted - package tooling, deleted with the package +packages/anatomy/src/cli/import-equine.ts replaced crates/core/src/bin/import_equine.rs, scripts/import-equine.sh pnpm import:equine --check | --out ; the TS CLI rewrote the seed folders in place +packages/anatomy/src/curation/app-review.ts ported crates/core/src/curation/draft/app_review.rs - +packages/anatomy/src/curation/apply.ts ported crates/core/src/curation/draft/apply.rs - +packages/anatomy/src/curation/assets.ts replaced crates/core/src/curation/draft/pipeline.rs xmldom cleaning not ported: the frozen draft/assets/horse.svg bytes are read and verified (BDR-068) +packages/anatomy/src/curation/changelog.ts ported crates/core/src/curation/draft/changelog.rs - +packages/anatomy/src/curation/fields.ts ported crates/core/src/curation/draft/fields.rs - +packages/anatomy/src/curation/index.ts ported crates/core/src/curation/draft/mod.rs module index +packages/anatomy/src/curation/labels.ts ported crates/core/src/curation/draft/labels.rs - +packages/anatomy/src/curation/migration-map.ts ported crates/core/src/curation/draft/migration_map.rs cascade-record debt kept on both sides (RUST.md §11.12) +packages/anatomy/src/curation/ops.ts ported crates/core/src/curation/draft/ops.rs - +packages/anatomy/src/curation/overlay.ts ported crates/core/src/curation/draft/overlay.rs, crates/core/src/curation/draft/drawing.rs - +packages/anatomy/src/curation/pipeline.ts ported crates/core/src/curation/draft/pipeline.rs - +packages/anatomy/src/curation/rename.ts ported crates/core/src/curation/draft/rename.rs - +packages/anatomy/src/curation/review-report.ts ported crates/core/src/curation/draft/review_report.rs, crates/core/src/curation/report_guard.rs - +packages/anatomy/src/curation/schema.ts ported crates/core/src/curation/draft/schema.rs, crates/core/src/curation/draft/shape.rs - +packages/anatomy/src/curation/seed.ts ported crates/core/src/curation/draft/seed.rs - +packages/anatomy/src/curation/sources.ts replaced crates/core/src/bin/import_equine.rs file reads moved to the binary; the core takes bytes +packages/anatomy/src/curation/stats.ts ported crates/core/src/curation/draft/stats.rs - +packages/anatomy/src/curation/targets.ts ported crates/core/src/curation/draft/targets.rs - +packages/anatomy/src/curation/types.ts ported crates/core/src/curation/draft/records.rs - +packages/anatomy/src/format.ts replaced crates/core/src/curation/prettier_json.rs, crates/core/src/curation/markdown.rs Prettier 3.8.3 layout reproduced, pinned by oracles/r5/prettier-json.json and markdown-tables.json +packages/anatomy/src/index.ts ported crates/core/src/curation/mod.rs package index +packages/anatomy/src/legacy/annotations.ts ported crates/core/src/curation/legacy/annotations.rs - +packages/anatomy/src/legacy/artifacts.ts ported crates/core/src/curation/legacy/mod.rs render_artifacts +packages/anatomy/src/legacy/authored-labels.ts ported crates/core/src/curation/legacy/authored_labels.rs - +packages/anatomy/src/legacy/catalog-checks.ts ported crates/core/src/curation/legacy/catalog_checks.rs - +packages/anatomy/src/legacy/catalog.ts ported crates/core/src/curation/legacy/catalog.rs - +packages/anatomy/src/legacy/categories.ts ported crates/core/src/curation/legacy/categories.rs - +packages/anatomy/src/legacy/ids.ts ported crates/core/src/curation/ids.rs, crates/core/src/curation/text.rs deterministicUuid, sha256Hex, slugify (oracles/r5/ids.json) +packages/anatomy/src/legacy/importer.ts ported crates/core/src/curation/legacy/importer.rs - +packages/anatomy/src/legacy/index.ts ported crates/core/src/curation/legacy/mod.rs module index +packages/anatomy/src/legacy/regions.ts ported crates/core/src/curation/legacy/regions.rs - +packages/anatomy/src/legacy/report.ts ported crates/core/src/curation/legacy/report.rs - +packages/anatomy/src/legacy/sources.ts replaced crates/core/src/bin/import_equine.rs source paths and reads moved to the binary +packages/anatomy/src/legacy/svg.ts ported crates/core/src/curation/legacy/svg.rs, crates/core/src/anatomy/svg/mod.rs xmldom replaced by the core SVG reader (declared, RUST.md §11.10) +packages/anatomy/src/legacy/types.ts ported crates/core/src/curation/legacy/types.rs - +packages/anatomy/src/legacy/vertebrae.ts ported crates/core/src/curation/legacy/vertebrae.rs - +packages/anatomy/src/markdown.ts ported crates/core/src/curation/markdown.rs - +packages/anatomy/src/render/compose.ts ported crates/core/src/anatomy/compose.rs R3 (oracles/r3) +packages/anatomy/src/render/dom.ts replaced apps/app/src/anatomy/drawing.ts, crates/core/src/anatomy/svg/serialize.rs the core returns SVG text; the app imports it with DOMParser + importNode (R3) +packages/anatomy/src/render/index.ts ported crates/core/src/anatomy/mod.rs module index +packages/anatomy/src/render/layer.ts ported crates/core/src/anatomy/layer.rs R3 (oracles/r3) +packages/anatomy/src/render/serialize.ts ported crates/core/src/anatomy/svg/serialize.rs - +packages/anatomy/tests/curation.apply.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.assets.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.migration-leaves.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.migration-map.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.overlay.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.pipeline.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/curation.schema.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/document.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/fixtures/mini-sheet.ts replaced crates/core/tests/oracles/r5/curation-synthetic.json, crates/core/tests/oracles/r5/review-synthetic.json the mini sheet is recorded as the baseline of the synthetic oracles +packages/anatomy/tests/helpers.ts deleted - test helpers of the TS suites (paths, draft loading) +packages/anatomy/tests/importer.counts.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/importer.guards.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/importer.special-cases.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/legacy.regions.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r3.layer-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.format-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.legacy-synthetic-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.pipeline-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/r5.review-synthetic-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/render.compose.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/render.layer.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tests/seed.golden.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/anatomy/tsconfig.json deleted - package tooling, deleted with the package +packages/anatomy/vitest.config.ts deleted - package tooling, deleted with the package +packages/domain/eslint.config.js deleted - package tooling, deleted with the package +packages/domain/package.json deleted - package tooling, deleted with the package +packages/domain/src/anatomical-sheet/create.ts ported crates/core/src/domain/sheet/create.rs, packages/core-wasm/tests/n-1/domain/anatomical-sheet/create.ts R2; byte-identical frozen N-1 copy kept +packages/domain/src/anatomical-sheet/index.ts ported crates/core/src/domain/sheet/mod.rs, packages/core-wasm/tests/n-1/domain/anatomical-sheet/index.ts module index; N-1 copy kept +packages/domain/src/anatomical-sheet/schema.ts ported crates/core/src/domain/sheet/schema.rs, packages/core-wasm/tests/n-1/domain/anatomical-sheet/schema.ts R2; N-1 copy kept +packages/domain/src/anatomical-sheet/sheet-index.ts ported crates/core/src/domain/sheet/index.rs, crates/core/src/domain/sheet/index_data.rs, packages/core-wasm/tests/n-1/domain/anatomical-sheet/sheet-index.ts R2; N-1 copy kept +packages/domain/src/anatomical-sheet/validate.ts ported crates/core/src/domain/sheet/validate.rs, crates/core/src/domain/sheet/check.rs, packages/core-wasm/tests/n-1/domain/anatomical-sheet/validate.ts R2; N-1 copy kept +packages/domain/src/archive/branding.ts ported crates/core/src/domain/archive/branding.rs, packages/core-wasm/tests/n-1/domain/archive/branding.ts R2; N-1 copy kept +packages/domain/src/archive/envelope.ts ported crates/core/src/domain/archive/envelope.rs, crates/core/src/domain/archive/read.rs, packages/core-wasm/tests/n-1/domain/archive/envelope.ts R2; N-1 copy kept +packages/domain/src/archive/index.ts ported crates/core/src/domain/archive/mod.rs, packages/core-wasm/tests/n-1/domain/archive/index.ts module index; N-1 copy kept +packages/domain/src/archive/labels.ts ported crates/core/src/domain/archive/labels.rs, packages/core-wasm/tests/n-1/domain/archive/labels.ts R2; N-1 copy kept +packages/domain/src/archive/snapshot.ts ported crates/core/src/domain/archive/snapshot.rs, crates/core/src/domain/archive/snapshot_rules.rs, packages/core-wasm/tests/n-1/domain/archive/snapshot.ts R2; N-1 copy kept +packages/domain/src/index.ts ported crates/core/src/domain/mod.rs, packages/core-wasm/tests/n-1/domain/index.ts package index; N-1 copy kept +packages/domain/src/report/identity.ts ported crates/core/src/domain/report/identity.rs, packages/core-wasm/tests/n-1/domain/report/identity.ts R2; N-1 copy kept +packages/domain/src/report/index.ts ported crates/core/src/domain/report/mod.rs, packages/core-wasm/tests/n-1/domain/report/index.ts module index; N-1 copy kept +packages/domain/src/report/migrate.ts ported crates/core/src/domain/report/read.rs, packages/core-wasm/tests/n-1/domain/report/migrate.ts migrate_report_v2_to_v3; N-1 copy kept +packages/domain/src/report/migration-map.ts ported crates/core/src/domain/report/migration_map.rs, packages/core-wasm/tests/n-1/domain/report/migration-map.ts R2; N-1 copy kept +packages/domain/src/report/rebase.ts ported crates/core/src/domain/report/rebase.rs, packages/core-wasm/tests/n-1/domain/report/rebase.ts R2; N-1 copy kept +packages/domain/src/report/v2.ts ported crates/core/src/domain/report/v2.rs, packages/core-wasm/tests/n-1/domain/report/v2.ts R2; N-1 copy kept +packages/domain/src/report/v3.ts ported crates/core/src/domain/report/v3.rs, packages/core-wasm/tests/n-1/domain/report/v3.ts R2; N-1 copy kept +packages/domain/tests/anatomical-sheet.schema.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/anatomical-sheet.validate.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/archive.branding-labels.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/archive.envelope.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/archive.snapshot.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/fixtures/horse-slice.ts replaced crates/core/tests/fixtures/horse-slice.json the slice as Zod parsed it (R2) +packages/domain/tests/fixtures/report-v2.full.json replaced crates/core/tests/fixtures/report-v2.full.json moved by git mv, sha256 e96b0882…729c kept (= apps/app/tests/fixtures copy) +packages/domain/tests/fixtures/report-v2.minimal.json replaced crates/core/tests/fixtures/report-v2.minimal.json moved by git mv, sha256 ba79698c…fde7 kept (= apps/app/tests/fixtures copy) +packages/domain/tests/helpers/draft-sheet.ts replaced crates/core/tests/archive_support/mod.rs draft_sheet, draft_map +packages/domain/tests/helpers/legacy-leaves.ts replaced crates/core/tests/archive_support/mod.rs legacy_leaves, leaves_as_v2_report +packages/domain/tests/r2-characterisation.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/r2-conformance.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/r2-horse-slice.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/r2-oracles.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/report.migrate.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/report.rebase.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/report.schema.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tests/sheet-index.test.ts replaced crates/core/tests/curation/LEDGER.tsv every case: one ledger row +packages/domain/tsconfig.json deleted - package tooling, deleted with the package +packages/domain/vitest.config.ts deleted - package tooling, deleted with the package +packages/supabase/scripts/upload-sheet-assets.ts replaced crates/core/src/bin/upload_sheet_assets/main.rs, crates/core/src/curation/upload.rs, scripts/upload-sheet-assets.sh pnpm assets:upload (R5.5, owner e2e PASS 11/11); assets:upload:legacy removed diff --git a/crates/core/tests/curation/LEDGER.tsv b/crates/core/tests/curation/LEDGER.tsv new file mode 100644 index 00000000..180a7e4a --- /dev/null +++ b/crates/core/tests/curation/LEDGER.tsv @@ -0,0 +1,408 @@ +ts_file case_title contract disposition target oracle note +packages/anatomy/tests/curation.apply.test.ts applyChangeset: set > sets a field and records before / after changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json case set-fields op0 = same input (region:C count_range {6,8}); formatted document bytes and the full records (before null, after) compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: set > creates a missing nested object for a dot path changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json set-fields: flexion description.en and document scope_disclaimer.fr create the missing nested object; document bytes compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: set > applies a subtree set to the target and every descendant changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json subtree-sets op0: same target, value reviewed (TS to_confirm); records list the same 5 targets in the same order +packages/anatomy/tests/curation.apply.test.ts applyChangeset: set > skips items without the field and items already at the value changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json subtree-sets: kind subtree records the category only (nodes lack the field); repeated description subtree records nothing (already at value); TS used requires_vet_referral, same rule +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames a zone and the annotations follow, one record each changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json renames-cascade: zone:hip->hip-joint records (zone:hip,null) then (annotation:hip,finding_zone_id), before item compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames a region code and the vertebral annotations follow changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json renames-cascade: region:C->CE with record annotation:neck vertebral_region_code; document compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames a view: parent links and trigger targets follow changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json renames-cascade: view:head->skull records (view:head,null),(annotation:head-trigger,opens_view_id) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames a main view: parent_view_id and view_id follow changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_draft::the_migration_map_replays_cascade_records_by_their_op_as_the_typescript_does crates/core/tests/oracles/r5/curation-synthetic.json case quirk-view-rename-retargets-annotation = same input (rename view:main): parent_view_id and view_id records and document compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames an annotation category: annotations follow changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json renames-cascade: category:joints->articulations, annotation:hip category_id record and document +packages/anatomy/tests/curation.apply.test.ts applyChangeset: rename > renames a reference: every citation follows changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json case quirk-reference-rename-renames-finding-path = same input (cite atlas then rename reference): last record before [atlas] after [atlas-2] +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds a node at position {"after":"flexion"} changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced crates/core/tests/oracles/r5/curation-synthetic.json, crates/core/tests/oracles/r5/pipeline.json add-remove-move: abduction at {after:flexion}; equine CHG-017 {after:pterygoid-tension} in the frozen records; document order compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds a node at position {"before":"flexion"} changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json add-remove-move: adduction at {before:extension} (TS anchor was the first sibling, same rule) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds a node at position 1 changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced crates/core/tests/oracles/r5/curation-synthetic.json, crates/core/tests/oracles/r5/pipeline.json numeric positions 0 (rotation, equine x3) and 1 (=append into one child); a mid-list index is not exercised as such, same splice +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds a node at position undefined changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json no position appends (deep-flexion, neck-anamnesis, carpus zone); records before null +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds children under a lean leaf changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json add-remove-move op0: deep-flexion added under the lean leaf flexion +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > adds a zone, an annotation and a reference at document level changeset application (ops, positions, review rule, refusals) ported cargo curation_draft::a_reference_added_at_document_level_can_be_cited_by_the_same_change ; cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced crates/core/tests/oracles/r5/curation-synthetic.json, crates/core/tests/oracles/r5/pipeline.json ported at R5.7: level A, the cite of the reference the same change added +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > removes a node and records the whole item changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json add-remove-move removes leaf extension; rehome removes category hip-dysfunctions with children: record before = whole item, after null +packages/anatomy/tests/curation.apply.test.ts applyChangeset: add, remove, move > moves a node into a sibling, then across zones changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json add-remove-move: rotation into sibling flexion, pain across zones before vet, trauma into surgery; records after = new paths (equine has 0 moves) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: cite > cites one item without duplicates changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json cite case: ids deduped inside one op, a cite of a present id writes no record, a new id appended after the existing one (hip/anamnesis), children untouched +packages/anatomy/tests/curation.apply.test.ts applyChangeset: cite > cites a subtree, and a zone stands for its categories changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json cite case: zone:hip stands for its two categories; zone:neck and finding:hip/anamnesis subtree records listed +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"set","target":"zone:nope","field":"name","value":{}}] → unknown target changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-unknown-target = same input; op message compared by equality (CHG-001 op 0: unknown target ...) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"set","target":"finding:hip","field":"name","value":{}}] → malformed target changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-malformed-target = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"set","target":"galaxy:x","field":"name","value":{}}] → unknown target changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-unknown-kind = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"set","target":"zone:hip","field":"colour","value":1}] → unknown field changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-unknown-field = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"set","target":"zone:hip","field":"id","value":"x"}] → unknown field changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-set-id = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"flexion","name":{"fr":"a","en":"a"}}}] → already exists changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-add-existing (value names differ); message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"a","en":"a"}},"position":{"after":"nope"}}] → unknown sibling changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-add-unknown-sibling (value names differ); message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"rename","target":"zone:hip","id":"neck"}] → already exists changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-rename-taken = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["ghost"]}] → undeclared reference changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-cite-undeclared = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > [{"op":"move","target":"finding:hip/hip-dysfunctions/mobility","to":"finding:hip/hip-dysfunctions/mobility/flexion"}] → into itself changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-move-into-itself = same input; message equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > rejects a change citing an undeclared reference changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-change-undeclared = same input; message CHG-001: undeclared reference(s): ghost compared by equality +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > rejects an integrity error left after the ops changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo sheet_rules::annotation_finding_zone_and_region_missing crates/core/tests/oracles/r5/curation-synthetic.json apply-remove-zone-integrity = same input; only the gate prefix is compared, the text Finding zone hip does not exist is not (R2 rule code and path checked by sheet_rules) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: errors fail loud > rejects a shape error left after the ops changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-shape-error = same input; gate prefix curated document is not shape-valid compared +packages/anatomy/tests/curation.apply.test.ts applyChangeset: purity > is deterministic changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::two_runs_emit_the_same_bytes ; cargo curation_review::two_runs_emit_the_same_review_files - determinism held on the equine run (byte-equal artifacts), not on a mini-sheet double run; the core takes no clock or randomness (clippy disallowed_methods) +packages/anatomy/tests/curation.apply.test.ts applyChangeset: purity > never mutates its inputs changeset application (ops, positions, review rule, refusals) deleted - - JS aliasing hazard only: apply_changeset(baseline: &Value, references: &[Reference], changes: &[Change]) (apply.rs:210) cannot mutate its inputs; the not.toBe identity check has no Rust meaning +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > marks a node set by a B change to_confirm, with a record changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json review-rule-b: set name at level B then record (mobility review_status inherited->to_confirm, change CHG-001) compared in full +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > marks every node of an added subtree changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json review-rule-b: added new and new/child marked, a child already to_confirm skipped +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > marks cited targets under a C change changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json two-changes: level C CHG-0011 cite zone:cervical marks finding:cervical/neck-dysfunctions; review-rule-b marks cited subtree +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > marks an annotation set by a B change changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json review-rule-b: set annotation:neck name.en -> annotation:neck review_status record +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > leaves a level A change untouched changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json every level A case (set-fields, js-index-key-in-value-overwritten on mobility name) has no marking record +packages/anatomy/tests/curation.apply.test.ts applyChangeset: review rule of levels B and C > throws when a B change sets review_status to reviewed changeset application (ops, positions, review rule, refusals) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json apply-b-sets-reviewed = same input; full message equality +packages/anatomy/tests/curation.assets.test.ts stripLegacyAnnotations on the real Horse.svg > removes exactly the elements carrying data-anno-id draft drawing asset (frozen horse.svg, view box) replaced cargo svg_sanitiser::the_product_svgs_come_out_untouched ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte crates/core/tests/oracles/r3/sanitiser.json, supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg stripLegacyAnnotations not ported: cleaned horse.svg kept as frozen TS bytes (BDR-068, RUST.md 11.11-11.12); pinned by its parsed tree and sha256/size; the removed-element count is not re-asserted +packages/anatomy/tests/curation.assets.test.ts stripLegacyAnnotations on the real Horse.svg > keeps the 270 drawing paths and every non-annotation byte draft drawing asset (frozen horse.svg, view box) replaced cargo svg_sanitiser::the_product_svgs_come_out_untouched ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte crates/core/tests/oracles/r3/sanitiser.json, supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg 270 paths, no data-anno-, XML declaration, no max-width: properties of the frozen file pinned by the sanitiser legitimate tree and sha256, not re-asserted one by one +packages/anatomy/tests/curation.assets.test.ts stripLegacyAnnotations on the real Horse.svg > is deterministic and parses as XML draft drawing asset (frozen horse.svg, view box) replaced cargo svg_sanitiser::the_product_svgs_come_out_untouched crates/core/tests/oracles/r3/sanitiser.json the core reader reads the frozen horse.svg with nothing removed and the frozen tree; determinism of a cleaning step is moot (no cleaning in Rust) +packages/anatomy/tests/curation.assets.test.ts stripLegacyAnnotations on the real Horse.svg > describes the cleaned bytes with their sha256 draft drawing asset (frozen horse.svg, view box) ported cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced ; cargo curation_format::slugs_and_uuids_match_the_typescript crates/core/tests/oracles/r5/pipeline.json, crates/core/tests/oracles/r5/ids.json sha256 and byte_size of the frozen horse.svg asserted inline; file and svg_asset_id via draft.assets == frozen record; asset uuid row in ids.json +packages/anatomy/tests/curation.assets.test.ts stripLegacyAnnotations on the real Horse.svg > reads a viewBox into a document view_box draft drawing asset (frozen horse.svg, view box) ported cargo curation_draft::a_view_box_of_four_numbers_is_read_and_three_are_refused ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte supabase/seed/anatomical-sheets/equine/draft/document.json ported at R5.7: four numbers read, three refused +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > migrates the 612 leaves: 442 identical, 141 moved, 29 removed the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::migrates_the_612_leaves_442_identical_141_moved_29_removed ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured ; vitest apps/app/tests/unit/migration.leaves.test.ts > the 612 legacy leaves in the application > resolves every migrated leaf to a leaf node of the bundled sheet supabase/seed/anatomical-sheets/equine/legacy-import/document.json ported at R5.7: on the committed map; 612 leaves, 612 findings, (442,141,29) asserted inline on the map Rust produces (byte-equal to the committed one); app asserts 612 and 29 unresolved +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > lands every resolved leaf on a leaf of the draft document the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::lands_every_resolved_leaf_on_a_leaf_of_the_draft_document ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured ; vitest apps/app/tests/unit/migration.leaves.test.ts > the 612 legacy leaves in the application > resolves every migrated leaf to a leaf node of the bundled sheet ; cargo report_rules::the_612_legacy_leaves_migrate_through_the_draft_map supabase/seed/anatomical-sheets/equine/legacy-import/document.json ported at R5.7; node_is_leaf == Some(true) on the produced document; app: leaf node of the bundled sheet; report_rules: node exists (not leafness) +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > keeps the legacy snapshots and the vet flag verbatim on every finding the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::keeps_the_legacy_snapshots_and_the_vet_flag_verbatim_on_every_finding ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured ; cargo report_rules::the_612_legacy_leaves_migrate_through_the_draft_map supabase/seed/anatomical-sheets/equine/legacy-import/document.json ported at R5.7: FR, EN and vet per finding +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > flags exactly the leaves the curation removed, with their legacy path kept the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::flags_exactly_the_leaves_the_curation_removed_with_their_legacy_path_kept ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured supabase/seed/anatomical-sheets/equine/legacy-import/document.json ported at R5.7; flagged paths == the leaves the map sends to null (same order), each absent from the document, 29 by the fate count +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > moves the 141 relocated leaves inside their zone: 134 under a renamed category, 7 renamed leaves the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::moves_the_141_relocated_leaves_inside_their_zone_134_category_7_leaf ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured supabase/seed/anatomical-sheets/equine/legacy-import/document.json ported at R5.7: 134 / 7 +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy leaf through the v2 → v3 migration > reads the migrated report back unchanged (v3 is stable) the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::reads_the_migrated_report_back_unchanged ; cargo report_rules::read_report_document_returns_v3_as_is_and_migrates_v2 ; cargo archive_rules::envelope_reads_a_bare_v3_as_is ; vitest apps/app/tests/unit/migration.leaves.test.ts > the 612 legacy leaves in the application > keeps every finding, resolved or not, through an archive PDF export and import - ported at R5.7; v3 read as is on fixtures (counters 0); the 612-leaf v3 report survives export/import equal with its 29 flags; a bare re-read of that v3 with 0/0 counters is not asserted +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy annotation as a report zone > maps the 26 observable legacy ids to annotations of the right view, names snapshotted the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::maps_the_26_observable_legacy_ids_to_annotations_of_the_right_view ; cargo report_rules::migrate_maps_legacy_ids_views_and_snapshots_the_legacy_names - ported at R5.7 +packages/anatomy/tests/curation.migration-leaves.test.ts every legacy annotation as a report zone > keeps vertebrae on the spine zones with region codes the draft defines the 612 legacy leaves and 27 annotations through the migration ported cargo curation_leaves::keeps_vertebrae_on_the_spine_zones_with_region_codes_the_draft_defines ; cargo report_rules::migrate_maps_legacy_ids_views_and_snapshots_the_legacy_names ; cargo sheet_rules::the_curated_draft_validates_with_no_issue ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte supabase/seed/anatomical-sheets/equine/draft/document.json ported at R5.7; vertebrae kept on the cervical zone (fixture, hand map); every region code defined enforced by the R2 region rule on the committed draft; 5 spine annotations in the byte-exact document +packages/anatomy/tests/curation.migration-map.test.ts report migration map on the real draft > is a valid map covering every legacy node, with the expected fates report migration map (fates, renames, re-homing) replaced cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo report_contract::the_v2_fixtures_and_the_migration_map_parse crates/core/tests/oracles/r5/pipeline.json, supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json migrationStats 792/571/180/7/34 vs the frozen run; map byte-exact (792 paths); strict parse of the committed map +packages/anatomy/tests/curation.migration-map.test.ts report migration map on the real draft > maps every legacy annotation with its legacy labels and the views report migration map (fates, renames, re-homing) replaced cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json, supabase/seed/anatomical-sheets/equine/legacy-import/legacy-id-map.json 27 annotations, point-mpbwtst0 and zone-mpby55kd entries, views, main_view_id frozen in the byte-exact map; legacy id map byte-exact +packages/anatomy/tests/curation.migration-map.test.ts report migration map on the real draft > every target path exists in the draft; identical, renamed, re-homed and removed cases report migration map (fates, renames, re-homing) replaced cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json the 6 named targets frozen in the byte-exact map; every non-null target exists by construction (migration_map.rs:270-280), asserted for the 612 leaves; no Rust walk of all 792 targets +packages/anatomy/tests/curation.migration-map.test.ts report migration map replay on a synthetic changeset > follows a rename, a move and a removal, and a renamed annotation report migration map (fates, renames, re-homing) ported cargo curation_draft::the_map_follows_a_rename_then_a_move_through_the_renamed_path ; cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json ported at R5.7: move through a just-renamed path +packages/anatomy/tests/curation.migration-map.test.ts report migration map replay on a synthetic changeset > re-homes a node whose category was replaced by another one holding the same path report migration map (fates, renames, re-homing) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json case rehome = TS input plus an annotation rename: mobility/flexion -> hip-new/mobility/flexion, extension and hip-dysfunctions null, rehomed 2 +packages/anatomy/tests/curation.overlay.test.ts review overlay > marks moved annotations with their previous position review overlays (moved, removed, added markers) replaced cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared ; cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced crates/core/tests/oracles/r5/review-synthetic.json, supabase/seed/anatomical-sheets/equine/draft/review/annotations-main.svg every-section overlay (byte-exact): hip moved + its previous position removed, neck added; equine overlays 5 moved / 5 removed; the marker list itself is not asserted +packages/anatomy/tests/curation.overlay.test.ts review overlay > reports an annotation dropped by the changeset review overlays (moved, removed, added markers) ported cargo curation_review::an_annotation_dropped_by_the_changeset_is_drawn_as_removed ; cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared crates/core/tests/oracles/r5/review-synthetic.json ported at R5.7 +packages/anatomy/tests/curation.overlay.test.ts review overlay > renders a framed SVG with one group per marker and a legend review overlays (moved, removed, added markers) replaced cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared crates/core/tests/oracles/r5/review-synthetic.json every-section main overlay byte-exact: root without width, groups moved/removed/added, stroke-dasharray, legend inchange, the drawing kept +packages/anatomy/tests/curation.overlay.test.ts review overlay > frames a detail view on its view box review overlays (moved, removed, added markers) replaced cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared ; cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced crates/core/tests/oracles/r5/review-synthetic.json, supabase/seed/anatomical-sheets/equine/draft/review/annotations-head.svg detail-view-and-path head overlay framed on 2.5 1 40 30; equine head overlay on 60 100 500 380, both byte-exact +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > validates with zero integrity error equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) ported cargo sheet_rules::the_curated_draft_validates_with_no_issue ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced supabase/seed/anatomical-sheets/equine/draft/document.json, crates/core/tests/oracles/r5/pipeline.json validate == [] asserted on the committed draft; build refuses integrity errors; issues [] and sheetId vs frozen (legacy and draft sheetId equal there) +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > carries one drawing and the curated content equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) replaced cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced ; cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte crates/core/tests/oracles/r5/pipeline.json, supabase/seed/anatomical-sheets/equine/draft/document.json assets 2->1, nodes 811, descriptionsFrOnly 0 in frozen statsBefore/After; main asset id, head view_box, Cd 15-21, carpus annotation and zone in the byte-exact document +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > lists CHG-000 and the Cd range change in the CHANGELOG equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) replaced cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced supabase/seed/anatomical-sheets/equine/draft/CHANGELOG.md CHANGELOG byte-exact holds the comparison heading, the CHG-000 view:head.view_box row and the region:Cd.count_range row +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > writes the ten review sections in order equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) replaced cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared supabase/seed/anatomical-sheets/equine/draft/REVIEW-REPORT.md, crates/core/tests/oracles/r5/review-synthetic.json REVIEW-REPORT byte-exact holds the ten headings in order; synthetic every-section too +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > seeds a converging draft and never publishes equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) replaced cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike supabase/seed/anatomical-sheets/equine/draft/equine_draft.sql, crates/core/tests/oracles/r5/curation-synthetic.json equine_draft.sql byte-exact (insert_sheet_draft, converging update to status draft, no publish_sheet_version); synthetic seed SQL compared per accepted case +packages/anatomy/tests/curation.pipeline.test.ts equine working draft (real sources + committed curation) > refuses a changeset that reuses the reserved CHG-000 equine working draft (CHG-000, CHANGELOG, REVIEW-REPORT, seed SQL) ported cargo curation_draft::a_changeset_reusing_the_reserved_asset_change_id_is_refused - ported at R5.7 +packages/anatomy/tests/curation.schema.test.ts curation schemas > parse the committed curation files changeset and references schema replaced cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced ; cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; cargo curation_caps::committed_files_keep_a_wide_margin_under_the_cap supabase/seed/anatomical-sheets/equine/curation/changes.json, crates/core/tests/oracles/r5/pipeline.json committed files parsed by every equine test; unique ids, C question, cited ids declared are enforced by parse/apply; id order and legacy-catalog presence only frozen (46 summaries, bibliography), not invariant checks +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects an unknown op changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-unknown-op (swap, TS test replace): refused at parse with the changes.json prefix +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects a level C change without question changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-level-c-without-question refused at parse +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects a bad change id changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-bad-id (CHG-12, TS test CHANGE-1) refused at parse +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects a change without ops changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-empty-ops refused at parse +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects an unknown key changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-unknown-change-key (extra, TS test needs_confirmation) refused at parse +packages/anatomy/tests/curation.schema.test.ts curation schemas > accepts a level C change with its question changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared crates/core/tests/oracles/r5/curation-synthetic.json, crates/core/tests/oracles/r5/review-synthetic.json level C with question accepted: review-rule-c (low), two-changes, review every-section CHG-0011 (high) +packages/anatomy/tests/curation.schema.test.ts curation schemas > rejects duplicate change ids and duplicate reference ids changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json schema-duplicate-change-ids and reference case references-duplicate-id refused +packages/anatomy/tests/curation.schema.test.ts curation schemas > derives needs_confirmation from the level changeset and references schema replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/curation-synthetic.json needs_confirmation (schema.rs:34) drives the marking: B and C cases marked, A cases not; no direct unit test of the three levels +packages/anatomy/tests/document.test.ts equine document > parses and validates with no error and no warning legacy import document validity replaced cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run ; cargo sheet_contract::the_legacy_import_baseline_prints_as_zod_outputs_it crates/core/tests/oracles/r5/pipeline.json, supabase/seed/anatomical-sheets/equine/legacy-import/document.json importer issues = validate_sheet_document of the document (importer.rs:358) compared to the frozen empty list; Zod-oracle parse of the committed baseline +packages/anatomy/tests/document.test.ts equine document > is deterministic: same result and same bytes on two runs legacy import document validity ported cargo curation_legacy::two_runs_emit_the_same_bytes - two runs, rendered files equal; whole-result equality replaced by the frozen intermediate values +packages/anatomy/tests/importer.counts.test.ts equine import volumes > imports 27 annotations, 26 linked to a finding zone legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json 27 annotations, 26 linked: frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > has two views and one trigger opening head from main legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json views main/head, one trigger main->head: frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > codes exactly the five zone-colonne polygons with C, T, L, S, Cd legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json five zone-colonne zones coded C T L S Cd: frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > counts 9 bilateral annotations legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json 9 bilateral: frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > writes 792 nodes, 612 leaves, 41 vet referrals in the document legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; cargo report_rules::the_612_legacy_leaves_migrate_through_the_draft_map ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json 792 nodes / 612 leaves / 41 vet in the document (report_rules also asserts 612 and 41): frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > reports the input side from the sources: 27 ids, 26 zones, 792/612/41 legacy catalog conversion (counts) replaced cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run crates/core/tests/oracles/r5/pipeline.json stats (legacyAnnotations 27, findingZones 26, nodes 792, leaves 612, vetReferrals 41) compared whole with the frozen run +packages/anatomy/tests/importer.counts.test.ts equine import volumes > maps every data-anno-id of both SVGs legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/legacy-id-map.json every data-anno-id of both SVGs mapped (legacy-id-map byte-exact; legacy sources never change): frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.counts.test.ts equine import volumes > places the nine head annotations in view head legacy catalog conversion (counts) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json nine head annotations in view head: frozen in the byte-exact committed legacy import, not re-asserted as numbers +packages/anatomy/tests/importer.guards.test.ts importer guards > throws when a zone loses a vet referral importer guards (nothing dropped, seed dollar tag) replaced cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/legacy-synthetic.json case truthy-referral (TS: zone hip: vetReferrals 1 in, 0 out) refused; Rust checks is_err only, the reason is not compared; equal counts pass on every accepted import +packages/anatomy/tests/importer.guards.test.ts importer guards > copies FR into EN when data-anno-name-en is absent, and says so importer guards (nothing dropped, seed dollar tag) replaced cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/legacy-synthetic.json generic case: h1 and p2 without name-en get en = fr in document.json and anomaly annotation.name_en.missing a_valider in parts.anomalies, both compared +packages/anatomy/tests/importer.guards.test.ts importer guards > refuses a document that contains the dollar-quote tag importer guards (nothing dropped, seed dollar tag) ported cargo curation_draft::a_document_holding_the_dollar_quote_tag_is_refused_by_the_seed - ported at R5.7 +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > turns vertebral-precision into a region code legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json lumbar L and caudal Cd zones: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > makes data-anno-lateral explicit legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json explicit laterality (hip bilateral, c7-t1 unpaired): frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > imports the trigger without name and without finding zone legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json trigger with name null and no finding_zone_id: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > keeps ssb-dysfunctions under sphenoid and names it in the report legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run supabase/seed/anatomical-sheets/equine/legacy-import/document.json, supabase/seed/anatomical-sheets/equine/legacy-import/IMPORT-REPORT.md ssb-dysfunctions under sphenoid in the byte-exact document; IMPORT-REPORT byte-exact holds sphenoid/ssb-dysfunctions and sphenoid-dysfunctions attendu; anomalies frozen +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > keeps the anamnesis category in all zones with its three variants legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json anamnesis in 26 zones, 3 variants, id trees equal to the frozen catalog: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > writes no en key where description_en is absent legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json description without en key: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > maps category kinds from their ids legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json category kinds of hip: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > preserves node ids at every level of every zone legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json node ids preserved against the frozen catalog: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts equine import special cases > writes the lean form: no default keys on plain leaves legacy catalog conversion (special cases) replaced cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json lean form of plain leaves: frozen in the byte-exact committed document (sources never change), not re-asserted +packages/anatomy/tests/importer.special-cases.test.ts importer-authored labels > declares every label written without a source legacy catalog conversion (special cases) replaced cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run crates/core/tests/oracles/r5/pipeline.json the nine label.authored a_valider subjects are part of the frozen anomaly list compared in order +packages/anatomy/tests/legacy.regions.test.ts inferRegionCode > matches FR roots, with and without accents spine region inference from legacy labels ported cargo curation_format::region_inference_follows_the_typescript ; cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run ; cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/js-semantics.json ported at R5.7 +packages/anatomy/tests/legacy.regions.test.ts inferRegionCode > matches EN roots when the FR label is absent spine region inference from legacy labels ported cargo curation_format::region_inference_follows_the_typescript crates/core/tests/oracles/r5/js-semantics.json ported at R5.7 +packages/anatomy/tests/legacy.regions.test.ts inferRegionCode > returns null when no root matches spine region inference from legacy labels replaced cargo curation_format::region_inference_follows_the_typescript ; cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/legacy-synthetic.json p1 Colonne -> code null, root null and anomaly annotation.region.unknown; empty and null labels not exercised (js-semantics rows unread) +packages/anatomy/tests/legacy.regions.test.ts inferRegionCode > reports the matched root and label, FR before EN spine region inference from legacy labels ported cargo curation_format::region_inference_follows_the_typescript ; cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run ; cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/js-semantics.json ported at R5.7: FR before EN, EN fallback +packages/anatomy/tests/r3.layer-oracles.test.ts R3 layer oracles (TypeScript freeze) > matches the frozen layer trees annotation layer rendering (R3 oracle) replaced cargo anatomy_layer::every_frozen_layer_is_reproduced_with_its_attribute_order ; cargo anatomy_layer::an_unknown_view_is_refused ; cargo anatomy_layer::an_unnamed_trigger_names_the_opened_view_in_each_language_and_a_named_one_keeps_its_names crates/core/tests/oracles/r3/layer.json generator (MAKE_R3_ORACLES); its 8 cases are read whole with attribute order by anatomy_layer, trigger names under the declared R3 rule +packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts R5.3 synthetic curation oracle > curation-synthetic.json changeset applier on synthetic cases (R5.3 oracle) replaced cargo curation_draft::the_synthetic_cases_match_the_typescript_or_are_refused_alike ; cargo curation_draft::an_inherited_member_name_is_a_plain_key_and_bypasses_nothing ; cargo curation_draft::the_migration_map_replays_cascade_records_by_their_op_as_the_typescript_does crates/core/tests/oracles/r5/curation-synthetic.json generator; 82 cases and 7 reference files read (14 compared, 67 refused alike, 1 declared accept, counts asserted) +packages/anatomy/tests/r5.format-oracles.test.ts R5.2 format and semantics oracles > prettier-json.json Prettier layout and JavaScript semantics (R5.2 oracle) replaced cargo curation_format::json_layout_matches_prettier_on_every_probe crates/core/tests/oracles/r5/prettier-json.json generator; every probe read, case 19 (emoji) the declared refusal +packages/anatomy/tests/r5.format-oracles.test.ts R5.2 format and semantics oracles > markdown-tables.json Prettier layout and JavaScript semantics (R5.2 oracle) replaced cargo curation_format::tables_align_as_prettier_aligns_them crates/core/tests/oracles/r5/markdown-tables.json generator; 10 tables read, case 5 (emoji) the declared refusal +packages/anatomy/tests/r5.format-oracles.test.ts R5.2 format and semantics oracles > js-semantics.json Prettier layout and JavaScript semantics (R5.2 oracle) replaced cargo curation_format::region_inference_follows_the_typescript ; cargo curation_format::slugs_and_uuids_match_the_typescript ; cargo curation_format::number_points_round_and_trim_follow_javascript ; cargo curation_format::object_keys_follow_javascript_order crates/core/tests/oracles/r5/js-semantics.json every section read since R5.7 (inferRegionCode added) +packages/anatomy/tests/r5.legacy-synthetic-oracles.test.ts R5.2 synthetic importer oracle > legacy-synthetic.json legacy importer on synthetic sources (R5.2 oracle) replaced cargo curation_legacy::the_synthetic_cases_match_the_typescript_or_are_refused_alike crates/core/tests/oracles/r5/legacy-synthetic.json generator; 2 accepted cases compared on files and parts; the 8 refusals checked as is_err only, reasons not compared +packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts R5.4 Markdown sweep oracle > markdown-sweep.json Markdown report guard (R5.4 oracle) replaced cargo curation_markdown::every_probe_is_formatted_as_the_typescript_or_refused crates/core/tests/oracles/r5/markdown-sweep.json generator; 798 probes read (raw digests, then same text or UnsupportedMarkdown) +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > the RFC 8785 canonicaliser passes the RFC vectors R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger replaced cargo sheet_fingerprint::the_rfc_8785_vectors_are_reproduced crates/core/tests/oracles/r5/fingerprints.json the same two RFC 8785 vectors, frozen in fingerprints.json, run through the core canonicaliser; the TS canonicaliser was test-local +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > pipeline.json: intermediate values and the artifact ledger R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger replaced cargo curation_legacy::the_intermediate_values_match_the_frozen_typescript_run ; cargo curation_draft::the_draft_section_of_the_frozen_run_is_reproduced ; cargo curation_draft::every_ledger_row_of_the_r5_1_run_is_the_committed_file ; cargo curation_legacy::the_raw_report_is_the_text_prettier_received ; cargo curation_draft::the_pre_switch_copies_are_the_files_the_typescript_wrote ; cargo curation_review::the_raw_reports_are_the_texts_prettier_received crates/core/tests/oracles/r5/pipeline.json generator; legacy and draft sections read whole; the ledger read in part (row 117) +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > ids.json: deterministic uuids and slugs R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger replaced cargo curation_format::slugs_and_uuids_match_the_typescript crates/core/tests/oracles/r5/ids.json generator; every uuid and slug row read +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > fingerprints.json: the D-R5 matrix and the number printing R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger replaced cargo sheet_fingerprint::the_rfc_8785_vectors_are_reproduced ; cargo sheet_fingerprint::the_draft_gives_the_frozen_validated_value crates/core/tests/oracles/r5/fingerprints.json generator; Rust reads the RFC vectors and the draft/document.json row only; the D-R5 matrix of the other artifacts and the 65-number list are decided study data (BDR-068), printing held by numbers.json +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > the ledger digests are the committed files (the golden folders) R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger replaced cargo curation_draft::every_ledger_row_of_the_r5_1_run_is_the_committed_file ; cargo curation_draft::the_pre_switch_copies_are_the_files_the_typescript_wrote ; cargo curation_review::the_raw_reports_are_the_texts_prettier_received ; cargo curation_legacy::the_raw_report_is_the_text_prettier_received ; cargo sheet_fingerprint::the_draft_gives_the_frozen_validated_value crates/core/tests/oracles/r5/pipeline.json ported at R5.7: the 16 rows, pre-switch substitution +packages/anatomy/tests/r5.pipeline-oracles.test.ts R5.1 oracles (crates/core/tests/oracles/r5) > two runs emit the same bytes for every artifact R5.1 freeze: intermediate values, ids, fingerprints, artifact ledger ported cargo curation_legacy::two_runs_emit_the_same_bytes ; cargo curation_draft::two_runs_emit_the_same_bytes ; cargo curation_review::two_runs_emit_the_same_review_files - both folders rendered twice and compared; cleanedSvg equality moot (frozen bytes read) +packages/anatomy/tests/r5.review-synthetic-oracles.test.ts R5.4 synthetic review oracle > review-synthetic.json review files on synthetic cases (R5.4 oracle) replaced cargo curation_review::the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared ; cargo curation_review::a_label_the_drawing_cannot_carry_is_refused ; cargo curation_review::ids_and_field_segments_that_could_forge_report_structure_are_refused crates/core/tests/oracles/r5/review-synthetic.json generator; its 4 cases read (raw and aligned reports, overlays bytes, app drawings bytes or declared rule) +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > keeps both elements of a selected point and the selected spine zone, haloed on the main view view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json hip (demo obs-demo-2) and cervical (obs-demo-3) haloed on main: circles r34/r22, polygon, #b85a3f, url(#osteo-halo), viewBox 0 0 2073.4 1629.4, no width/height; separate observations in the oracle +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > creates as the first child of an asset without one and fills it with the halo filter view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json main cases carry the defs with the halo filter before the asset children; edge asset with nested defs gets the filter appended there; tree equality (filter attribute order not compared) +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > never duplicates the filter on a root that already holds it view composition and highlight (SVG rendering) ported cargo anatomy_compose::the_halo_filter_is_never_duplicated_on_a_root_that_holds_it - ported at R5.7: compose of a root already holding the filter +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > frames the head view on its view box without any halo view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json head cases (atm, frontal, occipital; TS used parietal): viewBox 60 100 500 380, no defs, #b85a3f circles without filter +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > leaves an empty layer when nothing is selected view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json v2unresolved observations and edge-4 (no zones): empty layer +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > keeps the of every kept marker and emits no data attribute view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json titles are text nodes of the frozen trees, compared; no data-* attribute in any highlighted layer +packages/anatomy/tests/render.compose.test.ts composeViewSvg with a highlight > refuses an unknown view view composition and highlight (SVG rendering) replaced cargo anatomy_layer::an_unknown_view_is_refused ; cargo anatomy_canvas_op::closed_kinds_for_an_unknown_view_a_rejected_or_altered_drawing_and_bad_input - unknown view refused by render_layer and by view.canvas (unknown_view); compose_highlight's own UnknownView branch (compose.rs:90) has no direct test +packages/anatomy/tests/render.compose.test.ts highlightLayer on the layer tree > filters, restyles and strips data attributes without touching the input view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_highlighted_view_equals_the_engine_tree crates/core/tests/oracles/r3/highlight.json restyle (fill, fill-opacity, stroke-width kept), no filter when halo off, data-* stripped: all in the trees; highlight_layer takes the layer by value, so input untouched by construction +packages/anatomy/tests/render.compose.test.ts composeViewSvg without a highlight (review drawings) > renderAppReviewDrawing(main) equals the committed review drawing view composition and highlight (SVG rendering) replaced cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; cargo curation_review::app_main_differs_only_by_the_r3_trigger_names ; import-equine --check supabase/seed/anatomical-sheets/equine/draft/review/app-main.svg declared R3 difference (trigger EN name and title, RUST.md 11.14): tree equality after the rule, the difference measured to the byte; TS asserted byte equality +packages/anatomy/tests/render.compose.test.ts composeViewSvg without a highlight (review drawings) > renderAppReviewDrawing(head) equals the committed review drawing view composition and highlight (SVG rendering) ported cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; import-equine --check supabase/seed/anatomical-sheets/equine/draft/review/app-head.svg app-head.svg byte for byte (Match::Bytes) +packages/anatomy/tests/render.compose.test.ts composeViewSvg without a highlight (review drawings) > keeps the full interactive layer with its data attributes view composition and highlight (SVG rendering) replaced cargo anatomy_compose::every_canvas_equals_the_frozen_tree_and_every_state_set_its_layer ; cargo anatomy_canvas_op::each_view_answers_the_frozen_canvas ; vitest apps/app/tests/unit/canvas.trees.test.tsx > the main canvas > builds the frozen tree with no state apps/app/tests/fixtures/goldens/r3/canvas.main.json the canvas (compose_canvas) keeps the full layer with its data attributes and no defs, equal to the frozen R3 canvas golden +packages/anatomy/tests/render.layer.test.ts annotation layer on the real draft > draws every annotation of the main view as the legacy pair, zone or trigger annotation layer rendering replaced cargo anatomy_layer::every_frozen_layer_is_reproduced_with_its_attribute_order ; cargo anatomy_layer::an_unnamed_trigger_names_the_opened_view_in_each_language_and_a_named_one_keeps_its_names crates/core/tests/oracles/r3/layer.json draft/main/no-state case: hip pair attrs (34 transparent, 22 #ff9500 0.65 stroke), title, cervical polygon, trigger attrs, attribute order; draft = oracles/sheet.draft.json +packages/anatomy/tests/render.layer.test.ts annotation layer on the real draft > uses the detail style, the annotation colour override and the view box on the head view annotation layer rendering replaced cargo anatomy_layer::every_frozen_layer_is_reproduced_with_its_attribute_order crates/core/tests/oracles/r3/layer.json draft/head case: c0-c1 27/15 #ff0000 0.5, atm/hyoid/parietal colours, no hip +packages/anatomy/tests/render.layer.test.ts annotation layer on the real draft > applies states as data-state on both elements of a point annotation layer rendering replaced cargo anatomy_layer::every_frozen_layer_is_reproduced_with_its_attribute_order ; cargo anatomy_compose::every_canvas_equals_the_frozen_tree_and_every_state_set_its_layer crates/core/tests/oracles/r3/layer.json, apps/app/tests/fixtures/goldens/r3/canvas.main.layers.json state case (hip, cervical, head-trigger, atm) data-state on both point elements, none elsewhere +packages/anatomy/tests/render.layer.test.ts annotation layer on the real draft > materialises through a DOM and serialises to the same markup annotation layer rendering replaced cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; vitest apps/app/tests/unit/canvas.trees.test.tsx > the head canvas > builds the frozen tree with no state supabase/seed/anatomical-sheets/equine/draft/review/app-head.svg DOM materialisation moved to the app (buildViewSvg, R3); serialised group, title Appareil hyoidien / Hyoid apparatus, 18 circles, no script held by the byte-exact app-head.svg; createLayerElement and serializeLayer were TS-only +packages/anatomy/tests/render.layer.test.ts annotation layer edge cases > skips annotations without geometry and falls back to grey without any colour annotation layer rendering replaced cargo anatomy_layer::every_frozen_layer_is_reproduced_with_its_attribute_order ; cargo anatomy_layer::an_unknown_view_is_refused crates/core/tests/oracles/r3/layer.json edge document: neck and head-trigger without geometry absent, #888888 for colourless bones and missing category; unknown view refused (is_err, message not compared) +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > document.json equals a fresh run (rerun pnpm import:equine) generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/document.json document.json of a fresh run equals the committed file byte for byte +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > legacy-id-map.json equals a fresh run (rerun pnpm import:equine) generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/legacy-id-map.json legacy-id-map.json of a fresh run equals the committed file byte for byte +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > assets.json equals a fresh run (rerun pnpm import:equine) generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/assets.json assets.json of a fresh run equals the committed file byte for byte +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > IMPORT-REPORT.md equals a fresh run (rerun pnpm import:equine) generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/IMPORT-REPORT.md IMPORT-REPORT.md of a fresh run equals the committed file byte for byte +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > carries no SQL: the draft folder holds the only seed generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/ the rendered name list is exactly the four non-SQL files; --check flags any extra file +packages/anatomy/tests/seed.golden.test.ts committed legacy-import folder (golden) > copies the SVG assets byte for byte with the recorded sha256 generated seed folders byte for byte (seed SQL included) ported cargo curation_legacy::the_committed_legacy_import_folder_is_reproduced_byte_for_byte ; import-equine --check supabase/seed/anatomical-sheets/equine/legacy-import/assets/ each copy equals its source and its recorded sha256; byte_size held by assets.json byte equality +packages/anatomy/tests/seed.golden.test.ts committed draft folder (golden) > equals a fresh run for every produced file (the two fingerprinted ones before R5.6) generated seed folders byte for byte (seed SQL included) replaced cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte ; cargo curation_review::the_review_files_of_the_committed_draft_are_reproduced ; cargo curation_draft::the_switch_changes_only_the_fingerprint_of_the_two_files ; cargo curation_draft::the_pre_switch_copies_are_the_files_the_typescript_wrote ; import-equine --check supabase/seed/anatomical-sheets/equine/draft/, crates/core/tests/fixtures/r5-6/pre-switch/ Rust output vs the committed (switched) draft; pre-switch files = ledger and = committed under rule R5.6-fingerprint-v1; app-main.svg under the R3 rule +packages/anatomy/tests/seed.golden.test.ts committed draft folder (golden) > holds no file the run does not produce generated seed folders byte for byte (seed SQL included) replaced cargo curation_draft::the_generated_folders_hold_exactly_the_files_the_pipeline_writes ; import-equine --check supabase/seed/anatomical-sheets/equine/draft/ listing of not-produced files (import_equine.rs:258-265) runs only in the manual --check; no cargo test or gate (rust:check, check:all) lists the committed draft folder +packages/anatomy/tests/seed.golden.test.ts committed draft folder (golden) > holds the cleaned drawing with the recorded sha256 generated seed folders byte for byte (seed SQL included) ported cargo curation_draft::the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg sha256 and byte length of the frozen horse.svg equal the recorded asset; cleanedSvg string equality moot +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > accepts the horse slice fixture sheet document shape (anatomical model validation) ported cargo sheet_shape::accepts_the_horse_slice_and_its_own_output - parses the lean input of crates/core/tests/fixtures/horse-slice.json (frozen JSON of horseSliceInput) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > accepts a parsed document again (output is valid input) sheet document shape (anatomical model validation) ported cargo sheet_shape::accepts_the_horse_slice_and_its_own_output - parsed document serialised then reparsed equal (sheet_shape.rs:59-62) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects an unknown top-level key sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects an unknown nested key sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a stable id with spaces sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a stable id with an accent sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects an empty stable id sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects schema_version 1 sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a non-uuid svg_asset_id sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a polygon with 2 points sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a circle with r 0 sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a region count of 0 sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a missing en label sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a detail view without parent_view_id sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a detail_trigger with finding_zone_id sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a javascript: reference url sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a reference type foo sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a review_status foo sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a count_range with min 0 sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts AnatomicalSheetDocumentSchema > rejects a finding category kind foo sheet document shape (anatomical model validation) ported cargo sheet_shape::refuses_what_zod_refuses - same mutation and refusal in the Rust table (sheet_shape.rs:70-247) +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > accepts hip sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern - accept loop sheet_shape.rs:252-254; is_stable_id is the deserializer check (sheet/schema.rs:42) +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > accepts c7-t1 sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern - accept loop sheet_shape.rs:252-254; is_stable_id is the deserializer check (sheet/schema.rs:42) +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > accepts view_main sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern - accept loop sheet_shape.rs:252-254; is_stable_id is the deserializer check (sheet/schema.rs:42) +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > accepts 0 sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern - accept loop sheet_shape.rs:252-254; is_stable_id is the deserializer check (sheet/schema.rs:42) +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > rejects "Hip Joint" sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern ; cargo faunosteo_core::domain::js::tests::patterns_match_the_zod_regular_expressions - refuse loop sheet_shape.rs:255-257 +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > rejects "É" sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern ; cargo faunosteo_core::domain::js::tests::patterns_match_the_zod_regular_expressions - refuse loop sheet_shape.rs:255-257 +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > rejects "" sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern ; cargo faunosteo_core::domain::js::tests::patterns_match_the_zod_regular_expressions - refuse loop sheet_shape.rs:255-257 +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > rejects "-hip" sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern ; cargo faunosteo_core::domain::js::tests::patterns_match_the_zod_regular_expressions - refuse loop sheet_shape.rs:255-257 +packages/domain/tests/anatomical-sheet.schema.test.ts StableIdSchema > rejects "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" sheet document shape (anatomical model validation) ported cargo sheet_shape::stable_ids_follow_the_pattern ; cargo faunosteo_core::domain::js::tests::patterns_match_the_zod_regular_expressions - refuse loop sheet_shape.rs:255-257 +packages/domain/tests/anatomical-sheet.schema.test.ts FindingNodeSchema defaults > fills the optional keys of a lean node, recursively sheet document shape (anatomical model validation) ported cargo sheet_shape::a_lean_node_gets_its_defaults_recursively - defaults and recursive child equality (sheet_shape.rs:268-283) +packages/domain/tests/anatomical-sheet.schema.test.ts FindingNodeSchema defaults > keeps explicit values of the fixture sheet document shape (anatomical model validation) ported cargo sheet_shape::explicit_values_of_the_fixture_are_kept - lameness vet flag, trauma refs, Cd 15-21, C null, annotation[0] inherited (sheet_shape.rs:288-300) +packages/domain/tests/anatomical-sheet.schema.test.ts FindingNodeSchema defaults > does not add default keys to the lean input sheet document shape (anatomical model validation) ported cargo sheet_shape::the_lean_input_carries_no_default_key - checked on the frozen JSON fixture instead of the TS factory +packages/domain/tests/anatomical-sheet.validate.test.ts validateSheetDocument on the horse slice > reports no error and no warning sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::the_horse_slice_has_no_issue - empty issue list (sheet_rules.rs:87) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.main.count sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_main_count - [view.main.count, views] (sheet_rules.rs:99) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.main.count with no main view sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_main_count - no main view contains view.main.count (sheet_rules.rs:100-105) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.id.duplicate sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_id_duplicate - views[2].id (sheet_rules.rs:111-114) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.parent.missing sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_parent_missing - views[2].parent_view_id (sheet_rules.rs:120-123) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.parent.cycle (terminates on a two-view loop) sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_parent_cycle_terminates_on_a_two_view_loop - two cycle issues (sheet_rules.rs:134-140) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.parent.cycle on a self-parent sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_parent_cycle_on_a_self_parent - sheet_rules.rs:150-153 +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.unreachable sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_unreachable - views[1] (sheet_rules.rs:159) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.asset.missing on the main view sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_asset_missing_on_the_main_view_and_on_a_bare_detail - views[0].svg_asset_id (sheet_rules.rs:164-168) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > view.asset.missing on a detail view without asset nor view_box sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::view_asset_missing_on_the_main_view_and_on_a_bare_detail - views[1].view_box (sheet_rules.rs:169-177) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.id.duplicate (across views) sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_id_duplicate_across_views - copy of annotations[4] (atm, observable) moved to view-main (sheet_rules.rs:182-192) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.view.missing sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_view_and_category_missing - annotations[6].view_id (sheet_rules.rs:197-204) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.category.missing sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_view_and_category_missing - annotations[0].category_id (sheet_rules.rs:205-213) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.opens_view.invalid when the target is not a child sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_opens_view_invalid - loop trigger (sheet_rules.rs:218-228) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.opens_view.invalid when the target is main or absent sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_opens_view_invalid - to-main and to-ghost (sheet_rules.rs:229-247) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.finding_zone.missing sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_finding_zone_and_region_missing - annotations[6].finding_zone_id (sheet_rules.rs:252-262) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.region.missing sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_finding_zone_and_region_missing - annotations[1].vertebral_region_code (sheet_rules.rs:263-274) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > annotation.no_findings is a warning sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::annotation_no_findings_is_a_warning - code, path and Warning severity (sheet_rules.rs:283-290) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > region.code.duplicate sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::region_category_and_zone_duplicates - vertebral_config.regions[5].code (sheet_rules.rs:295-302) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > category.id.duplicate sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::region_category_and_zone_duplicates - categories[4].id (sheet_rules.rs:303-307) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding_zone.id.duplicate sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::region_category_and_zone_duplicates - finding_zones[5].id (sheet_rules.rs:308-312) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding.id.duplicate among finding categories sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::finding_id_duplicate_among_categories_and_nested_children - categories[3].id (sheet_rules.rs:317-324) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding.id.duplicate among nested children sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::finding_id_duplicate_among_categories_and_nested_children - children[0].children[2].id (sheet_rules.rs:325-336) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding ids may repeat across different sibling arrays sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::finding_ids_may_repeat_across_different_sibling_arrays - no issue (sheet_rules.rs:345) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > reference.id.duplicate sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::reference_duplicate_and_missing_citations - references[1].id (sheet_rules.rs:350-354) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding.reference.missing on a category and on a nested node sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::reference_duplicate_and_missing_citations - both reference_ids paths (sheet_rules.rs:355-373) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > region.count_range.invalid when count sits outside the range sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::region_count_range_invalid_and_bounds - code and path, plus the message (sheet_rules.rs:382-394) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > region.count_range accepts count on the bounds sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::region_count_range_invalid_and_bounds - 18-18 gives no issue (sheet_rules.rs:395-396) +packages/domain/tests/anatomical-sheet.validate.test.ts integrity rules (one mutation per code) > finding_zone.unreferenced is a warning sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::finding_zone_unreferenced_is_a_warning - finding_zones[5] and Warning (sheet_rules.rs:408-415) +packages/domain/tests/anatomical-sheet.validate.test.ts publication gate > accepts the fixture sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::publication_gate - is_publishable(slice) (sheet_rules.rs:442); assertPublishable no-throw has no separate Rust call +packages/domain/tests/anatomical-sheet.validate.test.ts publication gate > accepts a document with warnings only sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::publication_gate - one warning, publishable (sheet_rules.rs:443-448) +packages/domain/tests/anatomical-sheet.validate.test.ts publication gate > refuses a document with an error, exposing the issues sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::publication_gate - not publishable, check_sheet_document issues = [view.asset.missing] (sheet_rules.rs:449-454) +packages/domain/tests/anatomical-sheet.validate.test.ts createEmptySheetDocument > is valid for the shape tier sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::the_empty_document_is_shape_valid_but_not_publishable - PARTIAL: reparse, one main view-main without asset (sheet_rules.rs:464-470); view_box null not asserted (literal in sheet/create.rs:32) +packages/domain/tests/anatomical-sheet.validate.test.ts createEmptySheetDocument > is not publishable: the main view has no asset sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::the_empty_document_is_shape_valid_but_not_publishable - codes = [view.asset.missing] (sheet_rules.rs:471-475); the throw / is_publishable=false is not called on it +packages/domain/tests/anatomical-sheet.validate.test.ts ID stability under translation > keeps ids, references and validation output when labels change sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::ids_and_validation_output_survive_a_translation - PARTIAL: counter>50, ids and validation equal (sheet_rules.rs:532-541); TS 'relabeled differs' and 'non-label content identical after parse' not asserted +packages/domain/tests/anatomical-sheet.validate.test.ts ID stability under translation > keeps validation output identical on a broken document too sheet integrity rules (reference integrity, stable ids) ported cargo sheet_rules::validation_output_survives_a_translation_of_a_broken_document - sheet_rules.rs:557-560 +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > accepts the current identity and both image kinds archive branding and PDF labels ported cargo archive_rules::branding_accepts_the_identity_and_both_image_kinds - sample and bare branding parse to themselves (archive_rules.rs:41-45) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects unknown key archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 0 of the table (archive_rules.rs:56) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects non-http URL archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 1 of the table (archive_rules.rs:57) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects ftp URL archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 2 of the table (archive_rules.rs:58) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects URL over 2048 chars archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 3 of the table (archive_rules.rs:59) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects PNG base64 over 512 KiB archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 4 of the table (archive_rules.rs:64) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects PNG base64 with foreign characters archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 5 of the table (archive_rules.rs:69) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects SVG over 256 KiB archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 6 of the table (archive_rules.rs:74) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects fallback text over 128 chars archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 7 of the table (archive_rules.rs:79) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema > rejects credit with unknown key archive branding and PDF labels ported cargo archive_rules::branding_rejects_its_faults - case 8 of the table (archive_rules.rs:80) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts https://faunosteo.com archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts https://zenquality.fr archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts https://www.instagram.com/paws.iin.harmony archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts http://localhost:5173 archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts https://x.test/a-b_c~d?e=1&f=2#frag archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > accepts https://x.test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa archive branding and PDF labels ported cargo archive_rules::branding_urls - accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a closing parenthesis in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects an opening parenthesis in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a PDF action injection in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a backslash in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a space in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a tab in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a control character in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects DEL in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects an angle bracket in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a double quote in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a single quote in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a non-ASCII character in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects no host in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts BrandingSchema URLs > rejects a scheme in upper case in the site URL and in a credit URL archive branding and PDF labels ported cargo archive_rules::branding_urls - refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.branding-labels.test.ts PdfLabelSetSchema > lists 25 distinct keys and accepts a complete set in both locales archive branding and PDF labels ported cargo archive_rules::label_sets ; cargo archive_rules::envelope_v1_is_accepted_whole - 25 distinct keys, set parses (archive_rules.rs:135-144); full equality of the set inside the envelope (archive_rules.rs:652) +packages/domain/tests/archive.branding-labels.test.ts PdfLabelSetSchema > rejects a missing key, an extra key, a long value, a missing locale archive branding and PDF labels ported cargo archive_rules::label_sets - missing, extra, 257 chars, no en, extra de (archive_rules.rs:145-158) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > accepts the current identity and both image kinds archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_accepts_the_identity_and_both_image_kinds - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; sample and bare branding parse to themselves (archive_rules.rs:41-45) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects unknown key archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 0 of the table (archive_rules.rs:56) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects non-http URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 1 of the table (archive_rules.rs:57) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects ftp URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 2 of the table (archive_rules.rs:58) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects URL over 2048 chars archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 3 of the table (archive_rules.rs:59) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects PNG base64 over 512 KiB archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 4 of the table (archive_rules.rs:64) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects PNG base64 with foreign characters archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 5 of the table (archive_rules.rs:69) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects SVG over 256 KiB archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 6 of the table (archive_rules.rs:74) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects fallback text over 128 chars archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 7 of the table (archive_rules.rs:79) +packages/domain/tests/archive.envelope.test.ts BrandingSchema > rejects credit with unknown key archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; case 8 of the table (archive_rules.rs:80) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts https://faunosteo.com archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts https://zenquality.fr archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts https://www.instagram.com/paws.iin.harmony archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts http://localhost:5173 archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts https://x.test/a-b_c~d?e=1&f=2#frag archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > accepts https://x.test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a closing parenthesis in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects an opening parenthesis in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a PDF action injection in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a backslash in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a space in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a tab in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a control character in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects DEL in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects an angle bracket in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a double quote in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a single quote in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a non-ASCII character in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects no host in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts BrandingSchema URLs > rejects a scheme in upper case in the site URL and in a credit URL archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/archive.envelope.test.ts PdfLabelSetSchema > lists 25 distinct keys and accepts a complete set in both locales archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::label_sets ; cargo archive_rules::envelope_v1_is_accepted_whole - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; 25 distinct keys, set parses (archive_rules.rs:135-144); full equality of the set inside the envelope (archive_rules.rs:652) +packages/domain/tests/archive.envelope.test.ts PdfLabelSetSchema > rejects a missing key, an extra key, a long value, a missing locale archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::label_sets - same body re-registered by the import of archive.branding-labels.test in archive.envelope.test.ts; missing, extra, 257 chars, no en, extra de (archive_rules.rs:145-158) +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: bare reports > reads a bare v3 as is archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_reads_a_bare_v3_as_is - whole outcome equality (archive_rules.rs:591) +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: bare reports > migrates a bare v2 with the counts of the migration archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_migrates_a_bare_v2_with_the_counts_of_the_migration - origin v2, migrated, counts of the 612 leaves (archive_rules.rs:606-617); reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: bare reports > throws for a report version it cannot read, or a non-object archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_throws_for_an_unreadable_report_version_or_a_non_object - version 1 and null/string/42/array (archive_rules.rs:624-640); TS 'undefined' has no JSON form +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > accepts a valid v1 envelope whole archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_v1_is_accepted_whole - archive_rules.rs:646-653 +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > keeps the report of an envelope version it does not know archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_of_an_unknown_version_keeps_the_report - archive_rules.rs:662-668 +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > names the report version when the wrapped report is unknown archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_names_the_wrapped_report_version_it_cannot_read - found 4 (archive_rules.rs:679) +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > ignores unknown metadata keys, __proto__ included, within v1 archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_ignores_unknown_metadata_keys_proto_included - futureField and __proto__ absent from the archive (archive_rules.rs:695,708); JS prototype-pollution probe has no Rust equivalent +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > drops the envelope on a wrapper fault (schema): branding, labels, metadata archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_is_dropped_on_a_wrapper_fault - branding, labels, locale, format (archive_rules.rs:724-740) +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > drops a snapshot over the caps or failing its own schema archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_drops_a_snapshot_over_the_caps_or_failing_its_schema - caps, schema x2, integrity (archive_rules.rs:748-770) +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > drops a snapshot of another sheet than the report (sheet_mismatch) archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_drops_a_snapshot_of_another_sheet - sha and sheetId give sheet_mismatch (archive_rules.rs:779-792); report equality on the sha case not asserted +packages/domain/tests/archive.envelope.test.ts readArchiveDocument: envelopes > migrates a v2 report found inside an envelope and still checks the snapshot archive envelope v1 reading (old archive compatibility) ported cargo archive_rules::envelope_migrates_a_wrapped_v2_report_and_still_checks_the_snapshot - archive_rules.rs:804-807; reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > keeps every view, annotation, category and region, empties the bibliography sheet snapshot carried by an archive ported cargo archive_rules::draft_snapshot_keeps_every_view_annotation_category_and_region - archive_rules.rs:215-227; draft_full_report reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > prunes finding trees to the paths the report uses, every zone kept sheet snapshot carried by an archive ported cargo archive_rules::draft_snapshot_prunes_finding_trees_to_the_paths_used - archive_rules.rs:238-275 +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > carries the reachable asset with its manifest hash and the full ref sheet snapshot carried by an archive ported cargo archive_rules::draft_snapshot_carries_the_reachable_asset_hash_and_full_ref - archive_rules.rs:283-304 +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > is a valid document with no integrity error, under 250,000 bytes pretty-printed sheet snapshot carried by an archive ported cargo archive_rules::draft_snapshot_is_valid_small_and_passes_its_gate - 0 errors, < 250000 bytes, gate returns it (archive_rules.rs:315-319) +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > is pure and deterministic sheet snapshot carried by an archive ported cargo archive_rules::draft_snapshot_is_pure_and_deterministic - document unchanged, rebuild equal (archive_rules.rs:328-329); JS no-aliasing (not.toBe) is TS-only +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the equine draft > keeps what exists of an unresolved path and nothing else (legacy leaves) sheet snapshot carried by an archive ported cargo archive_rules::legacy_leaves_snapshot_keeps_what_exists_of_an_unresolved_path_and_nothing_else - PARTIAL: node present iff resolved (archive_rules.rs:336-365); TS ref/assets checks of snapshotIndexSource (TS-only adapter) not ported +packages/domain/tests/archive.snapshot.test.ts buildSheetSnapshot on the slice > copies review_status and requires_vet_referral, skips an asset it has no text for sheet snapshot carried by an archive ported cargo archive_rules::slice_snapshot_copies_review_status_and_vet_flag_and_skips_a_missing_asset - archive_rules.rs:372-423 +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > accepts the slice snapshot and returns the parsed copy sheet snapshot carried by an archive ported cargo archive_rules::assert_accepts_the_slice_snapshot_and_returns_the_parsed_copy - archive_rules.rs:427-428 +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects a finding tree deeper than the cap before parsing anything (caps) sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_a_tree_deeper_than_the_cap_before_parsing_anything - caps, schema, schema (archive_rules.rs:438-445) +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects shape faults (schema): unknown key, missing field, too many assets, non-object sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_shape_faults - archive_rules.rs:450-466 +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects a __proto__ key without polluting anything sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_a_proto_key - schema (archive_rules.rs:476); JS pollution probe is TS-only +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects counts over the caps (caps) sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_counts_over_the_caps - views, annotations, nodes, label (archive_rules.rs:489-511) +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects oversize assets in bytes, single and total (caps) sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_oversize_assets_in_bytes_single_and_total - archive_rules.rs:518-526 +packages/domain/tests/archive.snapshot.test.ts assertSnapshot > rejects integrity faults: a sheet rule error, a view reaching no carried asset sheet snapshot carried by an archive ported cargo archive_rules::assert_rejects_a_sheet_rule_error ; cargo archive_rules::assert_rejects_a_view_reaching_no_carried_asset - atm zone removed; no asset; other asset id (archive_rules.rs:530-537, 550) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > accepts the current identity and both image kinds R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_accepts_the_identity_and_both_image_kinds - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; sample and bare branding parse to themselves (archive_rules.rs:41-45) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects unknown key R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 0 of the table (archive_rules.rs:56) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects non-http URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 1 of the table (archive_rules.rs:57) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects ftp URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 2 of the table (archive_rules.rs:58) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects URL over 2048 chars R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 3 of the table (archive_rules.rs:59) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects PNG base64 over 512 KiB R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 4 of the table (archive_rules.rs:64) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects PNG base64 with foreign characters R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 5 of the table (archive_rules.rs:69) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects SVG over 256 KiB R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 6 of the table (archive_rules.rs:74) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects fallback text over 128 chars R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 7 of the table (archive_rules.rs:79) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema > rejects credit with unknown key R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_rejects_its_faults - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; case 8 of the table (archive_rules.rs:80) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts https://faunosteo.com R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts https://zenquality.fr R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts https://www.instagram.com/paws.iin.harmony R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts http://localhost:5173 R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts https://x.test/a-b_c~d?e=1&f=2#frag R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > accepts https://x.test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; accept loop (archive_rules.rs:93-105) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a closing parenthesis in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects an opening parenthesis in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a PDF action injection in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a backslash in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a space in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a tab in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a control character in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects DEL in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects an angle bracket in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a double quote in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a single quote in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a non-ASCII character in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects no host in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls ; cargo faunosteo_core::domain::archive::branding::tests::branding_urls_follow_the_zod_pattern - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts BrandingSchema URLs > rejects a scheme in upper case in the site URL and in a credit URL R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::branding_urls - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; refused as siteUrl and as partner.url (archive_rules.rs:107-130) +packages/domain/tests/r2-characterisation.test.ts PdfLabelSetSchema > lists 25 distinct keys and accepts a complete set in both locales R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::label_sets ; cargo archive_rules::envelope_v1_is_accepted_whole - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; 25 distinct keys, set parses (archive_rules.rs:135-144); full equality of the set inside the envelope (archive_rules.rs:652) +packages/domain/tests/r2-characterisation.test.ts PdfLabelSetSchema > rejects a missing key, an extra key, a long value, a missing locale R2 freeze: report and archive readers, rebase, snapshot verdicts ported cargo archive_rules::label_sets - same body re-registered by the import of archive.branding-labels.test in r2-characterisation.test.ts; missing, extra, 257 chars, no en, extra de (archive_rules.rs:145-158) +packages/domain/tests/r2-characterisation.test.ts R2 characterisation oracles (frozen from the TypeScript domain) > characterisation.json: report, archive, rebase and snapshot functions R2 freeze: report and archive readers, rebase, snapshot verdicts replaced cargo characterisation::rust_does_what_the_typescript_did ; cargo characterisation::rust_does_what_the_typescript_did_with_the_integrity_rules ; cargo characterisation::lone_surrogates_are_refused_never_replaced crates/core/tests/oracles/characterisation.json TS (MAKE unset) recomputes the 85 cases and asserts the committed file byte for byte; Rust compares its outputs to the same file; generator side is TS-only +packages/domain/tests/r2-characterisation.test.ts R2 characterisation oracles (frozen from the TypeScript domain) > verdicts.json: accept / refuse of the Zod schemas on hostile inputs R2 freeze: report and archive readers, rebase, snapshot verdicts replaced cargo characterisation::the_contracts_accept_and_refuse_what_zod_does crates/core/tests/oracles/verdicts.json TS (MAKE unset) recomputes the 765 Zod verdicts and asserts the committed file; Rust replays every verdict (1 L1 exception pinned) +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > clean integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/clean.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-main-count integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-main-count.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-parent-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-parent-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-parent-cycle integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-parent-cycle.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-unreachable integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-unreachable.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-asset-missing-main integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-asset-missing-main.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > view-asset-missing-detail integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/view-asset-missing-detail.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-view-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-view-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-category-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-category-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-opens-view-invalid integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-opens-view-invalid.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-finding-zone-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-finding-zone-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-region-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-region-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > annotation-no-findings integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/annotation-no-findings.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > region-code-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/region-code-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > category-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/category-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > finding-zone-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/finding-zone-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > finding-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/finding-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > reference-id-duplicate integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/reference-id-duplicate.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > finding-reference-missing integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/finding-reference-missing.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > region-count-range-invalid integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/region-count-range-invalid.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > finding-zone-unreferenced integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/finding-zone-unreferenced.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > several-errors integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/several-errors.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > shape-references-not-array integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/shape-references-not-array.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > shape-reference-url-scheme integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_rust_rules_report_what_the_typescript_rules_reported ; cargo sheet_conformance::the_sql_expectations_are_the_mirrored_error_codes ; cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance/shape-reference-url-scheme.json TS (MAKE unset) asserts the fixture file = TS validateSheetDocument output (+ shape tier verdict); Rust checks its rules and the SQL codes against the same file +packages/domain/tests/r2-conformance.test.ts sheet conformance fixtures > has no stale fixture file integrity codes shared with SQL (pgTAP conformance) replaced cargo sheet_conformance::the_pgtap_file_is_generated_from_the_fixtures crates/core/tests/conformance TS lists files absent from its CASES; Rust reads every *.json of the folder (>=25) and the committed supabase/tests/011_sheet_conformance.sql (26 asserts) pins the set +packages/domain/tests/r2-horse-slice.test.ts horse slice JSON fixture > equals the TypeScript lean input horse slice fixture freeze deleted - - TS generator/asserter of crates/core/tests/fixtures/horse-slice.json from horse-slice.ts; once the TS fixture is gone the JSON is the source; no business contract +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > sheet.draft.json Zod output oracles (contracts byte for byte) replaced cargo sheet_contract::the_curated_draft_prints_as_zod_outputs_it crates/core/tests/oracles/sheet.draft.json TS asserts source path and Zod(draft/document.json) = oracle output; Rust prints its parse of the same source and compares to the oracle output +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > sheet.legacy-import.json Zod output oracles (contracts byte for byte) replaced cargo sheet_contract::the_legacy_import_baseline_prints_as_zod_outputs_it crates/core/tests/oracles/sheet.legacy-import.json same mechanism on legacy-import/document.json +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > migration-map.draft.json Zod output oracles (contracts byte for byte) replaced cargo report_contract::the_draft_migration_map_reads_as_zod_read_it_entry_by_entry ; cargo report_contract::the_v2_fixtures_and_the_migration_map_parse ; cargo curation_draft::the_pre_switch_copies_are_the_files_the_typescript_wrote ; cargo curation_draft::the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured crates/core/tests/oracles/migration-map.draft.json entry by entry since R5.7; PARTIAL: TS compares Zod(pre-switch copy crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json) to the oracle output; no Rust test reads the oracle output, only parse of the committed map with counts >20 and >600 (actual 27 and 792) +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > report-v3.demo.json Zod output oracles (contracts byte for byte) replaced cargo report_contract::the_demo_report_prints_as_zod_outputs_it crates/core/tests/oracles/report-v3.demo.json byte-for-byte print of the Rust parse vs the oracle output +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > report-v2.full.json Zod output oracles (contracts byte for byte) replaced cargo report_contract::the_v2_fixtures_and_the_migration_map_parse ; cargo characterisation::rust_does_what_the_typescript_did crates/core/tests/oracles/report-v2.full.json Rust only checks the v2 parse succeeds (ReportV2 is never printed); the migrated output of the same fixture is compared exactly (case 'readReport: v2 full' of characterisation.json) +packages/domain/tests/r2-oracles.test.ts Zod output oracles of the R2 switch > report-v2.minimal.json Zod output oracles (contracts byte for byte) replaced cargo report_contract::the_v2_fixtures_and_the_migration_map_parse ; cargo characterisation::rust_does_what_the_typescript_did crates/core/tests/oracles/report-v2.minimal.json as above, case 'readReport: v2 minimal' +packages/domain/tests/r2-oracles.test.ts the committed migration map after R5.6 > is the oracle with only the fingerprint moved to the canonical value Zod output oracles (contracts byte for byte) replaced cargo curation_draft::the_switch_changes_only_the_fingerprint_of_the_two_files ; cargo curation_draft::the_pre_switch_copies_are_the_files_the_typescript_wrote crates/core/tests/oracles/migration-map.draft.json TS: committed map = oracle with documentSha256 27c7..->12d7..; Rust: committed = pre-switch copy + same rule byte-exact, pre-switch = TS bytes (sha in oracles/r5/pipeline.json) +packages/domain/tests/report.migrate.test.ts Report v3 schema > accepts a report with an empty reserved localAnnotations and defaults it Report v2 → v3 migration ported cargo report_rules::report_v3_schema_defaults_and_refusals - localAnnotations defaults to [] (report_rules.rs:154-155) +packages/domain/tests/report.migrate.test.ts Report v3 schema > rejects version 2 Report v2 → v3 migration ported cargo report_rules::report_v3_schema_defaults_and_refusals - same patch on the migrated minimal report (report_rules.rs:156-167); reads packages/domain/tests/fixtures/report-v2.minimal.json +packages/domain/tests/report.migrate.test.ts Report v3 schema > rejects a reserved localAnnotations entry Report v2 → v3 migration ported cargo report_rules::report_v3_schema_defaults_and_refusals - same patch on the migrated minimal report (report_rules.rs:156-167); reads packages/domain/tests/fixtures/report-v2.minimal.json +packages/domain/tests/report.migrate.test.ts Report v3 schema > rejects a French severity value Report v2 → v3 migration ported cargo report_rules::report_v3_schema_defaults_and_refusals - same patch on the migrated minimal report (report_rules.rs:156-167); reads packages/domain/tests/fixtures/report-v2.minimal.json +packages/domain/tests/report.migrate.test.ts Report v3 schema > rejects a malformed document hash Report v2 → v3 migration ported cargo report_rules::report_v3_schema_defaults_and_refusals - same patch on the migrated minimal report (report_rules.rs:156-167); reads packages/domain/tests/fixtures/report-v2.minimal.json +packages/domain/tests/report.migrate.test.ts migrateReportV2ToV3 on the golden fixtures > keeps identity, dates, conclusion and appointment verbatim Report v2 → v3 migration ported cargo report_rules::migrate_keeps_identity_dates_conclusion_and_appointment - report_rules.rs:175-194; reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/report.migrate.test.ts migrateReportV2ToV3 on the golden fixtures > maps legacy ids to annotation ids, views and snapshots the legacy names Report v2 → v3 migration ported cargo report_rules::migrate_maps_legacy_ids_views_and_snapshots_the_legacy_names - report_rules.rs:210-231; reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/report.migrate.test.ts migrateReportV2ToV3 on the golden fixtures > remaps moved finding paths, keeps removed ones flagged with their snapshots Report v2 → v3 migration ported cargo report_rules::migrate_remaps_moved_paths_and_flags_removed_ones - report_rules.rs:247-264; reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/report.migrate.test.ts migrateReportV2ToV3 on the golden fixtures > converts severities to stable codes Report v2 → v3 migration ported cargo report_rules::migrate_converts_severities_to_stable_codes - moderate and severe present (report_rules.rs:276); the 'only the three codes' check is the Severity type; reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/report.migrate.test.ts migrateReportV2ToV3 on the golden fixtures > flags an unknown legacy zone id and an unknown finding path instead of dropping them Report v2 → v3 migration ported cargo report_rules::migrate_flags_an_unknown_zone_and_an_unknown_path_instead_of_dropping_them - whole zone and finding objects, counts 1/1 (report_rules.rs:292-301); reads packages/domain/tests/fixtures/report-v2.full.json +packages/domain/tests/report.migrate.test.ts readReportDocument > returns a v3 document as is and migrates a v2 one Report v2 → v3 migration ported cargo report_rules::read_report_document_returns_v3_as_is_and_migrates_v2 - report_rules.rs:308-315; reads report-v2.minimal.json of packages/domain +packages/domain/tests/report.migrate.test.ts readReportDocument > refuses unknown versions with the found version Report v2 → v3 migration ported cargo report_rules::read_report_document_refuses_unknown_versions_with_the_found_version - 1, none, 7 (report_rules.rs:322-333); reads report-v2.minimal.json of packages/domain +packages/domain/tests/report.migrate.test.ts hostile identifiers > treats prototype keys as unknown ids instead of throwing Report v2 → v3 migration ported cargo report_rules::hostile_identifiers_are_unknown_ids - 2 zones, 1 finding, viewId __proto__ (report_rules.rs:349-350); reads report-v2.minimal.json of packages/domain +packages/domain/tests/report.rebase.test.ts rebaseReportOnSheet > returns the report untouched when it already sits on the loaded sheet rebase of a report on a sheet ported cargo report_rules::rebase_returns_the_report_untouched_on_the_loaded_sheet - equality and 0/0/false (report_rules.rs:474-482); JS identity (toBe) is TS-only +packages/domain/tests/report.rebase.test.ts rebaseReportOnSheet > flags what the new sheet lost, labels it from the archive, keeps the rest rebase of a report on a sheet ported cargo report_rules::rebase_flags_what_the_new_sheet_lost_labels_it_from_the_archive_keeps_the_rest - report_rules.rs:490-527; the TS re-parse of the output by ReportSchema is not repeated +packages/domain/tests/report.rebase.test.ts rebaseReportOnSheet > fills no label without an archived snapshot rebase of a report on a sheet ported cargo report_rules::rebase_fills_no_label_without_an_archived_snapshot - report_rules.rs:533-537 +packages/domain/tests/report.rebase.test.ts rebaseReportOnSheet > counts nothing twice: a rebased report rebased again onto the same sheet is stable rebase of a report on a sheet ported cargo report_rules::rebase_counts_nothing_twice - report_rules.rs:546-550 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > FindingSchema rejects empty path and empty findingZoneId Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:54-60 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > LateralSideSchema rejects both and empty Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:61-62 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > VertebraSchema rejects index 0 and non-integer index Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:63-65 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > ObservationSchema rejects an empty id Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:66-71 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > SeveritySchema accepts the three codes only Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:72-75 +packages/domain/tests/report.schema.test.ts report v3 leaf schemas > ReportZoneSchema rejects an empty annotationId Report v3 and v2 contract ported cargo report_rules::report_v3_leaf_schemas - report_rules.rs:76-82 +packages/domain/tests/report.schema.test.ts report v3 document and identity > ReportSchema validates nextAppointment variants Report v3 and v2 contract ported cargo report_rules::report_v3_document_and_identity - report_rules.rs:87-95 +packages/domain/tests/report.schema.test.ts report v3 document and identity > PractitionerSchema rejects an empty name Report v3 and v2 contract ported cargo report_rules::report_v3_document_and_identity - report_rules.rs:96 +packages/domain/tests/report.schema.test.ts report v3 document and identity > AnimalSchema rejects an empty speciesId Report v3 and v2 contract ported cargo report_rules::report_v3_document_and_identity - report_rules.rs:97 +packages/domain/tests/report.schema.test.ts report v3 permissive boundaries > strips unknown keys silently Report v3 and v2 contract ported cargo report_rules::report_v3_permissive_boundaries - report_rules.rs:102-103 +packages/domain/tests/report.schema.test.ts report v3 permissive boundaries > accepts a vertebra index above any region count (bounds are a sheet concern) Report v3 and v2 contract ported cargo report_rules::report_v3_permissive_boundaries - report_rules.rs:104 +packages/domain/tests/report.schema.test.ts report v3 permissive boundaries > accepts an unregistered speciesId Report v3 and v2 contract ported cargo report_rules::report_v3_permissive_boundaries - report_rules.rs:105-106 +packages/domain/tests/report.schema.test.ts report v3 permissive boundaries > accepts orphan findings citing a zone absent from zones (D5) Report v3 and v2 contract ported cargo report_rules::report_v3_permissive_boundaries - report_rules.rs:107-112 +packages/domain/tests/sheet-index.test.ts buildSheetIndex > keeps the source as given, typed as the caller passed it sheet index lookups ported cargo sheet_index::views_by_id_and_the_main_view - PARTIAL: main view, view-head detail, unknown view absent (sheet_index.rs:34-39); passthrough of caller fields (extra, ref) is a TS generic API detail, not ported +packages/domain/tests/sheet-index.test.ts buildSheetIndex > looks up annotations, zones, regions and spine markers by id sheet index lookups ported cargo sheet_index::annotations_zones_regions_and_spine_markers_by_id - sheet_index.rs:47-68; hip kind 'point' checked as observable() only +packages/domain/tests/sheet-index.test.ts buildSheetIndex > resolves finding paths and reports absent ones sheet index lookups ported cargo sheet_index::finding_paths_resolve_or_report_absence - sheet_index.rs:77-91 +packages/domain/tests/sheet-index.test.ts buildSheetIndex > names a nameless trigger after the view it opens sheet index lookups ported cargo sheet_index::a_nameless_trigger_is_named_after_the_view_it_opens ; cargo faunosteo_core::anatomy::layer::tests::an_unnamed_trigger_takes_the_opened_view_name_in_each_language - Tete/Head and hip en (sheet_index.rs:100-105) +packages/domain/tests/sheet-index.test.ts buildSheetIndex > refuses a document without a main view sheet index lookups ported cargo sheet_index::a_document_without_a_main_view_cannot_be_indexed - Err(NoMainView) instead of the 'no main view' message (sheet_index.rs:113) +packages/domain/tests/sheet-index.test.ts pickLabel / isObservable > falls back to the other locale and to the empty string sheet index lookups ported vitest apps/app/tests/unit/i18n.keys.test.ts > pickLocaleLabel > returns the active locale label ; vitest apps/app/tests/unit/i18n.keys.test.ts > pickLocaleLabel > falls back to the other language when empty ; vitest apps/app/tests/unit/i18n.keys.test.ts > pickLocaleLabel > returns the fallback when both are empty ; cargo faunosteo_core::anatomy::layer::tests::a_missing_language_falls_back_to_the_other - the app's pickLabel (apps/app/src/i18n/pickLocaleLabel.ts) has the same rule; the null-text wrapper path is covered only through undefined fr/en; domain pickLabel has no consumer left +packages/domain/tests/sheet-index.test.ts pickLabel / isObservable > tells observable annotations from triggers sheet index lookups ported cargo sheet_index::annotations_zones_regions_and_spine_markers_by_id ; cargo sheet_index::a_nameless_trigger_is_named_after_the_view_it_opens - observable() Some for hip (sheet_index.rs:47), None for head-trigger (sheet_index.rs:106); isObservable(undefined) is TS-only diff --git a/crates/core/tests/curation_caps.rs b/crates/core/tests/curation_caps.rs new file mode 100644 index 00000000..4a804b9d --- /dev/null +++ b/crates/core/tests/curation_caps.rs @@ -0,0 +1,76 @@ +//! The resource caps and the stable-id acceptance of the curation inputs (R5.5 adjustments of +//! R5.4, owner 2026-10-23 §3 and §6): an authored file over 4 MiB is refused by name before any +//! parse allocation, the committed files keep a wide margin, and the stable-id grammar the +//! applier enforces is the sheet contract's, not an equine list. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +use faunosteo_core::curation::draft::schema::MAX_CURATION_FILE_BYTES; +use faunosteo_core::curation::draft::{parse_changeset, parse_references}; +use faunosteo_core::domain::js::is_stable_id; + +const CURATION: &str = "../../supabase/seed/anatomical-sheets/equine/curation"; + +fn committed(name: &str) -> String { + std::fs::read_to_string(format!("{CURATION}/{name}")).unwrap() +} + +/// A valid-looking JSON text of exactly `len` bytes (spaces pad the tail). +fn padded(len: usize) -> String { + let mut text = String::from("{\"changes\":[]}"); + text.push_str(&" ".repeat(len - text.len())); + text +} + +#[test] +fn committed_files_keep_a_wide_margin_under_the_cap() { + for name in ["changes.json", "references.json"] { + let size = committed(name).len(); + assert!(size * 10 < MAX_CURATION_FILE_BYTES, "{name}: {size} bytes"); + } +} + +#[test] +fn a_file_over_the_cap_is_refused_by_name_before_the_parse() { + let over = padded(MAX_CURATION_FILE_BYTES + 1); + let changes = parse_changeset(&over).unwrap_err().to_string(); + assert!( + changes.starts_with("changes.json: larger than "), + "{changes}" + ); + let references = parse_references(&over).unwrap_err().to_string(); + assert!( + references.starts_with("references.json: larger than "), + "{references}" + ); +} + +#[test] +fn a_file_at_the_cap_reaches_the_parser() { + let at = padded(MAX_CURATION_FILE_BYTES); + assert!(parse_changeset(&at).is_ok()); +} + +#[test] +fn stable_ids_of_any_species_are_accepted_and_the_rest_refused() { + for id in [ + "canine-skull", + "feline_thorax-2", + "0-bovine", + "a", + &"x".repeat(64), + ] { + assert!(is_stable_id(id), "{id}"); + } + for id in [ + "", + "Equine", + "-x", + "a b", + "a/b", + "a.b", + "é", + &"x".repeat(65), + ] { + assert!(!is_stable_id(id), "{id:?}"); + } +} diff --git a/crates/core/tests/curation_draft.rs b/crates/core/tests/curation_draft.rs new file mode 100644 index 00000000..bf59063f --- /dev/null +++ b/crates/core/tests/curation_draft.rs @@ -0,0 +1,1166 @@ +//! The Rust draft pipeline against the TypeScript (R5.3): the R5.3 files of the committed +//! `draft/` folder byte for byte, the draft section frozen in `oracles/r5/pipeline.json` (46 +//! changes, 825 records, stats, migration stats), two runs byte-equal, the 612 legacy leaves +//! migrated through the core's reader on the produced map, and the synthetic cases of +//! `oracles/r5/curation-synthetic.json` (the generic contract, refusals included). Every +//! expectation was written by the TypeScript pipeline. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod archive_support; +mod common; + +use faunosteo_core::curation::draft::migration_map::{ + MigrationMapInput, SheetRef, build_report_migration_map, +}; +use faunosteo_core::curation::draft::records::ChangeRecord; +use faunosteo_core::curation::draft::schema::Changeset; +use faunosteo_core::curation::draft::seed::{DraftSeedParams, render_draft_seed_sql}; +use faunosteo_core::curation::draft::stats::document_stats; +use faunosteo_core::curation::draft::{ + DraftInput, DraftResult, apply_changeset, build_equine_draft, parse_changeset, + parse_references, parse_view_box, render_draft_artifacts, +}; +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::legacy::types::AssetRecord; +use faunosteo_core::curation::legacy::{ + EquineLegacyInput, HEAD_VIEW_ID, ImportResult, SvgSource, import_equine_legacy, +}; +use faunosteo_core::curation::prettier_json::format_json; +use faunosteo_core::domain::report::ReportMigrationMap; +use faunosteo_core::domain::report::read::read_report_document; +use faunosteo_core::domain::sheet::AnatomicalSheetDocument; +use faunosteo_core::domain::sheet::fingerprint::{ + FINGERPRINT_CONVENTION, TRUSTED_ALIASES, sheet_fingerprint, +}; +use faunosteo_core::json::to_js_compact; +use serde_json::{Map, Value, json}; + +const SOURCES: &str = "supabase/seed/anatomical-sheets/equine/legacy-sources"; +const CURATION: &str = "supabase/seed/anatomical-sheets/equine/curation"; +const DRAFT: &str = "supabase/seed/anatomical-sheets/equine/draft"; + +/// The text files of the draft, in the TypeScript order; the review files (drawings, the two +/// reports) are checked by `tests/curation_review.rs` (R5.4). +const DRAFT_FILES: [&str; 11] = [ + "document.json", + "assets.json", + "sheet-ref.json", + "report-migration-map.json", + "review/annotations-main.svg", + "review/annotations-head.svg", + "review/app-main.svg", + "review/app-head.svg", + "CHANGELOG.md", + "REVIEW-REPORT.md", + "equine_draft.sql", +]; + +/// The files R5.3 produced, compared byte for byte here. +const R5_3_FILES: [&str; 5] = [ + "document.json", + "assets.json", + "sheet-ref.json", + "report-migration-map.json", + "equine_draft.sql", +]; + +fn bytes(relative: &str) -> Vec<u8> { + std::fs::read(common::repo_path(relative)).unwrap() +} + +fn legacy_result() -> ImportResult { + let svg = |name: &str| SvgSource { + file_name: name.to_owned(), + bytes: bytes(&format!("{SOURCES}/{name}")), + }; + import_equine_legacy(&EquineLegacyInput { + main_svg: svg("Horse.svg"), + head_svg: svg("Horse_head.svg"), + catalog: bytes(&format!("{SOURCES}/pathologies.json")), + vertebrae: bytes(&format!("{SOURCES}/vertebrae.ts")), + }) + .unwrap() +} + +fn equine_draft() -> DraftResult { + let import_result = legacy_result(); + let references = + parse_references(&common::repo_file(&format!("{CURATION}/references.json"))).unwrap(); + let changeset = + parse_changeset(&common::repo_file(&format!("{CURATION}/changes.json"))).unwrap(); + let head = import_result + .view_boxes + .get(HEAD_VIEW_ID) + .and_then(Value::as_str); + build_equine_draft(&DraftInput { + import_result: &import_result, + cleaned_svg: &bytes(&format!("{DRAFT}/assets/horse.svg")), + head_view_box: parse_view_box(head).unwrap(), + references: &references, + changes: &changeset.changes, + }) + .unwrap() +} + +fn oracle(name: &str) -> Value { + serde_json::from_str(&common::repo_file(&format!( + "crates/core/tests/oracles/r5/{name}" + ))) + .unwrap() +} + +fn assert_same(actual: &Value, expected: &Value, what: &str) { + assert_eq!( + to_js_compact(actual).unwrap(), + to_js_compact(expected).unwrap(), + "{what}" + ); +} + +fn value<T: serde::Serialize + ?Sized>(value: &T) -> Value { + serde_json::to_value(value).unwrap() +} + +#[test] +fn the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte() { + let draft = equine_draft(); + let files = render_draft_artifacts(&draft, &[]).unwrap(); + let names: Vec<&str> = files.iter().map(|(name, _)| name.as_str()).collect(); + assert_eq!(names, DRAFT_FILES); + for (name, text) in files + .iter() + .filter(|(name, _)| R5_3_FILES.contains(&name.as_str())) + { + assert!( + *text == common::repo_file(&format!("{DRAFT}/{name}")), + "{name} differs" + ); + } + let asset = &draft.assets[0]; + let frozen = bytes(&format!("{DRAFT}/assets/{}", asset.file)); + assert_eq!(sha256_hex(&frozen), asset.sha256); + assert_eq!(frozen.len(), asset.byte_size); +} + +/// The declared difference of the R5.6 switch, `R5.6-fingerprint-v1` (owner 2026-10-24): from the +/// pre-switch file the TypeScript wrote, only the fingerprint moves from the registered alias to +/// its canonical value, and `sheet-ref.json` gains the descriptive block. Applied to a parsed +/// value, then printed by the generator's own formatter: anything else that differs fails. +fn r5_6_rule(name: &str, mut value: Value) -> Value { + let pair = &TRUSTED_ALIASES[0]; + let stamp = match name { + "sheet-ref.json" => &mut value["document_sha256"], + "report-migration-map.json" => &mut value["sheet"]["documentSha256"], + other => panic!("{other}: no declared rule"), + }; + assert_eq!( + *stamp, pair.alias, + "{name}: the pre-switch value is the alias" + ); + *stamp = Value::from(pair.canonical); + if name == "sheet-ref.json" { + value.as_object_mut().unwrap().insert( + "fingerprint".into(), + serde_json::json!({ "convention": FINGERPRINT_CONVENTION, "aliases": [pair.alias] }), + ); + } + value +} + +fn pre_switch(name: &str) -> String { + common::repo_file(&format!( + "crates/core/tests/fixtures/r5-6/pre-switch/{name}" + )) +} + +#[test] +fn the_pre_switch_copies_are_the_files_the_typescript_wrote() { + let artifacts = oracle("pipeline.json")["artifacts"].clone(); + for name in ["sheet-ref.json", "report-migration-map.json"] { + let row = artifacts + .as_array() + .unwrap() + .iter() + .find(|a| a["file"] == name && a["folder"].as_str().unwrap().ends_with("draft")) + .unwrap() + .clone(); + let text = pre_switch(name); + assert_eq!(row["sha256"], sha256_hex(text.as_bytes()), "{name}"); + assert_eq!(row["bytes"], text.len(), "{name}"); + } +} + +#[test] +fn the_switch_changes_only_the_fingerprint_of_the_two_files() { + for name in ["sheet-ref.json", "report-migration-map.json"] { + let before: Value = serde_json::from_str(&pre_switch(name)).unwrap(); + let expected = format_json(&r5_6_rule(name, before)).unwrap(); + assert!( + expected == common::repo_file(&format!("{DRAFT}/{name}")), + "{name}: the committed file is not the pre-switch one under R5.6-fingerprint-v1" + ); + } +} + +#[test] +fn the_document_fingerprint_is_v1_and_its_bytes_keep_the_historical_alias() { + let files = render_draft_artifacts(&equine_draft(), &[]).unwrap(); + let document = &files[0].1; + let reference: Value = serde_json::from_str(&files[2].1).unwrap(); + let pair = &TRUSTED_ALIASES[0]; + assert_eq!(sha256_hex(document.as_bytes()), pair.alias); + assert_eq!( + reference["document_sha256"], + sheet_fingerprint(document).unwrap() + ); + assert_eq!(reference["document_sha256"], pair.canonical); + assert_eq!( + reference["fingerprint"]["convention"], + FINGERPRINT_CONVENTION + ); + assert_eq!( + reference["fingerprint"]["aliases"], + serde_json::json!([pair.alias]) + ); +} + +#[test] +fn the_draft_section_of_the_frozen_run_is_reproduced() { + let draft = equine_draft(); + let frozen = oracle("pipeline.json"); + let expected = frozen["draft"].as_object().unwrap(); + assert_eq!(draft.sheet_id, expected["sheetId"].as_str().unwrap()); + assert_eq!(draft.changes.len(), 46); + assert_same(&value(&draft.changes), &expected["changes"], "changes"); + assert_same(&value(&draft.assets), &expected["assets"], "assets"); + assert_same( + &value(&draft.stats_before), + &expected["statsBefore"], + "statsBefore", + ); + assert_same( + &value(&draft.stats_after), + &expected["statsAfter"], + "statsAfter", + ); + assert_same(&value(&draft.issues), &expected["issues"], "issues"); + assert_eq!(draft.records.len(), 825); + let records = value(&draft.records); + for (index, record) in expected["records"].as_array().unwrap().iter().enumerate() { + assert_same(&records[index], record, &format!("record {index}")); + } + let document_json = format_json(&draft.document).unwrap(); + let reference = SheetRef { + sheet_id: draft.sheet_id.clone(), + version_id: None, + document_sha256: sha256_hex(document_json.as_bytes()), + }; + let (_, stats) = + faunosteo_core::curation::draft::pipeline::draft_migration_map(&draft, &reference).unwrap(); + assert_same( + &value(&stats), + &expected["migrationStats"], + "migrationStats", + ); +} + +#[test] +fn two_runs_emit_the_same_bytes() { + let first = render_draft_artifacts(&equine_draft(), &[]).unwrap(); + let second = render_draft_artifacts(&equine_draft(), &[]).unwrap(); + assert_eq!(first, second); +} + +fn node_is_leaf( + document: &AnatomicalSheetDocument, + zone_id: &str, + path: &[String], +) -> Option<bool> { + let zone = document.finding_zones.iter().find(|z| z.id == zone_id)?; + let category = zone.categories.iter().find(|c| c.id == path[0])?; + let mut children = &category.children; + let mut leaf = children.is_empty(); + for segment in &path[1..] { + let node = children.iter().find(|n| n.id == *segment)?; + children = &node.children; + leaf = children.is_empty(); + } + Some(leaf) +} + +#[test] +fn the_612_legacy_leaves_migrate_through_the_produced_map_as_the_typescript_measured() { + let draft = equine_draft(); + let files = render_draft_artifacts(&draft, &[]).unwrap(); + let map: ReportMigrationMap = serde_json::from_str(&files[3].1).unwrap(); + let document: AnatomicalSheetDocument = serde_json::from_value(draft.document.clone()).unwrap(); + let leaves = archive_support::legacy_leaves(); + assert_eq!(leaves.len(), 612); + let outcome = + read_report_document(&archive_support::leaves_as_v2_report(&leaves), &map).unwrap(); + let findings: Vec<_> = outcome + .report + .observations + .iter() + .flat_map(|o| o.findings.iter()) + .collect(); + assert_eq!(findings.len(), 612); + let (mut identical, mut moved, mut removed) = (0, 0, 0); + let mut flagged = Vec::new(); + for (leaf, finding) in leaves.iter().zip(&findings) { + let same = finding.finding_zone_id == leaf.zone_id && finding.path == leaf.path; + if finding.unresolved.is_some() { + removed += 1; + flagged.push(format!( + "{}/{}", + finding.finding_zone_id, + finding.path.join("/") + )); + assert!(node_is_leaf(&document, &finding.finding_zone_id, &finding.path).is_none()); + } else { + if same { + identical += 1 + } else { + moved += 1 + } + assert_eq!( + node_is_leaf(&document, &finding.finding_zone_id, &finding.path), + Some(true), + "{}/{}", + finding.finding_zone_id, + finding.path.join("/") + ); + } + assert_eq!(finding.label_fr_snapshot, leaf.fr); + } + assert_eq!((identical, moved, removed), (442, 141, 29)); + let nulls: Vec<String> = leaves + .iter() + .map(|leaf| format!("{}/{}", leaf.zone_id, leaf.path.join("/"))) + .filter(|key| map.finding_paths.get(key).is_some_and(Option::is_none)) + .collect(); + assert_eq!(flagged, nulls); +} + +// --------------------------------------------------------------------------------------------- +// Synthetic cases written by the TypeScript (`oracles/r5/curation-synthetic.json`). + +fn synthetic_records(records: &[ChangeRecord]) -> Value { + value(records) +} + +fn synthetic_map( + baseline: &Value, + result_document: &Value, + records: &[ChangeRecord], +) -> (Value, Value) { + let legacy_id_map: Map<String, Value> = json!({ + "views": { "head": "head" }, + "annotations": { "legacy-hip": "hip", "legacy-neck": "neck" }, + "categories": {}, + "finding_nodes": {}, + "assets": {}, + }) + .as_object() + .unwrap() + .clone(); + let sheet = SheetRef { + sheet_id: "11111111-1111-5111-8111-111111111111".to_owned(), + version_id: None, + document_sha256: "0".repeat(64), + }; + let (map, stats) = build_report_migration_map(&MigrationMapInput { + baseline, + final_document: result_document, + legacy_id_map: &legacy_id_map, + records, + sheet: &sheet, + main_view_id: "main", + }) + .unwrap(); + (map, value(&stats)) +} + +fn synthetic_seed(document_json: &str) -> String { + let assets = [AssetRecord { + file: "mini.svg".to_owned(), + sha256: "ab".repeat(32), + byte_size: 42, + svg_asset_id: "3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8".to_owned(), + }]; + render_draft_seed_sql(&DraftSeedParams { + sheet_id: "11111111-1111-5111-8111-111111111111", + assets: &assets, + document_json, + change_note: "Essai 'quoted'", + }) + .unwrap() +} + +/// Cases the TypeScript accepted and the port refuses, declared in RUST.md §11.12. +const DECLARED_REFUSALS: [&str; 4] = [ + "declared-proto-segment-overwritten", + "declared-set-without-value-drops-key", + "declared-children-string-renamed-then-removed", + "declared-children-object-then-added-to", +]; + +/// Cases the TypeScript refused and the port accepts, declared in RUST.md §11.12 (checked by +/// `an_inherited_member_name_is_a_plain_key_and_bypasses_nothing`). +const DECLARED_ACCEPTS: [&str; 1] = ["declared-inherited-member-overwritten"]; + +fn has_set_without_value(changes_file: &Value) -> bool { + changes_file["changes"] + .as_array() + .into_iter() + .flatten() + .filter_map(|change| change["ops"].as_array()) + .flatten() + .any(|op| op["op"] == "set" && op.get("value").is_none()) +} + +/// The refusal reason, compared by stage: a schema refusal (Zod's issue list) is a parse +/// refusal of `changes.json`; an op or change refusal carries the same message, change id and +/// op index included; a gate refusal names the same gate (the details are Zod's or serde's). +/// Declared family: an inherited `Object.prototype` member read at the end of a field path +/// made `structuredClone` throw at the op; the port writes a plain key the shape gate refuses. +fn assert_same_refusal(name: &str, typescript: &str, rust: &str) { + // Declared family: a non-object child of an added item made the TypeScript throw a + // TypeError where it walked it; the port refuses it at the add. + if typescript.contains("Cannot read properties of") + || typescript.contains("Cannot create property") + { + assert!(rust.contains("that is not an object"), "{name}: {rust}"); + return; + } + if typescript.ends_with("could not be cloned.") { + assert!( + rust.starts_with("curated document is not shape-valid"), + "{name}: {rust}" + ); + return; + } + if typescript.starts_with('[') { + assert!(rust.starts_with("changes.json: "), "{name}: {rust}"); + return; + } + for gate in [ + "curated document is not shape-valid", + "curated document has integrity errors", + ] { + if typescript.starts_with(gate) { + assert!(rust.starts_with(gate), "{name}: {rust}"); + return; + } + } + assert_eq!(rust, typescript, "{name}"); +} + +#[test] +fn the_synthetic_cases_match_the_typescript_or_are_refused_alike() { + let frozen = oracle("curation-synthetic.json"); + let baseline = &frozen["baseline"]; + let references = parse_references(&to_js_compact(&frozen["references_file"]).unwrap()).unwrap(); + let (mut compared, mut refused) = (0, 0); + for case in frozen["cases"].as_array().unwrap() { + let name = case["name"].as_str().unwrap(); + let changeset: Result<Changeset, _> = + parse_changeset(&to_js_compact(&case["changes_file"]).unwrap()); + let outcome = + changeset.and_then(|set| apply_changeset(baseline, &references, &set.changes)); + if DECLARED_ACCEPTS.contains(&name) { + assert!(outcome.is_ok(), "{name}: declared as accepted by the port"); + continue; + } + if !case["ok"].as_bool().unwrap() || DECLARED_REFUSALS.contains(&name) { + let error = outcome + .err() + .unwrap_or_else(|| panic!("{name}: the TypeScript refused, the port accepted")); + if name == "declared-proto-segment-overwritten" { + assert!( + error.to_string().contains("reserved key \"__proto__\""), + "{name}" + ); + } else if name == "declared-children-object-then-added-to" { + assert!(error.to_string().contains("that is not a list"), "{name}"); + } else if name == "declared-children-string-renamed-then-removed" { + assert!( + error.to_string().contains("that is not an object"), + "{name}" + ); + } else if has_set_without_value(&case["changes_file"]) { + // The declared family: refused at parse, whatever the TypeScript made of it. + assert!( + error.to_string().contains("missing field `value`"), + "{name}" + ); + } else { + let expected = case["error"].as_str().unwrap(); + assert_same_refusal(name, expected, &error.to_string()); + } + refused += 1; + continue; + } + compared += 1; + let result = outcome.unwrap_or_else(|error| panic!("{name}: {error}")); + let document_json = format_json(&result.document).unwrap(); + assert_eq!( + document_json, + case["document"].as_str().unwrap(), + "{name} document" + ); + assert_same( + &synthetic_records(&result.records), + &case["records"], + &format!("{name} records"), + ); + assert_same( + &value(&document_stats(&result.document).unwrap()), + &case["stats"], + &format!("{name} stats"), + ); + let (map, stats) = synthetic_map(baseline, &result.document, &result.records); + assert_eq!( + format_json(&map).unwrap(), + case["migration_map"].as_str().unwrap(), + "{name} map" + ); + assert_same( + &stats, + &case["migration_stats"], + &format!("{name} migration stats"), + ); + assert_eq!( + synthetic_seed(&document_json), + case["seed_sql"].as_str().unwrap(), + "{name} seed" + ); + } + assert_eq!((compared, refused), (14, 67)); + let reference_cases = frozen["reference_cases"].as_array().unwrap(); + assert_eq!(reference_cases.len(), 7); + for case in reference_cases { + let name = case["name"].as_str().unwrap(); + let outcome = parse_references(&to_js_compact(&case["file"]).unwrap()); + assert!( + outcome.is_err(), + "{name}: the TypeScript refused, the port accepted" + ); + } +} + +// --------------------------------------------------------------------------------------------- +// Parse semantics the synthetic oracle cannot carry (a JSON value holds no repeated key). + +const ONE_CHANGE: &str = r#"{"changes":[{"id":"CHG-001","level":"A","kind":"technical", +"title":{"fr":"Essai","en":"Test"},"rationale":"first","reference_ids":[], +"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]}"#; + +#[test] +fn a_repeated_key_keeps_its_last_value_as_json_parse_does() { + let repeated = ONE_CHANGE.replace( + r#""rationale":"first","#, + r#""rationale":"first","rationale":"last","#, + ); + let expected = ONE_CHANGE.replace(r#""rationale":"first","#, r#""rationale":"last","#); + assert_eq!( + parse_changeset(&repeated).unwrap(), + parse_changeset(&expected).unwrap() + ); + let references = r#"{"references":[{"id":"atlas","type":"book","citation":"a", +"citation":"b","url":null,"doi":null}]}"#; + assert_eq!(parse_references(references).unwrap()[0].citation, "b"); +} + +#[test] +fn a_reserved_touch_mark_key_in_an_authored_value_is_refused() { + let text = ONE_CHANGE.replace( + r#"{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}"#, + r#"{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name", +"value":{"fr":"a","en":"a","\u0000touched":0}}"#, + ); + let error = parse_changeset(&text).unwrap_err(); + assert!(error.to_string().contains("reserved key"), "{error}"); +} + +// --------------------------------------------------------------------------------------------- +// Declared and kept behaviours, characterised (owner 2026-10-23). + +fn mini_apply( + ops: Value, +) -> Result<faunosteo_core::curation::draft::records::CurationResult, String> { + mini_apply_at("B", ops) +} + +/// One change of the given level on the mini sheet (`changesetOf` of the TypeScript fixtures +/// used level A: no review mark). +fn mini_apply_at( + level: &str, + ops: Value, +) -> Result<faunosteo_core::curation::draft::records::CurationResult, String> { + let frozen = oracle("curation-synthetic.json"); + let references = parse_references(&to_js_compact(&frozen["references_file"]).unwrap()).unwrap(); + let file = json!({ "changes": [{ + "id": "CHG-001", "level": level, "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": "Essai", + "reference_ids": [], "ops": ops, + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).map_err(|e| e.to_string())?; + apply_changeset(&frozen["baseline"], &references, &changeset.changes).map_err(|e| e.to_string()) +} + +const MOBILITY: &str = "finding:hip/hip-dysfunctions/mobility"; + +fn mobility(document: &Value) -> &Value { + &document["finding_zones"][0]["categories"][0]["children"][0] +} + +/// An inherited `Object.prototype` member name (`constructor`, `toString`, `valueOf`…) in a +/// field path is an ordinary key in the port: it is never resolved through a prototype, the +/// settable table still checks the first segment, and every object of the sheet contract is +/// strict, so the key cannot reach the document. The only accepted form is a key a later op +/// replaces: the document is then the one the later op alone gives; one record traces the +/// overwritten write (or removed with its item). The TypeScript refused that form +/// (structuredClone of the function read). `__proto__` is not one of these names: it is +/// refused at the op (`a_proto_segment_is_refused_at_the_op`). +#[test] +fn an_inherited_member_name_is_a_plain_key_and_bypasses_nothing() { + let renamed = json!({ "fr": "Mobilité", "en": "Mobility" }); + let set_name = json!({ "op": "set", "target": MOBILITY, "field": "name", "value": renamed }); + for member in ["constructor", "toString", "hasOwnProperty", "valueOf"] { + let field = format!("name.{member}"); + let write = json!({ "op": "set", "target": MOBILITY, "field": field, "value": "x" }); + let kept = mini_apply(json!([write])).unwrap_err(); + assert!( + kept.starts_with("curated document is not shape-valid"), + "{member}: {kept}" + ); + let as_field = json!({ "op": "set", "target": MOBILITY, "field": member, "value": "x" }); + let refused = mini_apply(json!([as_field])).unwrap_err(); + assert!( + refused.contains(&format!("unknown field \"{member}\"")), + "{member}: {refused}" + ); + let deep = json!({ "op": "set", "target": MOBILITY, "field": format!("{member}.fr"), "value": "x" }); + assert!( + mini_apply(json!([deep])) + .unwrap_err() + .contains("unknown field"), + "{member}" + ); + let overwritten = mini_apply(json!([write, set_name])).unwrap(); + let alone = mini_apply(json!([set_name])).unwrap(); + assert_eq!( + format_json(&overwritten.document).unwrap(), + format_json(&alone.document).unwrap(), + "{member}: the document is the later op's alone" + ); + assert_eq!(mobility(&overwritten.document)["name"], renamed); + let traced: Vec<_> = overwritten + .records + .iter() + .filter(|r| r.field.as_deref() == Some(field.as_str())) + .collect(); + assert_eq!(traced.len(), 1, "{member}"); + assert_eq!( + traced[0].before, + Value::Null, + "{member}: never read through the prototype" + ); + assert_eq!( + overwritten.records.len(), + alone.records.len() + 1, + "{member}" + ); + } +} + +/// Technical debt kept during R5 (owner 2026-10-23, RUST.md §11.12): the migration map replays +/// a record by its op, whatever its target, as `migration-map.ts` does. A cascade record of a +/// view, zone or region rename on an annotation is replayed as a rename of that annotation, +/// and a reference rename's cascade on a cited finding as a rename of the finding's path. The +/// values below are the TypeScript's (frozen in `curation-synthetic.json`); a fix would change +/// them on both sides and is the owner's decision. +#[test] +fn the_migration_map_replays_cascade_records_by_their_op_as_the_typescript_does() { + let frozen = oracle("curation-synthetic.json"); + let case = |name: &str| { + let case = frozen["cases"] + .as_array() + .unwrap() + .iter() + .find(|c| c["name"] == name) + .unwrap(); + ( + serde_json::from_str::<Value>(case["migration_map"].as_str().unwrap()).unwrap(), + case["migration_stats"].clone(), + ) + }; + let (map, _) = case("quirk-view-rename-retargets-annotation"); + assert_eq!( + map["annotations"]["legacy-hip"]["id"], "principal", + "should stay hip" + ); + assert_eq!( + map["annotations"]["legacy-neck"]["id"], "principal", + "should stay neck" + ); + assert_eq!(map["views"]["head"], "principal", "should stay head"); + let (map, stats) = case("quirk-reference-rename-renames-finding-path"); + let path = "hip/hip-dysfunctions/mobility"; + assert_eq!( + map["finding_paths"][path], path, + "restored by re-homing only" + ); + assert_eq!( + stats["rehomed"], 3, + "should be 0: the three paths are identical" + ); + let (map, _) = case("renames-cascade"); + assert_eq!( + map["annotations"]["legacy-hip"]["id"], "hip-joint", + "should be coxofemoral" + ); + assert_eq!( + map["finding_paths"][path], + Value::Null, + "should be hip-joint/hip-dysfunctions/motion" + ); +} + +// --------------------------------------------------------------------------------------------- +// Resource bounds and reserved names reached through a field path (final R5.3 gates). + +#[test] +fn a_reserved_or_unbounded_field_path_is_refused_without_writing() { + for field in [ + "name.\u{0}touched", + "description.\u{0}touched", + "name.\u{0}other", + ] { + let op = json!({ "op": "set", "target": MOBILITY, "field": field, "value": "author text" }); + let error = mini_apply(json!([op])).unwrap_err(); + assert!( + error.contains("CHG-001 op 0: reserved key"), + "{field}: {error}" + ); + } + // 20,000 segments overflowed the stack before the bound (security gate, MEDIUM-1). + let deep = format!("name{}", ".a".repeat(20_000)); + let op = json!({ "op": "set", "target": MOBILITY, "field": deep, "value": "x" }); + let error = mini_apply(json!([op])).unwrap_err(); + assert!(error.contains("more than 8 segments"), "{error}"); +} + +#[test] +fn the_document_cannot_be_nested_past_the_bound_by_repeated_adds() { + let mut ops = Vec::new(); + let mut parent = MOBILITY.to_owned(); + for level in 0..40 { + let id = format!("n{level}"); + ops.push(json!({ "op": "add", "target": parent, "value": { "id": id, "name": { "fr": "a", "en": "a" } } })); + parent = format!("{parent}/{id}"); + } + let error = mini_apply(Value::Array(ops)).unwrap_err(); + assert!(error.contains("nests more than 64 levels"), "{error}"); +} + +fn import_equine(args: &[&str]) -> (i32, String) { + let output = std::process::Command::new(env!("CARGO_BIN_EXE_import-equine")) + .args(args) + .env_remove("INIT_CWD") + .output() + .unwrap(); + let text = String::from_utf8_lossy(&output.stderr).into_owned(); + (output.status.code().unwrap_or(-1), text) +} + +/// Fixed fixtures under the test target's temporary folder: created once, never deleted, and +/// never written by the refusals checked here. The seed refusal is tested on the pure check +/// (`inside`, unit test of the binary): a regression must never write into the real seed. +fn out_fixtures() -> std::path::PathBuf { + let base = std::path::Path::new(env!("CARGO_TARGET_TMPDIR")).join("import-equine-out"); + for folder in ["empty", "full"] { + std::fs::create_dir_all(base.join(folder)).unwrap(); + } + std::fs::write(base.join("full/keep.txt"), b"keep").unwrap(); + std::fs::write(base.join("file"), b"file").unwrap(); + let link = base.join("link"); + if std::fs::symlink_metadata(&link).is_err() { + std::os::unix::fs::symlink(base.join("empty"), &link).unwrap(); + } + base +} + +#[test] +fn out_refuses_every_unsafe_destination_and_writes_nothing() { + let base = out_fixtures(); + let at = |rest: &str| format!("{}/{rest}", base.display()); + let cases = [ + (at("link"), "a symbolic link"), + (at("link/"), "a symbolic link"), + (at("link/."), "a symbolic link"), + (at("file"), "not a folder"), + (at("full"), "not empty"), + (at("empty/../new"), "`..` is not accepted"), + (at("absent/new"), "the parent folder does not exist"), + ]; + for (path, why) in &cases { + let (code, stderr) = import_equine(&["--out", path]); + assert_eq!(code, 2, "{path}: {stderr}"); + assert!(stderr.contains(why), "{path}: {stderr}"); + } + assert_eq!(std::fs::read_dir(base.join("empty")).unwrap().count(), 0); + assert_eq!(std::fs::read_dir(base.join("full")).unwrap().count(), 1); + assert!(std::fs::symlink_metadata(base.join("absent")).is_err()); +} + +/// `JSON.parse` keeps no integer beyond 2^53: the record holds the double the document holds. +#[test] +fn an_integer_beyond_2_53_is_read_as_the_double_json_parse_gives() { + let text = |count: &str| { + format!( + r#"{{"changes":[{{"id":"CHG-001","level":"A","kind":"technical", +"title":{{"fr":"Essai","en":"Test"}},"rationale":"Essai","reference_ids":[], +"ops":[{{"op":"set","target":"region:C","field":"count","value":{count}}}]}}]}}"# + ) + }; + let exact = parse_changeset(&text("9007199254740993")).unwrap(); + let rounded = parse_changeset(&text("9007199254740992")).unwrap(); + let print = |set: &Changeset| to_js_compact(&serde_json::to_value(set).unwrap()).unwrap(); + assert_eq!(print(&exact), print(&rounded)); + let frozen = oracle("curation-synthetic.json"); + let references = parse_references(&to_js_compact(&frozen["references_file"]).unwrap()).unwrap(); + let result = apply_changeset(&frozen["baseline"], &references, &exact.changes).unwrap(); + assert_eq!( + to_js_compact(&result.records[0].after).unwrap(), + "9007199254740992" + ); + assert!( + format_json(&result.document) + .unwrap() + .contains("9007199254740992") + ); +} + +/// The records bound now stops a growing changeset first (every added value is recorded); the +/// document bound still holds a baseline near it: one small add past 200,000 values is refused. +#[test] +fn the_document_cannot_hold_more_values_than_the_bound() { + let frozen = oracle("curation-synthetic.json"); + let references = parse_references(&to_js_compact(&frozen["references_file"]).unwrap()).unwrap(); + let mut baseline = frozen["baseline"].clone(); + baseline["padding"] = Value::from(vec![Value::Null; 199_950]); + let value = json!({ "id": "small", "name": { "fr": "a", "en": "a" }, + "children": (0..20).map(|i| json!({ "id": format!("n{i}"), "name": { "fr": "a", "en": "a" } })) + .collect::<Vec<_>>() }); + let file = json!({ "changes": [{ + "id": "CHG-001", "level": "A", "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": "Essai", + "reference_ids": [], "ops": [{ "op": "add", "target": MOBILITY, "value": value }], + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).unwrap(); + let error = apply_changeset(&baseline, &references, &changeset.changes) + .unwrap_err() + .to_string(); + assert!(error.contains("more than 200000 values"), "{error}"); +} + +/// A rename or a remove records the whole item, before and after, with the change's texts: +/// the records are bounded in total (security gate R5.4 round 7: 400 renames of a +/// 5,000-child item asked for 4.3 GB). The equine changeset stays far below the bound. +#[test] +fn the_records_cannot_outgrow_their_bound() { + use faunosteo_core::curation::draft::records::MAX_RECORDED_WEIGHT; + use faunosteo_core::curation::draft::records::record_weight; + let equine: usize = equine_draft().records.iter().map(record_weight).sum(); + println!("equine records weigh {equine} units"); + assert!(equine * 8 < MAX_RECORDED_WEIGHT, "{equine}"); + let children: Vec<Value> = (0..5_000) + .map(|i| json!({ "id": format!("n{i}"), "name": { "fr": "a", "en": "a" } })) + .collect(); + let value = json!({ "id": "many", "name": { "fr": "a", "en": "a" }, "children": children }); + let mut ops = vec![json!({ "op": "add", "target": MOBILITY, "value": value })]; + for round in 0..200 { + let (from, to) = if round % 2 == 0 { + ("many", "other") + } else { + ("other", "many") + }; + ops.push(json!({ "op": "rename", "target": format!("{MOBILITY}/{from}"), "id": to })); + } + let error = mini_apply(Value::from(ops)).unwrap_err(); + assert!(error.contains("the records weigh more than"), "{error}"); +} + +/// One op, or the B/C marking, records once per item it reaches: the bound is charged at each +/// record, before the change and the op are cloned into it (security gate R5.4 round 8: a level +/// B add of 10,000 children with a 128 KiB rationale reached 1.37 GB inside one marking). +#[test] +fn the_records_bound_holds_inside_one_op_and_the_marking() { + let children: Vec<Value> = (0..5_000) + .map(|i| json!({ "id": format!("n{i}"), "name": { "fr": "a", "en": "a" } })) + .collect(); + let value = json!({ "id": "many", "name": { "fr": "a", "en": "a" }, "children": children }); + let add = json!({ "op": "add", "target": MOBILITY, "value": value }); + let frozen = oracle("curation-synthetic.json"); + let references = parse_references(&to_js_compact(&frozen["references_file"]).unwrap()).unwrap(); + let description = json!({ "fr": "d".repeat(4_096), "en": "d" }); + let subtree = json!({ "op": "set", "target": format!("{MOBILITY}/many"), "field": "description", + "value": description, "scope": "subtree" }); + let cases = [ + ("B", "r".repeat(8_192), json!([add])), + ("A", "Essai".to_owned(), json!([add, subtree])), + ]; + // A run of one-character reference ids weighs its headers too (security gate R5.4 round 9: + // 200,000 ids cloned into each record reached 948 MB at one unit per byte). + let mut cases = cases.to_vec(); + let sets: Vec<Value> = (0..100) + .map(|i| json!({ "op": "set", "target": MOBILITY, "field": "name.en", "value": format!("v{i}") })) + .collect(); + cases.push(("ids", "Essai".to_owned(), Value::from(sets))); + for (level, rationale, ops) in cases { + let ids = if level == "ids" { + vec!["atlas"; 200_000] + } else { + Vec::new() + }; + let level = if level == "ids" { "A" } else { level }; + let file = json!({ "changes": [{ + "id": "CHG-001", "level": level, "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": rationale, + "reference_ids": ids, "ops": ops, + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).unwrap(); + let error = apply_changeset(&frozen["baseline"], &references, &changeset.changes) + .unwrap_err() + .to_string(); + assert!( + error.contains("the records weigh more than"), + "{level}: {error}" + ); + } +} + +/// A `__proto__` segment had no faithful reading in the TypeScript (a prototype set, a +/// polluted `Object.prototype`, or nothing written): the port refuses it at the op. +#[test] +fn a_proto_segment_is_refused_at_the_op() { + let renamed = json!({ "fr": "a", "en": "b" }); + let set_name = json!({ "op": "set", "target": MOBILITY, "field": "name", "value": renamed }); + for field in [ + "name.__proto__", + "name.__proto__.x", + "description.__proto__.fr", + ] { + let write = json!({ "op": "set", "target": MOBILITY, "field": field, "value": "x" }); + for ops in [json!([write]), json!([write, set_name])] { + let error = mini_apply(ops).unwrap_err(); + assert!( + error.contains("CHG-001 op 0: reserved key \"__proto__\""), + "{field}: {error}" + ); + } + } +} + +// --------------------------------------------------------------------------------------------- +// R5.7: cases of the deleted TypeScript suites that no oracle carries, ported with their exact +// expectations (`crates/core/tests/curation/LEDGER.tsv`). + +/// `curation.apply.test.ts` "adds a zone, an annotation and a reference at document level": a +/// `cite` of a reference an earlier op of the same change added is accepted and recorded. +#[test] +fn a_reference_added_at_document_level_can_be_cited_by_the_same_change() { + let ops = json!([ + { "op": "add", "target": "document", "field": "finding_zones", + "value": { "id": "back", "name": { "fr": "Dos", "en": "Back" }, "categories": [] } }, + { "op": "add", "target": "document", "field": "annotations", "position": { "after": "neck" }, + "value": { "id": "back", "kind": "zone", "view_id": "main", "category_id": "bones", + "laterality": "unpaired", "geometry": null, "name": { "fr": "Dos", "en": "Back" }, + "finding_zone_id": "back", "vertebral_region_code": "T" } }, + { "op": "add", "target": "document", "field": "references", + "value": { "id": "book", "type": "book", "citation": "Book", "url": null, "doi": null } }, + { "op": "cite", "target": "finding:hip/anamnesis", "reference_ids": ["book"] }, + ]); + let result = mini_apply_at("A", ops).unwrap(); + let ids: Vec<&str> = result.document["annotations"] + .as_array() + .unwrap() + .iter() + .map(|a| a["id"].as_str().unwrap()) + .collect(); + assert_eq!(ids, ["hip", "neck", "back", "head-trigger"]); + let targets: Vec<&str> = result.records.iter().map(|r| r.target.as_str()).collect(); + assert_eq!( + targets, + [ + "zone:back", + "annotation:back", + "reference:book", + "finding:hip/anamnesis" + ] + ); +} + +/// `curation.assets.test.ts` "reads a viewBox into a document view_box". +#[test] +fn a_view_box_of_four_numbers_is_read_and_three_are_refused() { + let view_box = parse_view_box(Some("60 100 500 380")).unwrap(); + assert_eq!( + ( + view_box.min_x, + view_box.min_y, + view_box.width, + view_box.height + ), + (60.0, 100.0, 500.0, 380.0) + ); + let error = parse_view_box(Some("1 2 3")).unwrap_err().to_string(); + assert!(error.contains("invalid viewBox"), "{error}"); +} + +/// `curation.migration-map.test.ts` "follows a rename, a move and a removal, and a renamed +/// annotation": a move addressed through a path renamed by an earlier op of the same change. +#[test] +fn the_map_follows_a_rename_then_a_move_through_the_renamed_path() { + let result = mini_apply_at("A", json!([ + { "op": "rename", "target": "finding:hip/hip-dysfunctions/mobility", "id": "motion" }, + { "op": "move", "target": "finding:hip/hip-dysfunctions/motion/flexion", "to": "finding:hip/anamnesis" }, + { "op": "remove", "target": "finding:neck/neck-dysfunctions/vet" }, + { "op": "rename", "target": "annotation:hip", "id": "coxofemoral" }, + ])) + .unwrap(); + let baseline = oracle("curation-synthetic.json")["baseline"].clone(); + let (map, stats) = synthetic_map(&baseline, &result.document, &result.records); + let paths = &map["finding_paths"]; + assert_eq!( + paths["hip/hip-dysfunctions/mobility/extension"], + "hip/hip-dysfunctions/motion/extension" + ); + assert_eq!( + paths["hip/hip-dysfunctions/mobility/flexion"], + "hip/anamnesis/flexion" + ); + assert_eq!(paths["neck/neck-dysfunctions/vet"], Value::Null); + assert_eq!( + paths["neck/neck-dysfunctions/stiffness"], + "neck/neck-dysfunctions/stiffness" + ); + assert_eq!(map["annotations"]["legacy-hip"]["id"], "coxofemoral"); + assert_eq!(stats["removed"], 1); +} + +/// `curation.pipeline.test.ts` "refuses a changeset that reuses the reserved CHG-000". +#[test] +fn a_changeset_reusing_the_reserved_asset_change_id_is_refused() { + let import_result = legacy_result(); + let reserved = ONE_CHANGE.replace("CHG-001", "CHG-000"); + let changeset = parse_changeset(&reserved).unwrap(); + let error = build_equine_draft(&DraftInput { + import_result: &import_result, + cleaned_svg: &bytes(&format!("{DRAFT}/assets/horse.svg")), + head_view_box: parse_view_box(Some("60 100 500 380")).unwrap(), + references: &[], + changes: &changeset.changes, + }) + .err() + .unwrap() + .to_string(); + assert!(error.contains("CHG-000 is reserved"), "{error}"); +} + +/// `importer.guards.test.ts` "refuses a document that contains the dollar-quote tag". +#[test] +fn a_document_holding_the_dollar_quote_tag_is_refused_by_the_seed() { + let document_json = to_js_compact(&json!({ "note": "$equine_doc$" })).unwrap(); + let error = render_draft_seed_sql(&DraftSeedParams { + sheet_id: "11111111-1111-5111-8111-111111111111", + assets: &[], + document_json: &document_json, + change_note: "x", + }) + .unwrap_err() + .to_string(); + assert!(error.contains("$equine_doc$"), "{error}"); +} + +/// Every file under `dir`, relative to it, sorted. +fn files_under(dir: &str) -> Vec<String> { + fn walk(root: &std::path::Path, at: &std::path::Path, out: &mut Vec<String>) { + for entry in std::fs::read_dir(at).unwrap() { + let path = entry.unwrap().path(); + if path.is_dir() { + walk(root, &path, out); + } else { + out.push( + path.strip_prefix(root) + .unwrap() + .to_string_lossy() + .into_owned(), + ); + } + } + } + let root = std::path::PathBuf::from(common::repo_path(dir)); + let mut out = Vec::new(); + walk(&root, &root, &mut out); + out.sort(); + out +} + +/// `r5.pipeline-oracles.test.ts` "the ledger digests are the committed files": each of the 16 +/// text artifacts the TypeScript recorded at R5.1 is the committed file, byte count included; +/// the two fingerprint-bearing draft files are the pre-switch copies (the switch itself is +/// `the_switch_changes_only_the_fingerprint_of_the_two_files`). +#[test] +fn every_ledger_row_of_the_r5_1_run_is_the_committed_file() { + let artifacts = oracle("pipeline.json")["artifacts"].clone(); + let rows = artifacts.as_array().unwrap(); + assert_eq!(rows.len(), 16); + for row in rows { + let (folder, file) = ( + row["folder"].as_str().unwrap(), + row["file"].as_str().unwrap(), + ); + let switched = folder.ends_with("/draft") + && ["sheet-ref.json", "report-migration-map.json"].contains(&file); + let path = if switched { + format!("crates/core/tests/fixtures/r5-6/pre-switch/{file}") + } else { + format!("{folder}/{file}") + }; + let committed = bytes(&path); + assert_eq!(row["sha256"], sha256_hex(&committed), "{folder}/{file}"); + assert_eq!(row["bytes"], committed.len(), "{folder}/{file}"); + } +} + +/// `seed.golden.test.ts` "holds no file the run does not produce" and the legacy folder's "no +/// SQL": the two generated folders hold exactly the ledger's files plus the byte copies. +#[test] +fn the_generated_folders_hold_exactly_the_files_the_pipeline_writes() { + let artifacts = oracle("pipeline.json")["artifacts"].clone(); + let listed = |suffix: &str| -> Vec<String> { + artifacts + .as_array() + .unwrap() + .iter() + .filter(|row| row["folder"].as_str().unwrap().ends_with(suffix)) + .map(|row| row["file"].as_str().unwrap().to_owned()) + .collect() + }; + let mut legacy = listed("/legacy-import"); + legacy.extend([ + "assets/Horse.svg".to_owned(), + "assets/Horse_head.svg".to_owned(), + ]); + legacy.sort(); + let legacy_dir = "supabase/seed/anatomical-sheets/equine/legacy-import"; + assert_eq!(files_under(legacy_dir), legacy); + assert!(legacy.iter().all(|file| !file.ends_with(".sql"))); + let mut draft = listed("/draft"); + draft.sort(); + assert_eq!(draft.len(), 12); + assert_eq!(files_under(DRAFT), draft); +} diff --git a/crates/core/tests/curation_format.rs b/crates/core/tests/curation_format.rs new file mode 100644 index 00000000..cdae89a9 --- /dev/null +++ b/crates/core/tests/curation_format.rs @@ -0,0 +1,253 @@ +//! The pipeline's formatting and JavaScript semantics (R5.2) against the TypeScript tools +//! themselves: Prettier's JSON layout and table alignment, `slugify`, `deterministicUuid`, +//! `Number()`, `Math.round`, `Object.keys` order, `trim`. The expectations were written by +//! Node (`packages/anatomy/tests/r5.format-oracles.test.ts`, `r5.pipeline-oracles.test.ts`); +//! nothing here computes its own expected text. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::anatomy::svg::number::{is_js_space, js_number_of, js_split_list}; +use faunosteo_core::curation::PipelineError; +use faunosteo_core::curation::ids::deterministic_uuid; +use faunosteo_core::curation::legacy::regions::{RegionMatch, infer_region_code}; +use faunosteo_core::curation::markdown::format_markdown; +use faunosteo_core::curation::prettier_json::format_json; +use faunosteo_core::curation::text::{js_keys, js_round, slugify}; +use faunosteo_core::domain::js::parse_json; +use faunosteo_core::json::js_number; +use serde_json::Value; + +fn oracle(name: &str) -> Value { + serde_json::from_str(&common::repo_file(&format!( + "crates/core/tests/oracles/r5/{name}" + ))) + .unwrap() +} + +fn rows<'a>(value: &'a Value, key: &str) -> &'a Vec<Value> { + value[key].as_array().unwrap() +} + +/// Every case prints as Prettier printed it, except the declared refusal: a text holding an +/// emoji, whose Prettier width table is not reproduced (`PipelineError::UnsupportedWidth`). +#[test] +fn json_layout_matches_prettier_on_every_probe() { + let oracle = oracle("prettier-json.json"); + let mut refused = Vec::new(); + for (index, case) in rows(&oracle, "cases").iter().enumerate() { + let input = parse_json(case["input"].as_str().unwrap()).unwrap(); + match format_json(&input) { + Ok(text) => assert_eq!(text, case["output"].as_str().unwrap(), "case {index}"), + Err(PipelineError::UnsupportedWidth(_)) => refused.push(index), + Err(other) => panic!("case {index}: {other}"), + } + } + assert_eq!(refused, vec![19], "only the emoji case is refused"); +} + +#[test] +fn every_generated_json_file_of_the_seed_prints_byte_for_byte() { + let seed = "supabase/seed/anatomical-sheets/equine"; + for file in [ + "legacy-import/document.json", + "legacy-import/legacy-id-map.json", + "legacy-import/assets.json", + "draft/document.json", + "draft/assets.json", + "draft/sheet-ref.json", + "draft/report-migration-map.json", + ] { + let text = common::repo_file(&format!("{seed}/{file}")); + let value = parse_json(&text).unwrap(); + assert_eq!(format_json(&value).unwrap(), text, "{file}"); + } +} + +#[test] +fn tables_align_as_prettier_aligns_them() { + let oracle = oracle("markdown-tables.json"); + let mut refused = Vec::new(); + for (index, case) in rows(&oracle, "cases").iter().enumerate() { + match format_markdown(case["raw"].as_str().unwrap()) { + Ok(text) => assert_eq!(text, case["output"].as_str().unwrap(), "case {index}"), + Err(PipelineError::UnsupportedWidth(_)) => refused.push(index), + Err(other) => panic!("case {index}: {other}"), + } + } + assert_eq!(refused, vec![5], "only the emoji table is refused"); +} + +/// One long cell pads every row of its column: the aligned table is bounded before any row is +/// built (security gate R5.4 round 6: an 80 KB rationale over 14,000 records asked for 1 GB). +#[test] +fn an_aligned_table_past_the_bound_is_refused_before_it_is_built() { + let mut raw = vec!["| a | b |".to_owned(), "| --- | --- |".to_owned()]; + raw.push(format!("| {} | x |", "w".repeat(2_000))); + raw.extend((0..20_000).map(|_| "| a | b |".to_owned())); + let error = format_markdown(&raw.join("\n")).unwrap_err(); + assert!( + matches!(&error, PipelineError::Guard(message) if message.contains("exceeds the")), + "{error}" + ); +} + +#[test] +fn slugs_and_uuids_match_the_typescript() { + let semantics = oracle("js-semantics.json"); + let ids = oracle("ids.json"); + for row in rows(&semantics, "slugify").iter().chain(rows(&ids, "slug")) { + let label = row["label"].as_str().unwrap(); + assert_eq!(slugify(label), row["slug"].as_str().unwrap(), "{label:?}"); + } + let uuid_rows = rows(&semantics, "deterministicUuid") + .iter() + .chain(rows(&ids, "uuid")); + for row in uuid_rows { + let name = row["name"].as_str().unwrap(); + assert_eq!( + deterministic_uuid(name), + row["uuid"].as_str().unwrap(), + "{name:?}" + ); + } +} + +#[test] +fn number_points_round_and_trim_follow_javascript() { + let semantics = oracle("js-semantics.json"); + for row in rows(&semantics, "number") { + let value = js_number_of(row["text"].as_str().unwrap()); + assert_eq!(js_string(value), row["string"].as_str().unwrap(), "{row}"); + let negative_zero = value == 0.0 && value.is_sign_negative(); + assert_eq!( + negative_zero, + row["negativeZero"].as_bool().unwrap(), + "{row}" + ); + } + for row in rows(&semantics, "points") { + let numbers: Vec<String> = js_split_list(row["text"].as_str().unwrap()) + .into_iter() + .map(|part| js_string(js_number_of(part))) + .collect(); + let expected: Vec<&str> = rows(row, "numbers") + .iter() + .map(|n| n.as_str().unwrap()) + .collect(); + assert_eq!(numbers, expected, "{row}"); + } + for row in rows(&semantics, "mathRound") { + let bits = u64::from_str_radix(row["bits"].as_str().unwrap(), 16).unwrap(); + let value = f64::from_bits(bits); + let rounded = js_round(value); + assert_eq!(js_string(rounded), row["round"].as_str().unwrap(), "{row}"); + let negative_zero = rounded == 0.0 && rounded.is_sign_negative(); + assert_eq!( + negative_zero, + row["negativeZero"].as_bool().unwrap(), + "{row}" + ); + } + for row in rows(&semantics, "trim") { + let text = row["text"].as_str().unwrap(); + assert_eq!( + text.trim_matches(is_js_space), + row["trimmed"].as_str().unwrap() + ); + let space = text.chars().next().unwrap(); + assert_eq!( + is_js_space(space), + row["isSpace"].as_bool().unwrap(), + "{space:?}" + ); + } +} + +#[test] +fn object_keys_follow_javascript_order() { + let semantics = oracle("js-semantics.json"); + for row in rows(&semantics, "objectEntriesOrder") { + let value = parse_json(row["text"].as_str().unwrap()).unwrap(); + let keys: Vec<&String> = js_keys(value.as_object().unwrap()); + let expected: Vec<&str> = rows(row, "keys") + .iter() + .map(|k| k.as_str().unwrap()) + .collect(); + assert_eq!(keys, expected, "{row}"); + } +} + +/// `String(number)`, NaN and the infinities included. +fn js_string(value: f64) -> String { + if value.is_nan() { + "NaN".to_owned() + } else if value.is_infinite() { + if value > 0.0 { "Infinity" } else { "-Infinity" }.to_owned() + } else { + js_number(value) + } +} + +fn region(fr: Option<&str>, en: Option<&str>) -> Option<String> { + infer_region_code(fr, en).map(|m| m.code) +} + +/// `inferRegionCode` as Node ran it (`js-semantics.json`, 12 rows: root, label and code) and the +/// cases of the deleted `legacy.regions.test.ts` (R5.7): FR roots with and without accents, EN +/// roots when FR is absent, FR before EN, the EN fallback when FR names no root. +#[test] +fn region_inference_follows_the_typescript() { + let semantics = oracle("js-semantics.json"); + let cases = rows(&semantics, "inferRegionCode"); + assert_eq!(cases.len(), 12); + for case in cases { + let (fr, en) = (case["fr"].as_str(), case["en"].as_str()); + let actual = infer_region_code(fr, en).map(|RegionMatch { code, root, label }| { + serde_json::json!({ "code": code, "root": root, "label": label }) + }); + assert_eq!( + actual.unwrap_or(Value::Null), + case["match"], + "{fr:?} / {en:?}" + ); + } + for (fr, code) in [ + ("Vertèbres cervicales", "C"), + ("Vertebres cervicales", "C"), + ("Vertèbres thoraciques", "T"), + ("Vertebres thoraciques", "T"), + ("Vertèbres lombaires", "L"), + ("Vertèbres sacrales", "S"), + ("Vertèbres sacrées", "S"), + ("Vertèbres caudales", "Cd"), + ("Vertèbres coccygiennes", "Cd"), + ("Région dorsale", "T"), + ] { + assert_eq!(region(Some(fr), None).as_deref(), Some(code), "{fr}"); + } + for (en, code) in [ + ("Cervical Vertebrae", "C"), + ("Thoracic Vertebrae", "T"), + ("Lumbar Vertebrae", "L"), + ("Sacral Vertebrae", "S"), + ("Coccygeal Vertebrae", "Cd"), + ] { + assert_eq!(region(None, Some(en)).as_deref(), Some(code), "{en}"); + } + assert_eq!(region(Some("Épaule"), Some("Shoulder")), None); + assert_eq!(region(Some(""), Some("")), None); + assert_eq!(region(None, None), None); + assert_eq!( + infer_region_code(Some("Vertèbres lombaires"), Some("Cervical")), + Some(RegionMatch { + code: "L".into(), + root: "lombair".into(), + label: "Vertèbres lombaires".into() + }) + ); + assert_eq!( + region(Some("Épaule"), Some("Cervical Vertebrae")).as_deref(), + Some("C") + ); +} diff --git a/crates/core/tests/curation_leaves.rs b/crates/core/tests/curation_leaves.rs new file mode 100644 index 00000000..d7d2ea8a --- /dev/null +++ b/crates/core/tests/curation_leaves.rs @@ -0,0 +1,263 @@ +//! `packages/anatomy/tests/curation.migration-leaves.test.ts` ported with its exact expectations +//! (R5.7): every leaf of the legacy catalog (612) and every legacy annotation (27) travels through +//! the Report v2 → v3 migration with the committed map, then is checked against the curated draft +//! document itself, not against the map alone. The other 612-leaf tests (`report_rules`, the produced +//! map in `curation_draft`, the application's `migration.leaves`) keep their own angles. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod archive_support; +mod common; + +use archive_support::*; +use faunosteo_core::domain::report::v2::ReportV2; +use faunosteo_core::domain::report::{ + Finding, ReportMigrationMap, finding_path_key, migrate_report_v2_to_v3, read_report_document, +}; +use faunosteo_core::domain::sheet::{AnatomicalSheetDocument, Annotation, LoadedSheet}; +use serde_json::{Value, json}; + +struct Fixture { + draft: LoadedSheet, + map: ReportMigrationMap, + leaves: Vec<LegacyLeaf>, + findings: Vec<Finding>, +} + +fn fixture() -> Fixture { + let map = draft_map(); + let leaves = legacy_leaves(); + let v2: ReportV2 = from(leaves_as_v2_report(&leaves)); + let report = migrate_report_v2_to_v3(&v2, &map).unwrap().report; + let findings = report + .observations + .into_iter() + .flat_map(|o| o.findings) + .collect(); + Fixture { + draft: draft_sheet(), + map, + leaves, + findings, + } +} + +fn document(f: &Fixture) -> &AnatomicalSheetDocument { + &f.draft.document +} + +fn joined(path: &[String]) -> String { + path.join("/") +} + +/// An empty v2 report holding one observation with these zones. +fn zones_report(zones: Value) -> ReportV2 { + let mut v2 = leaves_as_v2_report(&[]); + v2["observations"] = json!([{ + "id": "zones", "zones": zones, "findings": [], "freeTextFindings": [], "comment": "" + }]); + from(v2) +} + +#[test] +fn migrates_the_612_leaves_442_identical_141_moved_29_removed() { + let f = fixture(); + assert_eq!(f.leaves.len(), 612); + assert_eq!(f.findings.len(), 612); + let (mut identical, mut moved, mut removed) = (0, 0, 0); + for (leaf, out) in f.leaves.iter().zip(&f.findings) { + let same = out.finding_zone_id == leaf.zone_id && out.path == leaf.path; + if out.unresolved.is_some() { + removed += 1; + } else if same { + identical += 1; + } else { + moved += 1; + } + } + assert_eq!((identical, moved, removed), (442, 141, 29)); +} + +#[test] +fn lands_every_resolved_leaf_on_a_leaf_of_the_draft_document() { + let f = fixture(); + for out in f.findings.iter().filter(|o| o.unresolved.is_none()) { + let where_ = format!("{}/{}", out.finding_zone_id, joined(&out.path)); + let node = f.draft.indexed().node_at(&out.finding_zone_id, &out.path); + assert!( + node.as_ref().is_some_and(|n| n.children().is_empty()), + "{where_}" + ); + } +} + +#[test] +fn keeps_the_legacy_snapshots_and_the_vet_flag_verbatim_on_every_finding() { + let f = fixture(); + for (leaf, out) in f.leaves.iter().zip(&f.findings) { + let en = if leaf.en.is_empty() { + &leaf.fr + } else { + &leaf.en + }; + assert_eq!(out.label_fr_snapshot, leaf.fr); + assert_eq!(&out.label_en_snapshot, en); + assert_eq!( + out.requires_vet_referral.unwrap_or(false), + leaf.vet, + "{}", + joined(&leaf.path) + ); + } +} + +#[test] +fn flags_exactly_the_leaves_the_curation_removed_with_their_legacy_path_kept() { + let f = fixture(); + let removed: Vec<String> = f + .leaves + .iter() + .map(|leaf| finding_path_key(&leaf.zone_id, &leaf.path)) + .filter(|key| matches!(f.map.finding_paths.get(key), Some(None))) + .collect(); + assert_eq!(removed.len(), 29); + let flagged: Vec<&Finding> = f + .findings + .iter() + .filter(|o| o.unresolved.is_some()) + .collect(); + let keys: Vec<String> = flagged + .iter() + .map(|o| format!("{}/{}", o.finding_zone_id, joined(&o.path))) + .collect(); + assert_eq!(keys, removed); + for o in flagged { + assert!( + f.draft + .indexed() + .node_at(&o.finding_zone_id, &o.path) + .is_none() + ); + } +} + +#[test] +fn moves_the_141_relocated_leaves_inside_their_zone_134_category_7_leaf() { + let f = fixture(); + let (mut category, mut leaf_renamed) = (0, 0); + for (leaf, out) in f.leaves.iter().zip(&f.findings) { + if out.unresolved.is_some() || out.path == leaf.path { + continue; + } + assert_eq!(out.finding_zone_id, leaf.zone_id, "{}", joined(&leaf.path)); + if out.path.last() == leaf.path.last() { + category += 1; + } else { + leaf_renamed += 1; + } + } + assert_eq!((category, leaf_renamed), (134, 7)); +} + +#[test] +fn reads_the_migrated_report_back_unchanged() { + let f = fixture(); + let v2 = leaves_as_v2_report(&f.leaves); + let report = read_report_document(&v2, &f.map).unwrap().report; + let again = read_report_document(&report_value(&report), &f.map).unwrap(); + assert_eq!(again.report, report); + assert_eq!((again.unresolved_zones, again.unresolved_findings), (0, 0)); +} + +#[test] +fn maps_the_26_observable_legacy_ids_to_annotations_of_the_right_view() { + let f = fixture(); + let doc = document(&f); + let triggers: Vec<&str> = doc + .annotations + .iter() + .filter_map(Annotation::trigger) + .map(|a| a.id.as_str()) + .collect(); + let mut legacy_ids: Vec<&String> = f + .map + .annotations + .iter() + .filter(|(_, mapped)| !triggers.contains(&mapped.id.as_str())) + .map(|(id, _)| id) + .collect(); + legacy_ids.sort(); + assert_eq!(legacy_ids.len(), 26); + let head: Vec<&str> = doc + .annotations + .iter() + .filter(|a| a.view_id() == "head") + .map(Annotation::id) + .collect(); + let zones: Vec<Value> = legacy_ids + .iter() + .map(|id| { + if head.contains(&f.map.annotations[*id].id.as_str()) { + json!({ "boneId": id, "detailSourceId": "head" }) + } else { + json!({ "boneId": id }) + } + }) + .collect(); + assert!(zones.iter().any(|z| z.get("detailSourceId").is_some())); + let out = migrate_report_v2_to_v3(&zones_report(json!(zones)), &f.map).unwrap(); + assert_eq!(out.unresolved_zones, 0); + for (zone, id) in out.report.observations[0].zones.iter().zip(&legacy_ids) { + let anno = doc + .annotations + .iter() + .find(|a| a.id() == zone.annotation_id); + let anno = anno.unwrap_or_else(|| panic!("{}", zone.annotation_id)); + assert_eq!(anno.view_id(), zone.view_id); + assert_eq!( + zone.label_fr_snapshot.as_deref(), + Some(f.map.annotations[*id].name.fr.as_str()) + ); + } +} + +#[test] +fn keeps_vertebrae_on_the_spine_zones_with_region_codes_the_draft_defines() { + let f = fixture(); + let doc = document(&f); + let codes: Vec<&str> = doc + .vertebral_config + .regions + .iter() + .map(|r| r.code.as_str()) + .collect(); + let spine: Vec<&str> = doc + .annotations + .iter() + .filter_map(Annotation::observable) + .filter_map(|a| a.vertebral_region_code.as_deref()) + .collect(); + assert_eq!(spine.len(), 5); + assert!(spine.iter().all(|code| codes.contains(code))); + let legacy_id = f + .map + .annotations + .iter() + .find(|(_, m)| m.id == "cervical") + .unwrap() + .0; + let report = zones_report(json!([ + { "boneId": legacy_id, "vertebrae": [{ "region": "C", "index": 7 }] } + ])); + let zone = &migrate_report_v2_to_v3(&report, &f.map) + .unwrap() + .report + .observations[0] + .zones[0]; + let vertebrae = zone.vertebrae.as_ref().unwrap(); + assert_eq!(vertebrae.len(), 1); + assert_eq!( + (vertebrae[0].region.as_str(), vertebrae[0].index), + ("C", 7.into()) + ); + assert!(codes.contains(&vertebrae[0].region.as_str())); +} diff --git a/crates/core/tests/curation_legacy.rs b/crates/core/tests/curation_legacy.rs new file mode 100644 index 00000000..8066140d --- /dev/null +++ b/crates/core/tests/curation_legacy.rs @@ -0,0 +1,169 @@ +//! The Rust legacy importer against the TypeScript (R5.2): the committed `legacy-import/` +//! folder byte for byte, the intermediate values frozen in `oracles/r5/pipeline.json`, the +//! raw report against the pre-Prettier digest of the ledger, two runs byte-equal, and the +//! synthetic cases of `oracles/r5/legacy-synthetic.json` (the generic contract, refusals +//! included). Every expectation was written by the TypeScript pipeline. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::legacy::report::render_import_report; +use faunosteo_core::curation::legacy::{ + EquineLegacyInput, ImportResult, SvgSource, import_equine_legacy, render_artifacts, +}; +use faunosteo_core::json::to_js_compact; +use serde_json::Value; + +const SOURCES: &str = "supabase/seed/anatomical-sheets/equine/legacy-sources"; +const LEGACY: &str = "supabase/seed/anatomical-sheets/equine/legacy-import"; + +fn bytes(relative: &str) -> Vec<u8> { + std::fs::read(common::repo_path(relative)).unwrap() +} + +fn equine_input() -> EquineLegacyInput { + EquineLegacyInput { + main_svg: SvgSource { + file_name: "Horse.svg".into(), + bytes: bytes(&format!("{SOURCES}/Horse.svg")), + }, + head_svg: SvgSource { + file_name: "Horse_head.svg".into(), + bytes: bytes(&format!("{SOURCES}/Horse_head.svg")), + }, + catalog: bytes(&format!("{SOURCES}/pathologies.json")), + vertebrae: bytes(&format!("{SOURCES}/vertebrae.ts")), + } +} + +fn oracle(name: &str) -> Value { + serde_json::from_str(&common::repo_file(&format!( + "crates/core/tests/oracles/r5/{name}" + ))) + .unwrap() +} + +/// The parts of a result the TypeScript `ImportResult` holds besides the two documents. +fn parts(result: &ImportResult) -> Value { + let mut value = serde_json::to_value(result).unwrap(); + let map = value.as_object_mut().unwrap(); + map.remove("document"); + map.remove("legacyIdMap"); + value +} + +fn assert_same(actual: &Value, expected: &Value, what: &str) { + assert_eq!( + to_js_compact(actual).unwrap(), + to_js_compact(expected).unwrap(), + "{what}" + ); +} + +#[test] +fn the_committed_legacy_import_folder_is_reproduced_byte_for_byte() { + let result = import_equine_legacy(&equine_input()).unwrap(); + let files = render_artifacts(&result).unwrap(); + let names: Vec<&str> = files.iter().map(|(name, _)| name.as_str()).collect(); + assert_eq!( + names, + [ + "document.json", + "legacy-id-map.json", + "assets.json", + "IMPORT-REPORT.md" + ] + ); + for (name, text) in &files { + assert!( + *text == common::repo_file(&format!("{LEGACY}/{name}")), + "{name} differs" + ); + } + for asset in &result.assets { + let copy = bytes(&format!("{LEGACY}/assets/{}", asset.file)); + assert_eq!(copy, bytes(&format!("{SOURCES}/{}", asset.file))); + assert_eq!(sha256_hex(©), asset.sha256); + } +} + +#[test] +fn the_intermediate_values_match_the_frozen_typescript_run() { + let result = import_equine_legacy(&equine_input()).unwrap(); + let frozen = oracle("pipeline.json"); + let legacy = frozen["legacy"].as_object().unwrap(); + let actual = parts(&result); + for (key, expected) in legacy { + assert_same(&actual[key], expected, key); + } + assert_eq!(result.sheet_id, legacy["sheetId"].as_str().unwrap()); +} + +#[test] +fn the_raw_report_is_the_text_prettier_received() { + let result = import_equine_legacy(&equine_input()).unwrap(); + let raw = render_import_report(&result).unwrap(); + let frozen = oracle("pipeline.json"); + let row = frozen["artifacts"] + .as_array() + .unwrap() + .iter() + .find(|row| row["folder"] == LEGACY && row["file"] == "IMPORT-REPORT.md") + .unwrap(); + assert_eq!( + sha256_hex(raw.as_bytes()), + row["before_prettier_sha256"].as_str().unwrap() + ); +} + +#[test] +fn two_runs_emit_the_same_bytes() { + let first = render_artifacts(&import_equine_legacy(&equine_input()).unwrap()).unwrap(); + let second = render_artifacts(&import_equine_legacy(&equine_input()).unwrap()).unwrap(); + assert_eq!(first, second); +} + +fn synthetic_input(case: &Value) -> EquineLegacyInput { + let text = |key: &str| case[key].as_str().unwrap().as_bytes().to_vec(); + EquineLegacyInput { + main_svg: SvgSource { + file_name: "Main.svg".into(), + bytes: text("main"), + }, + head_svg: SvgSource { + file_name: "Head.svg".into(), + bytes: text("head"), + }, + catalog: text("catalog"), + vertebrae: text("vertebrae"), + } +} + +#[test] +fn the_synthetic_cases_match_the_typescript_or_are_refused_alike() { + let frozen = oracle("legacy-synthetic.json"); + for case in frozen["cases"].as_array().unwrap() { + let name = case["name"].as_str().unwrap(); + let outcome = import_equine_legacy(&synthetic_input(case)); + if !case["ok"].as_bool().unwrap() { + assert!( + outcome.is_err(), + "{name}: the TypeScript refused, the port accepted" + ); + continue; + } + let result = outcome.unwrap_or_else(|error| panic!("{name}: {error}")); + for (file, text) in render_artifacts(&result).unwrap() { + assert_eq!( + text, + case["files"][&file].as_str().unwrap(), + "{name} {file}" + ); + } + let actual = parts(&result); + for (key, expected) in case["parts"].as_object().unwrap() { + assert_same(&actual[key], expected, &format!("{name} {key}")); + } + } +} diff --git a/crates/core/tests/curation_markdown.rs b/crates/core/tests/curation_markdown.rs new file mode 100644 index 00000000..ccfed70f --- /dev/null +++ b/crates/core/tests/curation_markdown.rs @@ -0,0 +1,177 @@ +//! The Markdown guard against the TypeScript (R5.4 final gates): every probe of +//! `oracles/r5/markdown-sweep.json` gives the raw reports the TypeScript wrote, then either the +//! TypeScript's formatted reports byte for byte or a refusal (`UnsupportedMarkdown`): the port +//! never writes a report that differs silently. Probes made of what the equine reports use are +//! never refused. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::curation::PipelineError; +use faunosteo_core::curation::draft::changelog::render_changelog; +use faunosteo_core::curation::draft::migration_map::{ + MigrationMapInput, SheetRef, build_report_migration_map, +}; +use faunosteo_core::curation::draft::review_report::{ReviewReportInput, render_review_report}; +use faunosteo_core::curation::draft::stats::document_stats; +use faunosteo_core::curation::draft::{apply_changeset, parse_changeset, parse_references}; +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::report_guard::format_report; +use faunosteo_core::json::to_js_compact; +use serde_json::{Value, json}; + +fn oracle() -> Value { + serde_json::from_str(&common::repo_file( + "crates/core/tests/oracles/r5/markdown-sweep.json", + )) + .unwrap() +} + +/// The raw CHANGELOG and REVIEW-REPORT of a probe, as the port writes them. +fn raw_reports( + frozen: &Value, + case: &Value, +) -> (Result<String, PipelineError>, Result<String, PipelineError>) { + let baseline = &frozen["baseline"]; + let references = + parse_references(&to_js_compact(&json!({ "references": frozen["references"] })).unwrap()) + .unwrap(); + let changeset = parse_changeset(&to_js_compact(&case["changes_file"]).unwrap()).unwrap(); + let result = apply_changeset(baseline, &references, &changeset.changes).unwrap(); + let before = document_stats(baseline).unwrap(); + let after = document_stats(&result.document).unwrap(); + let sheet = SheetRef { + sheet_id: "s".to_owned(), + version_id: None, + document_sha256: "0".repeat(64), + }; + let (_, stats) = build_report_migration_map(&MigrationMapInput { + baseline, + final_document: &result.document, + legacy_id_map: frozen["legacy_id_map"].as_object().unwrap(), + records: &result.records, + sheet: &sheet, + main_view_id: "main", + }) + .unwrap(); + let changes: Vec<_> = changeset.changes.iter().map(|c| c.summary()).collect(); + let changelog = render_changelog(&result.records, &before, &after, &stats); + let review = render_review_report(&ReviewReportInput { + changes: &changes, + records: &result.records, + document: &result.document, + stats_before: &before, + legacy_anomalies: &[], + }); + (changelog, review) +} + +/// Characters the equine reports use outside code spans: a probe made only of these (with +/// single spaces) is never refused. +const EQUINE_SAFE: &str = "[]&#{}=<>\"':;()/%?-.,«»…≠°—+"; + +fn equine_safe(probe: &str) -> bool { + // A leading or trailing space becomes two spaces once the probe sits in its sentence; the + // inline constructs (links, wiki links, autolinks, character references) are probed apart; + // the list-item fields refuse the wiki and liquid brackets whole (none in the equine ones). + let tag = probe.match_indices('<').any(|(at, _)| { + probe[at + 1..].starts_with(|c: char| c.is_ascii_alphabetic() || "/!?".contains(c)) + }); + let construct = tag + || ["](", "][", "![", "[[", "]]", "{%", "%}", "&", "`"] + .iter() + .any(|m| probe.contains(m)); + !construct + && !probe.contains(" ") + && !probe.starts_with(' ') + && !probe.ends_with(' ') + && probe + .chars() + .all(|c| c.is_alphanumeric() || c == ' ' || EQUINE_SAFE.contains(c)) +} + +#[test] +fn every_probe_is_formatted_as_the_typescript_or_refused() { + let frozen = oracle(); + let (mut same, mut refused, mut silent) = (0, 0, Vec::new()); + for case in frozen["cases"].as_array().unwrap() { + let probe = case["probe"].as_str().unwrap(); + let (changelog, review) = raw_reports(&frozen, case); + let digest = |text: &str| sha256_hex(text.as_bytes()); + if let Ok(changelog) = &changelog { + assert_eq!( + digest(changelog), + case["changelog_raw_sha256"], + "{probe:?} raw" + ); + } + if let Ok(review) = &review { + assert_eq!(digest(review), case["review_raw_sha256"], "{probe:?} raw"); + } + let outcomes = [ + ( + changelog.and_then(|text| format_report(&text)), + &case["changelog_sha256"], + ), + ( + review.and_then(|text| format_report(&text)), + &case["review_sha256"], + ), + ]; + let mut case_refused = false; + for (outcome, expected) in outcomes { + match outcome { + Ok(text) if digest(&text) == *expected => {} + Ok(_) => silent.push(probe.to_owned()), + Err(PipelineError::UnsupportedMarkdown(_) | PipelineError::UnsupportedWidth(_)) => { + case_refused = true; + } + Err(other) => panic!("{probe:?}: {other}"), + } + } + let closer = case["reference_id"] == "probe_ref_"; + assert!( + !(case_refused && equine_safe(probe) && !closer), + "{probe:?}: refused, yet made of what the equine reports use" + ); + if case_refused { + refused += 1 + } else { + same += 1 + } + } + silent.dedup(); + assert!( + silent.is_empty(), + "silent differences for {} probes: {silent:?}", + silent.len() + ); + assert_eq!(same + refused, 798); + println!("{same} identical, {refused} refused"); +} + +/// One long authored cell pads every row of its level: the CHANGELOG is refused before its +/// table is joined, through the pipeline (security gate R5.4 round 7), while the records stay +/// within their own bound. +#[test] +fn a_changelog_whose_alignment_would_explode_is_refused_before_it_is_built() { + let frozen = oracle(); + let mobility = "finding:hip/hip-dysfunctions/mobility"; + let sets: Vec<Value> = (0..20) + .map(|i| json!({ "op": "set", "target": mobility, "field": "name.en", "value": format!("v{i}") })) + .collect(); + let change = |id: &str, rationale: String, ops: Vec<Value>| { + json!({ "id": id, "level": "A", "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": rationale, + "reference_ids": [], "ops": ops }) + }; + let long = change("CHG-001", "a".repeat(2_000_000), vec![sets[0].clone()]); + let rows = change("CHG-002", "Essai".to_owned(), sets); + let case = json!({ "changes_file": { "changes": [long, rows] } }); + let (changelog, _) = raw_reports(&frozen, &case); + let error = changelog.unwrap_err(); + assert!( + matches!(&error, PipelineError::Guard(message) if message.contains("exceeds the")), + "{error}" + ); +} diff --git a/crates/core/tests/curation_review.rs b/crates/core/tests/curation_review.rs new file mode 100644 index 00000000..926fab8a --- /dev/null +++ b/crates/core/tests/curation_review.rs @@ -0,0 +1,599 @@ +//! The Rust review files against the TypeScript (R5.4): CHANGELOG.md and REVIEW-REPORT.md of the +//! committed draft byte for byte, their raw texts against the ledger's pre-Prettier digests, the +//! four review drawings byte for byte or, for the application's main drawing, as trees under +//! the declared R3 rule; the synthetic cases of `oracles/r5/review-synthetic.json`; two runs +//! byte-equal; an undeclared difference refused. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::curation::PipelineError; +use faunosteo_core::curation::draft::app_review::render_app_review_drawing; +use faunosteo_core::curation::draft::changelog::render_changelog; +use faunosteo_core::curation::draft::drawing::read_cleaned_drawing; +use faunosteo_core::curation::draft::migration_map::{ + MigrationMapInput, SheetRef, build_report_migration_map, +}; +use faunosteo_core::curation::draft::overlay::{OverlayInput, render_review_overlay}; +use faunosteo_core::curation::draft::review_report::{ReviewReportInput, render_review_report}; +use faunosteo_core::curation::draft::stats::document_stats; +use faunosteo_core::curation::draft::svg_compare::{Match, TriggerNames, compare_drawing}; +use faunosteo_core::curation::draft::{ + DraftInput, DraftResult, apply_changeset, build_equine_draft, parse_changeset, + parse_references, parse_view_box, render_draft_artifacts, +}; +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::legacy::types::Anomaly; +use faunosteo_core::curation::legacy::{ + EquineLegacyInput, HEAD_VIEW_ID, ImportResult, SvgSource, import_equine_legacy, +}; +use faunosteo_core::curation::prettier_json::format_json; +use faunosteo_core::curation::report_guard::format_report; +use faunosteo_core::domain::sheet::AnatomicalSheetDocument; +use faunosteo_core::json::to_js_compact; +use serde_json::{Map, Value}; + +const SOURCES: &str = "supabase/seed/anatomical-sheets/equine/legacy-sources"; +const CURATION: &str = "supabase/seed/anatomical-sheets/equine/curation"; +const DRAFT: &str = "supabase/seed/anatomical-sheets/equine/draft"; + +fn bytes(relative: &str) -> Vec<u8> { + std::fs::read(common::repo_path(relative)).unwrap() +} + +fn equine() -> (ImportResult, DraftResult) { + let svg = |name: &str| SvgSource { + file_name: name.to_owned(), + bytes: bytes(&format!("{SOURCES}/{name}")), + }; + let result = import_equine_legacy(&EquineLegacyInput { + main_svg: svg("Horse.svg"), + head_svg: svg("Horse_head.svg"), + catalog: bytes(&format!("{SOURCES}/pathologies.json")), + vertebrae: bytes(&format!("{SOURCES}/vertebrae.ts")), + }) + .unwrap(); + let references = + parse_references(&common::repo_file(&format!("{CURATION}/references.json"))).unwrap(); + let changeset = + parse_changeset(&common::repo_file(&format!("{CURATION}/changes.json"))).unwrap(); + let head = result.view_boxes.get(HEAD_VIEW_ID).and_then(Value::as_str); + let draft = build_equine_draft(&DraftInput { + import_result: &result, + cleaned_svg: &bytes(&format!("{DRAFT}/assets/horse.svg")), + head_view_box: parse_view_box(head).unwrap(), + references: &references, + changes: &changeset.changes, + }) + .unwrap(); + (result, draft) +} + +fn oracle(name: &str) -> Value { + serde_json::from_str(&common::repo_file(&format!( + "crates/core/tests/oracles/r5/{name}" + ))) + .unwrap() +} + +fn typed(document: &Value) -> AnatomicalSheetDocument { + serde_json::from_value(document.clone()).unwrap() +} + +const REVIEW_FILES: [&str; 6] = [ + "review/annotations-main.svg", + "review/annotations-head.svg", + "review/app-main.svg", + "review/app-head.svg", + "CHANGELOG.md", + "REVIEW-REPORT.md", +]; + +#[test] +fn the_review_files_of_the_committed_draft_are_reproduced() { + let (result, draft) = equine(); + let files = render_draft_artifacts(&draft, &result.anomalies).unwrap(); + let rule = TriggerNames::of(&typed(&draft.document)); + for name in REVIEW_FILES { + let produced = &files.iter().find(|(file, _)| file == name).unwrap().1; + let committed = common::repo_file(&format!("{DRAFT}/{name}")); + let outcome = compare_drawing(produced, &committed, Some(&rule)); + let expected = if name == "review/app-main.svg" { + Match::TreeAfterRule + } else { + Match::Bytes + }; + assert_eq!(outcome, Ok(expected), "{name}"); + } +} + +/// The one declared difference of the drawings, measured: `app-main.svg` differs from the +/// xmldom file in the trigger's English name and its title only, byte for byte elsewhere. +#[test] +fn app_main_differs_only_by_the_r3_trigger_names() { + let (result, draft) = equine(); + let files = render_draft_artifacts(&draft, &result.anomalies).unwrap(); + let produced = &files + .iter() + .find(|(file, _)| file == "review/app-main.svg") + .unwrap() + .1; + let committed = common::repo_file(&format!("{DRAFT}/review/app-main.svg")); + let fr = "Tête (vue latérale gauche)"; + let en = "Head (left lateral view)"; + let expected = committed + .replace( + &format!("data-anno-name-en=\"{fr}\""), + &format!("data-anno-name-en=\"{en}\""), + ) + .replace( + &format!("<title>{fr} / {fr}"), + &format!("{fr} / {en}"), + ); + assert_ne!(expected, committed); + assert_eq!(*produced, expected); +} + +#[test] +fn the_raw_reports_are_the_texts_prettier_received() { + let (result, draft) = equine(); + let document_json = format_json(&draft.document).unwrap(); + let reference = SheetRef { + sheet_id: draft.sheet_id.clone(), + version_id: None, + document_sha256: sha256_hex(document_json.as_bytes()), + }; + let (_, stats) = + faunosteo_core::curation::draft::pipeline::draft_migration_map(&draft, &reference).unwrap(); + let changelog = render_changelog( + &draft.records, + &draft.stats_before, + &draft.stats_after, + &stats, + ) + .unwrap(); + let review = render_review_report(&ReviewReportInput { + changes: &draft.changes, + records: &draft.records, + document: &draft.document, + stats_before: &draft.stats_before, + legacy_anomalies: &result.anomalies, + }) + .unwrap(); + let ledger = oracle("pipeline.json")["artifacts"] + .as_array() + .unwrap() + .clone(); + for (file, raw) in [("CHANGELOG.md", changelog), ("REVIEW-REPORT.md", review)] { + let row = ledger + .iter() + .find(|row| row["folder"] == DRAFT && row["file"] == file) + .unwrap(); + assert_eq!( + sha256_hex(raw.as_bytes()), + row["before_prettier_sha256"], + "{file} raw" + ); + let formatted = format_report(&raw).unwrap(); + assert_eq!( + sha256_hex(formatted.as_bytes()), + row["sha256"], + "{file} formatted" + ); + } +} + +#[test] +fn two_runs_emit_the_same_review_files() { + let (result, draft) = equine(); + let first = render_draft_artifacts(&draft, &result.anomalies).unwrap(); + let second = render_draft_artifacts(&draft, &result.anomalies).unwrap(); + assert_eq!(first, second); +} + +#[test] +fn an_undeclared_drawing_difference_is_refused() { + let committed = common::repo_file(&format!("{DRAFT}/review/annotations-main.svg")); + let changed = committed.replacen("#1d4ed8", "#1d4ed9", 1); + let (_, draft) = equine(); + let rule = TriggerNames::of(&typed(&draft.document)); + assert!(compare_drawing(&changed, &committed, None).is_err()); + assert!(compare_drawing(&changed, &committed, Some(&rule)).is_err()); + let app = common::repo_file(&format!("{DRAFT}/review/app-head.svg")); + let moved = app.replacen("cx=\"", "cx=\"1", 1); + assert!(compare_drawing(&moved, &app, Some(&rule)).is_err()); +} + +/// The tree fallback hides nothing (final gate R5.4): a stylesheet processing instruction, a +/// comment or another declared encoding in the committed application drawing is refused, +/// although the trees would still be equal under the rule. +#[test] +fn the_rule_fallback_refuses_what_the_tree_does_not_carry() { + let (result, draft) = equine(); + let files = render_draft_artifacts(&draft, &result.anomalies).unwrap(); + let produced = &files + .iter() + .find(|(file, _)| file == "review/app-main.svg") + .unwrap() + .1; + let committed = common::repo_file(&format!("{DRAFT}/review/app-main.svg")); + let rule = TriggerNames::of(&typed(&draft.document)); + assert_eq!( + compare_drawing(produced, &committed, Some(&rule)), + Ok(Match::TreeAfterRule) + ); + let stylesheet = committed.replacen( + "?>\n", + "?>\n\n", + 1, + ); + let comment = committed.replacen("", "", 1); + let trailing = format!("{committed}"); + let encoding = committed.replacen("encoding=\"UTF-8\"", "encoding=\"ISO-8859-1\"", 1); + for variant in [stylesheet, comment, trailing, encoding] { + assert_ne!(variant, committed); + assert!(compare_drawing(produced, &variant, Some(&rule)).is_err()); + } + // A difference the rule does not touch, on a file the rule could apply to. + let head = common::repo_file(&format!("{DRAFT}/review/app-head.svg")); + let commented = head.replacen("", "", 1); + assert!(compare_drawing(&head, &commented, Some(&rule)).is_err()); +} + +// --------------------------------------------------------------------------------------------- +// Synthetic cases written by the TypeScript (`oracles/r5/review-synthetic.json`). + +/// Cases the port refuses where the TypeScript wrote a file (declared in RUST.md §11.10 and §11.14). +const DECLARED_REFUSALS: [&str; 1] = ["declared-emoji-in-a-cell"]; + +struct Rendered { + changelog_raw: String, + changelog: Result, + review_raw: String, + review: Result, + drawings: Map, +} + +fn render_case(frozen: &Value, case: &Value) -> Rendered { + let baseline = &frozen["baseline"]; + let references = parse_references( + &to_js_compact(&serde_json::json!({ "references": frozen["references"] })).unwrap(), + ) + .unwrap(); + let changeset = parse_changeset(&to_js_compact(&case["changes_file"]).unwrap()).unwrap(); + let result = apply_changeset(baseline, &references, &changeset.changes).unwrap(); + let before = document_stats(baseline).unwrap(); + let after = document_stats(&result.document).unwrap(); + let sheet = SheetRef { + sheet_id: "11111111-1111-5111-8111-111111111111".to_owned(), + version_id: None, + document_sha256: "0".repeat(64), + }; + let (_, stats) = build_report_migration_map(&MigrationMapInput { + baseline, + final_document: &result.document, + legacy_id_map: frozen["legacy_id_map"].as_object().unwrap(), + records: &result.records, + sheet: &sheet, + main_view_id: "main", + }) + .unwrap(); + let anomalies: Vec = frozen["anomalies"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let text = |key: &str| a[key].as_str().unwrap().to_owned(); + let level = if a["level"] == "a_valider" { + "a_valider" + } else { + "informatif" + }; + Anomaly { + code: text("code"), + level, + subject: text("subject"), + message: text("message"), + } + }) + .collect(); + let changes: Vec<_> = changeset.changes.iter().map(|c| c.summary()).collect(); + let changelog_raw = render_changelog(&result.records, &before, &after, &stats).unwrap(); + let review_raw = render_review_report(&ReviewReportInput { + changes: &changes, + records: &result.records, + document: &result.document, + stats_before: &before, + legacy_anomalies: &anomalies, + }) + .unwrap(); + let drawing = read_cleaned_drawing(frozen["drawing"].as_str().unwrap().as_bytes()).unwrap(); + let document = typed(&result.document); + let mut drawings = Map::new(); + for view in &document.views { + let id = view.id(); + let overlay = render_review_overlay(&OverlayInput { + drawing: &drawing, + before: baseline, + after: &result.document, + view_id: id, + }) + .unwrap(); + drawings.insert(format!("annotations-{id}"), Value::from(overlay)); + } + for view in &document.views { + let app = render_app_review_drawing(&drawing, &document, view.id()).unwrap(); + drawings.insert(format!("app-{}", view.id()), Value::from(app)); + } + Rendered { + changelog: format_report(&changelog_raw), + review: format_report(&review_raw), + changelog_raw, + review_raw, + drawings, + } +} + +#[test] +fn the_synthetic_review_cases_match_the_typescript_or_are_refused_as_declared() { + let frozen = oracle("review-synthetic.json"); + let cases = frozen["cases"].as_array().unwrap(); + assert_eq!(cases.len(), 4); + for case in cases { + let name = case["name"].as_str().unwrap(); + let rendered = render_case(&frozen, case); + assert_eq!( + rendered.changelog_raw, + case["changelog_raw"].as_str().unwrap(), + "{name}" + ); + assert_eq!( + rendered.review_raw, + case["review_raw"].as_str().unwrap(), + "{name}" + ); + if DECLARED_REFUSALS.contains(&name) { + let refused = rendered.changelog.unwrap_err(); + assert!( + matches!( + refused, + PipelineError::UnsupportedWidth(_) | PipelineError::UnsupportedMarkdown(_) + ), + "{name}" + ); + } else { + assert_eq!( + rendered.changelog.unwrap(), + case["changelog"].as_str().unwrap(), + "{name}" + ); + } + // The review report and the drawings of a declared case are held too: the same text + // or a declared refusal, never another text. + match rendered.review { + Ok(review) => assert_eq!(review, case["review"].as_str().unwrap(), "{name}"), + Err(PipelineError::UnsupportedWidth(_) | PipelineError::UnsupportedMarkdown(_)) + if DECLARED_REFUSALS.contains(&name) => {} + Err(other) => panic!("{name}: {other}"), + } + let views = typed(&case_document(&frozen, case)).views.len(); + assert_eq!(rendered.drawings.len(), 2 * views, "{name}"); + let rule = TriggerNames::of(&typed(&case_document(&frozen, case))); + for (key, produced) in &rendered.drawings { + let committed = case["drawings"][key].as_str().unwrap(); + let outcome = compare_drawing(produced.as_str().unwrap(), committed, Some(&rule)); + assert!(outcome.is_ok(), "{name} {key}: {outcome:?}"); + if key.starts_with("annotations-") { + assert_eq!(outcome, Ok(Match::Bytes), "{name} {key}"); + } + } + } +} + +fn case_document(frozen: &Value, case: &Value) -> Value { + let references = parse_references( + &to_js_compact(&serde_json::json!({ "references": frozen["references"] })).unwrap(), + ) + .unwrap(); + let changeset = parse_changeset(&to_js_compact(&case["changes_file"]).unwrap()).unwrap(); + apply_changeset(&frozen["baseline"], &references, &changeset.changes) + .unwrap() + .document +} + +/// A label XML cannot carry, or a carriage return xmldom wrote raw and the core escapes, never +/// reaches a review drawing (final gate R5.4): the drawing is refused. +#[test] +fn a_label_the_drawing_cannot_carry_is_refused() { + let frozen = oracle("review-synthetic.json"); + let references = parse_references( + &to_js_compact(&serde_json::json!({ "references": frozen["references"] })).unwrap(), + ) + .unwrap(); + let drawing = read_cleaned_drawing(frozen["drawing"].as_str().unwrap().as_bytes()).unwrap(); + for label in ["Hanche\u{1}", "Han\rche"] { + let file = serde_json::json!({ "changes": [{ + "id": "CHG-001", "level": "A", "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": "Essai", "reference_ids": [], + "ops": [{ "op": "set", "target": "annotation:hip", "field": "name.fr", "value": label }], + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).unwrap(); + let result = apply_changeset(&frozen["baseline"], &references, &changeset.changes).unwrap(); + let error = + render_app_review_drawing(&drawing, &typed(&result.document), "main").unwrap_err(); + assert!( + error.to_string().contains("cannot carry"), + "{label:?}: {error}" + ); + } +} + +/// An id an op writes is checked at the op (security gate R5.4 round 2): a line break or a +/// backtick in an added, nested or renamed id, or in a field segment, would otherwise reach the +/// reports' code spans through the records (forged sections) even when a later op removes the +/// item. The committed drawing is read by the core's reader first (its depth cap holds). +#[test] +fn ids_and_field_segments_that_could_forge_report_structure_are_refused() { + let frozen = oracle("review-synthetic.json"); + let references = parse_references( + &to_js_compact(&serde_json::json!({ "references": frozen["references"] })).unwrap(), + ) + .unwrap(); + let forged = "x`\n## 11. Section forgée\n`y"; + let annotation = serde_json::json!({ + "id": forged, "kind": "point", "view_id": "main", "category_id": "bones", + "laterality": "unpaired", "geometry": null, "name": { "fr": "a", "en": "a" }, + "finding_zone_id": "neck", "vertebral_region_code": null, + }); + let node = serde_json::json!({ "id": "n1", "name": { "fr": "a", "en": "a" }, + "children": [{ "id": forged, "name": { "fr": "a", "en": "a" } }] }); + let cases = [ + serde_json::json!([ + { "op": "add", "target": "document", "field": "annotations", "value": annotation }, + { "op": "remove", "target": format!("annotation:{forged}") }, + ]), + serde_json::json!([{ "op": "rename", "target": "annotation:hip", "id": forged }]), + serde_json::json!([{ "op": "add", "target": "finding:hip/hip-dysfunctions/mobility", "value": node }]), + serde_json::json!([{ "op": "set", "target": "finding:hip/hip-dysfunctions/mobility", + "field": "name.x\ny", "value": "a" }]), + serde_json::json!([{ "op": "set", "target": "finding:hip/hip-dysfunctions/mobility", + "field": "name.x`y", "value": "a" }]), + ]; + for ops in cases { + let file = serde_json::json!({ "changes": [{ + "id": "CHG-001", "level": "A", "kind": "technical", + "title": { "fr": "Essai", "en": "Test" }, "rationale": "Essai", "reference_ids": [], + "ops": ops, + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).unwrap(); + let error = + apply_changeset(&frozen["baseline"], &references, &changeset.changes).unwrap_err(); + assert!(error.to_string().starts_with("CHG-001 op 0:"), "{error}"); + } + // A segment outside the paths' alphabet: a `]` in a code span closed an author's `[` + // (security gate R5.4 round 5). + for field in ["name.x]", "name.a b", "name.x*", "name.é"] { + let file = serde_json::json!({ "changes": [{ + "id": "CHG-001", "level": "A", "kind": "technical", + "title": { "fr": "Essai [", "en": "Test" }, "rationale": "Essai", "reference_ids": [], + "ops": [{ "op": "set", "target": "finding:hip/hip-dysfunctions/mobility", + "field": field, "value": "a" }], + }]}); + let changeset = parse_changeset(&to_js_compact(&file).unwrap()).unwrap(); + let error = + apply_changeset(&frozen["baseline"], &references, &changeset.changes).unwrap_err(); + assert!( + error.to_string().contains("segment outside [A-Za-z0-9_-]"), + "{field}: {error}" + ); + } + let deep = format!( + "{}{}", + "".repeat(100_000), + "".repeat(100_000) + ); + let (_, draft) = equine(); + let rule = TriggerNames::of(&typed(&draft.document)); + assert!(compare_drawing("", &deep, Some(&rule)).is_err()); +} + +/// Every review drawing repeats the whole cleaned drawing, two per view: the bytes are +/// projected and bounded before any drawing is rendered (security gate R5.4 round 8). +#[test] +fn review_drawings_past_their_bound_are_refused_before_rendering() { + let (result, mut draft) = equine(); + let views = draft.document["views"].as_array_mut().unwrap(); + let main = views[0].clone(); + for index in 0..300 { + let mut view = main.clone(); + view["id"] = Value::from(format!("extra-{index}")); + views.push(view); + } + let error = render_draft_artifacts(&draft, &result.anomalies).unwrap_err(); + assert!( + error.to_string().contains("past the 67108864 bound"), + "{error}" + ); +} + +/// An unnamed trigger writes the opened view's names in its markup: many of them opening a +/// long-named view are refused before rendering too (security gate R5.4 round 10: a 485 KB +/// changeset wrote a 131 MB drawing). The equine draft stays far below the bound. +#[test] +fn unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering() { + use faunosteo_core::curation::draft::pipeline::{ + MAX_REVIEW_DRAWINGS_BYTES, review_drawings_bytes, + }; + let (result, mut draft) = equine(); + let equine = review_drawings_bytes(&draft).unwrap(); + println!("equine review drawings projected at {equine} bytes"); + assert!(equine * 4 < MAX_REVIEW_DRAWINGS_BYTES, "{equine}"); + draft.document["views"][1]["name"]["fr"] = Value::from("t".repeat(32_768)); + let annotations = draft.document["annotations"].as_array_mut().unwrap(); + let trigger = annotations + .iter() + .find(|a| a["kind"] == "detail_trigger") + .unwrap() + .clone(); + for index in 0..1_000 { + let mut copy = trigger.clone(); + copy["id"] = Value::from(format!("trigger-{index}")); + annotations.push(copy); + } + let error = render_draft_artifacts(&draft, &result.anomalies).unwrap_err(); + assert!( + error.to_string().contains("past the 67108864 bound"), + "{error}" + ); +} + +/// The drawings projection is an upper bound of what is written: on the equine draft, and on +/// a draft whose annotations are all gone, where only the drawings' fixed parts remain +/// (verifier R5.4 round 11: 477 bytes over before the per-drawing allowance). +#[test] +fn the_drawings_projection_bounds_what_is_written() { + use faunosteo_core::curation::draft::pipeline::review_drawings_bytes; + // The drawings alone (`render_draft_artifacts` writes exactly these): a draft with no + // annotation is no valid sheet, so since R5.6 it has no fingerprint and no full render. + let written = |draft: &DraftResult, _anomalies: &[Anomaly]| -> usize { + faunosteo_core::curation::draft::pipeline::review_drawings(draft) + .unwrap() + .iter() + .map(|(_, text)| text.len()) + .sum() + }; + let (result, mut draft) = equine(); + assert!(review_drawings_bytes(&draft).unwrap() >= written(&draft, &result.anomalies)); + draft.document["annotations"] = Value::Array(Vec::new()); + draft.baseline["annotations"] = Value::Array(Vec::new()); + assert!(review_drawings_bytes(&draft).unwrap() >= written(&draft, &result.anomalies)); +} + +/// `curation.overlay.test.ts` "reports an annotation dropped by the changeset" (R5.7): an +/// annotation of the baseline that the curated document no longer holds is drawn as removed. +#[test] +fn an_annotation_dropped_by_the_changeset_is_drawn_as_removed() { + let frozen = oracle("review-synthetic.json"); + let before = &frozen["baseline"]; + let mut after = before.clone(); + after["annotations"] + .as_array_mut() + .unwrap() + .retain(|a| a["id"] != "hip"); + let drawing = read_cleaned_drawing(frozen["drawing"].as_str().unwrap().as_bytes()).unwrap(); + let overlay = render_review_overlay(&OverlayInput { + drawing: &drawing, + before, + after: &after, + view_id: "main", + }) + .unwrap(); + let tree = roxmltree::Document::parse(&overlay).unwrap(); + let status = |id: &str| { + tree.descendants() + .find(|n| n.attribute("data-review-id") == Some(id)) + .and_then(|n| n.attribute("data-review-status")) + }; + assert_eq!(status("hip"), Some("removed")); + assert_ne!(status("neck"), Some("removed")); +} diff --git a/crates/core/tests/curation_upload.rs b/crates/core/tests/curation_upload.rs new file mode 100644 index 00000000..8ac587a3 --- /dev/null +++ b/crates/core/tests/curation_upload.rs @@ -0,0 +1,208 @@ +//! The rules of the sheet-asset upload (R5.5): manifest, destination, bytes, plan. The tool +//! around them is exercised by `upload_tool.rs` against a stub of the local stack. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +use faunosteo_core::curation::ids::sha256_hex; +use faunosteo_core::curation::upload::{ + AssetEntry, ObjectState, Plan, RowState, UploadKind, check_destination, parse_manifest, + plan_entry, verify_asset, +}; + +const SEED: &str = "../../supabase/seed/anatomical-sheets/equine/draft"; +const UUID: &str = "7f767f74-3b36-51a7-8465-52dd7e2ead4a"; +const SVG: &[u8] = b""; + +fn entry_for(bytes: &[u8]) -> AssetEntry { + AssetEntry { + file: "a.svg".into(), + sha256: sha256_hex(bytes), + byte_size: bytes.len(), + svg_asset_id: UUID.into(), + } +} + +fn manifest(entries: &[(&str, &str, usize, &str)]) -> String { + let items: Vec = entries + .iter() + .map(|(file, sha, size, id)| { + format!("{{\"file\":\"{file}\",\"sha256\":\"{sha}\",\"byte_size\":{size},\"svg_asset_id\":\"{id}\"}}") + }) + .collect(); + format!("[{}]", items.join(",")) +} + +fn kind( + result: Result, +) -> UploadKind { + result.unwrap_err().kind +} + +#[test] +fn the_committed_manifest_and_drawing_pass() { + let text = std::fs::read_to_string(format!("{SEED}/assets.json")).unwrap(); + let entries = parse_manifest(&text).unwrap(); + assert_eq!(entries.len(), 1); + let bytes = std::fs::read(format!("{SEED}/assets/{}", entries[0].file)).unwrap(); + verify_asset(&entries[0], &bytes).unwrap(); + assert_eq!( + entries[0].object_key(), + format!("{}.svg", entries[0].sha256) + ); +} + +#[test] +fn a_bad_manifest_is_refused_whole() { + let sha = "a".repeat(64); + let good = (&"a.svg", sha.as_str(), 5usize, UUID); + let cases = [ + manifest(&[]), + "{}".into(), + "[{\"file\":\"a.svg\"}]".into(), + manifest(&[("../a.svg", &sha, 5, UUID)]), + manifest(&[(".a.svg", &sha, 5, UUID)]), + manifest(&[("a.png", &sha, 5, UUID)]), + manifest(&[("a.svg", &sha.to_uppercase(), 5, UUID)]), + manifest(&[("a.svg", "abc", 5, UUID)]), + manifest(&[("a.svg", &sha, 5, "not-a-uuid")]), + manifest(&[("a.svg", &sha, 0, UUID)]), + manifest(&[("a.svg", &sha, 17 * 1024 * 1024, UUID)]), + manifest(&[ + (good.0, good.1, good.2, good.3), + ( + "a.svg", + &"b".repeat(64), + 5, + "11111111-1111-1111-1111-111111111111", + ), + ]), + manifest(&[ + (good.0, good.1, good.2, good.3), + ("b.svg", &sha, 5, "11111111-1111-1111-1111-111111111111"), + ]), + manifest(&[ + (good.0, good.1, good.2, good.3), + ("b.svg", &"b".repeat(64), 5, UUID), + ]), + "x".repeat(2 * 1024 * 1024), + ]; + for text in cases { + assert_eq!( + kind(parse_manifest(&text)), + UploadKind::Manifest, + "{}", + &text[..text.len().min(80)] + ); + } +} + +#[test] +fn a_manifest_with_an_unknown_key_is_refused() { + let text = manifest(&[("a.svg", &"a".repeat(64), 5, UUID)]).replace("}", ",\"x\":1}"); + assert_eq!(kind(parse_manifest(&text)), UploadKind::Manifest); +} + +#[test] +fn only_bytes_that_match_and_that_the_svg_reader_keeps_whole_are_uploaded() { + let entry = entry_for(SVG); + verify_asset(&entry, SVG).unwrap(); + let mut other = SVG.to_vec(); + other[5] = b'X'; + assert_eq!(kind(verify_asset(&entry, &other)), UploadKind::Content); + let scripted: &[u8] = b""; + assert_eq!( + kind(verify_asset(&entry_for(scripted), scripted)), + UploadKind::Content + ); + let not_svg: &[u8] = b""; + assert_eq!( + kind(verify_asset(&entry_for(not_svg), not_svg)), + UploadKind::Content + ); + let binary: &[u8] = &[0xff, 0xfe, 0x00]; + assert_eq!( + kind(verify_asset(&entry_for(binary), binary)), + UploadKind::Content + ); +} + +#[test] +fn only_a_local_stack_is_a_destination() { + for ok in [ + "http://127.0.0.1:54321", + "http://localhost:54321", + "http://[::1]:54321", + "http://127.0.0.2:9", + ] { + let destination = check_destination(ok, None).unwrap(); + assert!(destination.origin().starts_with("http://"), "{ok}"); + assert!(!destination.origin().ends_with('/')); + } + assert_eq!( + check_destination("http://LOCALHOST:1", None) + .unwrap() + .origin(), + "http://localhost:1" + ); + for refused in [ + "https://127.0.0.1:54321", + "http://127.0.0.1", + "http://127.0.0.1:80", + "http://user@127.0.0.1:54321", + "http://127.0.0.1:54321/x", + "http://127.0.0.1:54321/?a=1", + "http://127.0.0.1:54321/#f", + "http://10.1.2.3:54321", + "http://example.test:54321", + "http://abcd.supabase.co:54321", + "http://faunosteo.com:54321", + "http://0.0.0.0:54321", + "http://[2001:db8::1]:54321", + "127.0.0.1:54321", + "", + ] { + assert_eq!( + kind(check_destination(refused, None)), + UploadKind::Destination, + "{refused}" + ); + } +} + +#[test] +fn the_dev_address_is_allowed_only_when_configured_and_private() { + let url = "http://192.168.1.100:54321"; + assert!(check_destination(url, None).is_err()); + assert!(check_destination(url, Some("192.168.1.101")).is_err()); + assert!(check_destination(url, Some("192.168.1.100")).is_ok()); + // A public address is never a DEV address, even when named as one. + assert!(check_destination("http://8.8.8.8:54321", Some("8.8.8.8")).is_err()); + // A name is not resolved: it cannot be proven local. + assert!(check_destination("http://mybox:54321", Some("mybox")).is_err()); +} + +#[test] +fn the_plan_follows_what_the_destination_holds_and_never_overwrites() { + let entry = entry_for(SVG); + let plan = |object, row| plan_entry(&entry, &object, &row); + let go = |upload, confirm| Ok(Plan { upload, confirm }); + assert_eq!(plan(ObjectState::Absent, RowState::Pending), go(true, true)); + assert_eq!( + plan(ObjectState::Verified, RowState::Pending), + go(false, true) + ); + assert_eq!( + plan(ObjectState::Verified, RowState::Confirmed), + go(false, false) + ); + assert_eq!( + plan(ObjectState::Absent, RowState::Confirmed), + go(true, false) + ); + for (object, row) in [ + (ObjectState::Different("f".repeat(64)), RowState::Pending), + (ObjectState::Absent, RowState::Unknown), + (ObjectState::Verified, RowState::OtherHash("f".repeat(64))), + ] { + assert_eq!(kind(plan(object, row)), UploadKind::State); + } +} diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json new file mode 100644 index 00000000..c199d71f --- /dev/null +++ b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json @@ -0,0 +1,997 @@ +{ + "schema_version": 1, + "sheet": { + "sheetId": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "versionId": null, + "documentSha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" + }, + "main_view_id": "main", + "views": { + "head": "head" + }, + "annotations": { + "point-mpbwrkp0": { + "id": "hind-fetlock", + "name": { + "fr": "Boulet post. (métatarso-phalangien)", + "en": "Hind fetlock" + } + }, + "point-mpbwsi9q": { + "id": "hock", + "name": { + "fr": "Jarret (tarsien)", + "en": "Hock" + } + }, + "point-mpbwt4fa": { + "id": "stifle", + "name": { + "fr": "Grasset (fémoro-tibial)", + "en": "Stifle" + } + }, + "point-mpbwtst0": { + "id": "hip", + "name": { + "fr": "Hanche (coxo-fémorale)", + "en": "Hip joint" + } + }, + "point-mpbwugty": { + "id": "sacroiliac", + "name": { + "fr": "Articulation Sacro-Iliaque", + "en": "Sacroiliac Joint" + } + }, + "point-mpbwv4xy": { + "id": "shoulder", + "name": { + "fr": "Épaule (scapulo-humérale)", + "en": "Shoulder joint" + } + }, + "point-mpbwvpvt": { + "id": "elbow", + "name": { + "fr": "Coude (huméro-radial)", + "en": "Elbow joint" + } + }, + "point-mpbwwaru": { + "id": "fore-fetlock", + "name": { + "fr": "Boulet ant. (métacarpo-phalangien)", + "en": "Fore fetlock" + } + }, + "point-mpbwwxvn": { + "id": "fore-sesamoids", + "name": { + "fr": "Sésamoïdes ant. (boulet)", + "en": "Forelimb Sesamoids" + } + }, + "point-mpbwxnb4": { + "id": "l6-s1", + "name": { + "fr": "Charnière L6-S1 (lombo-sacrée)", + "en": "L6-S1 (Lumbosacral)" + } + }, + "point-mpbwyd9i": { + "id": "t18-l1", + "name": { + "fr": "Charnière T18-L1 (dorso-lombaire)", + "en": "T18-L1 (Thoracolumbar)" + } + }, + "point-mpbwyyc9": { + "id": "c7-t1", + "name": { + "fr": "Charnière C7-T1 (cervico-thoracique)", + "en": "C7-T1 (Cervicothoracic)" + } + }, + "zone-mpbx00jq": { + "id": "caudal", + "name": { + "fr": "Vertèbres caudales", + "en": "Coccygeal Vertebrae" + } + }, + "zone-mpbx0xnp": { + "id": "sacral", + "name": { + "fr": "Vertèbres sacrales", + "en": "Sacral Vertebrae" + } + }, + "zone-mpbx1rm9": { + "id": "lumbar", + "name": { + "fr": "Vertèbres lombaires", + "en": "Lumbar Vertebrae" + } + }, + "zone-mpbx2rpe": { + "id": "thoracic", + "name": { + "fr": "Vertèbres thoraciques", + "en": "Thoracic Vertebrae" + } + }, + "zone-mpbx5hx2": { + "id": "cervical", + "name": { + "fr": "Vertèbres cervicales", + "en": "Cervical Vertebrae" + } + }, + "zone-mpby55kd": { + "id": "head-trigger", + "name": { + "fr": "", + "en": "" + } + }, + "point-mpbykomv": { + "id": "parietal", + "name": { + "fr": "Pariétal", + "en": "Parietal bone" + } + }, + "point-mpbylh35": { + "id": "frontal", + "name": { + "fr": "Frontal", + "en": "Frontal bone" + } + }, + "point-mpbymcln": { + "id": "sphenoid", + "name": { + "fr": "Sphénoïde", + "en": "Sphenoid" + } + }, + "point-mpbyn2k3": { + "id": "temporal", + "name": { + "fr": "Temporel", + "en": "Temporal" + } + }, + "point-mpbynls5": { + "id": "occipital", + "name": { + "fr": "Occipital", + "en": "Occipital" + } + }, + "point-mpbyo7zq": { + "id": "atm", + "name": { + "fr": "Articulation Temporo-Mandibulaire (ATM)", + "en": "Temporomandibular Joint (TMJ)" + } + }, + "point-mpbyphay": { + "id": "ssb", + "name": { + "fr": "Synchondrose Sphéno-Basilaire (SSB)", + "en": "Spheno-Basilar Synchondrosis (SBS)" + } + }, + "point-mpbyq841": { + "id": "hyoid", + "name": { + "fr": "Hyoïde", + "en": "Hyoid" + } + }, + "point-mpbyqxbg": { + "id": "c0-c1", + "name": { + "fr": "Charnière C0-C1 (occipito-atloïdienne)", + "en": "C0-C1 (Occipito-atlantal)" + } + } + }, + "finding_paths": { + "parietal/parietal-dysfunctions": "parietal/parietal-dysfunctions", + "parietal/parietal-dysfunctions/mobility": "parietal/parietal-dysfunctions/mobility", + "parietal/parietal-dysfunctions/mobility/flexion-external-rotation": "parietal/parietal-dysfunctions/mobility/flexion-external-rotation", + "parietal/parietal-dysfunctions/mobility/extension-internal-rotation": "parietal/parietal-dysfunctions/mobility/extension-internal-rotation", + "parietal/parietal-dysfunctions/mobility/global-restriction": "parietal/parietal-dysfunctions/mobility/global-restriction", + "parietal/parietal-dysfunctions/intraosseous": "parietal/parietal-dysfunctions/intraosseous", + "parietal/parietal-dysfunctions/intraosseous/squama-deformation": "parietal/parietal-dysfunctions/intraosseous/squama-deformation", + "parietal/parietal-dysfunctions/intraosseous/interparietal-compression": "parietal/parietal-dysfunctions/intraosseous/interparietal-compression", + "parietal/parietal-dysfunctions/sutures": "parietal/parietal-dysfunctions/sutures", + "parietal/parietal-dysfunctions/sutures/frontoparietal": "parietal/parietal-dysfunctions/sutures/frontoparietal", + "parietal/parietal-dysfunctions/sutures/parieto-occipital": "parietal/parietal-dysfunctions/sutures/parieto-occipital", + "parietal/parietal-dysfunctions/sutures/parieto-temporal": "parietal/parietal-dysfunctions/sutures/parieto-temporal", + "parietal/parietal-dysfunctions/sutures/sphenoparietal": "parietal/parietal-dysfunctions/sutures/sphenoparietal", + "parietal/parietal-dysfunctions/sutures/interparietal": "parietal/parietal-dysfunctions/sutures/sagittal", + "parietal/parietal-observations": "parietal/parietal-consultation-reasons", + "parietal/parietal-observations/behavior-change": "parietal/parietal-consultation-reasons/behavior-change", + "parietal/parietal-observations/behavior-change/head-touch-hypersensitivity": "parietal/parietal-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "parietal/parietal-observations/behavior-change/new-irritability": "parietal/parietal-consultation-reasons/behavior-change/new-irritability", + "parietal/parietal-observations/post-trauma-head": "parietal/parietal-consultation-reasons/post-trauma-head", + "parietal/anamnesis": "parietal/anamnesis", + "parietal/anamnesis/trauma-direct": "parietal/anamnesis/trauma-direct", + "parietal/anamnesis/stress-context": "parietal/anamnesis/stress-context", + "parietal/anamnesis/posture-context": "parietal/anamnesis/posture-context", + "parietal/anamnesis/dental-context": "parietal/anamnesis/dental-context", + "parietal/anamnesis/post-veterinary": "parietal/anamnesis/post-veterinary", + "parietal/anamnesis/no-identified-cause": "parietal/anamnesis/no-identified-cause", + "frontal/frontal-dysfunctions": "frontal/frontal-dysfunctions", + "frontal/frontal-dysfunctions/mobility": "frontal/frontal-dysfunctions/mobility", + "frontal/frontal-dysfunctions/mobility/flexion-external-rotation": "frontal/frontal-dysfunctions/mobility/flexion-external-rotation", + "frontal/frontal-dysfunctions/mobility/extension-internal-rotation": "frontal/frontal-dysfunctions/mobility/extension-internal-rotation", + "frontal/frontal-dysfunctions/mobility/global-restriction": "frontal/frontal-dysfunctions/mobility/global-restriction", + "frontal/frontal-dysfunctions/intraosseous": "frontal/frontal-dysfunctions/intraosseous", + "frontal/frontal-dysfunctions/intraosseous/metopic-compression": "frontal/frontal-dysfunctions/intraosseous/interfrontal-compression", + "frontal/frontal-dysfunctions/intraosseous/squama-deformation": "frontal/frontal-dysfunctions/intraosseous/squama-deformation", + "frontal/frontal-dysfunctions/sutures": "frontal/frontal-dysfunctions/sutures", + "frontal/frontal-dysfunctions/sutures/frontoparietal": "frontal/frontal-dysfunctions/sutures/frontoparietal", + "frontal/frontal-dysfunctions/sutures/frontosphenoidal": "frontal/frontal-dysfunctions/sutures/frontosphenoidal", + "frontal/frontal-dysfunctions/sutures/frontonasal": "frontal/frontal-dysfunctions/sutures/frontonasal", + "frontal/frontal-dysfunctions/sutures/frontolacrimal": "frontal/frontal-dysfunctions/sutures/frontolacrimal", + "frontal/frontal-dysfunctions/sutures/frontozygomatic": null, + "frontal/frontal-dysfunctions/sutures/interfrontal": "frontal/frontal-dysfunctions/sutures/interfrontal", + "frontal/frontal-observations": "frontal/frontal-consultation-reasons", + "frontal/frontal-observations/behavior-change": "frontal/frontal-consultation-reasons/behavior-change", + "frontal/frontal-observations/behavior-change/head-touch-hypersensitivity": "frontal/frontal-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "frontal/frontal-observations/behavior-change/new-irritability": "frontal/frontal-consultation-reasons/behavior-change/new-irritability", + "frontal/frontal-observations/head-rubbing": "frontal/frontal-consultation-reasons/head-rubbing", + "frontal/frontal-observations/frontal-relief-asymmetry": "frontal/frontal-consultation-reasons/frontal-relief-asymmetry", + "frontal/frontal-observations/post-trauma-head": "frontal/frontal-consultation-reasons/post-trauma-head", + "frontal/anamnesis": "frontal/anamnesis", + "frontal/anamnesis/trauma-direct": "frontal/anamnesis/trauma-direct", + "frontal/anamnesis/stress-context": "frontal/anamnesis/stress-context", + "frontal/anamnesis/posture-context": "frontal/anamnesis/posture-context", + "frontal/anamnesis/dental-context": "frontal/anamnesis/dental-context", + "frontal/anamnesis/post-veterinary": "frontal/anamnesis/post-veterinary", + "frontal/anamnesis/no-identified-cause": "frontal/anamnesis/no-identified-cause", + "sphenoid/ssb-dysfunctions": null, + "sphenoid/ssb-dysfunctions/physiological": null, + "sphenoid/ssb-dysfunctions/physiological/flexion": null, + "sphenoid/ssb-dysfunctions/physiological/extension": null, + "sphenoid/ssb-dysfunctions/physiological/torsion-right": null, + "sphenoid/ssb-dysfunctions/physiological/torsion-left": null, + "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-right": null, + "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-left": null, + "sphenoid/ssb-dysfunctions/traumatic": null, + "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-superior": null, + "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-inferior": null, + "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-right": null, + "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-left": null, + "sphenoid/ssb-dysfunctions/traumatic/compression": null, + "sphenoid/ssb-dysfunctions/intraosseous": "sphenoid/sphenoid-dysfunctions/intraosseous", + "sphenoid/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, + "sphenoid/ssb-dysfunctions/intraosseous/lesser-wings": null, + "sphenoid/ssb-dysfunctions/intraosseous/greater-wings": null, + "sphenoid/ssb-dysfunctions/sutures": "sphenoid/sphenoid-dysfunctions/sutures", + "sphenoid/ssb-dysfunctions/sutures/sphenopetrosal": "sphenoid/sphenoid-dysfunctions/sutures/sphenopetrosal", + "sphenoid/ssb-dysfunctions/sutures/sphenosquamous": "sphenoid/sphenoid-dysfunctions/sutures/sphenosquamous", + "sphenoid/ssb-dysfunctions/sutures/sphenoparietal": "sphenoid/sphenoid-dysfunctions/sutures/sphenoparietal", + "sphenoid/ssb-dysfunctions/sutures/frontosphenoidal": null, + "sphenoid/ssb-dysfunctions/sutures/sphenozygomatic": null, + "sphenoid/ssb-dysfunctions/sutures/sphenomaxillary": "sphenoid/sphenoid-dysfunctions/sutures/sphenomaxillary", + "sphenoid/ssb-dysfunctions/sutures/sphenovomerian": null, + "sphenoid/ssb-dysfunctions/sutures/sphenopalatine": "sphenoid/sphenoid-dysfunctions/sutures/sphenopalatine", + "sphenoid/sphenoid-observations": "sphenoid/sphenoid-consultation-reasons", + "sphenoid/sphenoid-observations/behavior-change": "sphenoid/sphenoid-consultation-reasons/behavior-change", + "sphenoid/sphenoid-observations/behavior-change/irritability": "sphenoid/sphenoid-consultation-reasons/behavior-change/irritability", + "sphenoid/sphenoid-observations/behavior-change/withdrawal": "sphenoid/sphenoid-consultation-reasons/behavior-change/withdrawal", + "sphenoid/sphenoid-observations/behavior-change/hypersensitivity": "sphenoid/sphenoid-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "sphenoid/sphenoid-observations/performance-drop": "sphenoid/sphenoid-consultation-reasons/performance-drop", + "sphenoid/sphenoid-observations/cycle-irregularity": "sphenoid/sphenoid-consultation-reasons/cycle-irregularity", + "sphenoid/sphenoid-observations/post-trauma-head": "sphenoid/sphenoid-consultation-reasons/post-trauma-head", + "sphenoid/anamnesis": "sphenoid/anamnesis", + "sphenoid/anamnesis/trauma-direct": "sphenoid/anamnesis/trauma-direct", + "sphenoid/anamnesis/stress-context": "sphenoid/anamnesis/stress-context", + "sphenoid/anamnesis/posture-context": "sphenoid/anamnesis/posture-context", + "sphenoid/anamnesis/dental-context": "sphenoid/anamnesis/dental-context", + "sphenoid/anamnesis/post-veterinary": "sphenoid/anamnesis/post-veterinary", + "sphenoid/anamnesis/no-identified-cause": "sphenoid/anamnesis/no-identified-cause", + "temporal/temporal-dysfunctions": "temporal/temporal-dysfunctions", + "temporal/temporal-dysfunctions/mobility": "temporal/temporal-dysfunctions/mobility", + "temporal/temporal-dysfunctions/mobility/temporal-anteriority": "temporal/temporal-dysfunctions/mobility/temporal-anteriority", + "temporal/temporal-dysfunctions/mobility/flexion-external-rotation": "temporal/temporal-dysfunctions/mobility/flexion-external-rotation", + "temporal/temporal-dysfunctions/mobility/extension-internal-rotation": "temporal/temporal-dysfunctions/mobility/extension-internal-rotation", + "temporal/temporal-dysfunctions/mobility/global-restriction": "temporal/temporal-dysfunctions/mobility/global-restriction", + "temporal/temporal-dysfunctions/intraosseous": "temporal/temporal-dysfunctions/intraosseous", + "temporal/temporal-dysfunctions/intraosseous/petrosquamous": "temporal/temporal-dysfunctions/intraosseous/petrosquamous", + "temporal/temporal-dysfunctions/intraosseous/tympanic-part": "temporal/temporal-dysfunctions/intraosseous/tympanic-part", + "temporal/temporal-dysfunctions/sutures": "temporal/temporal-dysfunctions/sutures", + "temporal/temporal-dysfunctions/sutures/parieto-temporal": "temporal/temporal-dysfunctions/sutures/parieto-temporal", + "temporal/temporal-dysfunctions/sutures/sphenosquamous": "temporal/temporal-dysfunctions/sutures/sphenosquamous", + "temporal/temporal-dysfunctions/sutures/occipitomastoid": "temporal/temporal-dysfunctions/sutures/occipitomastoid", + "temporal/temporal-dysfunctions/sutures/temporozygomatic": "temporal/temporal-dysfunctions/sutures/temporozygomatic", + "temporal/temporal-dysfunctions/sutures/petro-occipital": "temporal/temporal-dysfunctions/sutures/petro-occipital", + "temporal/temporal-observations": "temporal/temporal-consultation-reasons", + "temporal/temporal-observations/behavior-change": "temporal/temporal-consultation-reasons/behavior-change", + "temporal/temporal-observations/behavior-change/head-touch-hypersensitivity": "temporal/temporal-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "temporal/temporal-observations/behavior-change/new-irritability": "temporal/temporal-consultation-reasons/behavior-change/new-irritability", + "temporal/temporal-observations/post-trauma-head": "temporal/temporal-consultation-reasons/post-trauma-head", + "temporal/anamnesis": "temporal/anamnesis", + "temporal/anamnesis/trauma-direct": "temporal/anamnesis/trauma-direct", + "temporal/anamnesis/stress-context": "temporal/anamnesis/stress-context", + "temporal/anamnesis/posture-context": "temporal/anamnesis/posture-context", + "temporal/anamnesis/dental-context": "temporal/anamnesis/dental-context", + "temporal/anamnesis/post-veterinary": "temporal/anamnesis/post-veterinary", + "temporal/anamnesis/no-identified-cause": "temporal/anamnesis/no-identified-cause", + "occipital/occipital-dysfunctions": "occipital/occipital-dysfunctions", + "occipital/occipital-dysfunctions/mobility": "occipital/occipital-dysfunctions/mobility", + "occipital/occipital-dysfunctions/mobility/condylar-compression": "occipital/occipital-dysfunctions/mobility/condylar-compression", + "occipital/occipital-dysfunctions/mobility/flexion-external-rotation": "occipital/occipital-dysfunctions/mobility/flexion-external-rotation", + "occipital/occipital-dysfunctions/mobility/extension-internal-rotation": "occipital/occipital-dysfunctions/mobility/extension-internal-rotation", + "occipital/occipital-dysfunctions/mobility/global-restriction": "occipital/occipital-dysfunctions/mobility/global-restriction", + "occipital/occipital-dysfunctions/intraosseous": "occipital/occipital-dysfunctions/intraosseous", + "occipital/occipital-dysfunctions/intraosseous/squama-part": "occipital/occipital-dysfunctions/intraosseous/squama-part", + "occipital/occipital-dysfunctions/intraosseous/condylar-parts": "occipital/occipital-dysfunctions/intraosseous/condylar-parts", + "occipital/occipital-dysfunctions/intraosseous/basilar-part": "occipital/occipital-dysfunctions/intraosseous/basilar-part", + "occipital/occipital-dysfunctions/sutures": "occipital/occipital-dysfunctions/sutures", + "occipital/occipital-dysfunctions/sutures/parieto-occipital": "occipital/occipital-dysfunctions/sutures/parieto-occipital", + "occipital/occipital-dysfunctions/sutures/occipitomastoid": "occipital/occipital-dysfunctions/sutures/occipitomastoid", + "occipital/occipital-dysfunctions/sutures/petro-occipital": "occipital/occipital-dysfunctions/sutures/petro-occipital", + "occipital/occipital-observations": "occipital/occipital-consultation-reasons", + "occipital/occipital-observations/behavior-change": "occipital/occipital-consultation-reasons/behavior-change", + "occipital/occipital-observations/behavior-change/head-touch-hypersensitivity": "occipital/occipital-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "occipital/occipital-observations/behavior-change/new-irritability": "occipital/occipital-consultation-reasons/behavior-change/new-irritability", + "occipital/occipital-observations/post-trauma-head": "occipital/occipital-consultation-reasons/post-trauma-head", + "occipital/anamnesis": "occipital/anamnesis", + "occipital/anamnesis/trauma-direct": "occipital/anamnesis/trauma-direct", + "occipital/anamnesis/stress-context": "occipital/anamnesis/stress-context", + "occipital/anamnesis/posture-context": "occipital/anamnesis/posture-context", + "occipital/anamnesis/dental-context": "occipital/anamnesis/dental-context", + "occipital/anamnesis/post-veterinary": "occipital/anamnesis/post-veterinary", + "occipital/anamnesis/no-identified-cause": "occipital/anamnesis/no-identified-cause", + "ssb/ssb-dysfunctions": "ssb/ssb-dysfunctions", + "ssb/ssb-dysfunctions/physiological": "ssb/ssb-dysfunctions/physiological", + "ssb/ssb-dysfunctions/physiological/flexion": "ssb/ssb-dysfunctions/physiological/flexion", + "ssb/ssb-dysfunctions/physiological/extension": "ssb/ssb-dysfunctions/physiological/extension", + "ssb/ssb-dysfunctions/physiological/torsion-right": "ssb/ssb-dysfunctions/physiological/torsion-right", + "ssb/ssb-dysfunctions/physiological/torsion-left": "ssb/ssb-dysfunctions/physiological/torsion-left", + "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right", + "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left", + "ssb/ssb-dysfunctions/traumatic": "ssb/ssb-dysfunctions/traumatic", + "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior", + "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior", + "ssb/ssb-dysfunctions/traumatic/lateral-strain-right": "ssb/ssb-dysfunctions/traumatic/lateral-strain-right", + "ssb/ssb-dysfunctions/traumatic/lateral-strain-left": "ssb/ssb-dysfunctions/traumatic/lateral-strain-left", + "ssb/ssb-dysfunctions/traumatic/compression": "ssb/ssb-dysfunctions/traumatic/compression", + "ssb/ssb-dysfunctions/intraosseous": null, + "ssb/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, + "ssb/ssb-dysfunctions/intraosseous/lesser-wings": null, + "ssb/ssb-dysfunctions/intraosseous/greater-wings": null, + "ssb/ssb-dysfunctions/sutures": null, + "ssb/ssb-dysfunctions/sutures/sphenopetrosal": null, + "ssb/ssb-dysfunctions/sutures/sphenosquamous": null, + "ssb/ssb-dysfunctions/sutures/sphenoparietal": null, + "ssb/ssb-dysfunctions/sutures/frontosphenoidal": null, + "ssb/ssb-dysfunctions/sutures/sphenozygomatic": null, + "ssb/ssb-dysfunctions/sutures/sphenomaxillary": null, + "ssb/ssb-dysfunctions/sutures/sphenovomerian": null, + "ssb/ssb-dysfunctions/sutures/sphenopalatine": null, + "ssb/ssb-observations": "ssb/ssb-consultation-reasons", + "ssb/ssb-observations/behavior-change": "ssb/ssb-consultation-reasons/behavior-change", + "ssb/ssb-observations/behavior-change/irritability": "ssb/ssb-consultation-reasons/behavior-change/irritability", + "ssb/ssb-observations/behavior-change/withdrawal": "ssb/ssb-consultation-reasons/behavior-change/withdrawal", + "ssb/ssb-observations/behavior-change/hypersensitivity": "ssb/ssb-consultation-reasons/behavior-change/head-touch-hypersensitivity", + "ssb/ssb-observations/performance-drop": "ssb/ssb-consultation-reasons/performance-drop", + "ssb/ssb-observations/cycle-irregularity": "ssb/ssb-consultation-reasons/cycle-irregularity", + "ssb/ssb-observations/post-trauma-head": "ssb/ssb-consultation-reasons/post-trauma-head", + "ssb/anamnesis": "ssb/anamnesis", + "ssb/anamnesis/trauma-direct": "ssb/anamnesis/trauma-direct", + "ssb/anamnesis/stress-context": "ssb/anamnesis/stress-context", + "ssb/anamnesis/posture-context": "ssb/anamnesis/posture-context", + "ssb/anamnesis/dental-context": "ssb/anamnesis/dental-context", + "ssb/anamnesis/post-veterinary": "ssb/anamnesis/post-veterinary", + "ssb/anamnesis/no-identified-cause": "ssb/anamnesis/no-identified-cause", + "atm/atm-dysfunctions": "atm/atm-dysfunctions", + "atm/atm-dysfunctions/articular": "atm/atm-dysfunctions/articular", + "atm/atm-dysfunctions/articular/restriction-opening": "atm/atm-dysfunctions/articular/restriction-opening", + "atm/atm-dysfunctions/articular/restriction-closing": "atm/atm-dysfunctions/articular/restriction-closing", + "atm/atm-dysfunctions/articular/restriction-lateral": "atm/atm-dysfunctions/articular/restriction-lateral", + "atm/atm-dysfunctions/articular/restriction-protrusion": "atm/atm-dysfunctions/articular/restriction-protrusion", + "atm/atm-dysfunctions/articular/hypomobility": "atm/atm-dysfunctions/articular/hypomobility", + "atm/atm-dysfunctions/articular/hypermobility": "atm/atm-dysfunctions/articular/hypermobility", + "atm/atm-dysfunctions/muscular": "atm/atm-dysfunctions/muscular", + "atm/atm-dysfunctions/muscular/masseter-tension": "atm/atm-dysfunctions/muscular/masseter-tension", + "atm/atm-dysfunctions/muscular/temporalis-tension": "atm/atm-dysfunctions/muscular/temporalis-tension", + "atm/atm-dysfunctions/muscular/pterygoid-tension": "atm/atm-dysfunctions/muscular/pterygoid-tension", + "atm/atm-dysfunctions/muscular/trigger-points": "atm/atm-dysfunctions/muscular/trigger-points", + "atm/atm-dysfunctions/mechanical": "atm/atm-dysfunctions/mechanical", + "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw": "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw", + "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear": "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear", + "atm/atm-dysfunctions/mechanical/opening-deviation": "atm/atm-dysfunctions/mechanical/opening-deviation", + "atm/atm-dysfunctions/mechanical/asymmetric-amplitude": "atm/atm-dysfunctions/mechanical/asymmetric-amplitude", + "atm/atm-observations": "atm/atm-consultation-reasons", + "atm/atm-observations/bit-defense": "atm/atm-consultation-reasons/bit-defense", + "atm/atm-observations/headshaking": "atm/atm-consultation-reasons/headshaking", + "atm/atm-observations/head-tilt-saddle": "atm/atm-consultation-reasons/head-tilt-saddle", + "atm/atm-observations/slow-eating": "atm/atm-consultation-reasons/slow-eating", + "atm/atm-observations/drops-food": "atm/atm-consultation-reasons/drops-food", + "atm/atm-observations/hand-contact-refusal": "atm/atm-consultation-reasons/hand-contact-refusal", + "atm/atm-observations/false-bend": "atm/atm-consultation-reasons/false-bend", + "atm/atm-observations/post-dental-care": "atm/atm-consultation-reasons/post-dental-care", + "atm/anamnesis": "atm/anamnesis", + "atm/anamnesis/trauma-direct": "atm/anamnesis/trauma-direct", + "atm/anamnesis/stress-context": "atm/anamnesis/stress-context", + "atm/anamnesis/posture-context": "atm/anamnesis/posture-context", + "atm/anamnesis/dental-context": "atm/anamnesis/dental-context", + "atm/anamnesis/post-veterinary": "atm/anamnesis/post-veterinary", + "atm/anamnesis/no-identified-cause": "atm/anamnesis/no-identified-cause", + "hyoid/hyoid-dysfunctions": "hyoid/hyoid-dysfunctions", + "hyoid/hyoid-dysfunctions/mobility": "hyoid/hyoid-dysfunctions/mobility", + "hyoid/hyoid-dysfunctions/mobility/global-restriction": "hyoid/hyoid-dysfunctions/mobility/global-restriction", + "hyoid/hyoid-dysfunctions/mobility/lateral-deviation": "hyoid/hyoid-dysfunctions/mobility/lateral-deviation", + "hyoid/hyoid-dysfunctions/mobility/swing-restriction": "hyoid/hyoid-dysfunctions/mobility/retraction-protraction-restriction", + "hyoid/hyoid-dysfunctions/muscular": "hyoid/hyoid-dysfunctions/muscular", + "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension", + "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension", + "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension": "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension", + "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension": "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension", + "hyoid/hyoid-dysfunctions/intraosseous": "hyoid/hyoid-dysfunctions/intraosseous", + "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone": "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone", + "hyoid/hyoid-dysfunctions/intraosseous/basihyoid": "hyoid/hyoid-dysfunctions/intraosseous/basihyoid", + "hyoid/hyoid-observations": "hyoid/hyoid-consultation-reasons", + "hyoid/hyoid-observations/bit-defense": "hyoid/hyoid-consultation-reasons/bit-defense", + "hyoid/hyoid-observations/tongue-over-bit": "hyoid/hyoid-consultation-reasons/tongue-over-bit", + "hyoid/hyoid-observations/swallowing-difficulty": "hyoid/hyoid-consultation-reasons/swallowing-difficulty", + "hyoid/hyoid-observations/head-carriage-resistance": "hyoid/hyoid-consultation-reasons/head-carriage-resistance", + "hyoid/hyoid-observations/post-dental-care": "hyoid/hyoid-consultation-reasons/post-dental-care", + "hyoid/anamnesis": "hyoid/anamnesis", + "hyoid/anamnesis/trauma-direct": "hyoid/anamnesis/trauma-direct", + "hyoid/anamnesis/stress-context": "hyoid/anamnesis/stress-context", + "hyoid/anamnesis/posture-context": "hyoid/anamnesis/posture-context", + "hyoid/anamnesis/dental-context": "hyoid/anamnesis/dental-context", + "hyoid/anamnesis/post-veterinary": "hyoid/anamnesis/post-veterinary", + "hyoid/anamnesis/no-identified-cause": "hyoid/anamnesis/no-identified-cause", + "c0-c1/c0-c1-dysfunctions": "c0-c1/c0-c1-dysfunctions", + "c0-c1/c0-c1-dysfunctions/segmental": "c0-c1/c0-c1-dysfunctions/segmental", + "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion", + "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension": "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension", + "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion", + "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation": "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation", + "c0-c1/c0-c1-dysfunctions/segmental/fixation": "c0-c1/c0-c1-dysfunctions/segmental/fixation", + "c0-c1/c0-c1-dysfunctions/muscular": "c0-c1/c0-c1-dysfunctions/muscular", + "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension", + "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension", + "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension": "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension", + "c0-c1/c0-c1-dysfunctions/muscular/trigger-points": "c0-c1/c0-c1-dysfunctions/muscular/trigger-points", + "c0-c1/c0-c1-dysfunctions/mechanical": "c0-c1/c0-c1-dysfunctions/mechanical", + "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry", + "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry", + "c0-c1/c0-c1-observations": "c0-c1/c0-c1-consultation-reasons", + "c0-c1/c0-c1-observations/poll-sensitivity": "c0-c1/c0-c1-consultation-reasons/poll-sensitivity", + "c0-c1/c0-c1-observations/head-carriage": "c0-c1/c0-c1-consultation-reasons/head-carriage", + "c0-c1/c0-c1-observations/headshaking": "c0-c1/c0-c1-consultation-reasons/headshaking", + "c0-c1/c0-c1-observations/bridle-resistance": "c0-c1/c0-c1-consultation-reasons/bridle-resistance", + "c0-c1/c0-c1-observations/palpation-sensitivity": "c0-c1/c0-c1-consultation-reasons/palpation-sensitivity", + "c0-c1/anamnesis": "c0-c1/anamnesis", + "c0-c1/anamnesis/trauma-direct": "c0-c1/anamnesis/trauma-direct", + "c0-c1/anamnesis/saddle-context": "c0-c1/anamnesis/saddle-context", + "c0-c1/anamnesis/posture-context": "c0-c1/anamnesis/posture-context", + "c0-c1/anamnesis/stress-context": "c0-c1/anamnesis/stress-context", + "c0-c1/anamnesis/post-veterinary": "c0-c1/anamnesis/post-veterinary", + "c0-c1/anamnesis/no-identified-cause": "c0-c1/anamnesis/no-identified-cause", + "cervical/cervical-dysfunctions": "cervical/cervical-dysfunctions", + "cervical/cervical-dysfunctions/segmental": "cervical/cervical-dysfunctions/segmental", + "cervical/cervical-dysfunctions/segmental/restriction-flexion": "cervical/cervical-dysfunctions/segmental/restriction-flexion", + "cervical/cervical-dysfunctions/segmental/restriction-extension": "cervical/cervical-dysfunctions/segmental/restriction-extension", + "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion": "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion", + "cervical/cervical-dysfunctions/segmental/restriction-rotation": "cervical/cervical-dysfunctions/segmental/restriction-rotation", + "cervical/cervical-dysfunctions/segmental/localized-fixation": "cervical/cervical-dysfunctions/segmental/localized-fixation", + "cervical/cervical-dysfunctions/group": "cervical/cervical-dysfunctions/group", + "cervical/cervical-dysfunctions/group/nsr-group": "cervical/cervical-dysfunctions/group/nsr-group", + "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude": "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude", + "cervical/cervical-dysfunctions/muscular": "cervical/cervical-dysfunctions/muscular", + "cervical/cervical-dysfunctions/muscular/splenius-tension": "cervical/cervical-dysfunctions/muscular/splenius-tension", + "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis": "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis", + "cervical/cervical-dysfunctions/muscular/scalenus-tension": "cervical/cervical-dysfunctions/muscular/scalenus-tension", + "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension": "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension", + "cervical/cervical-dysfunctions/muscular/multifidus-cervicis": "cervical/cervical-dysfunctions/muscular/multifidus-cervicis", + "cervical/cervical-dysfunctions/mechanical": "cervical/cervical-dysfunctions/mechanical", + "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry": "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry", + "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry": "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry", + "cervical/cervical-observations": "cervical/cervical-consultation-reasons", + "cervical/cervical-observations/ridden-work": "cervical/cervical-consultation-reasons/ridden-work", + "cervical/cervical-observations/ridden-work/bend-asymmetry-work": "cervical/cervical-consultation-reasons/ridden-work/bend-asymmetry-work", + "cervical/cervical-observations/ridden-work/head-carriage": "cervical/cervical-consultation-reasons/ridden-work/head-carriage", + "cervical/cervical-observations/ridden-work/contact-resistance": "cervical/cervical-consultation-reasons/ridden-work/contact-resistance", + "cervical/cervical-observations/stumbling-proprioceptive": "cervical/cervical-consultation-reasons/stumbling-proprioceptive", + "cervical/cervical-observations/palpation-sensitivity": "cervical/cervical-consultation-reasons/palpation-sensitivity", + "cervical/cervical-observations/new-stiffness": "cervical/cervical-consultation-reasons/new-stiffness", + "cervical/anamnesis": "cervical/anamnesis", + "cervical/anamnesis/trauma-direct": "cervical/anamnesis/trauma-direct", + "cervical/anamnesis/saddle-context": "cervical/anamnesis/saddle-context", + "cervical/anamnesis/posture-context": "cervical/anamnesis/posture-context", + "cervical/anamnesis/stress-context": "cervical/anamnesis/stress-context", + "cervical/anamnesis/post-veterinary": "cervical/anamnesis/post-veterinary", + "cervical/anamnesis/no-identified-cause": "cervical/anamnesis/no-identified-cause", + "c7-t1/c7-t1-dysfunctions": "c7-t1/c7-t1-dysfunctions", + "c7-t1/c7-t1-dysfunctions/segmental": "c7-t1/c7-t1-dysfunctions/segmental", + "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion", + "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension": "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension", + "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion", + "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation": "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation", + "c7-t1/c7-t1-dysfunctions/segmental/fixation": "c7-t1/c7-t1-dysfunctions/segmental/fixation", + "c7-t1/c7-t1-dysfunctions/muscular": "c7-t1/c7-t1-dysfunctions/muscular", + "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension": "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension", + "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension": "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension", + "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension": "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension", + "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension": "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension", + "c7-t1/c7-t1-dysfunctions/mechanical": "c7-t1/c7-t1-dysfunctions/mechanical", + "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry", + "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry", + "c7-t1/c7-t1-observations": "c7-t1/c7-t1-consultation-reasons", + "c7-t1/c7-t1-observations/base-neck-stiffness": "c7-t1/c7-t1-consultation-reasons/base-neck-stiffness", + "c7-t1/c7-t1-observations/forelimb-engagement": "c7-t1/c7-t1-consultation-reasons/forelimb-engagement", + "c7-t1/c7-t1-observations/ewe-neck-posture": "c7-t1/c7-t1-consultation-reasons/ewe-neck-posture", + "c7-t1/c7-t1-observations/forelimb-lameness": "c7-t1/c7-t1-consultation-reasons/forelimb-lameness", + "c7-t1/anamnesis": "c7-t1/anamnesis", + "c7-t1/anamnesis/trauma-direct": "c7-t1/anamnesis/trauma-direct", + "c7-t1/anamnesis/saddle-context": "c7-t1/anamnesis/saddle-context", + "c7-t1/anamnesis/posture-context": "c7-t1/anamnesis/posture-context", + "c7-t1/anamnesis/stress-context": "c7-t1/anamnesis/stress-context", + "c7-t1/anamnesis/post-veterinary": "c7-t1/anamnesis/post-veterinary", + "c7-t1/anamnesis/no-identified-cause": "c7-t1/anamnesis/no-identified-cause", + "shoulder/shoulder-dysfunctions": "shoulder/shoulder-dysfunctions", + "shoulder/shoulder-dysfunctions/articular": "shoulder/shoulder-dysfunctions/articular", + "shoulder/shoulder-dysfunctions/articular/restriction-flexion": "shoulder/shoulder-dysfunctions/articular/restriction-flexion", + "shoulder/shoulder-dysfunctions/articular/restriction-extension": "shoulder/shoulder-dysfunctions/articular/restriction-extension", + "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction": "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction", + "shoulder/shoulder-dysfunctions/articular/restriction-glide": "shoulder/shoulder-dysfunctions/articular/restriction-glide", + "shoulder/shoulder-dysfunctions/articular/hypomobility": "shoulder/shoulder-dysfunctions/articular/hypomobility", + "shoulder/shoulder-dysfunctions/articular/hypermobility": "shoulder/shoulder-dysfunctions/articular/hypermobility", + "shoulder/shoulder-dysfunctions/muscular": "shoulder/shoulder-dysfunctions/muscular", + "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus": "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus", + "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension": "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension", + "shoulder/shoulder-dysfunctions/muscular/deltoid-tension": "shoulder/shoulder-dysfunctions/muscular/deltoid-tension", + "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension": "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension", + "shoulder/shoulder-dysfunctions/muscular/trigger-points": "shoulder/shoulder-dysfunctions/muscular/trigger-points", + "shoulder/shoulder-dysfunctions/mechanical": "shoulder/shoulder-dysfunctions/mechanical", + "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry", + "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry", + "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry", + "shoulder/shoulder-observations": "shoulder/shoulder-consultation-reasons", + "shoulder/shoulder-observations/ridden-work": "shoulder/shoulder-consultation-reasons/ridden-work", + "shoulder/shoulder-observations/ridden-work/canter-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/canter-difficulty", + "shoulder/shoulder-observations/ridden-work/backing-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/backing-difficulty", + "shoulder/shoulder-observations/ridden-work/limb-engagement": "shoulder/shoulder-consultation-reasons/ridden-work/limb-engagement", + "shoulder/shoulder-observations/ridden-work/jumping-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/jumping-difficulty", + "shoulder/shoulder-observations/shortened-cranial-phase": "shoulder/shoulder-consultation-reasons/shortened-cranial-phase", + "shoulder/shoulder-observations/limb-lameness": "shoulder/shoulder-consultation-reasons/limb-lameness", + "shoulder/anamnesis": "shoulder/anamnesis", + "shoulder/anamnesis/trauma-direct": "shoulder/anamnesis/trauma-direct", + "shoulder/anamnesis/sport-context": "shoulder/anamnesis/sport-context", + "shoulder/anamnesis/posture-context": "shoulder/anamnesis/posture-context", + "shoulder/anamnesis/stress-context": "shoulder/anamnesis/stress-context", + "shoulder/anamnesis/post-veterinary": "shoulder/anamnesis/post-veterinary", + "shoulder/anamnesis/no-identified-cause": "shoulder/anamnesis/no-identified-cause", + "elbow/elbow-dysfunctions": "elbow/elbow-dysfunctions", + "elbow/elbow-dysfunctions/articular": "elbow/elbow-dysfunctions/articular", + "elbow/elbow-dysfunctions/articular/restriction-flexion": "elbow/elbow-dysfunctions/articular/restriction-flexion", + "elbow/elbow-dysfunctions/articular/restriction-extension": "elbow/elbow-dysfunctions/articular/restriction-extension", + "elbow/elbow-dysfunctions/articular/restriction-lateromedial": "elbow/elbow-dysfunctions/articular/restriction-lateromedial", + "elbow/elbow-dysfunctions/articular/hypomobility": "elbow/elbow-dysfunctions/articular/hypomobility", + "elbow/elbow-dysfunctions/articular/hypermobility": "elbow/elbow-dysfunctions/articular/hypermobility", + "elbow/elbow-dysfunctions/muscular": "elbow/elbow-dysfunctions/muscular", + "elbow/elbow-dysfunctions/muscular/triceps-tension": "elbow/elbow-dysfunctions/muscular/triceps-tension", + "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension": "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension", + "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin": "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin", + "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin": "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin", + "elbow/elbow-dysfunctions/muscular/trigger-points": "elbow/elbow-dysfunctions/muscular/trigger-points", + "elbow/elbow-dysfunctions/mechanical": "elbow/elbow-dysfunctions/mechanical", + "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry": "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry", + "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry": "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry", + "elbow/elbow-observations": "elbow/elbow-consultation-reasons", + "elbow/elbow-observations/ridden-work": "elbow/elbow-consultation-reasons/ridden-work", + "elbow/elbow-observations/ridden-work/canter-difficulty": "elbow/elbow-consultation-reasons/ridden-work/canter-difficulty", + "elbow/elbow-observations/ridden-work/backing-difficulty": "elbow/elbow-consultation-reasons/ridden-work/backing-difficulty", + "elbow/elbow-observations/ridden-work/limb-engagement": "elbow/elbow-consultation-reasons/ridden-work/limb-engagement", + "elbow/elbow-observations/ridden-work/jumping-difficulty": "elbow/elbow-consultation-reasons/ridden-work/jumping-difficulty", + "elbow/elbow-observations/limb-lameness": "elbow/elbow-consultation-reasons/limb-lameness", + "elbow/anamnesis": "elbow/anamnesis", + "elbow/anamnesis/trauma-direct": "elbow/anamnesis/trauma-direct", + "elbow/anamnesis/sport-context": "elbow/anamnesis/sport-context", + "elbow/anamnesis/posture-context": "elbow/anamnesis/posture-context", + "elbow/anamnesis/stress-context": "elbow/anamnesis/stress-context", + "elbow/anamnesis/post-veterinary": "elbow/anamnesis/post-veterinary", + "elbow/anamnesis/no-identified-cause": "elbow/anamnesis/no-identified-cause", + "fore-fetlock/fore-fetlock-dysfunctions": "fore-fetlock/fore-fetlock-dysfunctions", + "fore-fetlock/fore-fetlock-dysfunctions/articular": "fore-fetlock/fore-fetlock-dysfunctions/articular", + "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion", + "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension", + "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial", + "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility", + "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility", + "fore-fetlock/fore-fetlock-dysfunctions/muscular": "fore-fetlock/fore-fetlock-dysfunctions/muscular", + "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon", + "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon", + "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia": "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia", + "fore-fetlock/fore-fetlock-dysfunctions/mechanical": "fore-fetlock/fore-fetlock-dysfunctions/mechanical", + "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", + "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry", + "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", + "fore-fetlock/fore-fetlock-observations": "fore-fetlock/fore-fetlock-consultation-reasons", + "fore-fetlock/fore-fetlock-observations/ridden-work": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work", + "fore-fetlock/fore-fetlock-observations/ridden-work/canter-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/canter-difficulty", + "fore-fetlock/fore-fetlock-observations/ridden-work/backing-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/backing-difficulty", + "fore-fetlock/fore-fetlock-observations/ridden-work/limb-engagement": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/limb-engagement", + "fore-fetlock/fore-fetlock-observations/ridden-work/jumping-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/jumping-difficulty", + "fore-fetlock/fore-fetlock-observations/limb-lameness": "fore-fetlock/fore-fetlock-consultation-reasons/limb-lameness", + "fore-fetlock/anamnesis": "fore-fetlock/anamnesis", + "fore-fetlock/anamnesis/trauma-direct": "fore-fetlock/anamnesis/trauma-direct", + "fore-fetlock/anamnesis/sport-context": "fore-fetlock/anamnesis/sport-context", + "fore-fetlock/anamnesis/posture-context": "fore-fetlock/anamnesis/posture-context", + "fore-fetlock/anamnesis/stress-context": "fore-fetlock/anamnesis/stress-context", + "fore-fetlock/anamnesis/post-veterinary": "fore-fetlock/anamnesis/post-veterinary", + "fore-fetlock/anamnesis/no-identified-cause": "fore-fetlock/anamnesis/no-identified-cause", + "fore-sesamoids/fore-sesamoids-dysfunctions": "fore-sesamoids/fore-sesamoids-dysfunctions", + "fore-sesamoids/fore-sesamoids-dysfunctions/mobility": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility", + "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction", + "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid", + "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid", + "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous", + "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean", + "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide", + "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical", + "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry", + "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry", + "fore-sesamoids/fore-sesamoids-observations": "fore-sesamoids/fore-sesamoids-consultation-reasons", + "fore-sesamoids/fore-sesamoids-observations/local-sensitivity": "fore-sesamoids/fore-sesamoids-consultation-reasons/local-sensitivity", + "fore-sesamoids/fore-sesamoids-observations/shortened-stride": "fore-sesamoids/fore-sesamoids-consultation-reasons/shortened-stride", + "fore-sesamoids/fore-sesamoids-observations/forelimb-lameness": "fore-sesamoids/fore-sesamoids-consultation-reasons/forelimb-lameness", + "fore-sesamoids/anamnesis": "fore-sesamoids/anamnesis", + "fore-sesamoids/anamnesis/trauma-direct": "fore-sesamoids/anamnesis/trauma-direct", + "fore-sesamoids/anamnesis/sport-context": "fore-sesamoids/anamnesis/sport-context", + "fore-sesamoids/anamnesis/posture-context": "fore-sesamoids/anamnesis/posture-context", + "fore-sesamoids/anamnesis/stress-context": "fore-sesamoids/anamnesis/stress-context", + "fore-sesamoids/anamnesis/post-veterinary": "fore-sesamoids/anamnesis/post-veterinary", + "fore-sesamoids/anamnesis/no-identified-cause": "fore-sesamoids/anamnesis/no-identified-cause", + "thoracic/thoracic-dysfunctions": "thoracic/thoracic-dysfunctions", + "thoracic/thoracic-dysfunctions/segmental": "thoracic/thoracic-dysfunctions/segmental", + "thoracic/thoracic-dysfunctions/segmental/restriction-flexion": "thoracic/thoracic-dysfunctions/segmental/restriction-flexion", + "thoracic/thoracic-dysfunctions/segmental/restriction-extension": "thoracic/thoracic-dysfunctions/segmental/restriction-extension", + "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion": "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion", + "thoracic/thoracic-dysfunctions/segmental/restriction-rotation": "thoracic/thoracic-dysfunctions/segmental/restriction-rotation", + "thoracic/thoracic-dysfunctions/segmental/localized-fixation": "thoracic/thoracic-dysfunctions/segmental/localized-fixation", + "thoracic/thoracic-dysfunctions/costovertebral": "thoracic/thoracic-dysfunctions/costovertebral", + "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction", + "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction", + "thoracic/thoracic-dysfunctions/group": "thoracic/thoracic-dysfunctions/group", + "thoracic/thoracic-dysfunctions/group/nsr-group": "thoracic/thoracic-dysfunctions/group/nsr-group", + "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude": "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude", + "thoracic/thoracic-dysfunctions/muscular": "thoracic/thoracic-dysfunctions/muscular", + "thoracic/thoracic-dysfunctions/muscular/longissimus-tension": "thoracic/thoracic-dysfunctions/muscular/longissimus-tension", + "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension": "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension", + "thoracic/thoracic-dysfunctions/muscular/trapezius-tension": "thoracic/thoracic-dysfunctions/muscular/trapezius-tension", + "thoracic/thoracic-dysfunctions/muscular/latissimus-tension": "thoracic/thoracic-dysfunctions/muscular/latissimus-tension", + "thoracic/thoracic-dysfunctions/muscular/trigger-points": "thoracic/thoracic-dysfunctions/muscular/trigger-points", + "thoracic/thoracic-dysfunctions/mechanical": "thoracic/thoracic-dysfunctions/mechanical", + "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry", + "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry", + "thoracic/thoracic-observations": "thoracic/thoracic-consultation-reasons", + "thoracic/thoracic-observations/ridden-work": "thoracic/thoracic-consultation-reasons/ridden-work", + "thoracic/thoracic-observations/ridden-work/saddle-region-sensitivity": "thoracic/thoracic-consultation-reasons/ridden-work/saddle-region-sensitivity", + "thoracic/thoracic-observations/ridden-work/cold-backed": "thoracic/thoracic-consultation-reasons/ridden-work/cold-backed", + "thoracic/thoracic-observations/ridden-work/hindquarter-engagement": "thoracic/thoracic-consultation-reasons/ridden-work/back-transmission", + "thoracic/thoracic-observations/ridden-work/bucking": "thoracic/thoracic-consultation-reasons/ridden-work/bucking", + "thoracic/thoracic-observations/girthing-defense": "thoracic/thoracic-consultation-reasons/girthing-defense", + "thoracic/thoracic-observations/palpation-sensitivity": "thoracic/thoracic-consultation-reasons/palpation-sensitivity", + "thoracic/thoracic-observations/new-stiffness": "thoracic/thoracic-consultation-reasons/new-stiffness", + "thoracic/anamnesis": "thoracic/anamnesis", + "thoracic/anamnesis/trauma-direct": "thoracic/anamnesis/trauma-direct", + "thoracic/anamnesis/saddle-context": "thoracic/anamnesis/saddle-context", + "thoracic/anamnesis/posture-context": "thoracic/anamnesis/posture-context", + "thoracic/anamnesis/stress-context": "thoracic/anamnesis/stress-context", + "thoracic/anamnesis/post-veterinary": "thoracic/anamnesis/post-veterinary", + "thoracic/anamnesis/no-identified-cause": "thoracic/anamnesis/no-identified-cause", + "t18-l1/t18-l1-dysfunctions": "t18-l1/t18-l1-dysfunctions", + "t18-l1/t18-l1-dysfunctions/segmental": "t18-l1/t18-l1-dysfunctions/segmental", + "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion", + "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension": "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension", + "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion", + "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation": "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation", + "t18-l1/t18-l1-dysfunctions/segmental/fixation": "t18-l1/t18-l1-dysfunctions/segmental/fixation", + "t18-l1/t18-l1-dysfunctions/muscular": "t18-l1/t18-l1-dysfunctions/muscular", + "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension": "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension", + "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension": "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension", + "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia": "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia", + "t18-l1/t18-l1-dysfunctions/muscular/trigger-points": "t18-l1/t18-l1-dysfunctions/muscular/trigger-points", + "t18-l1/t18-l1-dysfunctions/mechanical": "t18-l1/t18-l1-dysfunctions/mechanical", + "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry", + "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry", + "t18-l1/t18-l1-observations": "t18-l1/t18-l1-consultation-reasons", + "t18-l1/t18-l1-observations/back-mobility-loss": "t18-l1/t18-l1-consultation-reasons/back-mobility-loss", + "t18-l1/t18-l1-observations/saddle-rear-sensitivity": "t18-l1/t18-l1-consultation-reasons/saddle-rear-sensitivity", + "t18-l1/t18-l1-observations/transmission-defect": "t18-l1/t18-l1-consultation-reasons/transmission-defect", + "t18-l1/t18-l1-observations/palpation-sensitivity": "t18-l1/t18-l1-consultation-reasons/palpation-sensitivity", + "t18-l1/anamnesis": "t18-l1/anamnesis", + "t18-l1/anamnesis/trauma-direct": "t18-l1/anamnesis/trauma-direct", + "t18-l1/anamnesis/saddle-context": "t18-l1/anamnesis/saddle-context", + "t18-l1/anamnesis/posture-context": "t18-l1/anamnesis/posture-context", + "t18-l1/anamnesis/stress-context": "t18-l1/anamnesis/stress-context", + "t18-l1/anamnesis/post-veterinary": "t18-l1/anamnesis/post-veterinary", + "t18-l1/anamnesis/no-identified-cause": "t18-l1/anamnesis/no-identified-cause", + "lumbar/lumbar-dysfunctions": "lumbar/lumbar-dysfunctions", + "lumbar/lumbar-dysfunctions/segmental": "lumbar/lumbar-dysfunctions/segmental", + "lumbar/lumbar-dysfunctions/segmental/restriction-flexion": "lumbar/lumbar-dysfunctions/segmental/restriction-flexion", + "lumbar/lumbar-dysfunctions/segmental/restriction-extension": "lumbar/lumbar-dysfunctions/segmental/restriction-extension", + "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion": "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion", + "lumbar/lumbar-dysfunctions/segmental/restriction-rotation": "lumbar/lumbar-dysfunctions/segmental/restriction-rotation", + "lumbar/lumbar-dysfunctions/segmental/localized-fixation": "lumbar/lumbar-dysfunctions/segmental/localized-fixation", + "lumbar/lumbar-dysfunctions/group": "lumbar/lumbar-dysfunctions/group", + "lumbar/lumbar-dysfunctions/group/nsr-group": "lumbar/lumbar-dysfunctions/group/nsr-group", + "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude": "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude", + "lumbar/lumbar-dysfunctions/muscular": "lumbar/lumbar-dysfunctions/muscular", + "lumbar/lumbar-dysfunctions/muscular/longissimus-tension": "lumbar/lumbar-dysfunctions/muscular/longissimus-tension", + "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension": "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension", + "lumbar/lumbar-dysfunctions/muscular/psoas-tension": "lumbar/lumbar-dysfunctions/muscular/psoas-tension", + "lumbar/lumbar-dysfunctions/muscular/trigger-points": "lumbar/lumbar-dysfunctions/muscular/trigger-points", + "lumbar/lumbar-dysfunctions/mechanical": "lumbar/lumbar-dysfunctions/mechanical", + "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry", + "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry", + "lumbar/lumbar-observations": "lumbar/lumbar-consultation-reasons", + "lumbar/lumbar-observations/ridden-work": "lumbar/lumbar-consultation-reasons/ridden-work", + "lumbar/lumbar-observations/ridden-work/hollow-back-under-rider": "lumbar/lumbar-consultation-reasons/ridden-work/hollow-back-under-rider", + "lumbar/lumbar-observations/ridden-work/hindlimb-engagement": "lumbar/lumbar-consultation-reasons/ridden-work/hindlimb-engagement", + "lumbar/lumbar-observations/ridden-work/jumping-difficulty": "lumbar/lumbar-consultation-reasons/ridden-work/jumping-difficulty", + "lumbar/lumbar-observations/ridden-work/blocking-at-work": "lumbar/lumbar-consultation-reasons/ridden-work/blocking-at-work", + "lumbar/lumbar-observations/girthing-defense": "lumbar/lumbar-consultation-reasons/girthing-defense", + "lumbar/lumbar-observations/palpation-sensitivity": "lumbar/lumbar-consultation-reasons/palpation-sensitivity", + "lumbar/lumbar-observations/new-stiffness": "lumbar/lumbar-consultation-reasons/new-stiffness", + "lumbar/anamnesis": "lumbar/anamnesis", + "lumbar/anamnesis/trauma-direct": "lumbar/anamnesis/trauma-direct", + "lumbar/anamnesis/saddle-context": "lumbar/anamnesis/saddle-context", + "lumbar/anamnesis/posture-context": "lumbar/anamnesis/posture-context", + "lumbar/anamnesis/stress-context": "lumbar/anamnesis/stress-context", + "lumbar/anamnesis/post-veterinary": "lumbar/anamnesis/post-veterinary", + "lumbar/anamnesis/no-identified-cause": "lumbar/anamnesis/no-identified-cause", + "l6-s1/l6-s1-dysfunctions": "l6-s1/l6-s1-dysfunctions", + "l6-s1/l6-s1-dysfunctions/segmental": "l6-s1/l6-s1-dysfunctions/segmental", + "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion", + "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension": "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension", + "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion", + "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation": "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation", + "l6-s1/l6-s1-dysfunctions/segmental/fixation": "l6-s1/l6-s1-dysfunctions/segmental/fixation", + "l6-s1/l6-s1-dysfunctions/muscular": "l6-s1/l6-s1-dysfunctions/muscular", + "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension": "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension", + "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension": "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension", + "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension": "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension", + "l6-s1/l6-s1-dysfunctions/muscular/trigger-points": "l6-s1/l6-s1-dysfunctions/muscular/trigger-points", + "l6-s1/l6-s1-dysfunctions/mechanical": "l6-s1/l6-s1-dysfunctions/mechanical", + "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry", + "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry", + "l6-s1/l6-s1-observations": "l6-s1/l6-s1-consultation-reasons", + "l6-s1/l6-s1-observations/hindlimb-engagement": "l6-s1/l6-s1-consultation-reasons/hindlimb-engagement", + "l6-s1/l6-s1-observations/canter-quality": "l6-s1/l6-s1-consultation-reasons/canter-quality", + "l6-s1/l6-s1-observations/jumping-propulsion": "l6-s1/l6-s1-consultation-reasons/jumping-propulsion", + "l6-s1/l6-s1-observations/palpation-sensitivity": "l6-s1/l6-s1-consultation-reasons/palpation-sensitivity", + "l6-s1/anamnesis": "l6-s1/anamnesis", + "l6-s1/anamnesis/trauma-direct": "l6-s1/anamnesis/trauma-direct", + "l6-s1/anamnesis/saddle-context": "l6-s1/anamnesis/saddle-context", + "l6-s1/anamnesis/posture-context": "l6-s1/anamnesis/posture-context", + "l6-s1/anamnesis/stress-context": "l6-s1/anamnesis/stress-context", + "l6-s1/anamnesis/post-veterinary": "l6-s1/anamnesis/post-veterinary", + "l6-s1/anamnesis/no-identified-cause": "l6-s1/anamnesis/no-identified-cause", + "sacral/sacral-dysfunctions": "sacral/sacral-dysfunctions", + "sacral/sacral-dysfunctions/mobility": "sacral/sacral-dysfunctions/mobility", + "sacral/sacral-dysfunctions/mobility/nutation-restriction": "sacral/sacral-dysfunctions/mobility/nutation-restriction", + "sacral/sacral-dysfunctions/mobility/counternutation-restriction": "sacral/sacral-dysfunctions/mobility/counternutation-restriction", + "sacral/sacral-dysfunctions/mobility/sacral-torsion": "sacral/sacral-dysfunctions/mobility/sacral-torsion", + "sacral/sacral-dysfunctions/mobility/lateralisation": "sacral/sacral-dysfunctions/mobility/lateralisation", + "sacral/sacral-dysfunctions/muscular": "sacral/sacral-dysfunctions/muscular", + "sacral/sacral-dysfunctions/muscular/gluteal-tension": "sacral/sacral-dysfunctions/muscular/gluteal-tension", + "sacral/sacral-dysfunctions/muscular/longissimus-tension": "sacral/sacral-dysfunctions/muscular/longissimus-tension", + "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension": "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension", + "sacral/sacral-dysfunctions/muscular/trigger-points": "sacral/sacral-dysfunctions/muscular/trigger-points", + "sacral/sacral-dysfunctions/mechanical": "sacral/sacral-dysfunctions/mechanical", + "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry", + "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity": "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity", + "sacral/sacral-observations": "sacral/sacral-consultation-reasons", + "sacral/sacral-observations/ridden-work": "sacral/sacral-consultation-reasons/ridden-work", + "sacral/sacral-observations/ridden-work/hindlimb-propulsion": "sacral/sacral-consultation-reasons/ridden-work/hindlimb-propulsion", + "sacral/sacral-observations/ridden-work/canter-quality": "sacral/sacral-consultation-reasons/ridden-work/canter-quality", + "sacral/sacral-observations/ridden-work/bunny-hopping": "sacral/sacral-consultation-reasons/ridden-work/bunny-hopping", + "sacral/sacral-observations/tail-carriage": "sacral/sacral-consultation-reasons/tail-carriage", + "sacral/sacral-observations/palpation-sensitivity": "sacral/sacral-consultation-reasons/palpation-sensitivity", + "sacral/sacral-observations/new-stiffness": "sacral/sacral-consultation-reasons/new-stiffness", + "sacral/anamnesis": "sacral/anamnesis", + "sacral/anamnesis/trauma-direct": "sacral/anamnesis/trauma-direct", + "sacral/anamnesis/saddle-context": "sacral/anamnesis/saddle-context", + "sacral/anamnesis/posture-context": "sacral/anamnesis/posture-context", + "sacral/anamnesis/stress-context": "sacral/anamnesis/stress-context", + "sacral/anamnesis/post-veterinary": "sacral/anamnesis/post-veterinary", + "sacral/anamnesis/no-identified-cause": "sacral/anamnesis/no-identified-cause", + "sacroiliac/sacroiliac-dysfunctions": "sacroiliac/sacroiliac-dysfunctions", + "sacroiliac/sacroiliac-dysfunctions/articular": "sacroiliac/sacroiliac-dysfunctions/articular", + "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction", + "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction", + "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation": "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation", + "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction", + "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility", + "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility", + "sacroiliac/sacroiliac-dysfunctions/muscular": "sacroiliac/sacroiliac-dysfunctions/muscular", + "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension", + "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension", + "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension", + "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-ligament", + "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points": "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points", + "sacroiliac/sacroiliac-dysfunctions/mechanical": "sacroiliac/sacroiliac-dysfunctions/mechanical", + "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry", + "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry", + "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity": "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity", + "sacroiliac/sacroiliac-observations": "sacroiliac/sacroiliac-consultation-reasons", + "sacroiliac/sacroiliac-observations/ridden-work": "sacroiliac/sacroiliac-consultation-reasons/ridden-work", + "sacroiliac/sacroiliac-observations/ridden-work/hindlimb-engagement": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/hindlimb-engagement", + "sacroiliac/sacroiliac-observations/ridden-work/canter-disunited": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/canter-disunited", + "sacroiliac/sacroiliac-observations/ridden-work/bunny-hopping": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/bunny-hopping", + "sacroiliac/sacroiliac-observations/ridden-work/jumping-difficulty": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/jumping-difficulty", + "sacroiliac/sacroiliac-observations/croup-asymmetry": "sacroiliac/sacroiliac-consultation-reasons/croup-asymmetry", + "sacroiliac/sacroiliac-observations/hindlimb-lameness": "sacroiliac/sacroiliac-consultation-reasons/hindlimb-lameness", + "sacroiliac/anamnesis": "sacroiliac/anamnesis", + "sacroiliac/anamnesis/trauma-direct": "sacroiliac/anamnesis/trauma-direct", + "sacroiliac/anamnesis/sport-context": "sacroiliac/anamnesis/sport-context", + "sacroiliac/anamnesis/posture-context": "sacroiliac/anamnesis/posture-context", + "sacroiliac/anamnesis/stress-context": "sacroiliac/anamnesis/stress-context", + "sacroiliac/anamnesis/post-veterinary": "sacroiliac/anamnesis/post-veterinary", + "sacroiliac/anamnesis/no-identified-cause": "sacroiliac/anamnesis/no-identified-cause", + "hip/hip-dysfunctions": "hip/hip-dysfunctions", + "hip/hip-dysfunctions/articular": "hip/hip-dysfunctions/articular", + "hip/hip-dysfunctions/articular/restriction-flexion": "hip/hip-dysfunctions/articular/restriction-flexion", + "hip/hip-dysfunctions/articular/restriction-extension": "hip/hip-dysfunctions/articular/restriction-extension", + "hip/hip-dysfunctions/articular/restriction-abduction-adduction": "hip/hip-dysfunctions/articular/restriction-abduction-adduction", + "hip/hip-dysfunctions/articular/restriction-rotation": "hip/hip-dysfunctions/articular/restriction-rotation", + "hip/hip-dysfunctions/articular/hypomobility": "hip/hip-dysfunctions/articular/hypomobility", + "hip/hip-dysfunctions/articular/hypermobility": "hip/hip-dysfunctions/articular/hypermobility", + "hip/hip-dysfunctions/muscular": "hip/hip-dysfunctions/muscular", + "hip/hip-dysfunctions/muscular/gluteal-group-tension": "hip/hip-dysfunctions/muscular/gluteal-group-tension", + "hip/hip-dysfunctions/muscular/iliopsoas-tension": "hip/hip-dysfunctions/muscular/iliopsoas-tension", + "hip/hip-dysfunctions/muscular/adductors-tension": "hip/hip-dysfunctions/muscular/adductors-tension", + "hip/hip-dysfunctions/muscular/biceps-femoris-tension": "hip/hip-dysfunctions/muscular/biceps-femoris-tension", + "hip/hip-dysfunctions/muscular/trigger-points": "hip/hip-dysfunctions/muscular/trigger-points", + "hip/hip-dysfunctions/mechanical": "hip/hip-dysfunctions/mechanical", + "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry": "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry", + "hip/hip-dysfunctions/mechanical/amplitude-asymmetry": "hip/hip-dysfunctions/mechanical/amplitude-asymmetry", + "hip/hip-dysfunctions/mechanical/croup-asymmetry": "hip/hip-dysfunctions/mechanical/croup-asymmetry", + "hip/hip-observations": "hip/hip-consultation-reasons", + "hip/hip-observations/ridden-work": "hip/hip-consultation-reasons/ridden-work", + "hip/hip-observations/ridden-work/canter-difficulty": "hip/hip-consultation-reasons/ridden-work/canter-difficulty", + "hip/hip-observations/ridden-work/backing-difficulty": "hip/hip-consultation-reasons/ridden-work/backing-difficulty", + "hip/hip-observations/ridden-work/limb-engagement": "hip/hip-consultation-reasons/ridden-work/limb-engagement", + "hip/hip-observations/ridden-work/jumping-difficulty": "hip/hip-consultation-reasons/ridden-work/jumping-difficulty", + "hip/hip-observations/limb-lameness": "hip/hip-consultation-reasons/limb-lameness", + "hip/anamnesis": "hip/anamnesis", + "hip/anamnesis/trauma-direct": "hip/anamnesis/trauma-direct", + "hip/anamnesis/sport-context": "hip/anamnesis/sport-context", + "hip/anamnesis/posture-context": "hip/anamnesis/posture-context", + "hip/anamnesis/stress-context": "hip/anamnesis/stress-context", + "hip/anamnesis/post-veterinary": "hip/anamnesis/post-veterinary", + "hip/anamnesis/no-identified-cause": "hip/anamnesis/no-identified-cause", + "stifle/stifle-dysfunctions": "stifle/stifle-dysfunctions", + "stifle/stifle-dysfunctions/articular": "stifle/stifle-dysfunctions/articular", + "stifle/stifle-dysfunctions/articular/restriction-flexion": "stifle/stifle-dysfunctions/articular/restriction-flexion", + "stifle/stifle-dysfunctions/articular/restriction-extension": "stifle/stifle-dysfunctions/articular/restriction-extension", + "stifle/stifle-dysfunctions/articular/restriction-patellar-glide": "stifle/stifle-dysfunctions/articular/restriction-patellar-glide", + "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation": "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation", + "stifle/stifle-dysfunctions/articular/hypomobility": "stifle/stifle-dysfunctions/articular/hypomobility", + "stifle/stifle-dysfunctions/articular/hypermobility": "stifle/stifle-dysfunctions/articular/hypermobility", + "stifle/stifle-dysfunctions/muscular": "stifle/stifle-dysfunctions/muscular", + "stifle/stifle-dysfunctions/muscular/quadriceps-tension": "stifle/stifle-dysfunctions/muscular/quadriceps-tension", + "stifle/stifle-dysfunctions/muscular/hamstrings-tension": "stifle/stifle-dysfunctions/muscular/hamstrings-tension", + "stifle/stifle-dysfunctions/muscular/tfl-tension": "stifle/stifle-dysfunctions/muscular/tfl-tension", + "stifle/stifle-dysfunctions/muscular/trigger-points": "stifle/stifle-dysfunctions/muscular/trigger-points", + "stifle/stifle-dysfunctions/mechanical": "stifle/stifle-dysfunctions/mechanical", + "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry": "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry", + "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry": "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry", + "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation": "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation", + "stifle/stifle-observations": "stifle/stifle-consultation-reasons", + "stifle/stifle-observations/ridden-work": "stifle/stifle-consultation-reasons/ridden-work", + "stifle/stifle-observations/ridden-work/canter-difficulty": "stifle/stifle-consultation-reasons/ridden-work/canter-difficulty", + "stifle/stifle-observations/ridden-work/backing-difficulty": "stifle/stifle-consultation-reasons/ridden-work/backing-difficulty", + "stifle/stifle-observations/ridden-work/limb-engagement": "stifle/stifle-consultation-reasons/ridden-work/limb-engagement", + "stifle/stifle-observations/ridden-work/jumping-difficulty": "stifle/stifle-consultation-reasons/ridden-work/jumping-difficulty", + "stifle/stifle-observations/patellar-catching": "stifle/stifle-consultation-reasons/patellar-catching", + "stifle/stifle-observations/limb-lameness": "stifle/stifle-consultation-reasons/limb-lameness", + "stifle/anamnesis": "stifle/anamnesis", + "stifle/anamnesis/trauma-direct": "stifle/anamnesis/trauma-direct", + "stifle/anamnesis/sport-context": "stifle/anamnesis/sport-context", + "stifle/anamnesis/posture-context": "stifle/anamnesis/posture-context", + "stifle/anamnesis/stress-context": "stifle/anamnesis/stress-context", + "stifle/anamnesis/post-veterinary": "stifle/anamnesis/post-veterinary", + "stifle/anamnesis/no-identified-cause": "stifle/anamnesis/no-identified-cause", + "hock/hock-dysfunctions": "hock/hock-dysfunctions", + "hock/hock-dysfunctions/articular": "hock/hock-dysfunctions/articular", + "hock/hock-dysfunctions/articular/restriction-flexion": "hock/hock-dysfunctions/articular/restriction-flexion", + "hock/hock-dysfunctions/articular/restriction-extension": "hock/hock-dysfunctions/articular/restriction-extension", + "hock/hock-dysfunctions/articular/restriction-rotation": "hock/hock-dysfunctions/articular/restriction-rotation", + "hock/hock-dysfunctions/articular/restriction-small-joints": "hock/hock-dysfunctions/articular/restriction-small-joints", + "hock/hock-dysfunctions/articular/hypomobility": "hock/hock-dysfunctions/articular/hypomobility", + "hock/hock-dysfunctions/articular/hypermobility": "hock/hock-dysfunctions/articular/hypermobility", + "hock/hock-dysfunctions/muscular": "hock/hock-dysfunctions/muscular", + "hock/hock-dysfunctions/muscular/gastrocnemius-tension": "hock/hock-dysfunctions/muscular/gastrocnemius-tension", + "hock/hock-dysfunctions/muscular/peroneus-tertius": "hock/hock-dysfunctions/muscular/peroneus-tertius", + "hock/hock-dysfunctions/muscular/deep-digital-flexor": "hock/hock-dysfunctions/muscular/deep-digital-flexor", + "hock/hock-dysfunctions/muscular/tibialis-cranialis": "hock/hock-dysfunctions/muscular/tibialis-cranialis", + "hock/hock-dysfunctions/muscular/trigger-points": "hock/hock-dysfunctions/muscular/trigger-points", + "hock/hock-dysfunctions/mechanical": "hock/hock-dysfunctions/mechanical", + "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry": "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry", + "hock/hock-dysfunctions/mechanical/amplitude-asymmetry": "hock/hock-dysfunctions/mechanical/amplitude-asymmetry", + "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry": "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry", + "hock/hock-observations": "hock/hock-consultation-reasons", + "hock/hock-observations/ridden-work": "hock/hock-consultation-reasons/ridden-work", + "hock/hock-observations/ridden-work/canter-difficulty": "hock/hock-consultation-reasons/ridden-work/canter-difficulty", + "hock/hock-observations/ridden-work/backing-difficulty": "hock/hock-consultation-reasons/ridden-work/backing-difficulty", + "hock/hock-observations/ridden-work/limb-engagement": "hock/hock-consultation-reasons/ridden-work/limb-engagement", + "hock/hock-observations/ridden-work/jumping-difficulty": "hock/hock-consultation-reasons/ridden-work/jumping-difficulty", + "hock/hock-observations/limb-lameness": "hock/hock-consultation-reasons/limb-lameness", + "hock/anamnesis": "hock/anamnesis", + "hock/anamnesis/trauma-direct": "hock/anamnesis/trauma-direct", + "hock/anamnesis/sport-context": "hock/anamnesis/sport-context", + "hock/anamnesis/posture-context": "hock/anamnesis/posture-context", + "hock/anamnesis/stress-context": "hock/anamnesis/stress-context", + "hock/anamnesis/post-veterinary": "hock/anamnesis/post-veterinary", + "hock/anamnesis/no-identified-cause": "hock/anamnesis/no-identified-cause", + "hind-fetlock/hind-fetlock-dysfunctions": "hind-fetlock/hind-fetlock-dysfunctions", + "hind-fetlock/hind-fetlock-dysfunctions/articular": "hind-fetlock/hind-fetlock-dysfunctions/articular", + "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion", + "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension", + "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial", + "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility", + "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility", + "hind-fetlock/hind-fetlock-dysfunctions/muscular": "hind-fetlock/hind-fetlock-dysfunctions/muscular", + "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon", + "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon", + "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia": "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia", + "hind-fetlock/hind-fetlock-dysfunctions/mechanical": "hind-fetlock/hind-fetlock-dysfunctions/mechanical", + "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", + "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry", + "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", + "hind-fetlock/hind-fetlock-observations": "hind-fetlock/hind-fetlock-consultation-reasons", + "hind-fetlock/hind-fetlock-observations/ridden-work": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work", + "hind-fetlock/hind-fetlock-observations/ridden-work/canter-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/canter-difficulty", + "hind-fetlock/hind-fetlock-observations/ridden-work/backing-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/backing-difficulty", + "hind-fetlock/hind-fetlock-observations/ridden-work/limb-engagement": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/limb-engagement", + "hind-fetlock/hind-fetlock-observations/ridden-work/jumping-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/jumping-difficulty", + "hind-fetlock/hind-fetlock-observations/limb-lameness": "hind-fetlock/hind-fetlock-consultation-reasons/limb-lameness", + "hind-fetlock/anamnesis": "hind-fetlock/anamnesis", + "hind-fetlock/anamnesis/trauma-direct": "hind-fetlock/anamnesis/trauma-direct", + "hind-fetlock/anamnesis/sport-context": "hind-fetlock/anamnesis/sport-context", + "hind-fetlock/anamnesis/posture-context": "hind-fetlock/anamnesis/posture-context", + "hind-fetlock/anamnesis/stress-context": "hind-fetlock/anamnesis/stress-context", + "hind-fetlock/anamnesis/post-veterinary": "hind-fetlock/anamnesis/post-veterinary", + "hind-fetlock/anamnesis/no-identified-cause": "hind-fetlock/anamnesis/no-identified-cause", + "caudal/caudal-dysfunctions": "caudal/caudal-dysfunctions", + "caudal/caudal-dysfunctions/segmental": "caudal/caudal-dysfunctions/segmental", + "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion": "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion", + "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral": "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral", + "caudal/caudal-dysfunctions/segmental/localized-fixation": "caudal/caudal-dysfunctions/segmental/localized-fixation", + "caudal/caudal-dysfunctions/muscular": "caudal/caudal-dysfunctions/muscular", + "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis", + "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis", + "caudal/caudal-dysfunctions/muscular/coccygeus-tension": "caudal/caudal-dysfunctions/muscular/coccygeus-tension", + "caudal/caudal-dysfunctions/mechanical": "caudal/caudal-dysfunctions/mechanical", + "caudal/caudal-dysfunctions/mechanical/tail-deviation": "caudal/caudal-dysfunctions/mechanical/tail-deviation", + "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry": "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry", + "caudal/caudal-observations": "caudal/caudal-consultation-reasons", + "caudal/caudal-observations/tail-clamped": "caudal/caudal-consultation-reasons/tail-clamped", + "caudal/caudal-observations/tail-swishing": "caudal/caudal-consultation-reasons/tail-swishing", + "caudal/caudal-observations/tail-deviation-new": "caudal/caudal-consultation-reasons/tail-deviation-new", + "caudal/caudal-observations/tail-handling-sensitivity": "caudal/caudal-consultation-reasons/tail-handling-sensitivity", + "caudal/anamnesis": "caudal/anamnesis", + "caudal/anamnesis/trauma-direct": "caudal/anamnesis/trauma-direct", + "caudal/anamnesis/saddle-context": "caudal/anamnesis/saddle-context", + "caudal/anamnesis/posture-context": "caudal/anamnesis/posture-context", + "caudal/anamnesis/stress-context": "caudal/anamnesis/stress-context", + "caudal/anamnesis/post-veterinary": "caudal/anamnesis/post-veterinary", + "caudal/anamnesis/no-identified-cause": "caudal/anamnesis/no-identified-cause" + } +} diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json new file mode 100644 index 00000000..5633394d --- /dev/null +++ b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json @@ -0,0 +1,7 @@ +{ + "sheet_id": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "version_id": null, + "document_sha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", + "schema_version": 2, + "species_id": "equine" +} diff --git a/packages/domain/tests/fixtures/report-v2.full.json b/crates/core/tests/fixtures/report-v2.full.json similarity index 100% rename from packages/domain/tests/fixtures/report-v2.full.json rename to crates/core/tests/fixtures/report-v2.full.json diff --git a/packages/domain/tests/fixtures/report-v2.minimal.json b/crates/core/tests/fixtures/report-v2.minimal.json similarity index 100% rename from packages/domain/tests/fixtures/report-v2.minimal.json rename to crates/core/tests/fixtures/report-v2.minimal.json diff --git a/crates/core/tests/json_numbers.rs b/crates/core/tests/json_numbers.rs new file mode 100644 index 00000000..257be1b0 --- /dev/null +++ b/crates/core/tests/json_numbers.rs @@ -0,0 +1,57 @@ +//! `js_number` against V8 (R5.1b, F1). The expected texts come from +//! `crates/core/tests/oracles/r5/numbers.json`, written by `String(value)` in Node +//! (`scripts/r5-number-oracle.mjs`); each value is given by its IEEE 754 bits, so no +//! decimal parsing on this side decides the expectation. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod common; + +use faunosteo_core::json::js_number; +use serde_json::Value; + +fn oracle_rows() -> Vec<(u64, String)> { + let oracle: Value = serde_json::from_str(&common::repo_file( + "crates/core/tests/oracles/r5/numbers.json", + )) + .unwrap(); + oracle["rows"] + .as_array() + .unwrap() + .iter() + .map(|row| { + let bits = u64::from_str_radix(row[0].as_str().unwrap(), 16).unwrap(); + (bits, row[1].as_str().unwrap().to_owned()) + }) + .collect() +} + +#[test] +fn every_oracle_value_prints_as_v8_prints_it() { + let rows = oracle_rows(); + assert!(rows.len() > 40_000, "{} rows", rows.len()); + let mismatches: Vec = rows + .iter() + .filter_map(|(bits, expected)| { + let actual = js_number(f64::from_bits(*bits)); + (actual != *expected).then(|| format!("{bits:016x}: {actual} vs V8 {expected}")) + }) + .collect(); + assert!( + mismatches.is_empty(), + "{} mismatches, first: {:?}", + mismatches.len(), + &mismatches[..mismatches.len().min(5)] + ); +} + +/// The value the R5.1 study found in the legacy baseline (`Horse.svg`, annotation `cx`): +/// exactly 840.16925048828125, halfway between the two 16-digit candidates; ECMAScript +/// picks the even last digit. +#[test] +fn an_exact_decimal_tie_rounds_to_the_even_digit() { + let value = f64::from_bits(0x408a_415a_a000_0000); + assert_eq!(js_number(value), "840.1692504882812"); + assert_eq!(js_number(-value), "-840.1692504882812"); + assert_eq!(js_number(21.699_905_395_507_812), "21.699905395507812"); + assert_eq!(js_number(960.304_260_253_906_2), "960.3042602539062"); +} diff --git a/crates/core/tests/oracles/r5/curation-synthetic.json b/crates/core/tests/oracles/r5/curation-synthetic.json new file mode 100644 index 00000000..750d41d6 --- /dev/null +++ b/crates/core/tests/oracles/r5/curation-synthetic.json @@ -0,0 +1 @@ +{"baseline":{"schema_version":2,"species_id":"equine","name":{"fr":"Mini","en":"Mini"},"description":{},"scope_disclaimer":{},"attribution":{"authors":[],"license":null,"notes":null},"vertebral_config":{"regions":[{"code":"C","name":{"fr":"Cervicales","en":"Cervical"},"count":7},{"code":"T","name":{"fr":"Thoraciques","en":"Thoracic"},"count":18}]},"references":[],"categories":[{"id":"joints","name":{"fr":"Articulations","en":"Joints"},"color":null},{"id":"bones","name":{"fr":"Os","en":"Bones"},"color":null}],"views":[{"id":"main","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null},{"id":"head","kind":"detail","parent_view_id":"main","name":{"fr":"Tête","en":"Head"},"svg_asset_id":null,"view_box":{"min_x":0,"min_y":0,"width":10,"height":10}}],"annotations":[{"id":"hip","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip","vertebral_region_code":null},{"id":"neck","kind":"zone","view_id":"main","category_id":"bones","laterality":"unpaired","geometry":null,"name":{"fr":"Cou","en":"Neck"},"finding_zone_id":"neck","vertebral_region_code":"C"},{"id":"head-trigger","kind":"detail_trigger","view_id":"main","category_id":"bones","laterality":"unpaired","geometry":null,"name":null,"opens_view_id":"head"}],"finding_zones":[{"id":"hip","name":{"fr":"Hanche","en":"Hip"},"categories":[{"id":"hip-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}]},{"id":"pain","name":{"fr":"pain fr","en":"pain en"}}]},{"id":"anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"trauma","name":{"fr":"trauma fr","en":"trauma en"}}]}]},{"id":"neck","name":{"fr":"Cou","en":"Neck"},"categories":[{"id":"neck-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"stiffness","name":{"fr":"stiffness fr","en":"stiffness en"}},{"id":"vet","name":{"fr":"vet fr","en":"vet en"},"requires_vet_referral":true}]}]}]},"references_file":{"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},{"id":"paper","type":"journal","citation":"A paper","url":null,"doi":"10.1/x"}]},"cases":[{"name":"set-fields","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"region:C","field":"count_range","value":{"min":6,"max":8}},{"op":"set","target":"document","field":"name.en","value":"Mini sheet"},{"op":"set","target":"document","field":"scope_disclaimer.fr","value":"Périmètre"},{"op":"set","target":"annotation:hip","field":"geometry","value":{"type":"circle","cx":1.5,"cy":2,"r":0.25}},{"op":"set","target":"annotation:neck","field":"color","value":"#aabbcc"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","value":"Flexion described"},{"op":"set","target":"finding:hip/anamnesis","field":"name.fr","value":"Anamnèse complète"},{"op":"set","target":"zone:neck","field":"name","value":{"fr":"Encolure","en":"Neck"}},{"op":"set","target":"view:head","field":"name.en","value":"Skull"},{"op":"set","target":"category:bones","field":"color","value":"#112233"},{"op":"set","target":"reference:paper","field":"doi","value":"10.1/y"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"review_status","value":"reviewed"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini sheet\"\n },\n \"description\": {},\n \"scope_disclaimer\": {\n \"fr\": \"Périmètre\"\n },\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7,\n \"count_range\": {\n \"min\": 6,\n \"max\": 8\n }\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/y\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": \"#112233\"\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Skull\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1.5,\n \"cy\": 2,\n \"r\": 0.25\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"color\": \"#aabbcc\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"en\": \"Flexion described\"\n },\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse complète\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Encolure\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"region:C","field":"count_range","value":{"min":6,"max":8}},"target":"region:C","field":"count_range","before":null,"after":{"min":6,"max":8}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"document","field":"name.en","value":"Mini sheet"},"target":"document","field":"name.en","before":"Mini","after":"Mini sheet"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"document","field":"scope_disclaimer.fr","value":"Périmètre"},"target":"document","field":"scope_disclaimer.fr","before":null,"after":"Périmètre"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"annotation:hip","field":"geometry","value":{"type":"circle","cx":1.5,"cy":2,"r":0.25}},"target":"annotation:hip","field":"geometry","before":{"type":"circle","cx":1,"cy":2,"r":3},"after":{"type":"circle","cx":1.5,"cy":2,"r":0.25}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"annotation:neck","field":"color","value":"#aabbcc"},"target":"annotation:neck","field":"color","before":null,"after":"#aabbcc"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","value":"Flexion described"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","before":null,"after":"Flexion described"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/anamnesis","field":"name.fr","value":"Anamnèse complète"},"target":"finding:hip/anamnesis","field":"name.fr","before":"Anamnèse","after":"Anamnèse complète"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"zone:neck","field":"name","value":{"fr":"Encolure","en":"Neck"}},"target":"zone:neck","field":"name","before":{"fr":"Cou","en":"Neck"},"after":{"fr":"Encolure","en":"Neck"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"view:head","field":"name.en","value":"Skull"},"target":"view:head","field":"name.en","before":"Head","after":"Skull"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"category:bones","field":"color","value":"#112233"},"target":"category:bones","field":"color","before":null,"after":"#112233"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"reference:paper","field":"doi","value":"10.1/y"},"target":"reference:paper","field":"doi","before":"10.1/x","after":"10.1/y"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"review_status","value":"reviewed"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"review_status","before":null,"after":"reviewed"}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":1,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":9,"reviewed":1,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":1},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini sheet\"\n },\n \"description\": {},\n \"scope_disclaimer\": {\n \"fr\": \"Périmètre\"\n },\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7,\n \"count_range\": {\n \"min\": 6,\n \"max\": 8\n }\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/y\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": \"#112233\"\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Skull\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1.5,\n \"cy\": 2,\n \"r\": 0.25\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"color\": \"#aabbcc\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"en\": \"Flexion described\"\n },\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse complète\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Encolure\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini sheet\"\n },\n \"description\": {},\n \"scope_disclaimer\": {\n \"fr\": \"Périmètre\"\n },\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7,\n \"count_range\": {\n \"min\": 6,\n \"max\": 8\n }\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/y\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": \"#112233\"\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Skull\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1.5,\n \"cy\": 2,\n \"r\": 0.25\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"color\": \"#aabbcc\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"en\": \"Flexion described\"\n },\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse complète\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Encolure\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"subtree-sets","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},{"op":"set","target":"finding:hip/hip-dysfunctions","field":"kind","value":"custom","scope":"subtree"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"description","value":{"fr":"Même texte"},"scope":"subtree"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description","value":{"fr":"Même texte"}},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"description","value":{"fr":"Même texte"},"scope":"subtree"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"custom\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n }\n ],\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n },\n \"review_status\": \"reviewed\"\n }\n ],\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},"target":"finding:hip/hip-dysfunctions","field":"review_status","before":null,"after":"reviewed"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility","field":"review_status","before":null,"after":"reviewed"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"review_status","before":null,"after":"reviewed"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility/extension","field":"review_status","before":null,"after":"reviewed"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"review_status","value":"reviewed","scope":"subtree"},"target":"finding:hip/hip-dysfunctions/pain","field":"review_status","before":null,"after":"reviewed"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions","field":"kind","value":"custom","scope":"subtree"},"target":"finding:hip/hip-dysfunctions","field":"kind","before":"dysfunction","after":"custom"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"description","value":{"fr":"Même texte"},"scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility","field":"description","before":null,"after":{"fr":"Même texte"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"description","value":{"fr":"Même texte"},"scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description","before":null,"after":{"fr":"Même texte"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"description","value":{"fr":"Même texte"},"scope":"subtree"},"target":"finding:hip/hip-dysfunctions/mobility/extension","field":"description","before":null,"after":{"fr":"Même texte"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description","value":{"fr":"Même texte"}},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description","before":{"fr":"Même texte"},"after":{"fr":"Même texte"}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":3,"descriptionsFrOnly":3,"citedNodes":0,"nodesByReviewStatus":{"inherited":5,"reviewed":5,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"custom\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n }\n ],\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n },\n \"review_status\": \"reviewed\"\n }\n ],\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"custom\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n },\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n }\n ],\n \"review_status\": \"reviewed\",\n \"description\": {\n \"fr\": \"Même texte\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n },\n \"review_status\": \"reviewed\"\n }\n ],\n \"review_status\": \"reviewed\"\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"renames-cascade","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas","paper"]},{"op":"cite","target":"finding:neck/neck-dysfunctions/vet","reference_ids":["atlas"]},{"op":"rename","target":"zone:hip","id":"hip-joint"},{"op":"rename","target":"region:C","id":"CE"},{"op":"rename","target":"view:main","id":"principal"},{"op":"rename","target":"view:head","id":"skull"},{"op":"rename","target":"category:joints","id":"articulations"},{"op":"rename","target":"reference:atlas","id":"atlas-2"},{"op":"rename","target":"finding:hip-joint/hip-dysfunctions/mobility","id":"motion"},{"op":"rename","target":"annotation:hip","id":"coxofemoral"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"CE\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"articulations\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"skull\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"articulations\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip-joint\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"CE\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"skull\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip-joint\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"motion\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\", \"paper\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas-2\"]\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas","paper"]},"target":"finding:hip/hip-dysfunctions/mobility","field":"reference_ids","before":[],"after":["atlas","paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:neck/neck-dysfunctions/vet","reference_ids":["atlas"]},"target":"finding:neck/neck-dysfunctions/vet","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"zone:hip","id":"hip-joint"},"target":"zone:hip","field":null,"before":{"id":"hip","name":{"fr":"Hanche","en":"Hip"},"categories":[{"id":"hip-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}],"reference_ids":["atlas","paper"]},{"id":"pain","name":{"fr":"pain fr","en":"pain en"}}]},{"id":"anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"trauma","name":{"fr":"trauma fr","en":"trauma en"}}]}]},"after":{"id":"hip-joint","name":{"fr":"Hanche","en":"Hip"},"categories":[{"id":"hip-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}],"reference_ids":["atlas","paper"]},{"id":"pain","name":{"fr":"pain fr","en":"pain en"}}]},{"id":"anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"trauma","name":{"fr":"trauma fr","en":"trauma en"}}]}]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"zone:hip","id":"hip-joint"},"target":"annotation:hip","field":"finding_zone_id","before":"hip","after":"hip-joint"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"region:C","id":"CE"},"target":"region:C","field":null,"before":{"code":"C","name":{"fr":"Cervicales","en":"Cervical"},"count":7},"after":{"code":"CE","name":{"fr":"Cervicales","en":"Cervical"},"count":7}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"region:C","id":"CE"},"target":"annotation:neck","field":"vertebral_region_code","before":"C","after":"CE"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"view:main","field":null,"before":{"id":"main","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null},"after":{"id":"principal","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"view:head","field":"parent_view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:hip","field":"view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:neck","field":"view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:head-trigger","field":"view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:head","id":"skull"},"target":"view:head","field":null,"before":{"id":"head","kind":"detail","parent_view_id":"principal","name":{"fr":"Tête","en":"Head"},"svg_asset_id":null,"view_box":{"min_x":0,"min_y":0,"width":10,"height":10}},"after":{"id":"skull","kind":"detail","parent_view_id":"principal","name":{"fr":"Tête","en":"Head"},"svg_asset_id":null,"view_box":{"min_x":0,"min_y":0,"width":10,"height":10}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:head","id":"skull"},"target":"annotation:head-trigger","field":"opens_view_id","before":"head","after":"skull"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"category:joints","id":"articulations"},"target":"category:joints","field":null,"before":{"id":"joints","name":{"fr":"Articulations","en":"Joints"},"color":null},"after":{"id":"articulations","name":{"fr":"Articulations","en":"Joints"},"color":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"category:joints","id":"articulations"},"target":"annotation:hip","field":"category_id","before":"joints","after":"articulations"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas-2"},"target":"reference:atlas","field":null,"before":{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},"after":{"id":"atlas-2","type":"book","citation":"Atlas of anatomy","url":null,"doi":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas-2"},"target":"finding:hip-joint/hip-dysfunctions/mobility","field":"reference_ids","before":["atlas","paper"],"after":["atlas-2","paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas-2"},"target":"finding:neck/neck-dysfunctions/vet","field":"reference_ids","before":["atlas"],"after":["atlas-2"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"finding:hip-joint/hip-dysfunctions/mobility","id":"motion"},"target":"finding:hip-joint/hip-dysfunctions/mobility","field":null,"before":{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}],"reference_ids":["atlas-2","paper"]},"after":{"id":"motion","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}],"reference_ids":["atlas-2","paper"]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"annotation:hip","id":"coxofemoral"},"target":"annotation:hip","field":null,"before":{"id":"hip","kind":"point","view_id":"principal","category_id":"articulations","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip-joint","vertebral_region_code":null},"after":{"id":"coxofemoral","kind":"point","view_id":"principal","category_id":"articulations","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip-joint","vertebral_region_code":null}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":2,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"principal\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip-joint\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"CE\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip-joint/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": null,\n \"hip/hip-dysfunctions/mobility/flexion\": null,\n \"hip/hip-dysfunctions/mobility/extension\": null,\n \"hip/hip-dysfunctions/pain\": \"hip-joint/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip-joint/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip-joint/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":3,"remapped":4,"rehomed":1,"removed":3},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"CE\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"articulations\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"skull\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"articulations\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip-joint\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"CE\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"skull\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip-joint\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"motion\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\", \"paper\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas-2\"]\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"CE\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"articulations\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"skull\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"articulations\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip-joint\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"CE\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"skull\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip-joint\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"motion\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\", \"paper\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas-2\"]\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"add-remove-move","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility/flexion","value":{"id":"deep-flexion","name":{"fr":"deep-flexion fr","en":"deep-flexion en"}}},{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"rotation","name":{"fr":"rotation fr","en":"rotation en"}},"position":0},{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"abduction","name":{"fr":"abduction fr","en":"abduction en"}},"position":{"after":"flexion"}},{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"adduction","name":{"fr":"adduction fr","en":"adduction en"}},"position":{"before":"extension"}},{"op":"add","target":"finding:hip/anamnesis","value":{"id":"surgery","name":{"fr":"surgery fr","en":"surgery en"}},"position":1},{"op":"add","target":"zone:neck","value":{"id":"neck-anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"fall","name":{"fr":"fall fr","en":"fall en"}}]}},{"op":"add","target":"document","field":"references","value":{"id":"web","type":"web","citation":"A page","url":"https://example.org/a","doi":null}},{"op":"add","target":"document","field":"finding_zones","value":{"id":"carpus","name":{"fr":"Carpe","en":"Carpus"},"categories":[{"id":"carpus-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"effusion","name":{"fr":"effusion fr","en":"effusion en"}}]}]}},{"op":"add","target":"document","field":"annotations","value":{"id":"carpus","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":3,"cy":4,"r":1},"name":{"fr":"Carpe","en":"Carpus"},"finding_zone_id":"carpus","vertebral_region_code":null}},{"op":"add","target":"document","field":"regions","value":{"code":"L","name":{"fr":"Lombaires","en":"Lumbar"},"count":6},"position":{"after":"T"}},{"op":"add","target":"document","field":"categories","value":{"id":"muscles","name":{"fr":"Muscles","en":"Muscles"},"color":"#ff0000"},"position":0},{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/extension"},{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/rotation","to":"finding:hip/hip-dysfunctions/mobility/flexion","position":0},{"op":"move","target":"finding:hip/hip-dysfunctions/pain","to":"finding:neck/neck-dysfunctions","position":{"before":"vet"}},{"op":"move","target":"finding:hip/anamnesis/trauma","to":"finding:hip/anamnesis/surgery"},{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/adduction","to":"finding:hip/hip-dysfunctions/mobility","position":{"after":"abduction"}}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n },\n {\n \"code\": \"L\",\n \"name\": {\n \"fr\": \"Lombaires\",\n \"en\": \"Lumbar\"\n },\n \"count\": 6\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n },\n {\n \"id\": \"web\",\n \"type\": \"web\",\n \"citation\": \"A page\",\n \"url\": \"https://example.org/a\",\n \"doi\": null\n }\n ],\n \"categories\": [\n {\n \"id\": \"muscles\",\n \"name\": {\n \"fr\": \"Muscles\",\n \"en\": \"Muscles\"\n },\n \"color\": \"#ff0000\"\n },\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n },\n {\n \"id\": \"carpus\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 3,\n \"cy\": 4,\n \"r\": 1\n },\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"finding_zone_id\": \"carpus\",\n \"vertebral_region_code\": null\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"children\": [\n {\n \"id\": \"rotation\",\n \"name\": {\n \"fr\": \"rotation fr\",\n \"en\": \"rotation en\"\n }\n },\n {\n \"id\": \"deep-flexion\",\n \"name\": {\n \"fr\": \"deep-flexion fr\",\n \"en\": \"deep-flexion en\"\n }\n }\n ]\n },\n {\n \"id\": \"abduction\",\n \"name\": {\n \"fr\": \"abduction fr\",\n \"en\": \"abduction en\"\n }\n },\n {\n \"id\": \"adduction\",\n \"name\": {\n \"fr\": \"adduction fr\",\n \"en\": \"adduction en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"surgery\",\n \"name\": {\n \"fr\": \"surgery fr\",\n \"en\": \"surgery en\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n },\n {\n \"id\": \"neck-anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"fall\",\n \"name\": {\n \"fr\": \"fall fr\",\n \"en\": \"fall en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"carpus\",\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"categories\": [\n {\n \"id\": \"carpus-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"effusion\",\n \"name\": {\n \"fr\": \"effusion fr\",\n \"en\": \"effusion en\"\n }\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility/flexion","value":{"id":"deep-flexion","name":{"fr":"deep-flexion fr","en":"deep-flexion en"}}},"target":"finding:hip/hip-dysfunctions/mobility/flexion/deep-flexion","field":null,"before":null,"after":{"id":"deep-flexion","name":{"fr":"deep-flexion fr","en":"deep-flexion en"}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"rotation","name":{"fr":"rotation fr","en":"rotation en"}},"position":0},"target":"finding:hip/hip-dysfunctions/mobility/rotation","field":null,"before":null,"after":{"id":"rotation","name":{"fr":"rotation fr","en":"rotation en"}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"abduction","name":{"fr":"abduction fr","en":"abduction en"}},"position":{"after":"flexion"}},"target":"finding:hip/hip-dysfunctions/mobility/abduction","field":null,"before":null,"after":{"id":"abduction","name":{"fr":"abduction fr","en":"abduction en"}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"adduction","name":{"fr":"adduction fr","en":"adduction en"}},"position":{"before":"extension"}},"target":"finding:hip/hip-dysfunctions/mobility/adduction","field":null,"before":null,"after":{"id":"adduction","name":{"fr":"adduction fr","en":"adduction en"}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/anamnesis","value":{"id":"surgery","name":{"fr":"surgery fr","en":"surgery en"}},"position":1},"target":"finding:hip/anamnesis/surgery","field":null,"before":null,"after":{"id":"surgery","name":{"fr":"surgery fr","en":"surgery en"}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"zone:neck","value":{"id":"neck-anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"fall","name":{"fr":"fall fr","en":"fall en"}}]}},"target":"finding:neck/neck-anamnesis","field":null,"before":null,"after":{"id":"neck-anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"fall","name":{"fr":"fall fr","en":"fall en"}}]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"document","field":"references","value":{"id":"web","type":"web","citation":"A page","url":"https://example.org/a","doi":null}},"target":"reference:web","field":null,"before":null,"after":{"id":"web","type":"web","citation":"A page","url":"https://example.org/a","doi":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"document","field":"finding_zones","value":{"id":"carpus","name":{"fr":"Carpe","en":"Carpus"},"categories":[{"id":"carpus-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"effusion","name":{"fr":"effusion fr","en":"effusion en"}}]}]}},"target":"zone:carpus","field":null,"before":null,"after":{"id":"carpus","name":{"fr":"Carpe","en":"Carpus"},"categories":[{"id":"carpus-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"effusion","name":{"fr":"effusion fr","en":"effusion en"}}]}]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"document","field":"annotations","value":{"id":"carpus","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":3,"cy":4,"r":1},"name":{"fr":"Carpe","en":"Carpus"},"finding_zone_id":"carpus","vertebral_region_code":null}},"target":"annotation:carpus","field":null,"before":null,"after":{"id":"carpus","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":3,"cy":4,"r":1},"name":{"fr":"Carpe","en":"Carpus"},"finding_zone_id":"carpus","vertebral_region_code":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"document","field":"regions","value":{"code":"L","name":{"fr":"Lombaires","en":"Lumbar"},"count":6},"position":{"after":"T"}},"target":"region:L","field":null,"before":null,"after":{"code":"L","name":{"fr":"Lombaires","en":"Lumbar"},"count":6}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"document","field":"categories","value":{"id":"muscles","name":{"fr":"Muscles","en":"Muscles"},"color":"#ff0000"},"position":0},"target":"category:muscles","field":null,"before":null,"after":{"id":"muscles","name":{"fr":"Muscles","en":"Muscles"},"color":"#ff0000"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/extension"},"target":"finding:hip/hip-dysfunctions/mobility/extension","field":null,"before":{"id":"extension","name":{"fr":"extension fr","en":"extension en"}},"after":null},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/rotation","to":"finding:hip/hip-dysfunctions/mobility/flexion","position":0},"target":"finding:hip/hip-dysfunctions/mobility/rotation","field":null,"before":{"id":"rotation","name":{"fr":"rotation fr","en":"rotation en"}},"after":"finding:hip/hip-dysfunctions/mobility/flexion/rotation"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"move","target":"finding:hip/hip-dysfunctions/pain","to":"finding:neck/neck-dysfunctions","position":{"before":"vet"}},"target":"finding:hip/hip-dysfunctions/pain","field":null,"before":{"id":"pain","name":{"fr":"pain fr","en":"pain en"}},"after":"finding:neck/neck-dysfunctions/pain"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"move","target":"finding:hip/anamnesis/trauma","to":"finding:hip/anamnesis/surgery"},"target":"finding:hip/anamnesis/trauma","field":null,"before":{"id":"trauma","name":{"fr":"trauma fr","en":"trauma en"}},"after":"finding:hip/anamnesis/surgery/trauma"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/adduction","to":"finding:hip/hip-dysfunctions/mobility","position":{"after":"abduction"}},"target":"finding:hip/hip-dysfunctions/mobility/adduction","field":null,"before":{"id":"adduction","name":{"fr":"adduction fr","en":"adduction en"}},"after":"finding:hip/hip-dysfunctions/mobility/adduction"}],"stats":{"views":2,"assets":1,"annotations":4,"annotationsByKind":{"point":2,"zone":1,"detail_trigger":1},"annotationCategories":3,"findingZones":3,"findingCategories":5,"nodes":18,"leaves":10,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":18,"reviewed":0,"to_confirm":0},"references":3,"annotationsByReviewStatus":{"inherited":4,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": null,\n \"hip/hip-dysfunctions/pain\": \"neck/neck-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/surgery/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":7,"remapped":2,"rehomed":0,"removed":1},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n },\n {\n \"code\": \"L\",\n \"name\": {\n \"fr\": \"Lombaires\",\n \"en\": \"Lumbar\"\n },\n \"count\": 6\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n },\n {\n \"id\": \"web\",\n \"type\": \"web\",\n \"citation\": \"A page\",\n \"url\": \"https://example.org/a\",\n \"doi\": null\n }\n ],\n \"categories\": [\n {\n \"id\": \"muscles\",\n \"name\": {\n \"fr\": \"Muscles\",\n \"en\": \"Muscles\"\n },\n \"color\": \"#ff0000\"\n },\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n },\n {\n \"id\": \"carpus\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 3,\n \"cy\": 4,\n \"r\": 1\n },\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"finding_zone_id\": \"carpus\",\n \"vertebral_region_code\": null\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"children\": [\n {\n \"id\": \"rotation\",\n \"name\": {\n \"fr\": \"rotation fr\",\n \"en\": \"rotation en\"\n }\n },\n {\n \"id\": \"deep-flexion\",\n \"name\": {\n \"fr\": \"deep-flexion fr\",\n \"en\": \"deep-flexion en\"\n }\n }\n ]\n },\n {\n \"id\": \"abduction\",\n \"name\": {\n \"fr\": \"abduction fr\",\n \"en\": \"abduction en\"\n }\n },\n {\n \"id\": \"adduction\",\n \"name\": {\n \"fr\": \"adduction fr\",\n \"en\": \"adduction en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"surgery\",\n \"name\": {\n \"fr\": \"surgery fr\",\n \"en\": \"surgery en\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n },\n {\n \"id\": \"neck-anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"fall\",\n \"name\": {\n \"fr\": \"fall fr\",\n \"en\": \"fall en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"carpus\",\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"categories\": [\n {\n \"id\": \"carpus-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"effusion\",\n \"name\": {\n \"fr\": \"effusion fr\",\n \"en\": \"effusion en\"\n }\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n },\n {\n \"code\": \"L\",\n \"name\": {\n \"fr\": \"Lombaires\",\n \"en\": \"Lumbar\"\n },\n \"count\": 6\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n },\n {\n \"id\": \"web\",\n \"type\": \"web\",\n \"citation\": \"A page\",\n \"url\": \"https://example.org/a\",\n \"doi\": null\n }\n ],\n \"categories\": [\n {\n \"id\": \"muscles\",\n \"name\": {\n \"fr\": \"Muscles\",\n \"en\": \"Muscles\"\n },\n \"color\": \"#ff0000\"\n },\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n },\n {\n \"id\": \"carpus\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 3,\n \"cy\": 4,\n \"r\": 1\n },\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"finding_zone_id\": \"carpus\",\n \"vertebral_region_code\": null\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"children\": [\n {\n \"id\": \"rotation\",\n \"name\": {\n \"fr\": \"rotation fr\",\n \"en\": \"rotation en\"\n }\n },\n {\n \"id\": \"deep-flexion\",\n \"name\": {\n \"fr\": \"deep-flexion fr\",\n \"en\": \"deep-flexion en\"\n }\n }\n ]\n },\n {\n \"id\": \"abduction\",\n \"name\": {\n \"fr\": \"abduction fr\",\n \"en\": \"abduction en\"\n }\n },\n {\n \"id\": \"adduction\",\n \"name\": {\n \"fr\": \"adduction fr\",\n \"en\": \"adduction en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"surgery\",\n \"name\": {\n \"fr\": \"surgery fr\",\n \"en\": \"surgery en\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n },\n {\n \"id\": \"neck-anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"fall\",\n \"name\": {\n \"fr\": \"fall fr\",\n \"en\": \"fall en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"carpus\",\n \"name\": {\n \"fr\": \"Carpe\",\n \"en\": \"Carpus\"\n },\n \"categories\": [\n {\n \"id\": \"carpus-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"effusion\",\n \"name\": {\n \"fr\": \"effusion fr\",\n \"en\": \"effusion en\"\n }\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"cite","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["paper","atlas","paper"]},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas"]},{"op":"cite","target":"zone:hip","reference_ids":["atlas"]},{"op":"cite","target":"zone:neck","reference_ids":["paper"],"scope":"subtree"},{"op":"cite","target":"finding:hip/anamnesis","reference_ids":["paper"],"scope":"subtree"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"paper\", \"atlas\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas\"]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n },\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"atlas\", \"paper\"]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"paper\"]\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"paper\"]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["paper","atlas","paper"]},"target":"finding:hip/hip-dysfunctions/mobility","field":"reference_ids","before":[],"after":["paper","atlas"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"zone:hip","reference_ids":["atlas"]},"target":"finding:hip/hip-dysfunctions","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"zone:hip","reference_ids":["atlas"]},"target":"finding:hip/anamnesis","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"zone:neck","reference_ids":["paper"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions","field":"reference_ids","before":[],"after":["paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"zone:neck","reference_ids":["paper"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions/stiffness","field":"reference_ids","before":[],"after":["paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"zone:neck","reference_ids":["paper"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions/vet","field":"reference_ids","before":[],"after":["paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:hip/anamnesis","reference_ids":["paper"],"scope":"subtree"},"target":"finding:hip/anamnesis","field":"reference_ids","before":["atlas"],"after":["atlas","paper"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:hip/anamnesis","reference_ids":["paper"],"scope":"subtree"},"target":"finding:hip/anamnesis/trauma","field":"reference_ids","before":[],"after":["paper"]}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":7,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"paper\", \"atlas\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas\"]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n },\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"atlas\", \"paper\"]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"paper\"]\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"paper\"]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"paper\", \"atlas\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas\"]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n },\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"atlas\", \"paper\"]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"paper\"]\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"paper\"]\n }\n ],\n \"reference_ids\": [\"paper\"]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"review-rule-b","changes_file":{"changes":[{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high","ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}},{"op":"add","target":"finding:hip/anamnesis","value":{"id":"new","name":{"fr":"new fr","en":"new en"},"children":[{"id":"child","name":{"fr":"child fr","en":"child en"}},{"id":"confirmed","name":{"fr":"confirmed fr","en":"confirmed en"},"review_status":"to_confirm"}]}},{"op":"cite","target":"zone:neck","reference_ids":["atlas"],"scope":"subtree"},{"op":"rename","target":"finding:neck/neck-dysfunctions/stiffness","id":"rigidity"},{"op":"set","target":"annotation:neck","field":"name.en","value":"Cervical"},{"op":"set","target":"view:head","field":"name.fr","value":"Crâne"},{"op":"set","target":"zone:hip","field":"name.en","value":"Hip joint"},{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/flexion","to":"finding:hip/anamnesis"},{"op":"set","target":"finding:hip/anamnesis/flexion","field":"description.fr","value":"Déplacée"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Crâne\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Cervical\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip joint\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n },\n {\n \"id\": \"new\",\n \"name\": {\n \"fr\": \"new fr\",\n \"en\": \"new en\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"confirmed\",\n \"name\": {\n \"fr\": \"confirmed fr\",\n \"en\": \"confirmed en\"\n },\n \"review_status\": \"to_confirm\"\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"fr\": \"Déplacée\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"rigidity\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ],\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}},"target":"finding:hip/hip-dysfunctions/mobility","field":"name","before":{"fr":"mobility fr","en":"mobility en"},"after":{"fr":"Mobilité","en":"Mobility"}},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"add","target":"finding:hip/anamnesis","value":{"id":"new","name":{"fr":"new fr","en":"new en"},"children":[{"id":"child","name":{"fr":"child fr","en":"child en"}},{"id":"confirmed","name":{"fr":"confirmed fr","en":"confirmed en"},"review_status":"to_confirm"}]}},"target":"finding:hip/anamnesis/new","field":null,"before":null,"after":{"id":"new","name":{"fr":"new fr","en":"new en"},"children":[{"id":"child","name":{"fr":"child fr","en":"child en"}},{"id":"confirmed","name":{"fr":"confirmed fr","en":"confirmed en"},"review_status":"to_confirm"}]}},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"cite","target":"zone:neck","reference_ids":["atlas"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"cite","target":"zone:neck","reference_ids":["atlas"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions/stiffness","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"cite","target":"zone:neck","reference_ids":["atlas"],"scope":"subtree"},"target":"finding:neck/neck-dysfunctions/vet","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"rename","target":"finding:neck/neck-dysfunctions/stiffness","id":"rigidity"},"target":"finding:neck/neck-dysfunctions/stiffness","field":null,"before":{"id":"stiffness","name":{"fr":"stiffness fr","en":"stiffness en"},"reference_ids":["atlas"]},"after":{"id":"rigidity","name":{"fr":"stiffness fr","en":"stiffness en"},"reference_ids":["atlas"]}},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"annotation:neck","field":"name.en","value":"Cervical"},"target":"annotation:neck","field":"name.en","before":"Neck","after":"Cervical"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"view:head","field":"name.fr","value":"Crâne"},"target":"view:head","field":"name.fr","before":"Tête","after":"Crâne"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"zone:hip","field":"name.en","value":"Hip joint"},"target":"zone:hip","field":"name.en","before":"Hip","after":"Hip joint"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/flexion","to":"finding:hip/anamnesis"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":null,"before":{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},"after":"finding:hip/anamnesis/flexion"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/anamnesis/flexion","field":"description.fr","value":"Déplacée"},"target":"finding:hip/anamnesis/flexion","field":"description.fr","before":null,"after":"Déplacée"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"review_status","value":"to_confirm"},"target":"finding:hip/hip-dysfunctions/mobility","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/anamnesis/new","field":"review_status","value":"to_confirm"},"target":"finding:hip/anamnesis/new","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/anamnesis/new/child","field":"review_status","value":"to_confirm"},"target":"finding:hip/anamnesis/new/child","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions","field":"review_status","value":"to_confirm"},"target":"finding:neck/neck-dysfunctions","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions/rigidity","field":"review_status","value":"to_confirm"},"target":"finding:neck/neck-dysfunctions/rigidity","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions/vet","field":"review_status","value":"to_confirm"},"target":"finding:neck/neck-dysfunctions/vet","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"annotation:neck","field":"review_status","value":"to_confirm"},"target":"annotation:neck","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"B","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"priority":"high"},"op":{"op":"set","target":"finding:hip/anamnesis/flexion","field":"review_status","value":"to_confirm"},"target":"finding:hip/anamnesis/flexion","field":"review_status","before":"inherited","after":"to_confirm"}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":13,"leaves":8,"vetReferrals":1,"descriptions":1,"descriptionsFrOnly":1,"citedNodes":3,"nodesByReviewStatus":{"inherited":5,"reviewed":0,"to_confirm":8},"references":2,"annotationsByReviewStatus":{"inherited":2,"reviewed":0,"to_confirm":1},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/anamnesis/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/rigidity\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":8,"remapped":2,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Crâne\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Cervical\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip joint\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n },\n {\n \"id\": \"new\",\n \"name\": {\n \"fr\": \"new fr\",\n \"en\": \"new en\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"confirmed\",\n \"name\": {\n \"fr\": \"confirmed fr\",\n \"en\": \"confirmed en\"\n },\n \"review_status\": \"to_confirm\"\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"fr\": \"Déplacée\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"rigidity\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ],\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Crâne\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Cervical\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\",\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip joint\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n },\n {\n \"id\": \"new\",\n \"name\": {\n \"fr\": \"new fr\",\n \"en\": \"new en\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"confirmed\",\n \"name\": {\n \"fr\": \"confirmed fr\",\n \"en\": \"confirmed en\"\n },\n \"review_status\": \"to_confirm\"\n }\n ],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {\n \"fr\": \"Déplacée\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"rigidity\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n },\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ],\n \"reference_ids\": [\"atlas\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"review-rule-c","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low","ops":[{"op":"set","target":"annotation:hip","field":"laterality","value":"left"},{"op":"set","target":"finding:neck/neck-dysfunctions","field":"description.fr","value":"À confirmer"},{"op":"set","target":"finding:neck/neck-dysfunctions/vet","field":"review_status","value":"inherited"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"left\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null,\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"review_status\": \"to_confirm\"\n }\n ],\n \"description\": {\n \"fr\": \"À confirmer\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"annotation:hip","field":"laterality","value":"left"},"target":"annotation:hip","field":"laterality","before":"bilateral","after":"left"},{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions","field":"description.fr","value":"À confirmer"},"target":"finding:neck/neck-dysfunctions","field":"description.fr","before":null,"after":"À confirmer"},{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions/vet","field":"review_status","value":"inherited"},"target":"finding:neck/neck-dysfunctions/vet","field":"review_status","before":null,"after":"inherited"},{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"annotation:hip","field":"review_status","value":"to_confirm"},"target":"annotation:hip","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions","field":"review_status","value":"to_confirm"},"target":"finding:neck/neck-dysfunctions","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Latéralité ?","priority":"low"},"op":{"op":"set","target":"finding:neck/neck-dysfunctions/vet","field":"review_status","value":"to_confirm"},"target":"finding:neck/neck-dysfunctions/vet","field":"review_status","before":"inherited","after":"to_confirm"}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":1,"descriptionsFrOnly":1,"citedNodes":0,"nodesByReviewStatus":{"inherited":8,"reviewed":0,"to_confirm":2},"references":2,"annotationsByReviewStatus":{"inherited":2,"reviewed":0,"to_confirm":1},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"left\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null,\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"review_status\": \"to_confirm\"\n }\n ],\n \"description\": {\n \"fr\": \"À confirmer\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"left\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null,\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true,\n \"review_status\": \"to_confirm\"\n }\n ],\n \"description\": {\n \"fr\": \"À confirmer\"\n },\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"rehome","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"zone:hip","value":{"id":"hip-new","kind":"dysfunction","name":{"fr":"N","en":"N"},"children":[{"id":"mobility","name":{"fr":"M","en":"M"},"children":[{"id":"flexion","name":{"fr":"F","en":"F"}}]}]}},{"op":"remove","target":"finding:hip/hip-dysfunctions"},{"op":"rename","target":"annotation:hip","id":"coxofemoral"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n },\n {\n \"id\": \"hip-new\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"N\",\n \"en\": \"N\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"M\",\n \"en\": \"M\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"F\",\n \"en\": \"F\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"zone:hip","value":{"id":"hip-new","kind":"dysfunction","name":{"fr":"N","en":"N"},"children":[{"id":"mobility","name":{"fr":"M","en":"M"},"children":[{"id":"flexion","name":{"fr":"F","en":"F"}}]}]}},"target":"finding:hip/hip-new","field":null,"before":null,"after":{"id":"hip-new","kind":"dysfunction","name":{"fr":"N","en":"N"},"children":[{"id":"mobility","name":{"fr":"M","en":"M"},"children":[{"id":"flexion","name":{"fr":"F","en":"F"}}]}]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"remove","target":"finding:hip/hip-dysfunctions"},"target":"finding:hip/hip-dysfunctions","field":null,"before":{"id":"hip-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}]},{"id":"pain","name":{"fr":"pain fr","en":"pain en"}}]},"after":null},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"annotation:hip","id":"coxofemoral"},"target":"annotation:hip","field":null,"before":{"id":"hip","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip","vertebral_region_code":null},"after":{"id":"coxofemoral","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip","vertebral_region_code":null}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":8,"leaves":4,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":8,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"coxofemoral\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": null,\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-new/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-new/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": null,\n \"hip/hip-dysfunctions/pain\": null,\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":5,"remapped":0,"rehomed":2,"removed":3},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n },\n {\n \"id\": \"hip-new\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"N\",\n \"en\": \"N\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"M\",\n \"en\": \"M\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"F\",\n \"en\": \"F\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"coxofemoral\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n },\n {\n \"id\": \"hip-new\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"N\",\n \"en\": \"N\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"M\",\n \"en\": \"M\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"F\",\n \"en\": \"F\"\n }\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"declared-set-without-value-drops-key","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","value":"x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {}\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","value":"x"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","before":null,"after":"x"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en"},"target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description.en","before":"x","after":null}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {}\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n },\n \"description\": {}\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"quirk-view-rename-retargets-annotation","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"rename","target":"view:main","id":"principal"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"view:main","field":null,"before":{"id":"main","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null},"after":{"id":"principal","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"view:head","field":"parent_view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:hip","field":"view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:neck","field":"view_id","before":"main","after":"principal"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"view:main","id":"principal"},"target":"annotation:head-trigger","field":"view_id","before":"main","after":"principal"}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"principal\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"principal\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"principal\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"principal\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"principal\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"principal\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"principal\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"quirk-reference-rename-renames-finding-path","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas"]},{"op":"rename","target":"reference:atlas","id":"atlas-2"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas"]},"target":"finding:hip/hip-dysfunctions/mobility","field":"reference_ids","before":[],"after":["atlas"]},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas-2"},"target":"reference:atlas","field":null,"before":{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},"after":{"id":"atlas-2","type":"book","citation":"Atlas of anatomy","url":null,"doi":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas-2"},"target":"finding:hip/hip-dysfunctions/mobility","field":"reference_ids","before":["atlas"],"after":["atlas-2"]}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":1,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":3,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas-2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ],\n \"reference_ids\": [\"atlas-2\"]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"declared-children-string-renamed-then-removed","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":["s"]}},{"op":"rename","target":"reference:atlas","id":"atlas2"},{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/n1"}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":["s"]}},"target":"finding:hip/hip-dysfunctions/mobility/n1","field":null,"before":null,"after":{"id":"n1","name":{"fr":"a","en":"b"},"children":["s"]}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"reference:atlas","id":"atlas2"},"target":"reference:atlas","field":null,"before":{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},"after":{"id":"atlas2","type":"book","citation":"Atlas of anatomy","url":null,"doi":null}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/n1"},"target":"finding:hip/hip-dysfunctions/mobility/n1","field":null,"before":{"id":"n1","name":{"fr":"a","en":"b"},"children":["s"]},"after":null}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas2\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"js-index-key-in-value-overwritten","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"1":"x","fr":"A","en":"B"}},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"1":"x","fr":"A","en":"B"}},"target":"finding:hip/hip-dysfunctions/mobility","field":"name","before":{"fr":"mobility fr","en":"mobility en"},"after":{"1":"x","fr":"A","en":"B"}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}},"target":"finding:hip/hip-dysfunctions/mobility","field":"name","before":{"1":"x","fr":"A","en":"B"},"after":{"fr":"Mobilité","en":"Mobility"}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"js-index-segment-overwritten","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.0","value":"x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.0","value":"x"},"target":"finding:hip/hip-dysfunctions/mobility","field":"name.0","before":null,"after":"x"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}},"target":"finding:hip/hip-dysfunctions/mobility","field":"name","before":{"0":"x","fr":"mobility fr","en":"mobility en"},"after":{"fr":"Mobilité","en":"Mobility"}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"Mobilité\",\n \"en\": \"Mobility\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"js-big-integer-in-value-overwritten","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"region:C","field":"count","value":9007199254740992},{"op":"set","target":"region:C","field":"count","value":7}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"region:C","field":"count","value":9007199254740992},"target":"region:C","field":"count","before":7,"after":9007199254740992},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"region:C","field":"count","value":7},"target":"region:C","field":"count","before":9007199254740992,"after":7}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"declared-children-object-then-added-to","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":{"x":{"id":"x","name":{"fr":"x","en":"x"}}}}},{"op":"add","target":"finding:hip/hip-dysfunctions/mobility/n1","value":{"id":"child","name":{"fr":"child fr","en":"child en"}}}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n },\n {\n \"id\": \"n1\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":{"x":{"id":"x","name":{"fr":"x","en":"x"}}}}},"target":"finding:hip/hip-dysfunctions/mobility/n1","field":null,"before":null,"after":{"id":"n1","name":{"fr":"a","en":"b"},"children":{"x":{"id":"x","name":{"fr":"x","en":"x"}}}}},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"add","target":"finding:hip/hip-dysfunctions/mobility/n1","value":{"id":"child","name":{"fr":"child fr","en":"child en"}}},"target":"finding:hip/hip-dysfunctions/mobility/n1/child","field":null,"before":null,"after":{"id":"child","name":{"fr":"child fr","en":"child en"}}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":12,"leaves":7,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":12,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n },\n {\n \"id\": \"n1\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n },\n {\n \"id\": \"n1\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"child\",\n \"name\": {\n \"fr\": \"child fr\",\n \"en\": \"child en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"declared-proto-segment-overwritten","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.__proto__","value":"x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"a","en":"b"}}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.__proto__","value":"x"},"target":"finding:hip/hip-dysfunctions/mobility","field":"name.__proto__","before":{},"after":"x"},{"change":{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"a","en":"b"}},"target":"finding:hip/hip-dysfunctions/mobility","field":"name","before":{"fr":"mobility fr","en":"mobility en"},"after":{"fr":"a","en":"b"}}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":0,"nodesByReviewStatus":{"inherited":10,"reviewed":0,"to_confirm":0},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"neck/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"neck/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"neck/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":10,"remapped":0,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"neck\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"a\",\n \"en\": \"b\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"neck\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"stiffness fr\",\n \"en\": \"stiffness en\"\n }\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ]\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"two-changes","changes_file":{"changes":[{"id":"CHG-010","level":"A","kind":"terminology","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"rename","target":"zone:neck","id":"cervical"}]},{"id":"CHG-0011","level":"C","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Terme exact ?","ops":[{"op":"set","target":"finding:cervical/neck-dysfunctions/stiffness","field":"name.fr","value":"Raideur"},{"op":"cite","target":"zone:cervical","reference_ids":["paper"]}]}]},"ok":true,"document":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"cervical\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"cervical\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"Raideur\",\n \"en\": \"stiffness en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ],\n \"reference_ids\": [\"paper\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}\n","records":[{"change":{"id":"CHG-010","level":"A","kind":"terminology","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"zone:neck","id":"cervical"},"target":"zone:neck","field":null,"before":{"id":"neck","name":{"fr":"Cou","en":"Neck"},"categories":[{"id":"neck-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"stiffness","name":{"fr":"stiffness fr","en":"stiffness en"}},{"id":"vet","name":{"fr":"vet fr","en":"vet en"},"requires_vet_referral":true}]}]},"after":{"id":"cervical","name":{"fr":"Cou","en":"Neck"},"categories":[{"id":"neck-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"stiffness","name":{"fr":"stiffness fr","en":"stiffness en"}},{"id":"vet","name":{"fr":"vet fr","en":"vet en"},"requires_vet_referral":true}]}]}},{"change":{"id":"CHG-010","level":"A","kind":"terminology","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"medium"},"op":{"op":"rename","target":"zone:neck","id":"cervical"},"target":"annotation:neck","field":"finding_zone_id","before":"neck","after":"cervical"},{"change":{"id":"CHG-0011","level":"C","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Terme exact ?","priority":"medium"},"op":{"op":"set","target":"finding:cervical/neck-dysfunctions/stiffness","field":"name.fr","value":"Raideur"},"target":"finding:cervical/neck-dysfunctions/stiffness","field":"name.fr","before":"stiffness fr","after":"Raideur"},{"change":{"id":"CHG-0011","level":"C","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Terme exact ?","priority":"medium"},"op":{"op":"cite","target":"zone:cervical","reference_ids":["paper"]},"target":"finding:cervical/neck-dysfunctions","field":"reference_ids","before":[],"after":["paper"]},{"change":{"id":"CHG-0011","level":"C","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Terme exact ?","priority":"medium"},"op":{"op":"set","target":"finding:cervical/neck-dysfunctions/stiffness","field":"review_status","value":"to_confirm"},"target":"finding:cervical/neck-dysfunctions/stiffness","field":"review_status","before":"inherited","after":"to_confirm"},{"change":{"id":"CHG-0011","level":"C","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Terme exact ?","priority":"medium"},"op":{"op":"set","target":"finding:cervical/neck-dysfunctions","field":"review_status","value":"to_confirm"},"target":"finding:cervical/neck-dysfunctions","field":"review_status","before":"inherited","after":"to_confirm"}],"stats":{"views":2,"assets":1,"annotations":3,"annotationsByKind":{"point":1,"zone":1,"detail_trigger":1},"annotationCategories":2,"findingZones":2,"findingCategories":3,"nodes":10,"leaves":6,"vetReferrals":1,"descriptions":0,"descriptionsFrOnly":0,"citedNodes":1,"nodesByReviewStatus":{"inherited":8,"reviewed":0,"to_confirm":2},"references":2,"annotationsByReviewStatus":{"inherited":3,"reviewed":0,"to_confirm":0},"regionsWithCountRange":0},"migration_map":"{\n \"schema_version\": 1,\n \"sheet\": {\n \"sheetId\": \"11111111-1111-5111-8111-111111111111\",\n \"versionId\": null,\n \"documentSha256\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n \"main_view_id\": \"main\",\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"legacy-hip\": {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n }\n },\n \"legacy-neck\": {\n \"id\": \"cervical\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n }\n }\n },\n \"finding_paths\": {\n \"hip/hip-dysfunctions\": \"hip/hip-dysfunctions\",\n \"hip/hip-dysfunctions/mobility\": \"hip/hip-dysfunctions/mobility\",\n \"hip/hip-dysfunctions/mobility/flexion\": \"hip/hip-dysfunctions/mobility/flexion\",\n \"hip/hip-dysfunctions/mobility/extension\": \"hip/hip-dysfunctions/mobility/extension\",\n \"hip/hip-dysfunctions/pain\": \"hip/hip-dysfunctions/pain\",\n \"hip/anamnesis\": \"hip/anamnesis\",\n \"hip/anamnesis/trauma\": \"hip/anamnesis/trauma\",\n \"neck/neck-dysfunctions\": \"cervical/neck-dysfunctions\",\n \"neck/neck-dysfunctions/stiffness\": \"cervical/neck-dysfunctions/stiffness\",\n \"neck/neck-dysfunctions/vet\": \"cervical/neck-dysfunctions/vet\"\n }\n}\n","migration_stats":{"nodes":10,"identical":7,"remapped":3,"rehomed":0,"removed":0},"seed_sql":"-- Official equine anatomical sheet: working revision, DRAFT.\n-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.\n-- Idempotent and converging. Never publishes: the version stays in status\n-- draft until a platform admin validates REVIEW-REPORT.md and publishes it.\n\ninsert into public.anatomical_sheets\n (id, species_id, name, slug, description, creator_user_id, is_official, visibility)\nvalues (\n '11111111-1111-5111-8111-111111111111', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',\n 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)',\n null, true, 'private'\n)\non conflict (id) do nothing;\n\ninsert into public.anatomical_sheet_assets\n (id, sheet_id, sha256, byte_size, content_type, file_name)\nvalues\n ('3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8', '11111111-1111-5111-8111-111111111111', 'abababababababababababababababababababababababababababababababab', 42, 'image/svg+xml', 'mini.svg')\non conflict (sheet_id, sha256) do nothing;\n\nselect private.insert_sheet_draft(\n null,\n '11111111-1111-5111-8111-111111111111',\n $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"cervical\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"cervical\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"Raideur\",\n \"en\": \"stiffness en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ],\n \"reference_ids\": [\"paper\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb,\n 'Essai ''quoted'''\n)\nwhere not exists (\n select 1 from public.anatomical_sheet_versions where sheet_id = '11111111-1111-5111-8111-111111111111'\n);\n\nupdate public.anatomical_sheet_versions v\nset content = d.content, change_note = 'Essai ''quoted'''\nfrom (select $equine_doc${\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Mini\",\n \"en\": \"Mini\"\n },\n \"description\": {},\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [],\n \"license\": null,\n \"notes\": null\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n }\n ]\n },\n \"references\": [\n {\n \"id\": \"atlas\",\n \"type\": \"book\",\n \"citation\": \"Atlas of anatomy\",\n \"url\": null,\n \"doi\": null\n },\n {\n \"id\": \"paper\",\n \"type\": \"journal\",\n \"citation\": \"A paper\",\n \"url\": null,\n \"doi\": \"10.1/x\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"joints\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"bones\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue\",\n \"en\": \"View\"\n },\n \"svg_asset_id\": \"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": null,\n \"view_box\": {\n \"min_x\": 0,\n \"min_y\": 0,\n \"width\": 10,\n \"height\": 10\n }\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"joints\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 2,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"neck\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"finding_zone_id\": \"cervical\",\n \"vertebral_region_code\": \"C\"\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"bones\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": null,\n \"opens_view_id\": \"head\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"mobility\",\n \"name\": {\n \"fr\": \"mobility fr\",\n \"en\": \"mobility en\"\n },\n \"children\": [\n {\n \"id\": \"flexion\",\n \"name\": {\n \"fr\": \"flexion fr\",\n \"en\": \"flexion en\"\n }\n },\n {\n \"id\": \"extension\",\n \"name\": {\n \"fr\": \"extension fr\",\n \"en\": \"extension en\"\n }\n }\n ]\n },\n {\n \"id\": \"pain\",\n \"name\": {\n \"fr\": \"pain fr\",\n \"en\": \"pain en\"\n }\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"Anamnèse\",\n \"en\": \"Anamnesis\"\n },\n \"children\": [\n {\n \"id\": \"trauma\",\n \"name\": {\n \"fr\": \"trauma fr\",\n \"en\": \"trauma en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"cervical\",\n \"name\": {\n \"fr\": \"Cou\",\n \"en\": \"Neck\"\n },\n \"categories\": [\n {\n \"id\": \"neck-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"Dysfonctions\",\n \"en\": \"Dysfunctions\"\n },\n \"children\": [\n {\n \"id\": \"stiffness\",\n \"name\": {\n \"fr\": \"Raideur\",\n \"en\": \"stiffness en\"\n },\n \"review_status\": \"to_confirm\"\n },\n {\n \"id\": \"vet\",\n \"name\": {\n \"fr\": \"vet fr\",\n \"en\": \"vet en\"\n },\n \"requires_vet_referral\": true\n }\n ],\n \"reference_ids\": [\"paper\"],\n \"review_status\": \"to_confirm\"\n }\n ]\n }\n ]\n}$equine_doc$::jsonb as content) d\nwhere v.sheet_id = '11111111-1111-5111-8111-111111111111' and v.status = 'draft'\n and v.content <> d.content\n and (select count(*) from public.anatomical_sheet_versions o\n where o.sheet_id = '11111111-1111-5111-8111-111111111111') = 1;\n"},{"name":"children-null-then-removed","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":[null]}},{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/n1"}]}]},"ok":false,"error":"CHG-001 op 0: Cannot read properties of null (reading 'children')"},{"name":"children-string-marked-then-removed","changes_file":{"changes":[{"id":"CHG-001","level":"B","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"n1","name":{"fr":"a","en":"b"},"children":["s"]}}]},{"id":"CHG-002","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/n1"}]}]},"ok":false,"error":"Cannot create property 'review_status' on string 's'"},{"name":"shape-title-as-array","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":["Essai","Test"],"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"array\",\n \"path\": [\n \"changes\",\n 0,\n \"title\"\n ],\n \"message\": \"Expected object, received array\"\n }\n]"},{"name":"shape-level-as-map","changes_file":{"changes":[{"id":"CHG-001","level":{"A":null},"kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"expected\": \"'A' | 'B' | 'C'\",\n \"received\": \"object\",\n \"code\": \"invalid_type\",\n \"path\": [\n \"changes\",\n 0,\n \"level\"\n ],\n \"message\": \"Expected 'A' | 'B' | 'C', received object\"\n }\n]"},{"name":"shape-change-as-array","changes_file":{"changes":[["CHG-001","A","technical",{"fr":"a","en":"a"},"r",[],[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]]]},"ok":false,"error":"[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"array\",\n \"path\": [\n \"changes\",\n 0\n ],\n \"message\": \"Expected object, received array\"\n }\n]"},{"name":"shape-scope-as-map","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas"],"scope":{"subtree":null}}]}]},"ok":false,"error":"[\n {\n \"expected\": \"'self' | 'subtree'\",\n \"received\": \"object\",\n \"code\": \"invalid_type\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"scope\"\n ],\n \"message\": \"Expected 'self' | 'subtree', received object\"\n }\n]"},{"name":"shape-gate-name-as-array","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":["a","b"]}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.0.categories.0.children.0.name: Expected object, received array"},{"name":"shape-gate-status-as-map","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"review_status","value":{"reviewed":null}}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.0.categories.0.children.0.review_status: Expected 'inherited' | 'reviewed' | 'to_confirm', received object"},{"name":"shape-gate-laterality-as-map","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"annotation:hip","field":"laterality","value":{"bilateral":null}}]}]},"ok":false,"error":"curated document is not shape-valid: annotations.0.laterality: Expected 'unpaired' | 'bilateral' | 'left' | 'right', received object"},{"name":"shape-gate-view-box-as-array","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"view:head","field":"view_box","value":[0,0,5,5]}]}]},"ok":false,"error":"curated document is not shape-valid: views.1.view_box: Expected object, received array"},{"name":"shape-gate-geometry-as-array","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"annotation:hip","field":"geometry","value":["circle",1,2,3]}]}]},"ok":false,"error":"curated document is not shape-valid: annotations.0.geometry: Expected object, received array"},{"name":"shape-gate-added-node-name-as-array","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":["a","a"]}}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.0.categories.0.children.0.children.2.name: Expected object, received array"},{"name":"declared-inherited-member-overwritten","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.constructor","value":"x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité","en":"Mobility"}}]}]},"ok":false,"error":"CHG-001 op 0: function Object() { [native code] } could not be cloned."},{"name":"apply-inherited-member-kept","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.toString","value":"x"}]}]},"ok":false,"error":"CHG-001 op 0: function toString() { [native code] } could not be cloned."},{"name":"apply-inherited-member-as-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"constructor","value":"x"}]}]},"ok":false,"error":"CHG-001 op 0: unknown field \"constructor\" on \"finding:hip/hip-dysfunctions/mobility\""},{"name":"apply-inherited-member-intermediate","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.toString.x","value":"x"}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.0.categories.0.children.0.name: Unrecognized key(s) in object: 'toString'"},{"name":"schema-unknown-change-key","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"extra":1,"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"extra\"\n ],\n \"path\": [\n \"changes\",\n 0\n ],\n \"message\": \"Unrecognized key(s) in object: 'extra'\"\n }\n]"},{"name":"schema-unknown-op-key","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion","note":"x"}]}]},"ok":false,"error":"[\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"note\"\n ],\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0\n ],\n \"message\": \"Unrecognized key(s) in object: 'note'\"\n }\n]"},{"name":"schema-bad-id","changes_file":{"changes":[{"id":"CHG-12","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"validation\": \"regex\",\n \"code\": \"invalid_string\",\n \"message\": \"Invalid\",\n \"path\": [\n \"changes\",\n 0,\n \"id\"\n ]\n }\n]"},{"name":"schema-level-c-without-question","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"code\": \"custom\",\n \"message\": \"a level C change needs a question\",\n \"path\": [\n \"changes\",\n 0,\n \"question\"\n ]\n }\n]"},{"name":"schema-duplicate-change-ids","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]},{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/extension"}]}]},"ok":false,"error":"[\n {\n \"code\": \"custom\",\n \"message\": \"duplicate change id CHG-001\",\n \"path\": []\n }\n]"},{"name":"schema-empty-ops","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[]}]},"ok":false,"error":"[\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"array\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"Array must contain at least 1 element(s)\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\"\n ]\n }\n]"},{"name":"schema-empty-cite","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":[]}]}]},"ok":false,"error":"[\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"array\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"Array must contain at least 1 element(s)\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"reference_ids\"\n ]\n }\n]"},{"name":"schema-unknown-op","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"swap","target":"finding:hip/hip-dysfunctions/mobility"}]}]},"ok":false,"error":"[\n {\n \"code\": \"invalid_union_discriminator\",\n \"options\": [\n \"set\",\n \"rename\",\n \"add\",\n \"remove\",\n \"move\",\n \"cite\"\n ],\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"op\"\n ],\n \"message\": \"Invalid discriminator value. Expected 'set' | 'rename' | 'add' | 'remove' | 'move' | 'cite'\"\n }\n]"},{"name":"schema-negative-position","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":-1}]}]},"ok":false,"error":"[\n {\n \"code\": \"too_small\",\n \"minimum\": 0,\n \"type\": \"number\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"Number must be greater than or equal to 0\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ]\n }\n]"},{"name":"schema-fraction-position","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":1.5}]}]},"ok":false,"error":"[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"integer\",\n \"received\": \"float\",\n \"message\": \"Expected integer, received float\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ]\n }\n]"},{"name":"schema-two-anchors","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":{"after":"flexion","before":"extension"}}]}]},"ok":false,"error":"[\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"before\"\n ],\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ],\n \"message\": \"Unrecognized key(s) in object: 'before'\"\n }\n]"},{"name":"schema-title-missing-en","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"string\",\n \"received\": \"undefined\",\n \"path\": [\n \"changes\",\n 0,\n \"title\",\n \"en\"\n ],\n \"message\": \"Required\"\n }\n]"},{"name":"schema-empty-rationale","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"string\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"String must contain at least 1 character(s)\",\n \"path\": [\n \"changes\",\n 0,\n \"rationale\"\n ]\n }\n]"},{"name":"schema-bad-priority","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"urgent","ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"[\n {\n \"received\": \"urgent\",\n \"code\": \"invalid_enum_value\",\n \"options\": [\n \"high\",\n \"medium\",\n \"low\"\n ],\n \"path\": [\n \"changes\",\n 0,\n \"priority\"\n ],\n \"message\": \"Invalid enum value. Expected 'high' | 'medium' | 'low', received 'urgent'\"\n }\n]"},{"name":"schema-empty-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"","value":1}]}]},"ok":false,"error":"[\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"string\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"String must contain at least 1 character(s)\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"field\"\n ]\n }\n]"},{"name":"schema-set-without-value","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.fr"}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.0.categories.0.children.0.name.fr: Required"},{"name":"schema-null-scope","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["atlas"],"scope":null}]}]},"ok":false,"error":"[\n {\n \"expected\": \"'self' | 'subtree'\",\n \"received\": \"null\",\n \"code\": \"invalid_type\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"scope\"\n ],\n \"message\": \"Expected 'self' | 'subtree', received null\"\n }\n]"},{"name":"schema-null-position","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":null}]}]},"ok":false,"error":"[\n {\n \"code\": \"invalid_union\",\n \"unionErrors\": [\n {\n \"issues\": [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"number\",\n \"received\": \"null\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ],\n \"message\": \"Expected number, received null\"\n }\n ],\n \"name\": \"ZodError\"\n },\n {\n \"issues\": [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"null\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ],\n \"message\": \"Expected object, received null\"\n }\n ],\n \"name\": \"ZodError\"\n },\n {\n \"issues\": [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"null\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ],\n \"message\": \"Expected object, received null\"\n }\n ],\n \"name\": \"ZodError\"\n }\n ],\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"position\"\n ],\n \"message\": \"Invalid input\"\n }\n]"},{"name":"schema-null-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","field":null,"value":{"id":"x","name":{"fr":"x fr","en":"x en"}}}]}]},"ok":false,"error":"[\n {\n \"expected\": \"'references' | 'categories' | 'views' | 'annotations' | 'finding_zones' | 'regions'\",\n \"received\": \"null\",\n \"code\": \"invalid_type\",\n \"path\": [\n \"changes\",\n 0,\n \"ops\",\n 0,\n \"field\"\n ],\n \"message\": \"Expected 'references' | 'categories' | 'views' | 'annotations' | 'finding_zones' | 'regions', received null\"\n }\n]"},{"name":"apply-unknown-target","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"zone:nope","field":"name","value":{}}]}]},"ok":false,"error":"CHG-001 op 0: unknown target \"zone:nope\" (no \"nope\")"},{"name":"apply-malformed-target","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip","field":"name","value":{}}]}]},"ok":false,"error":"CHG-001 op 0: malformed target \"finding:hip\""},{"name":"apply-unknown-kind","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"galaxy:x","field":"name","value":{}}]}]},"ok":false,"error":"CHG-001 op 0: unknown target \"galaxy:x\""},{"name":"apply-unknown-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"zone:hip","field":"colour","value":1}]}]},"ok":false,"error":"CHG-001 op 0: unknown field \"colour\" on \"zone:hip\""},{"name":"apply-set-id","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"zone:hip","field":"id","value":"x"}]}]},"ok":false,"error":"CHG-001 op 0: unknown field \"id\" on \"zone:hip\""},{"name":"apply-malformed-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"zone:hip","field":"name..fr","value":"x"}]}]},"ok":false,"error":"CHG-001 op 0: malformed field \"name..fr\""},{"name":"apply-add-existing","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}}}]}]},"ok":false,"error":"CHG-001 op 0: \"flexion\" already exists among its siblings"},{"name":"apply-add-unknown-sibling","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":{"after":"nope"}}]}]},"ok":false,"error":"CHG-001 op 0: unknown sibling \"nope\""},{"name":"apply-add-out-of-range","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"x","name":{"fr":"x fr","en":"x en"}},"position":3}]}]},"ok":false,"error":"CHG-001 op 0: position 3 out of range"},{"name":"apply-add-non-object","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":"x"}]}]},"ok":false,"error":"CHG-001 op 0: add needs an object value"},{"name":"apply-add-document-without-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"document","value":{"id":"x","name":{"fr":"x fr","en":"x en"}}}]}]},"ok":false,"error":"CHG-001 op 0: add on document needs a field"},{"name":"apply-add-field-off-document","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"zone:hip","field":"categories","value":{"id":"x","name":{"fr":"x fr","en":"x en"}}}]}]},"ok":false,"error":"CHG-001 op 0: field \"categories\" is only valid on document"},{"name":"apply-add-without-id","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"name":{"fr":"a","en":"a"}}}]}]},"ok":false,"error":"CHG-001 op 0: the added item needs a string \"id\""},{"name":"apply-add-to-annotation","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"annotation:hip","value":{"id":"x","name":{"fr":"x fr","en":"x en"}}}]}]},"ok":false,"error":"CHG-001 op 0: \"annotation:hip\" holds no findings"},{"name":"apply-rename-taken","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"rename","target":"zone:hip","id":"neck"}]}]},"ok":false,"error":"CHG-001 op 0: \"neck\" already exists among its siblings"},{"name":"apply-rename-document","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"rename","target":"document","id":"x"}]}]},"ok":false,"error":"CHG-001 op 0: the document has no id to rename"},{"name":"apply-cite-undeclared","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["ghost"]}]}]},"ok":false,"error":"CHG-001 op 0: undeclared reference(s): ghost"},{"name":"apply-cite-annotation","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"cite","target":"annotation:hip","reference_ids":["atlas"]}]}]},"ok":false,"error":"CHG-001 op 0: \"annotation:hip\" is not a finding or a zone"},{"name":"apply-change-undeclared","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["ghost"],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"CHG-001: undeclared reference(s): ghost"},{"name":"apply-move-into-itself","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"move","target":"finding:hip/hip-dysfunctions/mobility","to":"finding:hip/hip-dysfunctions/mobility/flexion"}]}]},"ok":false,"error":"CHG-001 op 0: cannot move \"finding:hip/hip-dysfunctions/mobility\" into itself"},{"name":"apply-move-non-finding","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"move","target":"zone:hip","to":"zone:neck"}]}]},"ok":false,"error":"CHG-001 op 0: only findings move, got \"zone:hip\""},{"name":"apply-move-node-to-zone","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"move","target":"finding:hip/hip-dysfunctions/mobility/flexion","to":"zone:neck"}]}]},"ok":false,"error":"curated document is not shape-valid: finding_zones.1.categories.1.kind: Required; finding_zones.1.categories.1.children: Required"},{"name":"apply-remove-document","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"document"}]}]},"ok":false,"error":"CHG-001 op 0: the document cannot be removed"},{"name":"apply-remove-zone-integrity","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"zone:hip"}]}]},"ok":false,"error":"curated document has integrity errors: annotations[0].finding_zone_id: Finding zone \"hip\" does not exist"},{"name":"apply-shape-error","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"region:C","field":"count","value":"seven"}]}]},"ok":false,"error":"curated document is not shape-valid: vertebral_config.regions.0.count: Expected number, received string"},{"name":"apply-subtree-on-zone","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"zone:hip","field":"name","value":{},"scope":"subtree"}]}]},"ok":false,"error":"CHG-001 op 0: scope subtree needs a finding target, got \"zone:hip\""},{"name":"apply-subtree-no-field","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"kind","value":"x","scope":"subtree"}]}]},"ok":false,"error":"CHG-001 op 0: unknown field \"kind\" on \"finding:hip/hip-dysfunctions/mobility\""},{"name":"apply-b-sets-reviewed","changes_file":{"changes":[{"id":"CHG-001","level":"B","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"review_status","value":"reviewed"}]}]},"ok":false,"error":"CHG-001 op 0: level B cannot set \"finding:hip/hip-dysfunctions/mobility\" review_status to \"reviewed\""},{"name":"apply-second-change-fails","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"rename","target":"zone:neck","id":"cervical"}]},{"id":"CHG-002","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:neck/neck-dysfunctions/vet"}]}]},"ok":false,"error":"CHG-002 op 0: unknown target \"finding:neck/neck-dysfunctions/vet\" (no \"neck\")"}],"reference_cases":[{"name":"references-entry-as-array","file":{"references":[["atlas","book","Atlas",null,null]]},"ok":false},{"name":"references-type-as-map","file":{"references":[{"id":"atlas","type":{"book":null},"citation":"Atlas of anatomy","url":null,"doi":null}]},"ok":false},{"name":"references-duplicate-id","file":{"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},{"id":"paper","type":"journal","citation":"A paper","url":null,"doi":"10.1/x"},{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null}]},"ok":false},{"name":"references-unknown-key","file":{"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null,"note":"x"}]},"ok":false},{"name":"references-bad-type","file":{"references":[{"id":"atlas","type":"blog","citation":"Atlas of anatomy","url":null,"doi":null}]},"ok":false},{"name":"references-extra-top-key","file":{"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},{"id":"paper","type":"journal","citation":"A paper","url":null,"doi":"10.1/x"}],"extra":true},"ok":false},{"name":"references-bad-url","file":{"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":"ftp://x","doi":null}]},"ok":false}]} diff --git a/crates/core/tests/oracles/r5/fingerprint-differential.json b/crates/core/tests/oracles/r5/fingerprint-differential.json new file mode 100644 index 00000000..86a76854 --- /dev/null +++ b/crates/core/tests/oracles/r5/fingerprint-differential.json @@ -0,0 +1,40 @@ +{ + "frozen_from": "Node v24.21.0", + "cases": [ + { + "input": "[1e21, 1e-7, 1E+2, 0.1, -0, 5e-324, 1.7976931348623157e308, 123456789012345678901, 9007199254740993, 100, 1.5e-6, 0.000001, 1e20, 999999999999999999999]", + "canonical": "[1e+21,1e-7,100,0.1,0,5e-324,1.7976931348623157e+308,123456789012345680000,9007199254740992,100,0.0000015,0.000001,100000000000000000000,1e+21]", + "sha256": "454757d41a64c2a76e8fd9c555ce7f7732241ac8d192a731ccb880d5cdde1f25" + }, + { + "input": "{\"\\ud83d\\ude00\": 1, \"\\ufb33\": 2, \"\\u00e9\": 3, \"e\\u0301\": 4, \"Z\": 5, \"a\": 6, \"\": 7, \"aa\": 8, \"\\u0080\": 9}", + "canonical": "{\"\":7,\"Z\":5,\"a\":6,\"aa\":8,\"é\":4,\"€\":9,\"é\":3,\"😀\":1,\"דּ\":2}", + "sha256": "781d348d29b6dc2fcb75ed58f847fbc19ebb6f2dd526e5aa67e130a074a7200a" + }, + { + "input": "{\"s\": \"\\u0000\\u0001\\u001f\\b\\f\\n\\r\\t\\\"\\\\/\\u007f\\u2028\\u2029\\u00e9e\\u0301\\ud83d\\ude00\"}", + "canonical": "{\"s\":\"\\u0000\\u0001\\u001f\\b\\f\\n\\r\\t\\\"\\\\/

éé😀\"}", + "sha256": "ecaac6f9c64eb5f89acb33f7f98b840e3c07b8c91551e184af89aa1da702d0bb" + }, + { + "input": "{\"b\": {\"z\": [true, false, null, {\"y\": 1, \"x\": [ ]}], \"a\": {}}, \"a\": [[[]]]}", + "canonical": "{\"a\":[[[]]],\"b\":{\"a\":{},\"z\":[true,false,null,{\"x\":[],\"y\":1}]}}", + "sha256": "326c7cd13dafbbe0412b029969bf0b2994bdeea90313ca59b2cc4c5015c15447" + }, + { + "input": "{\"geometry\": {\"cx\": 743.0451049804688, \"cy\": 469.1115417480469, \"r\": 12}, \"name\": {\"fr\": \"Atlas (C1)\", \"en\": \"Atlas\"}}", + "canonical": "{\"geometry\":{\"cx\":743.0451049804688,\"cy\":469.1115417480469,\"r\":12},\"name\":{\"en\":\"Atlas\",\"fr\":\"Atlas (C1)\"}}", + "sha256": "0fa3704e87fb9f065b20bdd8d70c66705a20a33366f6ae8546adeb83ac1053f0" + }, + { + "input": "{\"k\": 1, \"k\": 2}", + "canonical": "{\"k\":2}", + "sha256": "1ddca3d1f7a33ce87c75de54e2b6a7ee0e52cf11cb8b8041e102b8477d5b1a23" + }, + { + "input": "[-1.0, 2.50, 1e0, -1e-0, 0.1e1, 12345678.9, 4.35, 0.3, 1e-6, 1e-5]", + "canonical": "[-1,2.5,1,-1,1,12345678.9,4.35,0.3,0.000001,0.00001]", + "sha256": "a2d500ce5093d2214d6e7b78163853211d5c8a43317ca81f0eac4f7aebd650e5" + } + ] +} diff --git a/crates/core/tests/oracles/r5/fingerprints.json b/crates/core/tests/oracles/r5/fingerprints.json new file mode 100644 index 00000000..8dc40025 --- /dev/null +++ b/crates/core/tests/oracles/r5/fingerprints.json @@ -0,0 +1,361 @@ +{ + "rules": { + "today_file_bytes": "sha256 of the Prettier-formatted JSON text the pipeline writes (pipeline.ts sheetRef)", + "a_js_pretty_newline": "sha256 of JSON.stringify(v, null, 2) + \"\\n\"", + "a_js_pretty": "sha256 of JSON.stringify(v, null, 2)", + "a_js_compact": "sha256 of JSON.stringify(v)", + "b_rfc8785": "sha256 of the RFC 8785 canonical text", + "a_js_pretty_validated": "document.json only: JSON.stringify(schema.parse(v), null, 2), the validated form (defaults filled)", + "b_rfc8785_validated": "document.json only: RFC 8785 of the validated form" + }, + "artifacts": [ + { + "file": "supabase/seed/anatomical-sheets/equine/legacy-import/document.json", + "bytes": 224109, + "today_file_bytes": "91e459f4c0ac8043831242c9fccde01f75f1023464db909f1c29571aa8a414c2", + "a_js_pretty_newline": "8c94a464ae618ec98af165284db2b352b27850fac329aee0ae4224465fb0adc2", + "a_js_pretty": "6fb3137199563dc99aaf08537613b08d1d5ae392147a83ed70bb91c070d27f66", + "a_js_compact": "bf8d3a22a3b131f7cc3d05aea8afb82d684bd31b41ca94d8c7adb199cb28c522", + "b_rfc8785": "d8b5f2cf0c8ebf68870296134eb2606a092726414d9175fbb983fb434b3881eb", + "prettier_equals_js_pretty": false, + "a_js_pretty_validated": "bd09fc71c4019e708e7bd1b8f402a7ed9406e0d23b7463889fbe4b0d7a72798a", + "b_rfc8785_validated": "1217637ed9a6ce1e05cdf274a7edb110d00cac6d76bea311a7c66ea841c4c024", + "validated_equals_input": false + }, + { + "file": "supabase/seed/anatomical-sheets/equine/legacy-import/legacy-id-map.json", + "bytes": 1323, + "today_file_bytes": "4ec2b4e3a0ee7d901145ce45f9cc240d28e30997155a51c6d53ea1c1a36667b7", + "a_js_pretty_newline": "4ec2b4e3a0ee7d901145ce45f9cc240d28e30997155a51c6d53ea1c1a36667b7", + "a_js_pretty": "490508e704bc3852e9494b034d630327bb2f550f5b9a1e0ef8024014654f0691", + "a_js_compact": "e028a65768f419d373869cc2bcbabbdef3285658db87619ec3908bb2e345d7d4", + "b_rfc8785": "8e3b6038d8f05e0b528979d4049c82e8cbcfd0d3e3c49cedd42ce18e32fdaf1a", + "prettier_equals_js_pretty": true + }, + { + "file": "supabase/seed/anatomical-sheets/equine/legacy-import/assets.json", + "bytes": 408, + "today_file_bytes": "109b0e7b8a03d398ea89ef278021f73d4f387992bbfdb2196c9cb7bec4232f2f", + "a_js_pretty_newline": "109b0e7b8a03d398ea89ef278021f73d4f387992bbfdb2196c9cb7bec4232f2f", + "a_js_pretty": "4d6c0bb91b1f8519b958902989a09cd584a2234757c3272d7a957a9edd10dc28", + "a_js_compact": "5f26484bbc984f4057355833d55372f9b8aecac7dd56982abd698d3f0d8bc478", + "b_rfc8785": "b4a3bc03eae8e5d4c26faeacc434bf844b9443dd51d190f879a2229812ca399d", + "prettier_equals_js_pretty": true + }, + { + "file": "supabase/seed/anatomical-sheets/equine/draft/document.json", + "bytes": 302794, + "today_file_bytes": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", + "a_js_pretty_newline": "90f668a3eb697b33d233b412af6cef045939260229abe1bac610d0379637aa1d", + "a_js_pretty": "79f143c0f4b41e639a0dfc48520c3e9c94a88d5552caebeba2c820a8148ceb51", + "a_js_compact": "59adcbaf44c467fbe8a88318fcef55681389f56d996d9ead0b0e400dc959cfc0", + "b_rfc8785": "a56e4a249eaaee82732eb4dd17b7c8be24fab548d776644cd5f7a4f0687e88a1", + "prettier_equals_js_pretty": false, + "a_js_pretty_validated": "ce4e940558b4cc4772cc1c719be5777a1ffb1517c3b4cf10d6d0830de385cd39", + "b_rfc8785_validated": "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2", + "validated_equals_input": false + }, + { + "file": "supabase/seed/anatomical-sheets/equine/draft/assets.json", + "bytes": 203, + "today_file_bytes": "c490dc758b330f372548a595826e2d4de73dcb935af1e39cb4883d5b31927cf5", + "a_js_pretty_newline": "c490dc758b330f372548a595826e2d4de73dcb935af1e39cb4883d5b31927cf5", + "a_js_pretty": "52fbadaf24eaae1a1c3ecb4e3122e7e1883c0950b6f3c8971e46b9543a533949", + "a_js_compact": "91a9234d0c41faacc17c66a20f0ab69141688ff168169df0bc68f171f09b6466", + "b_rfc8785": "c654010a95503c6377cd91569d3c54fcecb55a49c0bd398ae19605b6cf30168e", + "prettier_equals_js_pretty": true + }, + { + "file": "supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json", + "bytes": 217, + "today_file_bytes": "2c0716f1536e4182cde9ffb0f183c7255d1ad6a1fc754d72011ff8090304b285", + "a_js_pretty_newline": "2c0716f1536e4182cde9ffb0f183c7255d1ad6a1fc754d72011ff8090304b285", + "a_js_pretty": "afe7698ff86171163796bde3308be96b9ac92998748340a9fa4f44ba49b4444b", + "a_js_compact": "5a2a81a30a9fe80d1cb71c19404f8eee277b8fc12e67512dcb8c3c1e24c4201b", + "b_rfc8785": "d972d029a310f75596e40188569cd23a02fd26e578bc1197f3b7dcbe6210b1ca", + "prettier_equals_js_pretty": true + }, + { + "file": "supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json", + "bytes": 85627, + "today_file_bytes": "4139c51d3acd69ba9ca0ee6bb7bd7ebe7be4eb818e330ff278b37e1d04b7fce9", + "a_js_pretty_newline": "4139c51d3acd69ba9ca0ee6bb7bd7ebe7be4eb818e330ff278b37e1d04b7fce9", + "a_js_pretty": "01fac788d45ca8d44b33920f72c6442caf41133ec5c614acb40af383b7763471", + "a_js_compact": "97572130942dc0cb7538e7b4f7bd8eb71394e6604f08d1bc76214f186f3871c0", + "b_rfc8785": "f082b66f9a36fc9ba384e4807a3684e9578ab3c53b018a8a3cf383be5fe52ca6", + "prettier_equals_js_pretty": true + } + ], + "numbers": [ + { + "path": "legacy-import/document.json.annotations[6].geometry.cx", + "text": "743.0451049804688" + }, + { + "path": "legacy-import/document.json.annotations[9].geometry.cx", + "text": "1424.2662353515625" + }, + { + "path": "legacy-import/document.json.annotations[10].geometry.cx", + "text": "1117.97705078125" + }, + { + "path": "legacy-import/document.json.annotations[10].geometry.cy", + "text": "469.1115417480469" + }, + { + "path": "legacy-import/document.json.annotations[11].geometry.cx", + "text": "840.1692504882812" + }, + { + "path": "legacy-import/document.json.annotations[11].geometry.cy", + "text": "399.0752258300781" + }, + { + "path": "legacy-import/document.json.annotations[13].geometry.points[1][0]", + "text": "1418.5" + }, + { + "path": "legacy-import/document.json.annotations[13].geometry.points[1][1]", + "text": "556.2" + }, + { + "path": "legacy-import/document.json.annotations[13].geometry.points[2][0]", + "text": "1510.8" + }, + { + "path": "legacy-import/document.json.annotations[13].geometry.points[2][1]", + "text": "539.5" + }, + { + "path": "legacy-import/document.json.annotations[13].geometry.points[3][1]", + "text": "538.2" + }, + { + "path": "legacy-import/document.json.annotations[14].geometry.points[0][0]", + "text": "1401.3" + }, + { + "path": "legacy-import/document.json.annotations[14].geometry.points[0][1]", + "text": "457.1" + }, + { + "path": "legacy-import/document.json.annotations[14].geometry.points[4][0]", + "text": "1131.4" + }, + { + "path": "legacy-import/document.json.annotations[14].geometry.points[4][1]", + "text": "503.2" + }, + { + "path": "legacy-import/document.json.annotations[14].geometry.points[6][1]", + "text": "454.4" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[0][0]", + "text": "1109.9" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[0][1]", + "text": "497.7" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[1][1]", + "text": "558.9" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[2][0]", + "text": "1010.3" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[2][1]", + "text": "558.9" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[4][0]", + "text": "873.9" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[4][1]", + "text": "530.7" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[5][0]", + "text": "826.8" + }, + { + "path": "legacy-import/document.json.annotations[15].geometry.points[5][1]", + "text": "509.5" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[7][0]", + "text": "695.1" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[7][1]", + "text": "528.4" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[8][0]", + "text": "728.9" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[8][1]", + "text": "520.1" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[9][0]", + "text": "765.3" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[9][1]", + "text": "472.8" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[10][0]", + "text": "816.8" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[11][0]", + "text": "796.5" + }, + { + "path": "legacy-import/document.json.annotations[16].geometry.points[11][1]", + "text": "543.7" + }, + { + "path": "legacy-import/document.json.annotations[23].geometry.cx", + "text": "384.94287109375" + }, + { + "path": "legacy-import/document.json.annotations[23].geometry.cy", + "text": "314.0172882080078" + }, + { + "path": "draft/document.json.annotations[6].geometry.cx", + "text": "743.0451049804688" + }, + { + "path": "draft/document.json.annotations[14].geometry.points[1][0]", + "text": "1418.5" + }, + { + "path": "draft/document.json.annotations[14].geometry.points[1][1]", + "text": "556.2" + }, + { + "path": "draft/document.json.annotations[14].geometry.points[2][0]", + "text": "1510.8" + }, + { + "path": "draft/document.json.annotations[14].geometry.points[2][1]", + "text": "539.5" + }, + { + "path": "draft/document.json.annotations[14].geometry.points[3][1]", + "text": "538.2" + }, + { + "path": "draft/document.json.annotations[15].geometry.points[0][0]", + "text": "1401.3" + }, + { + "path": "draft/document.json.annotations[15].geometry.points[0][1]", + "text": "457.1" + }, + { + "path": "draft/document.json.annotations[15].geometry.points[4][0]", + "text": "1131.4" + }, + { + "path": "draft/document.json.annotations[15].geometry.points[4][1]", + "text": "503.2" + }, + { + "path": "draft/document.json.annotations[15].geometry.points[6][1]", + "text": "454.4" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[0][0]", + "text": "1109.9" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[0][1]", + "text": "497.7" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[1][1]", + "text": "558.9" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[2][0]", + "text": "1010.3" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[2][1]", + "text": "558.9" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[4][0]", + "text": "873.9" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[4][1]", + "text": "530.7" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[5][0]", + "text": "826.8" + }, + { + "path": "draft/document.json.annotations[16].geometry.points[5][1]", + "text": "509.5" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[7][0]", + "text": "695.1" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[7][1]", + "text": "528.4" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[8][0]", + "text": "728.9" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[8][1]", + "text": "520.1" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[9][0]", + "text": "765.3" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[9][1]", + "text": "472.8" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[10][0]", + "text": "816.8" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[11][0]", + "text": "796.5" + }, + { + "path": "draft/document.json.annotations[17].geometry.points[11][1]", + "text": "543.7" + } + ], + "rfc8785_vectors": [ + { + "input": "{\"numbers\": [333333333.33333329, 1E30, 4.50, 2e-3, 0.000000000000000000000000001], \"string\": \"\\u20ac$\\u000F\\u000aA'\\u0042\\u0022\\u005c\\\\\\\"\\/\", \"literals\": [null, true, false]}", + "canonical": "{\"literals\":[null,true,false],\"numbers\":[333333333.3333333,1e+30,4.5,0.002,1e-27],\"string\":\"€$\\u000f\\nA'B\\\"\\\\\\\\\\\"/\"}" + }, + { + "input": "{\"\\u20ac\": \"Euro Sign\", \"\\r\": \"Carriage Return\", \"\\ufb33\": \"Hebrew Letter Dalet With Dagesh\", \"1\": \"One\", \"\\ud83d\\ude00\": \"Emoji: Grinning Face\", \"\\u0080\": \"Control\", \"\\u00f6\": \"Latin Small Letter O With Diaeresis\"}", + "canonical": "{\"\\r\":\"Carriage Return\",\"1\":\"One\",\"€\":\"Control\",\"ö\":\"Latin Small Letter O With Diaeresis\",\"€\":\"Euro Sign\",\"😀\":\"Emoji: Grinning Face\",\"דּ\":\"Hebrew Letter Dalet With Dagesh\"}" + } + ] +} diff --git a/crates/core/tests/oracles/r5/ids.json b/crates/core/tests/oracles/r5/ids.json new file mode 100644 index 00000000..6de3b834 --- /dev/null +++ b/crates/core/tests/oracles/r5/ids.json @@ -0,0 +1,3234 @@ +{ + "uuid": [ + { + "name": "faunosteo:sheet:equine:v1", + "uuid": "503dc301-a8b1-50d4-9e44-0919b2fc2916" + }, + { + "name": "faunosteo:sheet:equine:v2", + "uuid": "194f4d81-4978-5539-8419-545581943862" + }, + { + "name": "faunosteo:asset:0ea5202fa3b95bac167b87c12ee969ab0272e085b60c2d34dbca6202c5f08541", + "uuid": "7f767f74-3b36-51a7-8465-52dd7e2ead4a" + }, + { + "name": "", + "uuid": "e3b0c442-98fc-5c14-9afb-f4c8996fb924" + }, + { + "name": "faunosteo:sheet:équin:v1", + "uuid": "a3d5fded-b676-53fa-b820-2ab9c8af24b5" + }, + { + "name": "faunosteo:asset:🐎", + "uuid": "197d9050-3ea9-5c1c-a991-543c6a3c380c" + } + ], + "slug": [ + { + "label": "", + "slug": "" + }, + { + "label": " ", + "slug": "" + }, + { + "label": "Cheval", + "slug": "cheval" + }, + { + "label": "Épaule gauche", + "slug": "epaule-gauche" + }, + { + "label": "Vertèbres thoraciques T1–T18", + "slug": "vertebres-thoraciques-t1-t18" + }, + { + "label": "Œil / orbite", + "slug": "il-orbite" + }, + { + "label": "Straße", + "slug": "stra-e" + }, + { + "label": "Ørsted", + "slug": "rsted" + }, + { + "label": "Rein d'un cheval", + "slug": "rein-d-un-cheval" + }, + { + "label": "ÀÉÎÕÜ ç ñ", + "slug": "aeiou-c-n" + }, + { + "label": "--déjà--", + "slug": "deja" + }, + { + "label": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "slug": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "label": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", + "slug": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + }, + { + "label": "DŽ Dž dž", + "slug": "" + }, + { + "label": "İstanbul", + "slug": "istanbul" + }, + { + "label": "12 côtes", + "slug": "12-cotes" + }, + { + "label": "Ça (combining cedilla)", + "slug": "ca-combining-cedilla" + }, + { + "label": "Cheval", + "slug": "cheval" + }, + { + "label": "Horse", + "slug": "horse" + }, + { + "label": "Cervicales", + "slug": "cervicales" + }, + { + "label": "Cervical", + "slug": "cervical" + }, + { + "label": "Thoraciques", + "slug": "thoraciques" + }, + { + "label": "Thoracic", + "slug": "thoracic" + }, + { + "label": "Lombaires", + "slug": "lombaires" + }, + { + "label": "Lumbar", + "slug": "lumbar" + }, + { + "label": "Sacrales", + "slug": "sacrales" + }, + { + "label": "Sacral", + "slug": "sacral" + }, + { + "label": "Caudales", + "slug": "caudales" + }, + { + "label": "Caudal", + "slug": "caudal" + }, + { + "label": "Articulations", + "slug": "articulations" + }, + { + "label": "Joints", + "slug": "joints" + }, + { + "label": "Os", + "slug": "os" + }, + { + "label": "Bones", + "slug": "bones" + }, + { + "label": "Charnières vertébrales", + "slug": "charnieres-vertebrales" + }, + { + "label": "Vertebral hinges", + "slug": "vertebral-hinges" + }, + { + "label": "Zone colonne", + "slug": "zone-colonne" + }, + { + "label": "Spine", + "slug": "spine" + }, + { + "label": "Cadrans du crâne", + "slug": "cadrans-du-crane" + }, + { + "label": "Skull quadrants", + "slug": "skull-quadrants" + }, + { + "label": "Vue générale", + "slug": "vue-generale" + }, + { + "label": "Overview", + "slug": "overview" + }, + { + "label": "Tête", + "slug": "tete" + }, + { + "label": "Head", + "slug": "head" + }, + { + "label": "Boulet post. (métatarso-phalangien)", + "slug": "boulet-post-metatarso-phalangien" + }, + { + "label": "Hind fetlock", + "slug": "hind-fetlock" + }, + { + "label": "Jarret (tarsien)", + "slug": "jarret-tarsien" + }, + { + "label": "Hock", + "slug": "hock" + }, + { + "label": "Grasset (fémoro-tibial)", + "slug": "grasset-femoro-tibial" + }, + { + "label": "Stifle", + "slug": "stifle" + }, + { + "label": "Hanche (coxo-fémorale)", + "slug": "hanche-coxo-femorale" + }, + { + "label": "Hip joint", + "slug": "hip-joint" + }, + { + "label": "Articulation Sacro-Iliaque", + "slug": "articulation-sacro-iliaque" + }, + { + "label": "Sacroiliac Joint", + "slug": "sacroiliac-joint" + }, + { + "label": "Épaule (scapulo-humérale)", + "slug": "epaule-scapulo-humerale" + }, + { + "label": "Shoulder joint", + "slug": "shoulder-joint" + }, + { + "label": "Coude (huméro-radial)", + "slug": "coude-humero-radial" + }, + { + "label": "Elbow joint", + "slug": "elbow-joint" + }, + { + "label": "Boulet ant. (métacarpo-phalangien)", + "slug": "boulet-ant-metacarpo-phalangien" + }, + { + "label": "Fore fetlock", + "slug": "fore-fetlock" + }, + { + "label": "Sésamoïdes ant. (boulet)", + "slug": "sesamoides-ant-boulet" + }, + { + "label": "Forelimb Sesamoids", + "slug": "forelimb-sesamoids" + }, + { + "label": "Charnière L6-S1 (lombo-sacrée)", + "slug": "charniere-l6-s1-lombo-sacree" + }, + { + "label": "L6-S1 (Lumbosacral)", + "slug": "l6-s1-lumbosacral" + }, + { + "label": "Charnière T18-L1 (dorso-lombaire)", + "slug": "charniere-t18-l1-dorso-lombaire" + }, + { + "label": "T18-L1 (Thoracolumbar)", + "slug": "t18-l1-thoracolumbar" + }, + { + "label": "Charnière C7-T1 (cervico-thoracique)", + "slug": "charniere-c7-t1-cervico-thoracique" + }, + { + "label": "C7-T1 (Cervicothoracic)", + "slug": "c7-t1-cervicothoracic" + }, + { + "label": "Vertèbres caudales", + "slug": "vertebres-caudales" + }, + { + "label": "Coccygeal Vertebrae", + "slug": "coccygeal-vertebrae" + }, + { + "label": "Vertèbres sacrales", + "slug": "vertebres-sacrales" + }, + { + "label": "Sacral Vertebrae", + "slug": "sacral-vertebrae" + }, + { + "label": "Vertèbres lombaires", + "slug": "vertebres-lombaires" + }, + { + "label": "Lumbar Vertebrae", + "slug": "lumbar-vertebrae" + }, + { + "label": "Vertèbres thoraciques", + "slug": "vertebres-thoraciques" + }, + { + "label": "Thoracic Vertebrae", + "slug": "thoracic-vertebrae" + }, + { + "label": "Vertèbres cervicales", + "slug": "vertebres-cervicales" + }, + { + "label": "Cervical Vertebrae", + "slug": "cervical-vertebrae" + }, + { + "label": "Pariétal", + "slug": "parietal" + }, + { + "label": "Parietal bone", + "slug": "parietal-bone" + }, + { + "label": "Frontal", + "slug": "frontal" + }, + { + "label": "Frontal bone", + "slug": "frontal-bone" + }, + { + "label": "Sphénoïde", + "slug": "sphenoide" + }, + { + "label": "Sphenoid", + "slug": "sphenoid" + }, + { + "label": "Temporel", + "slug": "temporel" + }, + { + "label": "Temporal", + "slug": "temporal" + }, + { + "label": "Occipital", + "slug": "occipital" + }, + { + "label": "Articulation Temporo-Mandibulaire (ATM)", + "slug": "articulation-temporo-mandibulaire-atm" + }, + { + "label": "Temporomandibular Joint (TMJ)", + "slug": "temporomandibular-joint-tmj" + }, + { + "label": "Synchondrose Sphéno-Basilaire (SSB)", + "slug": "synchondrose-spheno-basilaire-ssb" + }, + { + "label": "Spheno-Basilar Synchondrosis (SBS)", + "slug": "spheno-basilar-synchondrosis-sbs" + }, + { + "label": "Hyoïde", + "slug": "hyoide" + }, + { + "label": "Hyoid", + "slug": "hyoid" + }, + { + "label": "Charnière C0-C1 (occipito-atloïdienne)", + "slug": "charniere-c0-c1-occipito-atloidienne" + }, + { + "label": "C0-C1 (Occipito-atlantal)", + "slug": "c0-c1-occipito-atlantal" + }, + { + "label": "Dysfonctions ostéopathiques", + "slug": "dysfonctions-osteopathiques" + }, + { + "label": "Osteopathic dysfunctions", + "slug": "osteopathic-dysfunctions" + }, + { + "label": "Lésions de mobilité", + "slug": "lesions-de-mobilite" + }, + { + "label": "Mobility lesions", + "slug": "mobility-lesions" + }, + { + "label": "En flexion (rotation externe)", + "slug": "en-flexion-rotation-externe" + }, + { + "label": "Flexion (external rotation)", + "slug": "flexion-external-rotation" + }, + { + "label": "En extension (rotation interne)", + "slug": "en-extension-rotation-interne" + }, + { + "label": "Extension (internal rotation)", + "slug": "extension-internal-rotation" + }, + { + "label": "Restriction de mobilité globale", + "slug": "restriction-de-mobilite-globale" + }, + { + "label": "Global mobility restriction", + "slug": "global-mobility-restriction" + }, + { + "label": "Lésions intra-osseuses", + "slug": "lesions-intra-osseuses" + }, + { + "label": "Intra-osseous lesions", + "slug": "intra-osseous-lesions" + }, + { + "label": "Déformation de l'écaille pariétale palpée", + "slug": "deformation-de-l-ecaille-parietale-palpee" + }, + { + "label": "Palpated parietal squama deformation", + "slug": "palpated-parietal-squama-deformation" + }, + { + "label": "Compression interpariétale", + "slug": "compression-interparietale" + }, + { + "label": "Interparietal compression", + "slug": "interparietal-compression" + }, + { + "label": "Restrictions de sutures", + "slug": "restrictions-de-sutures" + }, + { + "label": "Suture restrictions", + "slug": "suture-restrictions" + }, + { + "label": "Suture fronto-pariétale (coronale)", + "slug": "suture-fronto-parietale-coronale" + }, + { + "label": "Frontoparietal suture (coronal)", + "slug": "frontoparietal-suture-coronal" + }, + { + "label": "Suture pariéto-occipitale (lambdoïde)", + "slug": "suture-parieto-occipitale-lambdoide" + }, + { + "label": "Parieto-occipital suture (lambdoid)", + "slug": "parieto-occipital-suture-lambdoid" + }, + { + "label": "Suture pariéto-temporale (squameuse)", + "slug": "suture-parieto-temporale-squameuse" + }, + { + "label": "Parieto-temporal suture (squamous)", + "slug": "parieto-temporal-suture-squamous" + }, + { + "label": "Suture sphéno-pariétale", + "slug": "suture-spheno-parietale" + }, + { + "label": "Sphenoparietal suture", + "slug": "sphenoparietal-suture" + }, + { + "label": "Suture interpariétale (sagittale)", + "slug": "suture-interparietale-sagittale" + }, + { + "label": "Interparietal suture (sagittal)", + "slug": "interparietal-suture-sagittal" + }, + { + "label": "Observations / motifs de consultation", + "slug": "observations-motifs-de-consultation" + }, + { + "label": "Observations / consultation reasons", + "slug": "observations-consultation-reasons" + }, + { + "label": "Modifications comportementales rapportées", + "slug": "modifications-comportementales-rapportees" + }, + { + "label": "Reported behavioral changes", + "slug": "reported-behavioral-changes" + }, + { + "label": "Hypersensibilité au toucher de la tête", + "slug": "hypersensibilite-au-toucher-de-la-tete" + }, + { + "label": "Head touch hypersensitivity", + "slug": "head-touch-hypersensitivity" + }, + { + "label": "Irritabilité nouvelle au harnachement de tête", + "slug": "irritabilite-nouvelle-au-harnachement-de-tete" + }, + { + "label": "New irritability with head tack", + "slug": "new-irritability-with-head-tack" + }, + { + "label": "Suite de traumatisme crânien (choc, coup)", + "slug": "suite-de-traumatisme-cranien-choc-coup" + }, + { + "label": "Post head trauma (blow, impact)", + "slug": "post-head-trauma-blow-impact" + }, + { + "label": "Anamnèse / facteurs rapportés", + "slug": "anamnese-facteurs-rapportes" + }, + { + "label": "Anamnesis / reported factors", + "slug": "anamnesis-reported-factors" + }, + { + "label": "Traumatisme rapporté (choc, chute)", + "slug": "traumatisme-rapporte-choc-chute" + }, + { + "label": "Reported trauma (blow, fall)", + "slug": "reported-trauma-blow-fall" + }, + { + "label": "Contexte de stress / changement", + "slug": "contexte-de-stress-changement" + }, + { + "label": "Stress / change context", + "slug": "stress-change-context" + }, + { + "label": "Contexte postural (harnachement, position de travail)", + "slug": "contexte-postural-harnachement-position-de-travail" + }, + { + "label": "Postural context", + "slug": "postural-context" + }, + { + "label": "Suite de soin dentaire récent", + "slug": "suite-de-soin-dentaire-recent" + }, + { + "label": "Post recent dental care", + "slug": "post-recent-dental-care" + }, + { + "label": "Suite d'intervention vétérinaire", + "slug": "suite-d-intervention-veterinaire" + }, + { + "label": "Post veterinary intervention", + "slug": "post-veterinary-intervention" + }, + { + "label": "Pas de cause identifiée", + "slug": "pas-de-cause-identifiee" + }, + { + "label": "No identified cause", + "slug": "no-identified-cause" + }, + { + "label": "Compression métopique (suture interfrontale persistante)", + "slug": "compression-metopique-suture-interfrontale-persistante" + }, + { + "label": "Metopic compression (persistent interfrontal suture)", + "slug": "metopic-compression-persistent-interfrontal-suture" + }, + { + "label": "Déformation de l'écaille frontale palpée", + "slug": "deformation-de-l-ecaille-frontale-palpee" + }, + { + "label": "Palpated frontal squama deformation", + "slug": "palpated-frontal-squama-deformation" + }, + { + "label": "Suture fronto-sphénoïdale", + "slug": "suture-fronto-sphenoidale" + }, + { + "label": "Frontosphenoidal suture", + "slug": "frontosphenoidal-suture" + }, + { + "label": "Suture fronto-nasale", + "slug": "suture-fronto-nasale" + }, + { + "label": "Frontonasal suture", + "slug": "frontonasal-suture" + }, + { + "label": "Suture fronto-lacrymale", + "slug": "suture-fronto-lacrymale" + }, + { + "label": "Frontolacrimal suture", + "slug": "frontolacrimal-suture" + }, + { + "label": "Suture fronto-zygomatique", + "slug": "suture-fronto-zygomatique" + }, + { + "label": "Frontozygomatic suture", + "slug": "frontozygomatic-suture" + }, + { + "label": "Suture interfrontale (métopique)", + "slug": "suture-interfrontale-metopique" + }, + { + "label": "Interfrontal suture (metopic)", + "slug": "interfrontal-suture-metopic" + }, + { + "label": "Frottements répétés de la tête rapportés", + "slug": "frottements-repetes-de-la-tete-rapportes" + }, + { + "label": "Reported repeated head rubbing", + "slug": "reported-repeated-head-rubbing" + }, + { + "label": "Asymétrie de relief frontal observée", + "slug": "asymetrie-de-relief-frontal-observee" + }, + { + "label": "Observed frontal relief asymmetry", + "slug": "observed-frontal-relief-asymmetry" + }, + { + "label": "Lésions physiologiques (SSB)", + "slug": "lesions-physiologiques-ssb" + }, + { + "label": "Physiological lesions (SBS)", + "slug": "physiological-lesions-sbs" + }, + { + "label": "Flexion", + "slug": "flexion" + }, + { + "label": "Extension", + "slug": "extension" + }, + { + "label": "Torsion droite", + "slug": "torsion-droite" + }, + { + "label": "Right torsion", + "slug": "right-torsion" + }, + { + "label": "Torsion gauche", + "slug": "torsion-gauche" + }, + { + "label": "Left torsion", + "slug": "left-torsion" + }, + { + "label": "Side-bending rotation droite", + "slug": "side-bending-rotation-droite" + }, + { + "label": "Right side-bending rotation", + "slug": "right-side-bending-rotation" + }, + { + "label": "Side-bending rotation gauche", + "slug": "side-bending-rotation-gauche" + }, + { + "label": "Left side-bending rotation", + "slug": "left-side-bending-rotation" + }, + { + "label": "Lésions non-physiologiques / traumatiques", + "slug": "lesions-non-physiologiques-traumatiques" + }, + { + "label": "Non-physiological / traumatic lesions", + "slug": "non-physiological-traumatic-lesions" + }, + { + "label": "Strain vertical haut", + "slug": "strain-vertical-haut" + }, + { + "label": "Superior vertical strain", + "slug": "superior-vertical-strain" + }, + { + "label": "Strain vertical bas", + "slug": "strain-vertical-bas" + }, + { + "label": "Inferior vertical strain", + "slug": "inferior-vertical-strain" + }, + { + "label": "Strain latéral droit", + "slug": "strain-lateral-droit" + }, + { + "label": "Right lateral strain", + "slug": "right-lateral-strain" + }, + { + "label": "Strain latéral gauche", + "slug": "strain-lateral-gauche" + }, + { + "label": "Left lateral strain", + "slug": "left-lateral-strain" + }, + { + "label": "Compression SSB", + "slug": "compression-ssb" + }, + { + "label": "SBS compression", + "slug": "sbs-compression" + }, + { + "label": "Désengagement pré-sphénoïde / post-sphénoïde", + "slug": "desengagement-pre-sphenoide-post-sphenoide" + }, + { + "label": "Pre-sphenoid / post-sphenoid disengagement", + "slug": "pre-sphenoid-post-sphenoid-disengagement" + }, + { + "label": "Dysfonction des petites ailes", + "slug": "dysfonction-des-petites-ailes" + }, + { + "label": "Lesser wings dysfunction", + "slug": "lesser-wings-dysfunction" + }, + { + "label": "Dysfonction des grandes ailes", + "slug": "dysfonction-des-grandes-ailes" + }, + { + "label": "Greater wings dysfunction", + "slug": "greater-wings-dysfunction" + }, + { + "label": "Suture sphéno-pétreuse", + "slug": "suture-spheno-petreuse" + }, + { + "label": "Sphenopetrosal suture", + "slug": "sphenopetrosal-suture" + }, + { + "label": "Suture sphéno-squameuse", + "slug": "suture-spheno-squameuse" + }, + { + "label": "Sphenosquamous suture", + "slug": "sphenosquamous-suture" + }, + { + "label": "Suture sphéno-zygomatique", + "slug": "suture-spheno-zygomatique" + }, + { + "label": "Sphenozygomatic suture", + "slug": "sphenozygomatic-suture" + }, + { + "label": "Suture sphéno-maxillaire", + "slug": "suture-spheno-maxillaire" + }, + { + "label": "Sphenomaxillary suture", + "slug": "sphenomaxillary-suture" + }, + { + "label": "Suture sphéno-vomérienne", + "slug": "suture-spheno-vomerienne" + }, + { + "label": "Sphenovomerine suture", + "slug": "sphenovomerine-suture" + }, + { + "label": "Suture sphéno-palatine", + "slug": "suture-spheno-palatine" + }, + { + "label": "Sphenopalatine suture", + "slug": "sphenopalatine-suture" + }, + { + "label": "Irritabilité / agressivité nouvelle", + "slug": "irritabilite-agressivite-nouvelle" + }, + { + "label": "New irritability / aggressiveness", + "slug": "new-irritability-aggressiveness" + }, + { + "label": "Apathie / repli", + "slug": "apathie-repli" + }, + { + "label": "Apathy / withdrawal", + "slug": "apathy-withdrawal" + }, + { + "label": "Baisse de performance inexpliquée", + "slug": "baisse-de-performance-inexpliquee" + }, + { + "label": "Unexplained performance drop", + "slug": "unexplained-performance-drop" + }, + { + "label": "Irrégularité de cyclicité rapportée", + "slug": "irregularite-de-cyclicite-rapportee" + }, + { + "label": "Reported cycle irregularity", + "slug": "reported-cycle-irregularity" + }, + { + "label": "Suite de traumatisme crânien", + "slug": "suite-de-traumatisme-cranien" + }, + { + "label": "Post head trauma", + "slug": "post-head-trauma" + }, + { + "label": "Antériorité / postériorité temporale", + "slug": "anteriorite-posteriorite-temporale" + }, + { + "label": "Temporal anteriority / posteriority", + "slug": "temporal-anteriority-posteriority" + }, + { + "label": "Dysfonction pétro-squameuse", + "slug": "dysfonction-petro-squameuse" + }, + { + "label": "Petrosquamous dysfunction", + "slug": "petrosquamous-dysfunction" + }, + { + "label": "Dysfonction de la partie tympanique", + "slug": "dysfonction-de-la-partie-tympanique" + }, + { + "label": "Tympanic part dysfunction", + "slug": "tympanic-part-dysfunction" + }, + { + "label": "Suture occipito-mastoïdienne", + "slug": "suture-occipito-mastoidienne" + }, + { + "label": "Occipitomastoid suture", + "slug": "occipitomastoid-suture" + }, + { + "label": "Suture temporo-zygomatique", + "slug": "suture-temporo-zygomatique" + }, + { + "label": "Temporozygomatic suture", + "slug": "temporozygomatic-suture" + }, + { + "label": "Suture pétro-occipitale", + "slug": "suture-petro-occipitale" + }, + { + "label": "Petro-occipital suture", + "slug": "petro-occipital-suture" + }, + { + "label": "Compression condylienne", + "slug": "compression-condylienne" + }, + { + "label": "Condylar compression", + "slug": "condylar-compression" + }, + { + "label": "Dysfonction de l'écaille (supra-occipital)", + "slug": "dysfonction-de-l-ecaille-supra-occipital" + }, + { + "label": "Squamous part dysfunction (supraoccipital)", + "slug": "squamous-part-dysfunction-supraoccipital" + }, + { + "label": "Dysfonction des parties condyliennes (exo-occipital)", + "slug": "dysfonction-des-parties-condyliennes-exo-occipital" + }, + { + "label": "Condylar parts dysfunction (exoccipital)", + "slug": "condylar-parts-dysfunction-exoccipital" + }, + { + "label": "Dysfonction de la partie basilaire", + "slug": "dysfonction-de-la-partie-basilaire" + }, + { + "label": "Basilar part dysfunction", + "slug": "basilar-part-dysfunction" + }, + { + "label": "Dysfonctions ostéopathiques de l'ATM", + "slug": "dysfonctions-osteopathiques-de-l-atm" + }, + { + "label": "Osteopathic TMJ dysfunctions", + "slug": "osteopathic-tmj-dysfunctions" + }, + { + "label": "Restrictions de mobilité articulaire", + "slug": "restrictions-de-mobilite-articulaire" + }, + { + "label": "Articular mobility restrictions", + "slug": "articular-mobility-restrictions" + }, + { + "label": "Restriction à l'ouverture", + "slug": "restriction-a-l-ouverture" + }, + { + "label": "Opening restriction", + "slug": "opening-restriction" + }, + { + "label": "Restriction à la fermeture", + "slug": "restriction-a-la-fermeture" + }, + { + "label": "Closing restriction", + "slug": "closing-restriction" + }, + { + "label": "Restriction en latéralité", + "slug": "restriction-en-lateralite" + }, + { + "label": "Lateral restriction", + "slug": "lateral-restriction" + }, + { + "label": "Restriction en protraction/rétraction", + "slug": "restriction-en-protraction-retraction" + }, + { + "label": "Protrusion/retraction restriction", + "slug": "protrusion-retraction-restriction" + }, + { + "label": "Hypomobilité globale", + "slug": "hypomobilite-globale" + }, + { + "label": "Global hypomobility", + "slug": "global-hypomobility" + }, + { + "label": "Hypermobilité / laxité perçue", + "slug": "hypermobilite-laxite-percue" + }, + { + "label": "Hypermobility / perceived laxity", + "slug": "hypermobility-perceived-laxity" + }, + { + "label": "Tensions des muscles masticateurs", + "slug": "tensions-des-muscles-masticateurs" + }, + { + "label": "Masticatory muscle tensions", + "slug": "masticatory-muscle-tensions" + }, + { + "label": "Tension du masséter", + "slug": "tension-du-masseter" + }, + { + "label": "Masseter tension", + "slug": "masseter-tension" + }, + { + "label": "Tension du temporal", + "slug": "tension-du-temporal" + }, + { + "label": "Temporalis tension", + "slug": "temporalis-tension" + }, + { + "label": "Tension des ptérygoïdiens", + "slug": "tension-des-pterygoidiens" + }, + { + "label": "Pterygoid tension", + "slug": "pterygoid-tension" + }, + { + "label": "Points de tension myofasciaux", + "slug": "points-de-tension-myofasciaux" + }, + { + "label": "Myofascial trigger points", + "slug": "myofascial-trigger-points" + }, + { + "label": "Asymétries mécaniques observées", + "slug": "asymetries-mecaniques-observees" + }, + { + "label": "Observed mechanical asymmetries", + "slug": "observed-mechanical-asymmetries" + }, + { + "label": "Latéro-déviation de la mâchoire", + "slug": "latero-deviation-de-la-machoire" + }, + { + "label": "Mandibular lateral deviation", + "slug": "mandibular-lateral-deviation" + }, + { + "label": "Asymétrie d'usure dentaire (à confirmer par praticien dentaire)", + "slug": "asymetrie-d-usure-dentaire-a-confirmer-par-praticien-dentaire" + }, + { + "label": "Asymmetric dental wear (to confirm with dental practitioner)", + "slug": "asymmetric-dental-wear-to-confirm-with-dental-practitioner" + }, + { + "label": "Déviation à l'ouverture", + "slug": "deviation-a-l-ouverture" + }, + { + "label": "Opening deviation", + "slug": "opening-deviation" + }, + { + "label": "Amplitude asymétrique d'ouverture", + "slug": "amplitude-asymetrique-d-ouverture" + }, + { + "label": "Asymmetric opening amplitude", + "slug": "asymmetric-opening-amplitude" + }, + { + "label": "Réactions de défense au mors", + "slug": "reactions-de-defense-au-mors" + }, + { + "label": "Defense reactions to bit", + "slug": "defense-reactions-to-bit" + }, + { + "label": "Headshaking (secouement de tête)", + "slug": "headshaking-secouement-de-tete" + }, + { + "label": "Headshaking", + "slug": "headshaking" + }, + { + "label": "Inclinaison de tête sous selle", + "slug": "inclinaison-de-tete-sous-selle" + }, + { + "label": "Head tilt under saddle", + "slug": "head-tilt-under-saddle" + }, + { + "label": "Difficulté à mâcher / alimentation lente", + "slug": "difficulte-a-macher-alimentation-lente" + }, + { + "label": "Chewing difficulty / slow eating", + "slug": "chewing-difficulty-slow-eating" + }, + { + "label": "Laisse tomber de la nourriture", + "slug": "laisse-tomber-de-la-nourriture" + }, + { + "label": "Drops food while eating", + "slug": "drops-food-while-eating" + }, + { + "label": "Refus du contact main du cavalier", + "slug": "refus-du-contact-main-du-cavalier" + }, + { + "label": "Refusal of rider's hand contact", + "slug": "refusal-of-rider-s-hand-contact" + }, + { + "label": "Faux pli / fausse incurvation au travail", + "slug": "faux-pli-fausse-incurvation-au-travail" + }, + { + "label": "False bend / curvature at work", + "slug": "false-bend-curvature-at-work" + }, + { + "label": "Suite de soin dentaire", + "slug": "suite-de-soin-dentaire" + }, + { + "label": "Post dental care", + "slug": "post-dental-care" + }, + { + "label": "Restrictions de mobilité de l'appareil hyoïdien", + "slug": "restrictions-de-mobilite-de-l-appareil-hyoidien" + }, + { + "label": "Hyoid apparatus mobility restrictions", + "slug": "hyoid-apparatus-mobility-restrictions" + }, + { + "label": "Déviation latérale palpée", + "slug": "deviation-laterale-palpee" + }, + { + "label": "Palpated lateral deviation", + "slug": "palpated-lateral-deviation" + }, + { + "label": "Restriction du balancier (déglutition)", + "slug": "restriction-du-balancier-deglutition" + }, + { + "label": "Swing restriction (swallowing)", + "slug": "swing-restriction-swallowing" + }, + { + "label": "Tensions musculaires associées", + "slug": "tensions-musculaires-associees" + }, + { + "label": "Associated muscle tensions", + "slug": "associated-muscle-tensions" + }, + { + "label": "Tension des muscles sus-hyoïdiens", + "slug": "tension-des-muscles-sus-hyoidiens" + }, + { + "label": "Suprahyoid muscle tension", + "slug": "suprahyoid-muscle-tension" + }, + { + "label": "Tension des muscles sous-hyoïdiens (sterno-hyoïdien)", + "slug": "tension-des-muscles-sous-hyoidiens-sterno-hyoidien" + }, + { + "label": "Infrahyoid muscle tension (sternohyoid)", + "slug": "infrahyoid-muscle-tension-sternohyoid" + }, + { + "label": "Tension du stylo-hyoïdien (lien temporal/ATM)", + "slug": "tension-du-stylo-hyoidien-lien-temporal-atm" + }, + { + "label": "Stylohyoid tension (temporal/TMJ link)", + "slug": "stylohyoid-tension-temporal-tmj-link" + }, + { + "label": "Tension des muscles de la base de langue", + "slug": "tension-des-muscles-de-la-base-de-langue" + }, + { + "label": "Tongue base muscle tension", + "slug": "tongue-base-muscle-tension" + }, + { + "label": "Dysfonction du stylo-hyal palpée", + "slug": "dysfonction-du-stylo-hyal-palpee" + }, + { + "label": "Palpated stylohyoid bone dysfunction", + "slug": "palpated-stylohyoid-bone-dysfunction" + }, + { + "label": "Dysfonction du basi-hyal palpée", + "slug": "dysfonction-du-basi-hyal-palpee" + }, + { + "label": "Palpated basihyoid dysfunction", + "slug": "palpated-basihyoid-dysfunction" + }, + { + "label": "Réactions de défense au mors / dans le contact", + "slug": "reactions-de-defense-au-mors-dans-le-contact" + }, + { + "label": "Defense reactions to bit / in contact", + "slug": "defense-reactions-to-bit-in-contact" + }, + { + "label": "Langue passée par-dessus le mors rapportée", + "slug": "langue-passee-par-dessus-le-mors-rapportee" + }, + { + "label": "Reported tongue-over-bit", + "slug": "reported-tongue-over-bit" + }, + { + "label": "Difficulté de déglutition rapportée", + "slug": "difficulte-de-deglutition-rapportee" + }, + { + "label": "Reported swallowing difficulty", + "slug": "reported-swallowing-difficulty" + }, + { + "label": "Résistance dans le port de tête", + "slug": "resistance-dans-le-port-de-tete" + }, + { + "label": "Head carriage resistance", + "slug": "head-carriage-resistance" + }, + { + "label": "Restrictions / fixations de la charnière", + "slug": "restrictions-fixations-de-la-charniere" + }, + { + "label": "Junction restrictions / fixations", + "slug": "junction-restrictions-fixations" + }, + { + "label": "Restriction en flexion", + "slug": "restriction-en-flexion" + }, + { + "label": "Flexion restriction", + "slug": "flexion-restriction" + }, + { + "label": "Restriction en extension", + "slug": "restriction-en-extension" + }, + { + "label": "Extension restriction", + "slug": "extension-restriction" + }, + { + "label": "Restriction en latéroflexion", + "slug": "restriction-en-lateroflexion" + }, + { + "label": "Lateroflexion restriction", + "slug": "lateroflexion-restriction" + }, + { + "label": "Restriction en rotation", + "slug": "restriction-en-rotation" + }, + { + "label": "Rotation restriction", + "slug": "rotation-restriction" + }, + { + "label": "Fixation de la charnière", + "slug": "fixation-de-la-charniere" + }, + { + "label": "Junction fixation", + "slug": "junction-fixation" + }, + { + "label": "Tensions musculaires locales", + "slug": "tensions-musculaires-locales" + }, + { + "label": "Local muscle tensions", + "slug": "local-muscle-tensions" + }, + { + "label": "Tension des droits de la tête", + "slug": "tension-des-droits-de-la-tete" + }, + { + "label": "Rectus capitis tension", + "slug": "rectus-capitis-tension" + }, + { + "label": "Tension des obliques de la tête", + "slug": "tension-des-obliques-de-la-tete" + }, + { + "label": "Obliquus capitis tension", + "slug": "obliquus-capitis-tension" + }, + { + "label": "Tension du splénius", + "slug": "tension-du-splenius" + }, + { + "label": "Splenius tension", + "slug": "splenius-tension" + }, + { + "label": "Asymétrie d'amplitude gauche/droite", + "slug": "asymetrie-d-amplitude-gauche-droite" + }, + { + "label": "Left/right amplitude asymmetry", + "slug": "left-right-amplitude-asymmetry" + }, + { + "label": "Asymétrie d'alignement à la jonction observée", + "slug": "asymetrie-d-alignement-a-la-jonction-observee" + }, + { + "label": "Observed junction alignment asymmetry", + "slug": "observed-junction-alignment-asymmetry" + }, + { + "label": "Sensibilité de la nuque rapportée", + "slug": "sensibilite-de-la-nuque-rapportee" + }, + { + "label": "Reported poll sensitivity", + "slug": "reported-poll-sensitivity" + }, + { + "label": "Difficulté de flexion de nuque / port de tête", + "slug": "difficulte-de-flexion-de-nuque-port-de-tete" + }, + { + "label": "Poll flexion difficulty / head carriage", + "slug": "poll-flexion-difficulty-head-carriage" + }, + { + "label": "Résistance à la mise en main", + "slug": "resistance-a-la-mise-en-main" + }, + { + "label": "Resistance to coming on the bit", + "slug": "resistance-to-coming-on-the-bit" + }, + { + "label": "Sensibilité à la palpation rapportée", + "slug": "sensibilite-a-la-palpation-rapportee" + }, + { + "label": "Reported palpation sensitivity", + "slug": "reported-palpation-sensitivity" + }, + { + "label": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "slug": "contexte-de-sellerie-selle-inadaptee-poids-du-cavalier" + }, + { + "label": "Saddle context (ill-fitting saddle, rider weight)", + "slug": "saddle-context-ill-fitting-saddle-rider-weight" + }, + { + "label": "Contexte postural / de travail", + "slug": "contexte-postural-de-travail" + }, + { + "label": "Postural / work context", + "slug": "postural-work-context" + }, + { + "label": "Restrictions / fixations segmentaires", + "slug": "restrictions-fixations-segmentaires" + }, + { + "label": "Segmental restrictions / fixations", + "slug": "segmental-restrictions-fixations" + }, + { + "label": "Fixation segmentaire localisée (C2–C7)", + "slug": "fixation-segmentaire-localisee-c2-c7" + }, + { + "label": "Localized segmental fixation (C2–C7)", + "slug": "localized-segmental-fixation-c2-c7" + }, + { + "label": "Dysfonctions de groupe", + "slug": "dysfonctions-de-groupe" + }, + { + "label": "Group dysfunctions", + "slug": "group-dysfunctions" + }, + { + "label": "Dysfonction de groupe en neutralité (NSR)", + "slug": "dysfonction-de-groupe-en-neutralite-nsr" + }, + { + "label": "Neutral group dysfunction (NSR)", + "slug": "neutral-group-dysfunction-nsr" + }, + { + "label": "Attitude scoliotique fonctionnelle observée", + "slug": "attitude-scoliotique-fonctionnelle-observee" + }, + { + "label": "Observed functional scoliotic attitude", + "slug": "observed-functional-scoliotic-attitude" + }, + { + "label": "Tensions musculaires paravertébrales", + "slug": "tensions-musculaires-paravertebrales" + }, + { + "label": "Paravertebral muscle tensions", + "slug": "paravertebral-muscle-tensions" + }, + { + "label": "Tension du longissimus de la tête / du cou", + "slug": "tension-du-longissimus-de-la-tete-du-cou" + }, + { + "label": "Longissimus capitis / cervicis tension", + "slug": "longissimus-capitis-cervicis-tension" + }, + { + "label": "Tension du scalène", + "slug": "tension-du-scalene" + }, + { + "label": "Scalenus tension", + "slug": "scalenus-tension" + }, + { + "label": "Tension du brachio-céphalique", + "slug": "tension-du-brachio-cephalique" + }, + { + "label": "Brachiocephalicus tension", + "slug": "brachiocephalicus-tension" + }, + { + "label": "Tension du multifide cervical", + "slug": "tension-du-multifide-cervical" + }, + { + "label": "Cervical multifidus tension", + "slug": "cervical-multifidus-tension" + }, + { + "label": "Asymétrie d'incurvation gauche/droite", + "slug": "asymetrie-d-incurvation-gauche-droite" + }, + { + "label": "Left/right bend asymmetry", + "slug": "left-right-bend-asymmetry" + }, + { + "label": "Asymétrie de relief musculaire gauche/droite", + "slug": "asymetrie-de-relief-musculaire-gauche-droite" + }, + { + "label": "Left/right muscle relief asymmetry", + "slug": "left-right-muscle-relief-asymmetry" + }, + { + "label": "Travail monté / locomotion", + "slug": "travail-monte-locomotion" + }, + { + "label": "Ridden work / locomotion", + "slug": "ridden-work-locomotion" + }, + { + "label": "Incurvation difficile d'un côté au travail", + "slug": "incurvation-difficile-d-un-cote-au-travail" + }, + { + "label": "Bend difficulty on one side at work", + "slug": "bend-difficulty-on-one-side-at-work" + }, + { + "label": "Port de tête / encolure anormal rapporté", + "slug": "port-de-tete-encolure-anormal-rapporte" + }, + { + "label": "Reported abnormal head/neck carriage", + "slug": "reported-abnormal-head-neck-carriage" + }, + { + "label": "Résistance au contact / mise en main", + "slug": "resistance-au-contact-mise-en-main" + }, + { + "label": "Contact / on-the-bit resistance", + "slug": "contact-on-the-bit-resistance" + }, + { + "label": "Trébuchements / déficit proprioceptif rapporté", + "slug": "trebuchements-deficit-proprioceptif-rapporte" + }, + { + "label": "Reported stumbling / proprioceptive deficit", + "slug": "reported-stumbling-proprioceptive-deficit" + }, + { + "label": "Raideur nouvelle / récente", + "slug": "raideur-nouvelle-recente" + }, + { + "label": "New / recent stiffness", + "slug": "new-recent-stiffness" + }, + { + "label": "Tension du dentelé ventral du cou", + "slug": "tension-du-dentele-ventral-du-cou" + }, + { + "label": "Ventral serratus tension", + "slug": "ventral-serratus-tension" + }, + { + "label": "Tension des muscles cervicaux profonds", + "slug": "tension-des-muscles-cervicaux-profonds" + }, + { + "label": "Deep cervical muscle tension", + "slug": "deep-cervical-muscle-tension" + }, + { + "label": "Raideur de la base de l'encolure", + "slug": "raideur-de-la-base-de-l-encolure" + }, + { + "label": "Base-of-neck stiffness", + "slug": "base-of-neck-stiffness" + }, + { + "label": "Défaut d'engagement / d'amplitude des antérieurs", + "slug": "defaut-d-engagement-d-amplitude-des-anterieurs" + }, + { + "label": "Lack of forelimb engagement / amplitude", + "slug": "lack-of-forelimb-engagement-amplitude" + }, + { + "label": "Posture d'encolure renversée rapportée", + "slug": "posture-d-encolure-renversee-rapportee" + }, + { + "label": "Reported ewe-neck posture", + "slug": "reported-ewe-neck-posture" + }, + { + "label": "Boiterie antérieure rapportée", + "slug": "boiterie-anterieure-rapportee" + }, + { + "label": "Reported forelimb lameness", + "slug": "reported-forelimb-lameness" + }, + { + "label": "Restriction en abduction/adduction", + "slug": "restriction-en-abduction-adduction" + }, + { + "label": "Abduction/adduction restriction", + "slug": "abduction-adduction-restriction" + }, + { + "label": "Restriction de glissement cranio-caudal", + "slug": "restriction-de-glissement-cranio-caudal" + }, + { + "label": "Cranio-caudal glide restriction", + "slug": "cranio-caudal-glide-restriction" + }, + { + "label": "Tensions musculaires péri-articulaires", + "slug": "tensions-musculaires-peri-articulaires" + }, + { + "label": "Peri-articular muscle tensions", + "slug": "peri-articular-muscle-tensions" + }, + { + "label": "Tension du sus-/sous-épineux", + "slug": "tension-du-sus-sous-epineux" + }, + { + "label": "Supraspinatus / infraspinatus tension", + "slug": "supraspinatus-infraspinatus-tension" + }, + { + "label": "Tension du sous-scapulaire", + "slug": "tension-du-sous-scapulaire" + }, + { + "label": "Subscapularis tension", + "slug": "subscapularis-tension" + }, + { + "label": "Tension du deltoïde", + "slug": "tension-du-deltoide" + }, + { + "label": "Deltoid tension", + "slug": "deltoid-tension" + }, + { + "label": "Tension du biceps brachial", + "slug": "tension-du-biceps-brachial" + }, + { + "label": "Biceps brachii tension", + "slug": "biceps-brachii-tension" + }, + { + "label": "Asymétrie de report de poids au repos", + "slug": "asymetrie-de-report-de-poids-au-repos" + }, + { + "label": "Resting weight-bearing asymmetry", + "slug": "resting-weight-bearing-asymmetry" + }, + { + "label": "Asymétrie de position de la scapula", + "slug": "asymetrie-de-position-de-la-scapula" + }, + { + "label": "Scapular position asymmetry", + "slug": "scapular-position-asymmetry" + }, + { + "label": "Locomotion / travail monté", + "slug": "locomotion-travail-monte" + }, + { + "label": "Locomotion / ridden work", + "slug": "locomotion-ridden-work" + }, + { + "label": "Difficulté / refus au départ au galop", + "slug": "difficulte-refus-au-depart-au-galop" + }, + { + "label": "Difficulty / refusal at canter departure", + "slug": "difficulty-refusal-at-canter-departure" + }, + { + "label": "Reculer difficile ou de travers", + "slug": "reculer-difficile-ou-de-travers" + }, + { + "label": "Difficult or crooked backing", + "slug": "difficult-or-crooked-backing" + }, + { + "label": "Défaut d'engagement / d'amplitude du membre", + "slug": "defaut-d-engagement-d-amplitude-du-membre" + }, + { + "label": "Lack of limb engagement / amplitude", + "slug": "lack-of-limb-engagement-amplitude" + }, + { + "label": "Difficulté / refus à l'obstacle", + "slug": "difficulte-refus-a-l-obstacle" + }, + { + "label": "Difficulty / refusal at jumping", + "slug": "difficulty-refusal-at-jumping" + }, + { + "label": "Phase antérieure du pas raccourcie rapportée", + "slug": "phase-anterieure-du-pas-raccourcie-rapportee" + }, + { + "label": "Reported shortened cranial stride phase", + "slug": "reported-shortened-cranial-stride-phase" + }, + { + "label": "Boiterie rapportée (membre concerné)", + "slug": "boiterie-rapportee-membre-concerne" + }, + { + "label": "Reported lameness (affected limb)", + "slug": "reported-lameness-affected-limb" + }, + { + "label": "Contexte sportif (discipline, intensité, sol)", + "slug": "contexte-sportif-discipline-intensite-sol" + }, + { + "label": "Sport context (discipline, intensity, footing)", + "slug": "sport-context-discipline-intensity-footing" + }, + { + "label": "Contexte postural / d'aplombs", + "slug": "contexte-postural-d-aplombs" + }, + { + "label": "Postural / conformation context", + "slug": "postural-conformation-context" + }, + { + "label": "Restriction en jeu latéro-médial", + "slug": "restriction-en-jeu-latero-medial" + }, + { + "label": "Lateromedial play restriction", + "slug": "lateromedial-play-restriction" + }, + { + "label": "Tension du triceps brachial", + "slug": "tension-du-triceps-brachial" + }, + { + "label": "Triceps brachii tension", + "slug": "triceps-brachii-tension" + }, + { + "label": "Tension du biceps / brachial", + "slug": "tension-du-biceps-brachial" + }, + { + "label": "Biceps / brachialis tension", + "slug": "biceps-brachialis-tension" + }, + { + "label": "Tension des origines des extenseurs du carpe", + "slug": "tension-des-origines-des-extenseurs-du-carpe" + }, + { + "label": "Carpal extensors origin tension", + "slug": "carpal-extensors-origin-tension" + }, + { + "label": "Tension des origines des fléchisseurs du carpe", + "slug": "tension-des-origines-des-flechisseurs-du-carpe" + }, + { + "label": "Carpal flexors origin tension", + "slug": "carpal-flexors-origin-tension" + }, + { + "label": "Tension des tendons fléchisseurs digitaux palpée", + "slug": "tension-des-tendons-flechisseurs-digitaux-palpee" + }, + { + "label": "Palpated digital flexor tendons tension", + "slug": "palpated-digital-flexor-tendons-tension" + }, + { + "label": "Tension du tendon extenseur digital", + "slug": "tension-du-tendon-extenseur-digital" + }, + { + "label": "Digital extensor tendon tension", + "slug": "digital-extensor-tendon-tension" + }, + { + "label": "Tension de la fascia palmaire", + "slug": "tension-de-la-fascia-palmaire" + }, + { + "label": "Palmar fascia tension", + "slug": "palmar-fascia-tension" + }, + { + "label": "Asymétrie d'axe du boulet observée", + "slug": "asymetrie-d-axe-du-boulet-observee" + }, + { + "label": "Observed fetlock axis asymmetry", + "slug": "observed-fetlock-axis-asymmetry" + }, + { + "label": "Restrictions de mobilité", + "slug": "restrictions-de-mobilite" + }, + { + "label": "Mobility restrictions", + "slug": "mobility-restrictions" + }, + { + "label": "Restriction de glissement sésamoïdien", + "slug": "restriction-de-glissement-sesamoidien" + }, + { + "label": "Sesamoid glide restriction", + "slug": "sesamoid-glide-restriction" + }, + { + "label": "Restriction du sésamoïde médial", + "slug": "restriction-du-sesamoide-medial" + }, + { + "label": "Medial sesamoid restriction", + "slug": "medial-sesamoid-restriction" + }, + { + "label": "Restriction du sésamoïde latéral", + "slug": "restriction-du-sesamoide-lateral" + }, + { + "label": "Lateral sesamoid restriction", + "slug": "lateral-sesamoid-restriction" + }, + { + "label": "Tensions ligamentaires / tendineuses associées", + "slug": "tensions-ligamentaires-tendineuses-associees" + }, + { + "label": "Associated ligamentous / tendinous tensions", + "slug": "associated-ligamentous-tendinous-tensions" + }, + { + "label": "Tension du ligament inter-sésamoïdien palpée", + "slug": "tension-du-ligament-inter-sesamoidien-palpee" + }, + { + "label": "Palpated intersesamoidean ligament tension", + "slug": "palpated-intersesamoidean-ligament-tension" + }, + { + "label": "Restriction de glissement du tendon fléchisseur", + "slug": "restriction-de-glissement-du-tendon-flechisseur" + }, + { + "label": "Flexor tendon glide restriction", + "slug": "flexor-tendon-glide-restriction" + }, + { + "label": "Asymétrie de position sésamoïdienne palpée", + "slug": "asymetrie-de-position-sesamoidienne-palpee" + }, + { + "label": "Palpated sesamoid position asymmetry", + "slug": "palpated-sesamoid-position-asymmetry" + }, + { + "label": "Sensibilité locale rapportée", + "slug": "sensibilite-locale-rapportee" + }, + { + "label": "Reported local sensitivity", + "slug": "reported-local-sensitivity" + }, + { + "label": "Foulée antérieure raccourcie rapportée", + "slug": "foulee-anterieure-raccourcie-rapportee" + }, + { + "label": "Reported shortened forelimb stride", + "slug": "reported-shortened-forelimb-stride" + }, + { + "label": "Fixation segmentaire localisée (T1–T18)", + "slug": "fixation-segmentaire-localisee-t1-t18" + }, + { + "label": "Localized segmental fixation (T1–T18)", + "slug": "localized-segmental-fixation-t1-t18" + }, + { + "label": "Restrictions costo-vertébrales", + "slug": "restrictions-costo-vertebrales" + }, + { + "label": "Costovertebral restrictions", + "slug": "costovertebral-restrictions" + }, + { + "label": "Restriction de tête de côte", + "slug": "restriction-de-tete-de-cote" + }, + { + "label": "Rib head restriction", + "slug": "rib-head-restriction" + }, + { + "label": "Restriction costale au mouvement respiratoire", + "slug": "restriction-costale-au-mouvement-respiratoire" + }, + { + "label": "Costal respiratory motion restriction", + "slug": "costal-respiratory-motion-restriction" + }, + { + "label": "Tension du long dorsal (longissimus)", + "slug": "tension-du-long-dorsal-longissimus" + }, + { + "label": "Longissimus tension", + "slug": "longissimus-tension" + }, + { + "label": "Tension de l'ilio-costal", + "slug": "tension-de-l-ilio-costal" + }, + { + "label": "Iliocostalis tension", + "slug": "iliocostalis-tension" + }, + { + "label": "Tension du trapèze", + "slug": "tension-du-trapeze" + }, + { + "label": "Trapezius tension", + "slug": "trapezius-tension" + }, + { + "label": "Tension du grand dorsal", + "slug": "tension-du-grand-dorsal" + }, + { + "label": "Latissimus dorsi tension", + "slug": "latissimus-dorsi-tension" + }, + { + "label": "Asymétrie de la région du garrot observée", + "slug": "asymetrie-de-la-region-du-garrot-observee" + }, + { + "label": "Observed withers region asymmetry", + "slug": "observed-withers-region-asymmetry" + }, + { + "label": "Sensibilité de la région de la selle rapportée", + "slug": "sensibilite-de-la-region-de-la-selle-rapportee" + }, + { + "label": "Reported saddle-region sensitivity", + "slug": "reported-saddle-region-sensitivity" + }, + { + "label": "Dos froid / défense à la mise en selle rapportée", + "slug": "dos-froid-defense-a-la-mise-en-selle-rapportee" + }, + { + "label": "Reported cold-backed / mounting defense", + "slug": "reported-cold-backed-mounting-defense" + }, + { + "label": "Défaut de transmission dos / arrière-main", + "slug": "defaut-de-transmission-dos-arriere-main" + }, + { + "label": "Lack of back / hindquarter transmission", + "slug": "lack-of-back-hindquarter-transmission" + }, + { + "label": "Sauts de mouton / coups de cul au travail", + "slug": "sauts-de-mouton-coups-de-cul-au-travail" + }, + { + "label": "Bucking at work", + "slug": "bucking-at-work" + }, + { + "label": "Défense / sensibilité au sanglage", + "slug": "defense-sensibilite-au-sanglage" + }, + { + "label": "Girthing defense / sensitivity", + "slug": "girthing-defense-sensitivity" + }, + { + "label": "Tension du fascia thoraco-lombaire", + "slug": "tension-du-fascia-thoraco-lombaire" + }, + { + "label": "Thoracolumbar fascia tension", + "slug": "thoracolumbar-fascia-tension" + }, + { + "label": "Perte de mobilité du dos à la jonction rapportée", + "slug": "perte-de-mobilite-du-dos-a-la-jonction-rapportee" + }, + { + "label": "Reported back mobility loss at junction", + "slug": "reported-back-mobility-loss-at-junction" + }, + { + "label": "Sensibilité à l'arrière de la selle rapportée", + "slug": "sensibilite-a-l-arriere-de-la-selle-rapportee" + }, + { + "label": "Reported rear-saddle sensitivity", + "slug": "reported-rear-saddle-sensitivity" + }, + { + "label": "Défaut de transmission avant-main / arrière-main", + "slug": "defaut-de-transmission-avant-main-arriere-main" + }, + { + "label": "Fore/hindquarter transmission defect", + "slug": "fore-hindquarter-transmission-defect" + }, + { + "label": "Fixation segmentaire localisée (L1–L6)", + "slug": "fixation-segmentaire-localisee-l1-l6" + }, + { + "label": "Localized segmental fixation (L1–L6)", + "slug": "localized-segmental-fixation-l1-l6" + }, + { + "label": "Tension du psoas / muscles sous-lombaires", + "slug": "tension-du-psoas-muscles-sous-lombaires" + }, + { + "label": "Psoas / sublumbar muscle tension", + "slug": "psoas-sublumbar-muscle-tension" + }, + { + "label": "Bascule / asymétrie du bassin observée", + "slug": "bascule-asymetrie-du-bassin-observee" + }, + { + "label": "Observed pelvic tilt / asymmetry", + "slug": "observed-pelvic-tilt-asymmetry" + }, + { + "label": "Dos creusé / sensible sous le cavalier", + "slug": "dos-creuse-sensible-sous-le-cavalier" + }, + { + "label": "Hollow / sensitive back under rider", + "slug": "hollow-sensitive-back-under-rider" + }, + { + "label": "Défaut d'engagement des postérieurs", + "slug": "defaut-d-engagement-des-posterieurs" + }, + { + "label": "Lack of hindlimb engagement", + "slug": "lack-of-hindlimb-engagement" + }, + { + "label": "Cheval qui se bloque au travail", + "slug": "cheval-qui-se-bloque-au-travail" + }, + { + "label": "Horse that locks up at work", + "slug": "horse-that-locks-up-at-work" + }, + { + "label": "Tension des fessiers", + "slug": "tension-des-fessiers" + }, + { + "label": "Gluteal tension", + "slug": "gluteal-tension" + }, + { + "label": "Galop désuni / qualité du galop rapportée", + "slug": "galop-desuni-qualite-du-galop-rapportee" + }, + { + "label": "Reported disunited / poor-quality canter", + "slug": "reported-disunited-poor-quality-canter" + }, + { + "label": "Défaut de propulsion à l'obstacle", + "slug": "defaut-de-propulsion-a-l-obstacle" + }, + { + "label": "Lack of propulsion at jumping", + "slug": "lack-of-propulsion-at-jumping" + }, + { + "label": "Restrictions de mobilité sacrée", + "slug": "restrictions-de-mobilite-sacree" + }, + { + "label": "Sacral mobility restrictions", + "slug": "sacral-mobility-restrictions" + }, + { + "label": "Restriction en nutation", + "slug": "restriction-en-nutation" + }, + { + "label": "Nutation restriction", + "slug": "nutation-restriction" + }, + { + "label": "Restriction en contre-nutation", + "slug": "restriction-en-contre-nutation" + }, + { + "label": "Counternutation restriction", + "slug": "counternutation-restriction" + }, + { + "label": "Torsion sacrée palpée", + "slug": "torsion-sacree-palpee" + }, + { + "label": "Palpated sacral torsion", + "slug": "palpated-sacral-torsion" + }, + { + "label": "Latéralisation sacrée palpée", + "slug": "lateralisation-sacree-palpee" + }, + { + "label": "Palpated sacral lateralisation", + "slug": "palpated-sacral-lateralisation" + }, + { + "label": "Tension des muscles sacro-caudaux", + "slug": "tension-des-muscles-sacro-caudaux" + }, + { + "label": "Sacrocaudalis tension", + "slug": "sacrocaudalis-tension" + }, + { + "label": "Asymétrie des tubérosités sacrales observée", + "slug": "asymetrie-des-tuberosites-sacrales-observee" + }, + { + "label": "Observed tuber sacrale asymmetry", + "slug": "observed-tuber-sacrale-asymmetry" + }, + { + "label": "Obliquité du bassin observée", + "slug": "obliquite-du-bassin-observee" + }, + { + "label": "Observed pelvic obliquity", + "slug": "observed-pelvic-obliquity" + }, + { + "label": "Défaut de propulsion des postérieurs", + "slug": "defaut-de-propulsion-des-posterieurs" + }, + { + "label": "Lack of hindlimb propulsion", + "slug": "lack-of-hindlimb-propulsion" + }, + { + "label": "Postérieurs sautillant ensemble rapporté", + "slug": "posterieurs-sautillant-ensemble-rapporte" + }, + { + "label": "Reported bunny-hopping behind", + "slug": "reported-bunny-hopping-behind" + }, + { + "label": "Port de queue anormal rapporté", + "slug": "port-de-queue-anormal-rapporte" + }, + { + "label": "Reported abnormal tail carriage", + "slug": "reported-abnormal-tail-carriage" + }, + { + "label": "Restriction de rotation iliaque", + "slug": "restriction-de-rotation-iliaque" + }, + { + "label": "Iliac rotation restriction", + "slug": "iliac-rotation-restriction" + }, + { + "label": "Restriction de cisaillement / glissement", + "slug": "restriction-de-cisaillement-glissement" + }, + { + "label": "Shear / glide restriction", + "slug": "shear-glide-restriction" + }, + { + "label": "Tension du moyen fessier", + "slug": "tension-du-moyen-fessier" + }, + { + "label": "Gluteus medius tension", + "slug": "gluteus-medius-tension" + }, + { + "label": "Tension du biceps fémoral", + "slug": "tension-du-biceps-femoral" + }, + { + "label": "Biceps femoris tension", + "slug": "biceps-femoris-tension" + }, + { + "label": "Tension du ligament sacro-sciatique palpée", + "slug": "tension-du-ligament-sacro-sciatique-palpee" + }, + { + "label": "Palpated sacrosciatic ligament tension", + "slug": "palpated-sacrosciatic-ligament-tension" + }, + { + "label": "Asymétrie des pointes de hanche observée", + "slug": "asymetrie-des-pointes-de-hanche-observee" + }, + { + "label": "Observed tuber coxae asymmetry", + "slug": "observed-tuber-coxae-asymmetry" + }, + { + "label": "Galop désuni / changements de pied difficiles", + "slug": "galop-desuni-changements-de-pied-difficiles" + }, + { + "label": "Disunited canter / difficult flying changes", + "slug": "disunited-canter-difficult-flying-changes" + }, + { + "label": "Asymétrie de croupe rapportée", + "slug": "asymetrie-de-croupe-rapportee" + }, + { + "label": "Reported croup asymmetry", + "slug": "reported-croup-asymmetry" + }, + { + "label": "Boiterie postérieure rapportée", + "slug": "boiterie-posterieure-rapportee" + }, + { + "label": "Reported hindlimb lameness", + "slug": "reported-hindlimb-lameness" + }, + { + "label": "Tension du groupe fessier", + "slug": "tension-du-groupe-fessier" + }, + { + "label": "Gluteal group tension", + "slug": "gluteal-group-tension" + }, + { + "label": "Tension de l'ilio-psoas", + "slug": "tension-de-l-ilio-psoas" + }, + { + "label": "Iliopsoas tension", + "slug": "iliopsoas-tension" + }, + { + "label": "Tension des adducteurs", + "slug": "tension-des-adducteurs" + }, + { + "label": "Adductors tension", + "slug": "adductors-tension" + }, + { + "label": "Asymétrie de croupe observée", + "slug": "asymetrie-de-croupe-observee" + }, + { + "label": "Observed croup asymmetry", + "slug": "observed-croup-asymmetry" + }, + { + "label": "Restriction de glissement rotulien", + "slug": "restriction-de-glissement-rotulien" + }, + { + "label": "Patellar glide restriction", + "slug": "patellar-glide-restriction" + }, + { + "label": "Restriction de rotation tibiale", + "slug": "restriction-de-rotation-tibiale" + }, + { + "label": "Tibial rotation restriction", + "slug": "tibial-rotation-restriction" + }, + { + "label": "Tension du quadriceps fémoral", + "slug": "tension-du-quadriceps-femoral" + }, + { + "label": "Quadriceps femoris tension", + "slug": "quadriceps-femoris-tension" + }, + { + "label": "Tension des ischio-jambiers", + "slug": "tension-des-ischio-jambiers" + }, + { + "label": "Hamstring tension", + "slug": "hamstring-tension" + }, + { + "label": "Tension du tenseur du fascia lata", + "slug": "tension-du-tenseur-du-fascia-lata" + }, + { + "label": "Tensor fasciae latae tension", + "slug": "tensor-fasciae-latae-tension" + }, + { + "label": "Latéro-déviation rotulienne observée", + "slug": "latero-deviation-rotulienne-observee" + }, + { + "label": "Observed patellar lateral deviation", + "slug": "observed-patellar-lateral-deviation" + }, + { + "label": "Accrochement rotulien intermittent rapporté", + "slug": "accrochement-rotulien-intermittent-rapporte" + }, + { + "label": "Reported intermittent patellar catching", + "slug": "reported-intermittent-patellar-catching" + }, + { + "label": "Restriction de rotation (tarso-crural)", + "slug": "restriction-de-rotation-tarso-crural" + }, + { + "label": "Rotation restriction (tarsocrural)", + "slug": "rotation-restriction-tarsocrural" + }, + { + "label": "Restriction de jeu des petites articulations tarsiennes", + "slug": "restriction-de-jeu-des-petites-articulations-tarsiennes" + }, + { + "label": "Small tarsal joints play restriction", + "slug": "small-tarsal-joints-play-restriction" + }, + { + "label": "Tension du gastrocnémien", + "slug": "tension-du-gastrocnemien" + }, + { + "label": "Gastrocnemius tension", + "slug": "gastrocnemius-tension" + }, + { + "label": "Tension du péronier tiers / appareil réciproque", + "slug": "tension-du-peronier-tiers-appareil-reciproque" + }, + { + "label": "Peroneus tertius / reciprocal apparatus tension", + "slug": "peroneus-tertius-reciprocal-apparatus-tension" + }, + { + "label": "Tension du fléchisseur profond du doigt", + "slug": "tension-du-flechisseur-profond-du-doigt" + }, + { + "label": "Deep digital flexor tension", + "slug": "deep-digital-flexor-tension" + }, + { + "label": "Tension du tibial crânial", + "slug": "tension-du-tibial-cranial" + }, + { + "label": "Cranial tibial tension", + "slug": "cranial-tibial-tension" + }, + { + "label": "Asymétrie d'axe du jarret observée", + "slug": "asymetrie-d-axe-du-jarret-observee" + }, + { + "label": "Observed hock axis asymmetry", + "slug": "observed-hock-axis-asymmetry" + }, + { + "label": "Tension de la fascia plantaire", + "slug": "tension-de-la-fascia-plantaire" + }, + { + "label": "Plantar fascia tension", + "slug": "plantar-fascia-tension" + }, + { + "label": "Restriction dorso-ventrale", + "slug": "restriction-dorso-ventrale" + }, + { + "label": "Dorsoventral restriction", + "slug": "dorsoventral-restriction" + }, + { + "label": "Fixation segmentaire localisée", + "slug": "fixation-segmentaire-localisee" + }, + { + "label": "Localized segmental fixation", + "slug": "localized-segmental-fixation" + }, + { + "label": "Tension du sacro-caudal dorsal", + "slug": "tension-du-sacro-caudal-dorsal" + }, + { + "label": "Sacrocaudalis dorsalis tension", + "slug": "sacrocaudalis-dorsalis-tension" + }, + { + "label": "Tension du sacro-caudal ventral", + "slug": "tension-du-sacro-caudal-ventral" + }, + { + "label": "Sacrocaudalis ventralis tension", + "slug": "sacrocaudalis-ventralis-tension" + }, + { + "label": "Tension du coccygien", + "slug": "tension-du-coccygien" + }, + { + "label": "Coccygeus tension", + "slug": "coccygeus-tension" + }, + { + "label": "Déviation latérale de la queue observée", + "slug": "deviation-laterale-de-la-queue-observee" + }, + { + "label": "Observed lateral tail deviation", + "slug": "observed-lateral-tail-deviation" + }, + { + "label": "Asymétrie de port de queue observée", + "slug": "asymetrie-de-port-de-queue-observee" + }, + { + "label": "Observed tail carriage asymmetry", + "slug": "observed-tail-carriage-asymmetry" + }, + { + "label": "Queue serrée / plaquée rapportée", + "slug": "queue-serree-plaquee-rapportee" + }, + { + "label": "Reported clamped tail", + "slug": "reported-clamped-tail" + }, + { + "label": "Battements de queue répétés au travail", + "slug": "battements-de-queue-repetes-au-travail" + }, + { + "label": "Repeated tail swishing at work", + "slug": "repeated-tail-swishing-at-work" + }, + { + "label": "Déviation nouvelle de la queue rapportée", + "slug": "deviation-nouvelle-de-la-queue-rapportee" + }, + { + "label": "Reported new tail deviation", + "slug": "reported-new-tail-deviation" + }, + { + "label": "Sensibilité à la manipulation de la queue rapportée", + "slug": "sensibilite-a-la-manipulation-de-la-queue-rapportee" + }, + { + "label": "Reported tail-handling sensitivity", + "slug": "reported-tail-handling-sensitivity" + }, + { + "label": "Vertebral junctions", + "slug": "vertebral-junctions" + }, + { + "label": "Segments vertébraux", + "slug": "segments-vertebraux" + }, + { + "label": "Vertebral segments", + "slug": "vertebral-segments" + }, + { + "label": "Os du crâne", + "slug": "os-du-crane" + }, + { + "label": "Cranial bones", + "slug": "cranial-bones" + }, + { + "label": "Vue latérale gauche", + "slug": "vue-laterale-gauche" + }, + { + "label": "Left lateral view", + "slug": "left-lateral-view" + }, + { + "label": "Tête (vue latérale gauche)", + "slug": "tete-vue-laterale-gauche" + }, + { + "label": "Head (left lateral view)", + "slug": "head-left-lateral-view" + }, + { + "label": "Boulet postérieur (métatarso-phalangien)", + "slug": "boulet-posterieur-metatarso-phalangien" + }, + { + "label": "Jarret (tarso-crurale et intertarsiennes)", + "slug": "jarret-tarso-crurale-et-intertarsiennes" + }, + { + "label": "Hock (tarsal joints)", + "slug": "hock-tarsal-joints" + }, + { + "label": "Grasset (fémoro-tibiale et fémoro-patellaire)", + "slug": "grasset-femoro-tibiale-et-femoro-patellaire" + }, + { + "label": "Stifle joint", + "slug": "stifle-joint" + }, + { + "label": "Articulation sacro-iliaque", + "slug": "articulation-sacro-iliaque" + }, + { + "label": "Sacroiliac joint", + "slug": "sacroiliac-joint" + }, + { + "label": "Coude (huméro-radio-ulnaire)", + "slug": "coude-humero-radio-ulnaire" + }, + { + "label": "Carpe (antébrachio-carpienne, médio-carpienne)", + "slug": "carpe-antebrachio-carpienne-medio-carpienne" + }, + { + "label": "Carpus (carpal joints)", + "slug": "carpus-carpal-joints" + }, + { + "label": "Boulet antérieur (métacarpo-phalangien)", + "slug": "boulet-anterieur-metacarpo-phalangien" + }, + { + "label": "Sésamoïdes antérieurs (boulet)", + "slug": "sesamoides-anterieurs-boulet" + }, + { + "label": "Forelimb sesamoids", + "slug": "forelimb-sesamoids" + }, + { + "label": "L6-S1 junction (lumbosacral joint)", + "slug": "l6-s1-junction-lumbosacral-joint" + }, + { + "label": "Charnière T18-L1 (thoraco-lombaire)", + "slug": "charniere-t18-l1-thoraco-lombaire" + }, + { + "label": "T18-L1 junction (thoracolumbar)", + "slug": "t18-l1-junction-thoracolumbar" + }, + { + "label": "C7-T1 junction (cervicothoracic)", + "slug": "c7-t1-junction-cervicothoracic" + }, + { + "label": "Caudal vertebrae", + "slug": "caudal-vertebrae" + }, + { + "label": "Sacral vertebrae", + "slug": "sacral-vertebrae" + }, + { + "label": "Lumbar vertebrae", + "slug": "lumbar-vertebrae" + }, + { + "label": "Thoracic vertebrae", + "slug": "thoracic-vertebrae" + }, + { + "label": "Cervical vertebrae", + "slug": "cervical-vertebrae" + }, + { + "label": "Sphenoid bone", + "slug": "sphenoid-bone" + }, + { + "label": "Temporal bone", + "slug": "temporal-bone" + }, + { + "label": "Occipital bone", + "slug": "occipital-bone" + }, + { + "label": "Articulation temporo-mandibulaire (ATM)", + "slug": "articulation-temporo-mandibulaire-atm" + }, + { + "label": "Temporomandibular joint (TMJ)", + "slug": "temporomandibular-joint-tmj" + }, + { + "label": "Synchondrose sphéno-occipitale (SSB)", + "slug": "synchondrose-spheno-occipitale-ssb" + }, + { + "label": "Spheno-occipital synchondrosis (SBS)", + "slug": "spheno-occipital-synchondrosis-sbs" + }, + { + "label": "Appareil hyoïdien", + "slug": "appareil-hyoidien" + }, + { + "label": "Hyoid apparatus", + "slug": "hyoid-apparatus" + }, + { + "label": "Charnière C0-C1 (atlanto-occipitale)", + "slug": "charniere-c0-c1-atlanto-occipitale" + }, + { + "label": "C0-C1 junction (atlanto-occipital joint)", + "slug": "c0-c1-junction-atlanto-occipital-joint" + }, + { + "label": "Dysfonctions de mobilité", + "slug": "dysfonctions-de-mobilite" + }, + { + "label": "Mobility dysfunctions", + "slug": "mobility-dysfunctions" + }, + { + "label": "Dysfonctions intra-osseuses", + "slug": "dysfonctions-intra-osseuses" + }, + { + "label": "Intra-osseous dysfunctions", + "slug": "intra-osseous-dysfunctions" + }, + { + "label": "Compression de l'os interpariétal", + "slug": "compression-de-l-os-interparietal" + }, + { + "label": "Interparietal bone compression", + "slug": "interparietal-bone-compression" + }, + { + "label": "Suture sagittale (entre les deux pariétaux)", + "slug": "suture-sagittale-entre-les-deux-parietaux" + }, + { + "label": "Sagittal suture (between the two parietals)", + "slug": "sagittal-suture-between-the-two-parietals" + }, + { + "label": "Postural context (tack, working position)", + "slug": "postural-context-tack-working-position" + }, + { + "label": "Compression interfrontale (suture interfrontale persistante)", + "slug": "compression-interfrontale-suture-interfrontale-persistante" + }, + { + "label": "Interfrontal compression (persistent interfrontal suture)", + "slug": "interfrontal-compression-persistent-interfrontal-suture" + }, + { + "label": "Suture interfrontale", + "slug": "suture-interfrontale" + }, + { + "label": "Interfrontal suture", + "slug": "interfrontal-suture" + }, + { + "label": "En flexion", + "slug": "en-flexion" + }, + { + "label": "En extension", + "slug": "en-extension" + }, + { + "label": "Dysfonction de la synchondrose intersphénoïdale (présphénoïde / basisphénoïde)", + "slug": "dysfonction-de-la-synchondrose-intersphenoidale-presphenoide-bas" + }, + { + "label": "Intersphenoid synchondrosis dysfunction (presphenoid / basisphenoid)", + "slug": "intersphenoid-synchondrosis-dysfunction-presphenoid-basisphenoid" + }, + { + "label": "Dysfonction des ailes orbitaires (petites ailes)", + "slug": "dysfonction-des-ailes-orbitaires-petites-ailes" + }, + { + "label": "Orbital wings (lesser wings) dysfunction", + "slug": "orbital-wings-lesser-wings-dysfunction" + }, + { + "label": "Dysfonction des ailes temporales (grandes ailes)", + "slug": "dysfonction-des-ailes-temporales-grandes-ailes" + }, + { + "label": "Temporal wings (greater wings) dysfunction", + "slug": "temporal-wings-greater-wings-dysfunction" + }, + { + "label": "Restrictions des sutures et synchondroses", + "slug": "restrictions-des-sutures-et-synchondroses" + }, + { + "label": "Suture and synchondrosis restrictions", + "slug": "suture-and-synchondrosis-restrictions" + }, + { + "label": "Suture sphéno-frontale", + "slug": "suture-spheno-frontale" + }, + { + "label": "Sphenofrontal suture", + "slug": "sphenofrontal-suture" + }, + { + "label": "Suture sphéno-pariétale (contact ponctuel)", + "slug": "suture-spheno-parietale-contact-ponctuel" + }, + { + "label": "Sphenoparietal suture (point contact)", + "slug": "sphenoparietal-suture-point-contact" + }, + { + "label": "Suture ptérygo-sphénoïdale", + "slug": "suture-pterygo-sphenoidale" + }, + { + "label": "Pterygosphenoid suture", + "slug": "pterygosphenoid-suture" + }, + { + "label": "Suture vomérosphénoïdale", + "slug": "suture-vomerosphenoidale" + }, + { + "label": "Vomerosphenoid suture", + "slug": "vomerosphenoid-suture" + }, + { + "label": "Suture sphéno-maxillaire (contact non documenté chez le cheval)", + "slug": "suture-spheno-maxillaire-contact-non-documente-chez-le-cheval" + }, + { + "label": "Sphenomaxillary suture (contact not documented in the horse)", + "slug": "sphenomaxillary-suture-contact-not-documented-in-the-horse" + }, + { + "label": "Synchondrose sphéno-pétreuse", + "slug": "synchondrose-spheno-petreuse" + }, + { + "label": "Sphenopetrosal synchondrosis", + "slug": "sphenopetrosal-synchondrosis" + }, + { + "label": "Dysfonction de la fissure pétro-squameuse", + "slug": "dysfonction-de-la-fissure-petro-squameuse" + }, + { + "label": "Petrosquamous fissure dysfunction", + "slug": "petrosquamous-fissure-dysfunction" + }, + { + "label": "Synchondrose pétro-occipitale", + "slug": "synchondrose-petro-occipitale" + }, + { + "label": "Petro-occipital synchondrosis", + "slug": "petro-occipital-synchondrosis" + }, + { + "label": "Dysfonction de l'écaille occipitale (supra-occipital)", + "slug": "dysfonction-de-l-ecaille-occipitale-supra-occipital" + }, + { + "label": "Dysfonction des parties latérales (condylaires, exo-occipital)", + "slug": "dysfonction-des-parties-laterales-condylaires-exo-occipital" + }, + { + "label": "Lateral (condylar) parts dysfunction (exoccipital)", + "slug": "lateral-condylar-parts-dysfunction-exoccipital" + }, + { + "label": "Dysfonction de la partie basilaire (basi-occipital)", + "slug": "dysfonction-de-la-partie-basilaire-basi-occipital" + }, + { + "label": "Basilar part dysfunction (basioccipital)", + "slug": "basilar-part-dysfunction-basioccipital" + }, + { + "label": "Suture occipito-interpariétale", + "slug": "suture-occipito-interparietale" + }, + { + "label": "Occipito-interparietal suture", + "slug": "occipito-interparietal-suture" + }, + { + "label": "Chute à la renverse ou traumatisme de la nuque chez le jeune cheval", + "slug": "chute-a-la-renverse-ou-traumatisme-de-la-nuque-chez-le-jeune-che" + }, + { + "label": "Rearing over backwards or poll trauma in a young horse", + "slug": "rearing-over-backwards-or-poll-trauma-in-a-young-horse" + }, + { + "label": "Synchondrose sphéno-occipitale (SSB, sphéno-basilaire)", + "slug": "synchondrose-spheno-occipitale-ssb-spheno-basilaire" + }, + { + "label": "Spheno-occipital synchondrosis (SBS, sphenobasilar)", + "slug": "spheno-occipital-synchondrosis-sbs-sphenobasilar" + }, + { + "label": "Dysfonctions physiologiques (schémas de la SSB)", + "slug": "dysfonctions-physiologiques-schemas-de-la-ssb" + }, + { + "label": "Physiological dysfunctions (SBS patterns)", + "slug": "physiological-dysfunctions-sbs-patterns" + }, + { + "label": "Dysfonctions non physiologiques / traumatiques", + "slug": "dysfonctions-non-physiologiques-traumatiques" + }, + { + "label": "Non-physiological / traumatic dysfunctions", + "slug": "non-physiological-traumatic-dysfunctions" + }, + { + "label": "Restriction en protraction / rétraction", + "slug": "restriction-en-protraction-retraction" + }, + { + "label": "Protrusion / retrusion restriction", + "slug": "protrusion-retrusion-restriction" + }, + { + "label": "Tension des ptérygoïdiens médial et latéral", + "slug": "tension-des-pterygoidiens-medial-et-lateral" + }, + { + "label": "Medial and lateral pterygoid tension", + "slug": "medial-and-lateral-pterygoid-tension" + }, + { + "label": "Tension du digastrique (ouverture de la bouche)", + "slug": "tension-du-digastrique-ouverture-de-la-bouche" + }, + { + "label": "Digastricus tension (mouth opening)", + "slug": "digastricus-tension-mouth-opening" + }, + { + "label": "Points de tension myofasciaux (hypertonie à la palpation)", + "slug": "points-de-tension-myofasciaux-hypertonie-a-la-palpation" + }, + { + "label": "Myofascial tension points (palpated hypertonicity)", + "slug": "myofascial-tension-points-palpated-hypertonicity" + }, + { + "label": "Asymétries observées à l'examen statique", + "slug": "asymetries-observees-a-l-examen-statique" + }, + { + "label": "Asymmetries observed at static examination", + "slug": "asymmetries-observed-at-static-examination" + }, + { + "label": "Douleur à l'ouverture de la bouche ou tuméfaction de l'ATM rapportée", + "slug": "douleur-a-l-ouverture-de-la-bouche-ou-tumefaction-de-l-atm-rappo" + }, + { + "label": "Reported pain on opening the mouth or TMJ swelling", + "slug": "reported-pain-on-opening-the-mouth-or-tmj-swelling" + }, + { + "label": "Restriction de rétraction / protraction hyoïdienne (déglutition)", + "slug": "restriction-de-retraction-protraction-hyoidienne-deglutition" + }, + { + "label": "Hyoid retraction / protraction restriction (swallowing)", + "slug": "hyoid-retraction-protraction-restriction-swallowing" + }, + { + "label": "Tension des muscles supra-hyoïdiens (mylo-hyoïdien, génio-hyoïdien, stylo-hyoïdien, occipito-hyoïdien, digastrique)", + "slug": "tension-des-muscles-supra-hyoidiens-mylo-hyoidien-genio-hyoidien" + }, + { + "label": "Suprahyoid muscle tension (mylohyoideus, geniohyoideus, stylohyoideus, occipitohyoideus, digastricus)", + "slug": "suprahyoid-muscle-tension-mylohyoideus-geniohyoideus-stylohyoide" + }, + { + "label": "Tension des muscles infra-hyoïdiens (sterno-hyoïdien, sterno-thyroïdien, omo-hyoïdien)", + "slug": "tension-des-muscles-infra-hyoidiens-sterno-hyoidien-sterno-thyro" + }, + { + "label": "Infrahyoid muscle tension (sternohyoideus, sternothyroideus, omohyoideus)", + "slug": "infrahyoid-muscle-tension-sternohyoideus-sternothyroideus-omohyo" + }, + { + "label": "Tension du stylo-hyoïdien (lien temporal / ATM)", + "slug": "tension-du-stylo-hyoidien-lien-temporal-atm" + }, + { + "label": "Stylohyoid tension (temporal / TMJ link)", + "slug": "stylohyoid-tension-temporal-tmj-link" + }, + { + "label": "Tension des muscles de la base de la langue (hyo-glosse, génio-glosse)", + "slug": "tension-des-muscles-de-la-base-de-la-langue-hyo-glosse-genio-glo" + }, + { + "label": "Tongue base muscle tension (hyoglossus, genioglossus)", + "slug": "tongue-base-muscle-tension-hyoglossus-genioglossus" + }, + { + "label": "Dysfonctions des pièces de l'appareil hyoïdien", + "slug": "dysfonctions-des-pieces-de-l-appareil-hyoidien" + }, + { + "label": "Hyoid apparatus bone dysfunctions", + "slug": "hyoid-apparatus-bone-dysfunctions" + }, + { + "label": "Dysfonction du stylohyoïde (stylo-hyal) palpée", + "slug": "dysfonction-du-stylohyoide-stylo-hyal-palpee" + }, + { + "label": "Dysfonction du basihyoïde (basi-hyal) palpée", + "slug": "dysfonction-du-basihyoide-basi-hyal-palpee" + }, + { + "label": "Restriction de l'articulation temporo-hyoïdienne (synchondrose)", + "slug": "restriction-de-l-articulation-temporo-hyoidienne-synchondrose" + }, + { + "label": "Temporohyoid joint restriction (synchondrosis)", + "slug": "temporohyoid-joint-restriction-synchondrosis" + }, + { + "label": "Signes d'ostéoarthropathie temporo-hyoïdienne rapportés (paralysie faciale, tête penchée, ataxie, dysphagie)", + "slug": "signes-d-osteoarthropathie-temporo-hyoidienne-rapportes-paralysi" + }, + { + "label": "Reported signs of temporohyoid osteoarthropathy (facial paralysis, head tilt, ataxia, dysphagia)", + "slug": "reported-signs-of-temporohyoid-osteoarthropathy-facial-paralysis" + }, + { + "label": "Asymétrie d'amplitude gauche / droite", + "slug": "asymetrie-d-amplitude-gauche-droite" + }, + { + "label": "Left / right amplitude asymmetry", + "slug": "left-right-amplitude-asymmetry" + }, + { + "label": "Dysfonction de groupe de type I (NSR, modèle de Fryette)", + "slug": "dysfonction-de-groupe-de-type-i-nsr-modele-de-fryette" + }, + { + "label": "Type I group dysfunction (NSR, Fryette model)", + "slug": "type-i-group-dysfunction-nsr-fryette-model" + }, + { + "label": "Tension des multifides cervicaux", + "slug": "tension-des-multifides-cervicaux" + }, + { + "label": "Cervical multifidi tension", + "slug": "cervical-multifidi-tension" + }, + { + "label": "Asymétrie d'incurvation gauche / droite", + "slug": "asymetrie-d-incurvation-gauche-droite" + }, + { + "label": "Left / right bend asymmetry", + "slug": "left-right-bend-asymmetry" + }, + { + "label": "Asymétrie de relief musculaire gauche / droite", + "slug": "asymetrie-de-relief-musculaire-gauche-droite" + }, + { + "label": "Left / right muscle relief asymmetry", + "slug": "left-right-muscle-relief-asymmetry" + }, + { + "label": "Reported abnormal head / neck carriage", + "slug": "reported-abnormal-head-neck-carriage" + }, + { + "label": "Serratus ventralis cervicis tension", + "slug": "serratus-ventralis-cervicis-tension" + }, + { + "label": "Restriction en abduction / adduction", + "slug": "restriction-en-abduction-adduction" + }, + { + "label": "Abduction / adduction restriction", + "slug": "abduction-adduction-restriction" + }, + { + "label": "Tension du supra-épineux / infra-épineux", + "slug": "tension-du-supra-epineux-infra-epineux" + }, + { + "label": "Reported shortened cranial phase of the stride", + "slug": "reported-shortened-cranial-phase-of-the-stride" + }, + { + "label": "Tension du biceps brachial / brachial", + "slug": "tension-du-biceps-brachial-brachial" + }, + { + "label": "Biceps brachii / brachialis tension", + "slug": "biceps-brachii-brachialis-tension" + }, + { + "label": "Tension des tendons extenseurs du carpe palpée", + "slug": "tension-des-tendons-extenseurs-du-carpe-palpee" + }, + { + "label": "Palpated carpal extensor tendons tension", + "slug": "palpated-carpal-extensor-tendons-tension" + }, + { + "label": "Tension des tendons fléchisseurs du carpe palpée", + "slug": "tension-des-tendons-flechisseurs-du-carpe-palpee" + }, + { + "label": "Palpated carpal flexor tendons tension", + "slug": "palpated-carpal-flexor-tendons-tension" + }, + { + "label": "Tension des tendons fléchisseurs du doigt palpée", + "slug": "tension-des-tendons-flechisseurs-du-doigt-palpee" + }, + { + "label": "Asymétrie d'axe du carpe observée", + "slug": "asymetrie-d-axe-du-carpe-observee" + }, + { + "label": "Observed carpal axis asymmetry", + "slug": "observed-carpal-axis-asymmetry" + }, + { + "label": "Chaleur, gonflement ou douleur à la palpation rapportés", + "slug": "chaleur-gonflement-ou-douleur-a-la-palpation-rapportes" + }, + { + "label": "Reported heat, swelling or pain on palpation", + "slug": "reported-heat-swelling-or-pain-on-palpation" + }, + { + "label": "Tension du fascia palmaire", + "slug": "tension-du-fascia-palmaire" + }, + { + "label": "Tension du ligament palmaire (intersésamoïdien) palpée", + "slug": "tension-du-ligament-palmaire-intersesamoidien-palpee" + }, + { + "label": "Palpated palmar (intersesamoidean) ligament tension", + "slug": "palpated-palmar-intersesamoidean-ligament-tension" + }, + { + "label": "Restriction costo-vertébrale (tête / tubercule de la côte)", + "slug": "restriction-costo-vertebrale-tete-tubercule-de-la-cote" + }, + { + "label": "Costovertebral restriction (rib head / costotransverse joint)", + "slug": "costovertebral-restriction-rib-head-costotransverse-joint" + }, + { + "label": "Reported cold-backed / saddling defense", + "slug": "reported-cold-backed-saddling-defense" + }, + { + "label": "Bucking / kicking out at work", + "slug": "bucking-kicking-out-at-work" + }, + { + "label": "Fore / hindquarter transmission defect", + "slug": "fore-hindquarter-transmission-defect" + }, + { + "label": "Palpated sacral lateralization", + "slug": "palpated-sacral-lateralization" + }, + { + "label": "Postérieurs sautillant ensemble (rapporté)", + "slug": "posterieurs-sautillant-ensemble-rapporte" + }, + { + "label": "Tension du ligament sacro-tubéral large (sacro-sciatique) palpée", + "slug": "tension-du-ligament-sacro-tuberal-large-sacro-sciatique-palpee" + }, + { + "label": "Palpated broad sacrotuberous (sacrosciatic) ligament tension", + "slug": "palpated-broad-sacrotuberous-sacrosciatic-ligament-tension" + }, + { + "label": "Tension des ischio-jambiers (biceps fémoral, semi-tendineux, semi-membraneux)", + "slug": "tension-des-ischio-jambiers-biceps-femoral-semi-tendineux-semi-m" + }, + { + "label": "Hamstrings tension (biceps femoris, semitendinosus, semimembranosus)", + "slug": "hamstrings-tension-biceps-femoris-semitendinosus-semimembranosus" + }, + { + "label": "Tension du fibulaire (péronier) tertius / appareil réciproque", + "slug": "tension-du-fibulaire-peronier-tertius-appareil-reciproque" + }, + { + "label": "Fibularis (peroneus) tertius / reciprocal apparatus tension", + "slug": "fibularis-peroneus-tertius-reciprocal-apparatus-tension" + }, + { + "label": "Tibialis cranialis tension", + "slug": "tibialis-cranialis-tension" + }, + { + "label": "Jarret extensible grasset fléchi rapporté", + "slug": "jarret-extensible-grasset-flechi-rapporte" + }, + { + "label": "Reported hock extension with the stifle flexed", + "slug": "reported-hock-extension-with-the-stifle-flexed" + }, + { + "label": "Tension du fascia plantaire", + "slug": "tension-du-fascia-plantaire" + } + ] +} diff --git a/crates/core/tests/oracles/r5/js-semantics.json b/crates/core/tests/oracles/r5/js-semantics.json new file mode 100644 index 00000000..ba9ff2b4 --- /dev/null +++ b/crates/core/tests/oracles/r5/js-semantics.json @@ -0,0 +1 @@ +{"slugify":[{"label":"Cheval","slug":"cheval"},{"label":"Épaule","slug":"epaule"},{"label":"İstanbul","slug":"istanbul"},{"label":"KK","slug":"kk"},{"label":"ΣΑΣ ΟΔΟΣ","slug":""},{"label":"Straße","slug":"stra-e"},{"label":"fin","slug":"n"},{"label":"full","slug":""},{"label":"Džemal","slug":"emal"},{"label":"Ⅻ","slug":""},{"label":"x̧́y","slug":"xy"},{"label":"①②","slug":""},{"label":"a—b–c","slug":"a-b-c"},{"label":"__a__","slug":"a"},{"label":"œuvre Æther","slug":"uvre-ther"},{"label":"Ünïcödé","slug":"unicode"},{"label":"😀 smile","slug":"smile"},{"label":"한국어","slug":""},{"label":"ğ ş ı","slug":"g-s"},{"label":"1/2 et 3/4","slug":"1-2-et-3-4"},{"label":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaéb","slug":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae"},{"label":"----------------------------------------------------------------------z","slug":"z"}],"deterministicUuid":[{"name":"faunosteo:sheet:canine:v1","uuid":"f565d6c8-9376-5f0c-8a88-b5f20c91bb17"},{"name":"faunosteo:sheet:feline:v12","uuid":"6e2061b2-68aa-50a3-bb17-dbf6b62cd192"},{"name":"faunosteo:asset:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","uuid":"51cf4b04-8520-57c8-99ba-561abfab37f3"},{"name":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","uuid":"44f83544-94a5-5a03-ba17-92a8d3e9c534"},{"name":"é","uuid":"4a99557e-4033-5353-9de2-eb65472017ca"},{"name":"😀","uuid":"f0443a34-2c5e-5547-83a1-11b51ba56c93"},{"name":"\u0000","uuid":"6e340b9c-ffb3-5a98-9ca5-44e6bb780a2c"}],"inferRegionCode":[{"fr":"Cervicales","en":null,"match":{"code":"C","root":"cervic","label":"Cervicales"}},{"fr":null,"en":"Thoracic","match":{"code":"T","root":"thorac","label":"Thoracic"}},{"fr":"DORSALES","en":"Lumbar","match":{"code":"T","root":"dors","label":"DORSALES"}},{"fr":"Région sacrée","en":"Sacral","match":{"code":"S","root":"sacre","label":"Région sacrée"}},{"fr":"Coccygiennes","en":null,"match":{"code":"Cd","root":"coccyg","label":"Coccygiennes"}},{"fr":"Lombaires","en":"x","match":{"code":"L","root":"lombair","label":"Lombaires"}},{"fr":"Épaule","en":"Shoulder","match":null},{"fr":null,"en":null,"match":null},{"fr":"","en":"caudal","match":{"code":"Cd","root":"caudal","label":"caudal"}},{"fr":"Thoracolombaire","en":"","match":{"code":"T","root":"thorac","label":"Thoracolombaire"}},{"fr":"CERVICALES","en":"CERVICAL","match":{"code":"C","root":"cervic","label":"CERVICALES"}},{"fr":"Sacrum","en":"Sacrum","match":null}],"number":[{"text":"","string":"0","negativeZero":false},{"text":" ","string":"0","negativeZero":false},{"text":"12","string":"12","negativeZero":false},{"text":" 12 ","string":"12","negativeZero":false},{"text":"0x1A","string":"26","negativeZero":false},{"text":"0X1a","string":"26","negativeZero":false},{"text":"0b11","string":"3","negativeZero":false},{"text":"0o17","string":"15","negativeZero":false},{"text":"1e3","string":"1000","negativeZero":false},{"text":"1E-3","string":"0.001","negativeZero":false},{"text":".5","string":"0.5","negativeZero":false},{"text":"5.","string":"5","negativeZero":false},{"text":"+5","string":"5","negativeZero":false},{"text":"-5","string":"-5","negativeZero":false},{"text":"Infinity","string":"Infinity","negativeZero":false},{"text":"-Infinity","string":"-Infinity","negativeZero":false},{"text":"+Infinity","string":"Infinity","negativeZero":false},{"text":"infinity","string":"NaN","negativeZero":false},{"text":"NaN","string":"NaN","negativeZero":false},{"text":"abc","string":"NaN","negativeZero":false},{"text":"1,5","string":"NaN","negativeZero":false},{"text":" 12 ","string":"12","negativeZero":false},{"text":"7","string":"7","negativeZero":false},{"text":"12px","string":"NaN","negativeZero":false},{"text":"1_000","string":"NaN","negativeZero":false},{"text":"00012","string":"12","negativeZero":false},{"text":"-0","string":"0","negativeZero":true},{"text":"0x","string":"NaN","negativeZero":false},{"text":"1e","string":"NaN","negativeZero":false},{"text":"1e+","string":"NaN","negativeZero":false},{"text":" \n\t3 ","string":"3","negativeZero":false},{"text":"
3","string":"3","negativeZero":false},{"text":"1.7976931348623157e309","string":"Infinity","negativeZero":false},{"text":"5e-325","string":"0","negativeZero":false},{"text":"0.1e1","string":"1","negativeZero":false},{"text":"-.5","string":"-0.5","negativeZero":false},{"text":"--5","string":"NaN","negativeZero":false},{"text":"+-5","string":"NaN","negativeZero":false},{"text":"0x-1","string":"NaN","negativeZero":false}],"points":[{"text":" 1,2 3,4 ","numbers":["1","2","3","4"]},{"text":"1,,2","numbers":["1","2"]},{"text":",1,2","numbers":["0","1","2"]},{"text":"1 2 3","numbers":["1","2","3"]},{"text":"","numbers":["0"]},{"text":"1e3,2","numbers":["1000","2"]},{"text":" 1 2","numbers":["1","2"]},{"text":"1.5,2.25 ","numbers":["1.5","2.25"]},{"text":"1,2,3,4,5,6","numbers":["1","2","3","4","5","6"]},{"text":"a,b","numbers":["NaN","NaN"]},{"text":" ","numbers":["0"]},{"text":"1\n2\t3 4","numbers":["1","2","3","4"]}],"mathRound":[{"bits":"3fe0000000000000","value":"0.5","round":"1","negativeZero":false},{"bits":"3ff8000000000000","value":"1.5","round":"2","negativeZero":false},{"bits":"4004000000000000","value":"2.5","round":"3","negativeZero":false},{"bits":"bfe0000000000000","value":"-0.5","round":"0","negativeZero":true},{"bits":"bff8000000000000","value":"-1.5","round":"-1","negativeZero":false},{"bits":"c004000000000000","value":"-2.5","round":"-2","negativeZero":false},{"bits":"3fdfffffffffffff","value":"0.49999999999999994","round":"0","negativeZero":false},{"bits":"bfdfffffffffffff","value":"-0.49999999999999994","round":"0","negativeZero":true},{"bits":"432fffffffffffff","value":"4503599627370495.5","round":"4503599627370496","negativeZero":false},{"bits":"c32fffffffffffff","value":"-4503599627370495.5","round":"-4503599627370495","negativeZero":false},{"bits":"444b1ae4d6e2ef50","value":"1e+21","round":"1e+21","negativeZero":false},{"bits":"bfd999999999999a","value":"-0.4","round":"0","negativeZero":true},{"bits":"400d99999999999a","value":"3.7","round":"4","negativeZero":false},{"bits":"c00d99999999999a","value":"-3.7","round":"-4","negativeZero":false},{"bits":"0000000000000000","value":"0","round":"0","negativeZero":false},{"bits":"8000000000000000","value":"0","round":"0","negativeZero":true},{"bits":"4003ffffffffffff","value":"2.4999999999999996","round":"2","negativeZero":false},{"bits":"3ff0000000000001","value":"1.0000000000000002","round":"1","negativeZero":false}],"objectEntriesOrder":[{"text":"{\"b\":1,\"2\":2,\"a\":3,\"1\":4,\"01\":5,\"4294967295\":6,\"4294967294\":7,\"-1\":8,\"1.5\":9}","keys":["1","2","4294967294","b","a","01","4294967295","-1","1.5"]},{"text":"{\"z\":1,\"y\":2,\"10\":3,\"9\":4,\"0\":5}","keys":["0","9","10","z","y"]},{"text":"{\"a\":1,\"a\":2,\"b\":3}","keys":["a","b"]}],"trim":[{"text":" x ","trimmed":"x","isSpace":true},{"text":"\tx\t","trimmed":"x","isSpace":true},{"text":"\nx\n","trimmed":"x","isSpace":true},{"text":" x ","trimmed":"x","isSpace":true},{"text":"x","trimmed":"x","isSpace":true},{"text":"
x
","trimmed":"x","isSpace":true},{"text":" x ","trimmed":"x","isSpace":true},{"text":"​x​","trimmed":"​x​","isSpace":false}]} diff --git a/crates/core/tests/oracles/r5/legacy-synthetic.json b/crates/core/tests/oracles/r5/legacy-synthetic.json new file mode 100644 index 00000000..8aa1b793 --- /dev/null +++ b/crates/core/tests/oracles/r5/legacy-synthetic.json @@ -0,0 +1 @@ +{"cases":[{"name":"generic","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\n \"schema_version\": 2.5,\n \"scope_disclaimer\": \"Périmètre « test »\",\n \"zones\": {\n \"2\": {\n \"id\": \"2\",\n \"name_fr\": \"Deux\",\n \"name_en\": \"Two\",\n \"categories\": [\n {\n \"id\": \"weird\",\n \"name_fr\": \"weird fr\",\n \"name_en\": \"weird en\"\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n }\n ]\n },\n \"10\": {\n \"id\": \"10\",\n \"name_fr\": \"Dix\",\n \"name_en\": \"Ten\",\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n }\n ]\n }\n ]\n },\n \"hip\": {\n \"id\": \"hip\",\n \"name_fr\": \"Hanche\",\n \"name_en\": \"Hip\",\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"name_fr\": \"hip-dysfunctions fr\",\n \"name_en\": \"hip-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"Épaule Gauche\",\n \"name_fr\": \"Épaule Gauche fr\",\n \"name_en\": \"Épaule Gauche en\",\n \"description_fr\": \"seulement FR\"\n },\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\",\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name_fr\": \"deep fr\",\n \"name_en\": \"deep en\",\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name_fr\": \"leaf fr\",\n \"name_en\": \"leaf en\",\n \"description_en\": \"EN only\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"name_fr\": \"spine-observations fr\",\n \"name_en\": \"spine-observations en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n }\n ]\n }\n ]\n },\n \"spine\": {\n \"id\": \"spine\",\n \"name_fr\": \"Colonne\",\n \"name_en\": \"Spine\",\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"name_fr\": \"spine-dysfunctions fr\",\n \"name_en\": \"spine-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n },\n {\n \"id\": \"x y\",\n \"name_fr\": \"x y fr\",\n \"name_en\": \"x y en\"\n }\n ]\n }\n ]\n }\n }\n}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":true,"files":{"document.json":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Cheval\",\n \"en\": \"Horse\"\n },\n \"description\": {\n \"fr\": \"Fiche anatomique officielle Faunosteo\",\n \"en\": \"Official Faunosteo anatomical sheet\"\n },\n \"scope_disclaimer\": {\n \"fr\": \"Périmètre « test »\"\n },\n \"attribution\": {\n \"authors\": [\"Faunosteo\"],\n \"license\": null,\n \"notes\": \"Import des données historiques: Horse.svg, Horse_head.svg, pathologies.json (schema 2.5)\"\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n },\n {\n \"code\": \"L\",\n \"name\": {\n \"fr\": \"Lombaires\",\n \"en\": \"Lumbar\"\n },\n \"count\": 6\n },\n {\n \"code\": \"S\",\n \"name\": {\n \"fr\": \"Sacrales\",\n \"en\": \"Sacral\"\n },\n \"count\": 5\n },\n {\n \"code\": \"Cd\",\n \"name\": {\n \"fr\": \"Caudales\",\n \"en\": \"Caudal\"\n },\n \"count\": 20\n }\n ]\n },\n \"references\": [],\n \"categories\": [\n {\n \"id\": \"articulations\",\n \"name\": {\n \"fr\": \"Articulations\",\n \"en\": \"Joints\"\n },\n \"color\": null\n },\n {\n \"id\": \"charnieres-vertebrales\",\n \"name\": {\n \"fr\": \"Charnières vertébrales\",\n \"en\": \"Vertebral hinges\"\n },\n \"color\": null\n },\n {\n \"id\": \"zone-colonne\",\n \"name\": {\n \"fr\": \"Colonne vertébrale\",\n \"en\": \"Spine\"\n },\n \"color\": null\n },\n {\n \"id\": \"os\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n },\n {\n \"id\": \"cadrans-du-crane\",\n \"name\": {\n \"fr\": \"Cadrans du crâne\",\n \"en\": \"Skull quadrants\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue générale\",\n \"en\": \"Overview\"\n },\n \"svg_asset_id\": \"72f574fe-6082-5fd1-b3ff-da244bf0c74a\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": \"5ff5d8c8-78e9-5a53-b841-ecd78df55f04\",\n \"view_box\": null\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"articulations\",\n \"laterality\": \"bilateral\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 10.5,\n \"cy\": 20,\n \"r\": 2\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"spine\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"charnieres-vertebrales\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"polygon\",\n \"points\": [\n [1, 2],\n [3, 4],\n [5, 6]\n ]\n },\n \"name\": {\n \"fr\": \"Colonne\",\n \"en\": \"Spine\"\n },\n \"finding_zone_id\": \"spine\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"region-sacree\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"zone-colonne\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"polygon\",\n \"points\": [\n [16, 10],\n [2, 3],\n [4, 5]\n ]\n },\n \"name\": {\n \"fr\": \"Région sacrée\",\n \"en\": \"Région sacrée\"\n },\n \"finding_zone_id\": null,\n \"vertebral_region_code\": \"S\"\n },\n {\n \"id\": \"rect-only\",\n \"kind\": \"zone\",\n \"view_id\": \"main\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": null,\n \"name\": {\n \"fr\": \"Rect only\",\n \"en\": \"Rect only\"\n },\n \"finding_zone_id\": null,\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"head-trigger\",\n \"kind\": \"detail_trigger\",\n \"view_id\": \"main\",\n \"category_id\": \"cadrans-du-crane\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 5,\n \"cy\": 5,\n \"r\": 2\n },\n \"name\": null,\n \"opens_view_id\": \"head\"\n },\n {\n \"id\": \"10\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 840.1692504882812,\n \"cy\": 0,\n \"r\": 3\n },\n \"name\": {\n \"fr\": \"Dix\",\n \"en\": \"Ten\"\n },\n \"finding_zone_id\": \"10\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"deux\",\n \"kind\": \"point\",\n \"view_id\": \"head\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 3,\n \"cy\": 4,\n \"r\": 5\n },\n \"name\": {\n \"fr\": \"Deux\",\n \"en\": \"Deux\"\n },\n \"finding_zone_id\": null,\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"2\",\n \"kind\": \"point\",\n \"view_id\": \"head\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 3,\n \"cy\": 4,\n \"r\": 5\n },\n \"name\": {\n \"fr\": \"Deux\",\n \"en\": \"Two\"\n },\n \"finding_zone_id\": \"2\",\n \"vertebral_region_code\": null\n },\n {\n \"id\": \"thoracic\",\n \"kind\": \"point\",\n \"view_id\": \"head\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 1,\n \"r\": 1\n },\n \"name\": {\n \"fr\": \"Thoracique\",\n \"en\": \"Thoracic\"\n },\n \"finding_zone_id\": null,\n \"vertebral_region_code\": \"T\"\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"2\",\n \"name\": {\n \"fr\": \"Deux\",\n \"en\": \"Two\"\n },\n \"categories\": [\n {\n \"id\": \"weird\",\n \"kind\": \"custom\",\n \"name\": {\n \"fr\": \"weird fr\",\n \"en\": \"weird en\"\n },\n \"children\": []\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"anamnesis fr\",\n \"en\": \"anamnesis en\"\n },\n \"children\": [\n {\n \"id\": \"age\",\n \"name\": {\n \"fr\": \"age fr\",\n \"en\": \"age en\"\n }\n },\n {\n \"id\": \"use\",\n \"name\": {\n \"fr\": \"use fr\",\n \"en\": \"use en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"10\",\n \"name\": {\n \"fr\": \"Dix\",\n \"en\": \"Ten\"\n },\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"anamnesis fr\",\n \"en\": \"anamnesis en\"\n },\n \"children\": [\n {\n \"id\": \"age\",\n \"name\": {\n \"fr\": \"age fr\",\n \"en\": \"age en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"hip-dysfunctions fr\",\n \"en\": \"hip-dysfunctions en\"\n },\n \"children\": [\n {\n \"id\": \"epaule-gauche\",\n \"name\": {\n \"fr\": \"Épaule Gauche fr\",\n \"en\": \"Épaule Gauche en\"\n },\n \"description\": {\n \"fr\": \"seulement FR\"\n }\n },\n {\n \"id\": \"ok\",\n \"name\": {\n \"fr\": \"ok fr\",\n \"en\": \"ok en\"\n },\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name\": {\n \"fr\": \"deep fr\",\n \"en\": \"deep en\"\n },\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name\": {\n \"fr\": \"leaf fr\",\n \"en\": \"leaf en\"\n },\n \"description\": {\n \"en\": \"EN only\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"kind\": \"anamnesis\",\n \"name\": {\n \"fr\": \"anamnesis fr\",\n \"en\": \"anamnesis en\"\n },\n \"children\": [\n {\n \"id\": \"age\",\n \"name\": {\n \"fr\": \"age fr\",\n \"en\": \"age en\"\n }\n },\n {\n \"id\": \"use\",\n \"name\": {\n \"fr\": \"use fr\",\n \"en\": \"use en\"\n }\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"kind\": \"consultation_reason\",\n \"name\": {\n \"fr\": \"spine-observations fr\",\n \"en\": \"spine-observations en\"\n },\n \"children\": [\n {\n \"id\": \"ok\",\n \"name\": {\n \"fr\": \"ok fr\",\n \"en\": \"ok en\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"spine\",\n \"name\": {\n \"fr\": \"Colonne\",\n \"en\": \"Spine\"\n },\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"spine-dysfunctions fr\",\n \"en\": \"spine-dysfunctions en\"\n },\n \"children\": [\n {\n \"id\": \"ok\",\n \"name\": {\n \"fr\": \"ok fr\",\n \"en\": \"ok en\"\n }\n },\n {\n \"id\": \"x-y\",\n \"name\": {\n \"fr\": \"x y fr\",\n \"en\": \"x y en\"\n }\n }\n ]\n }\n ]\n }\n ]\n}\n","legacy-id-map.json":"{\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"a1\": \"thoracic\",\n \"p1\": \"spine\",\n \"p2\": \"region-sacree\",\n \"r1\": \"rect-only\",\n \"t1\": \"head-trigger\",\n \"x1\": \"10\",\n \"h1\": \"deux\",\n \"h2\": \"2\"\n },\n \"categories\": {\n \"articulations\": \"articulations\",\n \"charni-res-vert-brales\": \"charnieres-vertebrales\",\n \"zone-colonne\": \"zone-colonne\",\n \"os\": \"os\",\n \"cadrans-du-cr-ne\": \"cadrans-du-crane\"\n },\n \"finding_nodes\": {\n \"hip/hip-dysfunctions/Épaule Gauche\": \"epaule-gauche\",\n \"spine/spine-dysfunctions/x y\": \"x-y\"\n },\n \"assets\": {\n \"Main.svg\": \"72f574fe-6082-5fd1-b3ff-da244bf0c74a\",\n \"Head.svg\": \"5ff5d8c8-78e9-5a53-b841-ecd78df55f04\"\n }\n}\n","assets.json":"[\n {\n \"file\": \"Main.svg\",\n \"sha256\": \"683bb679abe721f18a34ac7a12a4c44ff9a22dfb8842a63cffb3ed8ab90be013\",\n \"byte_size\": 1261,\n \"svg_asset_id\": \"72f574fe-6082-5fd1-b3ff-da244bf0c74a\"\n },\n {\n \"file\": \"Head.svg\",\n \"sha256\": \"8320769b20e14e9887768ae66398863ac43838be573de37cd0c25c3e0a4e63cf\",\n \"byte_size\": 483,\n \"svg_asset_id\": \"5ff5d8c8-78e9-5a53-b841-ecd78df55f04\"\n }\n]\n","IMPORT-REPORT.md":"# Rapport d'import : fiche anatomique équine v1\n\nGénéré par `pnpm import:equine` à partir des données historiques. Ne pas modifier à la main : relancer la commande.\n\nStatut : **brouillon** (version 1 en `draft`), jamais publié par le seed. Fiche `503dc301-a8b1-50d4-9e44-0919b2fc2916`, espèce `equine`.\n\nLes éléments de la section « Anomalies à valider » demandent une décision métier avant toute publication.\n\n## 1. Sources et empreintes\n\n| Fichier | Octets | sha256 | Id d'asset |\n| ------------------ | ------ | ------------------------------------------------------------------ | -------------------------------------- |\n| `Main.svg` | 1261 | `683bb679abe721f18a34ac7a12a4c44ff9a22dfb8842a63cffb3ed8ab90be013` | `72f574fe-6082-5fd1-b3ff-da244bf0c74a` |\n| `Head.svg` | 483 | `8320769b20e14e9887768ae66398863ac43838be573de37cd0c25c3e0a4e63cf` | `5ff5d8c8-78e9-5a53-b841-ecd78df55f04` |\n| `pathologies.json` | 3468 | `5e77c31f2ec5f0b23c362e80485161c8a86fe143b4b17189d15230befcc076b6` | - |\n| `vertebrae.ts` | 92 | `6f19808d958e89d717b555e601ac2f5ec3e0131db9e4305fd2128cce3c9194a8` | - |\n\nLes ids d'asset sont dérivés du sha256 du fichier (UUID déterministe), les deux SVG sont copiés à l'identique dans `assets/`.\n\n- vue `main` : viewBox `0 0 100 50` (view_box du document laissé à null, le SVG porte le sien)\n- vue `head` : viewBox `absent` (view_box du document laissé à null, le SVG porte le sien)\n\n## 2. Volumes\n\n| Mesure | Valeur |\n| ------------------------------------------ | ------ |\n| Annotations | 9 |\n| dont vue `main` (Horse.svg) | 6 |\n| dont vue `head` (Horse_head.svg) | 3 |\n| Annotations reliées à une zone de constats | 4 |\n| Déclencheurs de vue détail | 1 |\n| Vues | 2 |\n| Zones vertébrales avec code de région | 2 |\n| Annotations bilatérales | 1 |\n| Zones de constats (catalogue) | 4 |\n| Nœuds (catégories incluses) | 19 |\n| Feuilles | 11 |\n| Orientations vétérinaires | 1 |\n\nContrôle entrée = sortie, compté des deux côtés (sources lues, document écrit). L'importateur s'arrête au moindre écart :\n\n| Contrôle | Lu (sources) | Écrit (document) |\n| ------------------------------------ | ------------ | ---------------- |\n| Annotations (data-anno-id distincts) | 9 | 9 |\n| Nœuds (catégories incluses) | 19 | 19 |\n| Feuilles | 11 | 12 |\n| Orientations vétérinaires | 1 | 1 |\n\n## 3. Annotations\n\n| Id historique | Nouvel id | Vue | Type | Latéralité | Région | Zone de constats | Géométrie |\n| ------------- | --------------- | ---- | -------------- | ---------- | ------ | ---------------- | --------------------------------- |\n| `a1` | `hip` | main | point | bilateral | - | `hip` | cercle (10.5, 20) r 2 |\n| `p1` | `spine` | main | zone | unpaired | - | `spine` | polygone 3 points |\n| `p2` | `region-sacree` | main | zone | unpaired | S | - | polygone 3 points |\n| `r1` | `rect-only` | main | zone | unpaired | - | - | aucune |\n| `t1` | `head-trigger` | main | detail_trigger | unpaired | - | - | cercle (5, 5) r 2 |\n| `x1` | `10` | main | point | unpaired | - | `10` | cercle (840.1692504882812, 0) r 3 |\n| `h1` | `deux` | head | point | unpaired | - | - | cercle (3, 4) r 5 |\n| `h2` | `2` | head | point | unpaired | - | `2` | cercle (3, 4) r 5 |\n| `a1` | `thoracic` | head | point | unpaired | T | - | cercle (1, 1) r 1 |\n\n## 4. Catégories d'annotation\n\n| Id SVG | Id | Libellé FR | Libellé EN | Origine du libellé |\n| ------------------------ | ------------------------ | ---------------------- | ---------------- | ---------------------- |\n| `articulations` | `articulations` | Articulations | Joints | importateur, à valider |\n| `charni-res-vert-brales` | `charnieres-vertebrales` | Charnières vertébrales | Vertebral hinges | importateur, à valider |\n| `zone-colonne` | `zone-colonne` | Colonne vertébrale | Spine | importateur, à valider |\n| `os` | `os` | Os | Bones | importateur, à valider |\n| `cadrans-du-cr-ne` | `cadrans-du-crane` | Cadrans du crâne | Skull quadrants | importateur, à valider |\n\nCouleur : `null` partout (les couleurs du SVG restent dans l'asset). Dans les SVG, `data-anno-category-name` répète le slug (`articulations`, `os`) : ce n'est pas un libellé, le libellé lisible de la table de l'importateur est utilisé.\n\n## 5. Configuration vertébrale\n\n| Code | Nom FR | Nom EN | Vertèbres | Origine du libellé |\n| ---- | ----------- | -------- | --------- | ---------------------- |\n| `C` | Cervicales | Cervical | 7 | importateur, à valider |\n| `T` | Thoraciques | Thoracic | 18 | importateur, à valider |\n| `L` | Lombaires | Lumbar | 6 | importateur, à valider |\n| `S` | Sacrales | Sacral | 5 | importateur, à valider |\n| `Cd` | Caudales | Caudal | 20 | importateur, à valider |\n\nNombres de vertèbres : `vertebrae.ts`. Noms de région : écrits par l'importateur (aucune source ne les porte).\n\nCodes de région déduits des libellés (racines `cervic`, `thorac`/`dors`, `lombair`/`lumbar`, `sacral`/`sacre`, `caudal`/`coccyg`, FR puis EN). Déduction faite une fois ici, le document porte le code :\n\n| Annotation | Libellé lu | Racine | Code |\n| --------------- | ------------- | -------- | ---- |\n| `spine` | Colonne | - | - |\n| `region-sacree` | Région sacrée | `sacre` | `S` |\n| `thoracic` | Thoracique | `thorac` | `T` |\n\n## 6. Arbre de constats par zone\n\nCopie fidèle du catalogue : ids, libellés, descriptions présentes, orientations vétérinaires et sources. Ordre des zones et des catégories conservé. Nœuds = catégories incluses.\n\n| Zone | Nom | Nœuds | Feuilles | Orientations vét. |\n| --------- | ------- | ----- | -------- | ----------------- |\n| `2` | Deux | 4 | 2 | 0 |\n| `10` | Dix | 2 | 1 | 0 |\n| `hip` | Hanche | 10 | 6 | 1 |\n| `spine` | Colonne | 3 | 2 | 0 |\n| **Total** | | 19 | 11 | 1 |\n\n## 7. Anomalies à valider\n\n35 points demandent une décision, 5 sont informatifs.\n\n### À valider\n\n| Code | Objet | Détail |\n| --------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |\n| `label.authored` | name | Libellé écrit par l'importateur : FR « Cheval », EN « Horse ». |\n| `label.authored` | description | Libellé écrit par l'importateur : FR « Fiche anatomique officielle Faunosteo », EN « Official Faunosteo anatomical sheet ». |\n| `label.authored` | views.main | Libellé écrit par l'importateur : FR « Vue générale », EN « Overview ». |\n| `label.authored` | views.head | Libellé écrit par l'importateur : FR « Tête », EN « Head ». |\n| `label.authored` | vertebral_config.C | Libellé écrit par l'importateur : FR « Cervicales », EN « Cervical ». |\n| `label.authored` | vertebral_config.T | Libellé écrit par l'importateur : FR « Thoraciques », EN « Thoracic ». |\n| `label.authored` | vertebral_config.L | Libellé écrit par l'importateur : FR « Lombaires », EN « Lumbar ». |\n| `label.authored` | vertebral_config.S | Libellé écrit par l'importateur : FR « Sacrales », EN « Sacral ». |\n| `label.authored` | vertebral_config.Cd | Libellé écrit par l'importateur : FR « Caudales », EN « Caudal ». |\n| `svg.geometry.unsupported` | Main.svg r1 | Élément non pris en charge : géométrie non importée (null). |\n| `annotation.region.unknown` | p1 | Région vertébrale non déduite. |\n| `annotation.laterality.unknown` | p1 | Latéralité « left » inconnue, importée en « unpaired ». |\n| `annotation.name_en.missing` | p2 | data-anno-name-en absent : nom EN copié du FR « Région sacrée », à traduire. |\n| `annotation.unmapped` | p2 | Annotation non reliée à une zone de constats. |\n| `annotation.name_fr.missing` | r1 | data-anno-name-fr absent : nom FR repris de « Rect only ». |\n| `annotation.unmapped` | r1 | Annotation non reliée à une zone de constats. |\n| `annotation.special.unknown` | r1 | special « other » ignoré. |\n| `annotation.name_en.missing` | h1 | data-anno-name-en absent : nom EN copié du FR « Deux », à traduire. |\n| `annotation.unmapped` | h1 | Annotation non reliée à une zone de constats. |\n| `annotation.unmapped` | a1 | Annotation non reliée à une zone de constats. |\n| `category.label.authored` | articulations | Libellé écrit par l'importateur : FR « Articulations », EN « Joints ». |\n| `category.slug.normalised` | charni-res-vert-brales | Slug technique dégradé (accents perdus) normalisé en « charnieres-vertebrales ». |\n| `category.label.authored` | charnieres-vertebrales | Libellé écrit par l'importateur : FR « Charnières vertébrales », EN « Vertebral hinges ». |\n| `category.label.authored` | zone-colonne | Libellé écrit par l'importateur : FR « Colonne vertébrale », EN « Spine ». |\n| `category.label.authored` | os | Libellé écrit par l'importateur : FR « Os », EN « Bones ». |\n| `category.slug.normalised` | cadrans-du-cr-ne | Slug technique dégradé (accents perdus) normalisé en « cadrans-du-crane ». |\n| `category.label.authored` | cadrans-du-crane | Libellé écrit par l'importateur : FR « Cadrans du crâne », EN « Skull quadrants ». |\n| `finding.category.kind_unknown` | 2/weird | Type de catégorie non reconnu, importé en « custom ». |\n| `finding.id.slugified` | hip/hip-dysfunctions/Épaule Gauche | Identifiant hors motif stable, remplacé par « epaule-gauche ». |\n| `finding.id.slugified` | spine/spine-dysfunctions/x y | Identifiant hors motif stable, remplacé par « x-y ». |\n| `finding.category.foreign_prefix` | hip/spine-observations | Identifiant de catégorie dupliqué entre hip et spine ; hip-observations attendu ; décision ostéopathe requise. Importé tel quel (non renommé). |\n| `finding.description_en.missing` | pathologies.json | 1 descriptions sans traduction anglaise (clé « en » absente, rien d'inventé). |\n| `document.scope_disclaimer.no_en` | scope_disclaimer | Texte de périmètre légal en français seulement : traduction anglaise à rédiger. |\n| `vertebral.cd.capped` | Cd | Caudales plafonnées à 20 pour le sélecteur, alors que l'espèce varie (18–22) selon le commentaire source. |\n| `finding.sources.none` | pathologies.json | Aucune source bibliographique sur les nœuds, alors que la règle projet en demande au moins une par entrée. |\n\n### Informatif\n\n| Code | Objet | Détail |\n| -------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `annotation.trigger.unnamed` | t1 | Déclencheur de vue détail sans nom (name null), comme dans le SVG. |\n| `finding.anamnesis.variant` | anamnesis variante 1/2 | Zones 2, hip : age, use. |\n| `finding.anamnesis.variant` | anamnesis variante 2/2 | Zones 10 : age. |\n| `finding.id.shared_across_zones` | 4 identifiants | Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, adressage par zone + chemin). Les plus fréquents : age (3), anamnesis (3), ok (2), use (2). |\n| `annotation.geometry.hitbox` | géométrie | Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur visuel n'est pas importé. |\n\n## 8. Données non importées\n\n- géométrie de `r1` (forme non prise en charge)\n\nNon repris par construction :\n\n- `schema_version` du catalogue (`2.0`) : version du format historique, remplacée par `schema_version: 2` du document canonique ; la valeur d'origine est citée dans `attribution.notes`.\n- bloc `species` du catalogue (`equine`, Cheval / Horse) : porté par `species_id` du document et par la table `public.species` ; le nom de la fiche est écrit séparément (voir anomalies `label.authored`).\n- second élément graphique de chaque annotation (marqueur visuel) : reste dans l'asset SVG copié à l'identique, le document ne garde que la zone de clic.\n- `data-anno-category-name` : répète le slug technique (`articulations`, `os`), ce n'est pas un libellé ; le libellé de catégorie vient de la table de l'importateur (section 4).\n\n## 9. Résultat de validation\n\n- Forme (`AnatomicalSheetDocumentSchema`) : conforme.\n- Intégrité (`validateSheetDocument`) : 0 erreur(s), 4 avertissement(s).\n\n| Gravité | Code | Chemin | Message |\n| ------- | ------------------------ | -------------------------------- | ------------------------------------------------------- |\n| warning | `annotation.no_findings` | `annotations[2].finding_zone_id` | Annotation \"region-sacree\" is linked to no finding zone |\n| warning | `annotation.no_findings` | `annotations[3].finding_zone_id` | Annotation \"rect-only\" is linked to no finding zone |\n| warning | `annotation.no_findings` | `annotations[6].finding_zone_id` | Annotation \"deux\" is linked to no finding zone |\n| warning | `annotation.no_findings` | `annotations[8].finding_zone_id` | Annotation \"thoracic\" is linked to no finding zone |\n"},"parts":{"assets":[{"file":"Main.svg","sha256":"683bb679abe721f18a34ac7a12a4c44ff9a22dfb8842a63cffb3ed8ab90be013","byte_size":1261,"svg_asset_id":"72f574fe-6082-5fd1-b3ff-da244bf0c74a"},{"file":"Head.svg","sha256":"8320769b20e14e9887768ae66398863ac43838be573de37cd0c25c3e0a4e63cf","byte_size":483,"svg_asset_id":"5ff5d8c8-78e9-5a53-b841-ecd78df55f04"}],"sourceDigests":[{"file":"pathologies.json","sha256":"5e77c31f2ec5f0b23c362e80485161c8a86fe143b4b17189d15230befcc076b6","byte_size":3468},{"file":"vertebrae.ts","sha256":"6f19808d958e89d717b555e601ac2f5ec3e0131db9e4305fd2128cce3c9194a8","byte_size":92}],"sheetId":"503dc301-a8b1-50d4-9e44-0919b2fc2916","viewBoxes":{"main":"0 0 100 50","head":null},"annotationRows":[{"legacyId":"a1","newId":"hip","viewId":"main","kind":"point","laterality":"bilateral","regionCode":null,"findingZoneId":"hip","geometry":"cercle (10.5, 20) r 2"},{"legacyId":"p1","newId":"spine","viewId":"main","kind":"zone","laterality":"unpaired","regionCode":null,"findingZoneId":"spine","geometry":"polygone 3 points"},{"legacyId":"p2","newId":"region-sacree","viewId":"main","kind":"zone","laterality":"unpaired","regionCode":"S","findingZoneId":null,"geometry":"polygone 3 points"},{"legacyId":"r1","newId":"rect-only","viewId":"main","kind":"zone","laterality":"unpaired","regionCode":null,"findingZoneId":null,"geometry":"aucune"},{"legacyId":"t1","newId":"head-trigger","viewId":"main","kind":"detail_trigger","laterality":"unpaired","regionCode":null,"findingZoneId":null,"geometry":"cercle (5, 5) r 2"},{"legacyId":"x1","newId":"10","viewId":"main","kind":"point","laterality":"unpaired","regionCode":null,"findingZoneId":"10","geometry":"cercle (840.1692504882812, 0) r 3"},{"legacyId":"h1","newId":"deux","viewId":"head","kind":"point","laterality":"unpaired","regionCode":null,"findingZoneId":null,"geometry":"cercle (3, 4) r 5"},{"legacyId":"h2","newId":"2","viewId":"head","kind":"point","laterality":"unpaired","regionCode":null,"findingZoneId":"2","geometry":"cercle (3, 4) r 5"},{"legacyId":"a1","newId":"thoracic","viewId":"head","kind":"point","laterality":"unpaired","regionCode":"T","findingZoneId":null,"geometry":"cercle (1, 1) r 1"}],"regionInferences":[{"annotationId":"p1","label":"Colonne","root":null,"code":null},{"annotationId":"p2","label":"Région sacrée","root":"sacre","code":"S"},{"annotationId":"a1","label":"Thoracique","root":"thorac","code":"T"}],"zoneStats":[{"zoneId":"2","nodes":4,"leaves":2,"vetReferrals":0},{"zoneId":"10","nodes":2,"leaves":1,"vetReferrals":0},{"zoneId":"hip","nodes":10,"leaves":6,"vetReferrals":1},{"zoneId":"spine","nodes":3,"leaves":2,"vetReferrals":0}],"stats":{"legacyAnnotations":9,"annotations":9,"annotationsByView":{"main":6,"head":3},"linkedAnnotations":4,"triggers":1,"views":2,"vertebralAnnotations":2,"bilateral":1,"findingZones":4,"nodes":19,"leaves":11,"vetReferrals":1,"missingDescriptionEn":1,"sources":0},"anomalies":[{"code":"label.authored","level":"a_valider","subject":"name","message":"Libellé écrit par l'importateur : FR « Cheval », EN « Horse »."},{"code":"label.authored","level":"a_valider","subject":"description","message":"Libellé écrit par l'importateur : FR « Fiche anatomique officielle Faunosteo », EN « Official Faunosteo anatomical sheet »."},{"code":"label.authored","level":"a_valider","subject":"views.main","message":"Libellé écrit par l'importateur : FR « Vue générale », EN « Overview »."},{"code":"label.authored","level":"a_valider","subject":"views.head","message":"Libellé écrit par l'importateur : FR « Tête », EN « Head »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.C","message":"Libellé écrit par l'importateur : FR « Cervicales », EN « Cervical »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.T","message":"Libellé écrit par l'importateur : FR « Thoraciques », EN « Thoracic »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.L","message":"Libellé écrit par l'importateur : FR « Lombaires », EN « Lumbar »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.S","message":"Libellé écrit par l'importateur : FR « Sacrales », EN « Sacral »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.Cd","message":"Libellé écrit par l'importateur : FR « Caudales », EN « Caudal »."},{"code":"svg.geometry.unsupported","level":"a_valider","subject":"Main.svg r1","message":"Élément non pris en charge : géométrie non importée (null)."},{"code":"annotation.region.unknown","level":"a_valider","subject":"p1","message":"Région vertébrale non déduite."},{"code":"annotation.laterality.unknown","level":"a_valider","subject":"p1","message":"Latéralité « left » inconnue, importée en « unpaired »."},{"code":"annotation.name_en.missing","level":"a_valider","subject":"p2","message":"data-anno-name-en absent : nom EN copié du FR « Région sacrée », à traduire."},{"code":"annotation.unmapped","level":"a_valider","subject":"p2","message":"Annotation non reliée à une zone de constats."},{"code":"annotation.name_fr.missing","level":"a_valider","subject":"r1","message":"data-anno-name-fr absent : nom FR repris de « Rect only »."},{"code":"annotation.unmapped","level":"a_valider","subject":"r1","message":"Annotation non reliée à une zone de constats."},{"code":"annotation.special.unknown","level":"a_valider","subject":"r1","message":"special « other » ignoré."},{"code":"annotation.trigger.unnamed","level":"informatif","subject":"t1","message":"Déclencheur de vue détail sans nom (name null), comme dans le SVG."},{"code":"annotation.name_en.missing","level":"a_valider","subject":"h1","message":"data-anno-name-en absent : nom EN copié du FR « Deux », à traduire."},{"code":"annotation.unmapped","level":"a_valider","subject":"h1","message":"Annotation non reliée à une zone de constats."},{"code":"annotation.unmapped","level":"a_valider","subject":"a1","message":"Annotation non reliée à une zone de constats."},{"code":"category.label.authored","level":"a_valider","subject":"articulations","message":"Libellé écrit par l'importateur : FR « Articulations », EN « Joints »."},{"code":"category.slug.normalised","level":"a_valider","subject":"charni-res-vert-brales","message":"Slug technique dégradé (accents perdus) normalisé en « charnieres-vertebrales »."},{"code":"category.label.authored","level":"a_valider","subject":"charnieres-vertebrales","message":"Libellé écrit par l'importateur : FR « Charnières vertébrales », EN « Vertebral hinges »."},{"code":"category.label.authored","level":"a_valider","subject":"zone-colonne","message":"Libellé écrit par l'importateur : FR « Colonne vertébrale », EN « Spine »."},{"code":"category.label.authored","level":"a_valider","subject":"os","message":"Libellé écrit par l'importateur : FR « Os », EN « Bones »."},{"code":"category.slug.normalised","level":"a_valider","subject":"cadrans-du-cr-ne","message":"Slug technique dégradé (accents perdus) normalisé en « cadrans-du-crane »."},{"code":"category.label.authored","level":"a_valider","subject":"cadrans-du-crane","message":"Libellé écrit par l'importateur : FR « Cadrans du crâne », EN « Skull quadrants »."},{"code":"finding.category.kind_unknown","level":"a_valider","subject":"2/weird","message":"Type de catégorie non reconnu, importé en « custom »."},{"code":"finding.id.slugified","level":"a_valider","subject":"hip/hip-dysfunctions/Épaule Gauche","message":"Identifiant hors motif stable, remplacé par « epaule-gauche »."},{"code":"finding.id.slugified","level":"a_valider","subject":"spine/spine-dysfunctions/x y","message":"Identifiant hors motif stable, remplacé par « x-y »."},{"code":"finding.category.foreign_prefix","level":"a_valider","subject":"hip/spine-observations","message":"Identifiant de catégorie dupliqué entre hip et spine ; hip-observations attendu ; décision ostéopathe requise. Importé tel quel (non renommé)."},{"code":"finding.anamnesis.variant","level":"informatif","subject":"anamnesis variante 1/2","message":"Zones 2, hip : age, use."},{"code":"finding.anamnesis.variant","level":"informatif","subject":"anamnesis variante 2/2","message":"Zones 10 : age."},{"code":"finding.id.shared_across_zones","level":"informatif","subject":"4 identifiants","message":"Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, adressage par zone + chemin). Les plus fréquents : age (3), anamnesis (3), ok (2), use (2)."},{"code":"finding.description_en.missing","level":"a_valider","subject":"pathologies.json","message":"1 descriptions sans traduction anglaise (clé « en » absente, rien d'inventé)."},{"code":"document.scope_disclaimer.no_en","level":"a_valider","subject":"scope_disclaimer","message":"Texte de périmètre légal en français seulement : traduction anglaise à rédiger."},{"code":"vertebral.cd.capped","level":"a_valider","subject":"Cd","message":"Caudales plafonnées à 20 pour le sélecteur, alors que l'espèce varie (18–22) selon le commentaire source."},{"code":"finding.sources.none","level":"a_valider","subject":"pathologies.json","message":"Aucune source bibliographique sur les nœuds, alors que la règle projet en demande au moins une par entrée."},{"code":"annotation.geometry.hitbox","level":"informatif","subject":"géométrie","message":"Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur visuel n'est pas importé."}],"issues":[{"code":"annotation.no_findings","severity":"warning","path":"annotations[2].finding_zone_id","message":"Annotation \"region-sacree\" is linked to no finding zone"},{"code":"annotation.no_findings","severity":"warning","path":"annotations[3].finding_zone_id","message":"Annotation \"rect-only\" is linked to no finding zone"},{"code":"annotation.no_findings","severity":"warning","path":"annotations[6].finding_zone_id","message":"Annotation \"deux\" is linked to no finding zone"},{"code":"annotation.no_findings","severity":"warning","path":"annotations[8].finding_zone_id","message":"Annotation \"thoracic\" is linked to no finding zone"}]}},{"name":"minimal","main":"\n\n \n\n","head":"\n\n\n\n","catalog":"{\"schema_version\":\"2.0\",\"zones\":{\"hip\":{\"id\":\"hip\",\"name_fr\":\"Hanche\",\"name_en\":\"Hip\",\"categories\":[{\"id\":\"hip-dysfunctions\",\"name_fr\":\"hip-dysfunctions fr\",\"name_en\":\"hip-dysfunctions en\",\"children\":[{\"id\":\"a\",\"name_fr\":\"a fr\",\"name_en\":\"a en\"}]}]}}}","vertebrae":"const V = {C:7,T:18,L:6,S:5,Cd:21}","ok":true,"files":{"document.json":"{\n \"schema_version\": 2,\n \"species_id\": \"equine\",\n \"name\": {\n \"fr\": \"Cheval\",\n \"en\": \"Horse\"\n },\n \"description\": {\n \"fr\": \"Fiche anatomique officielle Faunosteo\",\n \"en\": \"Official Faunosteo anatomical sheet\"\n },\n \"scope_disclaimer\": {},\n \"attribution\": {\n \"authors\": [\"Faunosteo\"],\n \"license\": null,\n \"notes\": \"Import des données historiques: Horse.svg, Horse_head.svg, pathologies.json (schema 2.0)\"\n },\n \"vertebral_config\": {\n \"regions\": [\n {\n \"code\": \"C\",\n \"name\": {\n \"fr\": \"Cervicales\",\n \"en\": \"Cervical\"\n },\n \"count\": 7\n },\n {\n \"code\": \"T\",\n \"name\": {\n \"fr\": \"Thoraciques\",\n \"en\": \"Thoracic\"\n },\n \"count\": 18\n },\n {\n \"code\": \"L\",\n \"name\": {\n \"fr\": \"Lombaires\",\n \"en\": \"Lumbar\"\n },\n \"count\": 6\n },\n {\n \"code\": \"S\",\n \"name\": {\n \"fr\": \"Sacrales\",\n \"en\": \"Sacral\"\n },\n \"count\": 5\n },\n {\n \"code\": \"Cd\",\n \"name\": {\n \"fr\": \"Caudales\",\n \"en\": \"Caudal\"\n },\n \"count\": 21\n }\n ]\n },\n \"references\": [],\n \"categories\": [\n {\n \"id\": \"os\",\n \"name\": {\n \"fr\": \"Os\",\n \"en\": \"Bones\"\n },\n \"color\": null\n }\n ],\n \"views\": [\n {\n \"id\": \"main\",\n \"kind\": \"main\",\n \"name\": {\n \"fr\": \"Vue générale\",\n \"en\": \"Overview\"\n },\n \"svg_asset_id\": \"1e485f50-f39f-5560-b9fe-1f19efebf17d\",\n \"view_box\": null\n },\n {\n \"id\": \"head\",\n \"kind\": \"detail\",\n \"parent_view_id\": \"main\",\n \"name\": {\n \"fr\": \"Tête\",\n \"en\": \"Head\"\n },\n \"svg_asset_id\": \"022b9733-a668-5a48-9fd0-397b6df8968e\",\n \"view_box\": null\n }\n ],\n \"annotations\": [\n {\n \"id\": \"hip\",\n \"kind\": \"point\",\n \"view_id\": \"main\",\n \"category_id\": \"os\",\n \"laterality\": \"unpaired\",\n \"geometry\": {\n \"type\": \"circle\",\n \"cx\": 1,\n \"cy\": 1,\n \"r\": 1\n },\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"finding_zone_id\": \"hip\",\n \"vertebral_region_code\": null\n }\n ],\n \"finding_zones\": [\n {\n \"id\": \"hip\",\n \"name\": {\n \"fr\": \"Hanche\",\n \"en\": \"Hip\"\n },\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"kind\": \"dysfunction\",\n \"name\": {\n \"fr\": \"hip-dysfunctions fr\",\n \"en\": \"hip-dysfunctions en\"\n },\n \"children\": [\n {\n \"id\": \"a\",\n \"name\": {\n \"fr\": \"a fr\",\n \"en\": \"a en\"\n }\n }\n ]\n }\n ]\n }\n ]\n}\n","legacy-id-map.json":"{\n \"views\": {\n \"head\": \"head\"\n },\n \"annotations\": {\n \"m\": \"hip\"\n },\n \"categories\": {\n \"os\": \"os\"\n },\n \"finding_nodes\": {},\n \"assets\": {\n \"Main.svg\": \"1e485f50-f39f-5560-b9fe-1f19efebf17d\",\n \"Head.svg\": \"022b9733-a668-5a48-9fd0-397b6df8968e\"\n }\n}\n","assets.json":"[\n {\n \"file\": \"Main.svg\",\n \"sha256\": \"1043b19b834804e2f852c30fdcc9ca390c649bcce2758497c5b71fe009211edb\",\n \"byte_size\": 232,\n \"svg_asset_id\": \"1e485f50-f39f-5560-b9fe-1f19efebf17d\"\n },\n {\n \"file\": \"Head.svg\",\n \"sha256\": \"4b79df6d4031757c90cac20d3c6fe7c183dec8d08d0030e1d10bf1c33fc9d111\",\n \"byte_size\": 106,\n \"svg_asset_id\": \"022b9733-a668-5a48-9fd0-397b6df8968e\"\n }\n]\n","IMPORT-REPORT.md":"# Rapport d'import : fiche anatomique équine v1\n\nGénéré par `pnpm import:equine` à partir des données historiques. Ne pas modifier à la main : relancer la commande.\n\nStatut : **brouillon** (version 1 en `draft`), jamais publié par le seed. Fiche `503dc301-a8b1-50d4-9e44-0919b2fc2916`, espèce `equine`.\n\nLes éléments de la section « Anomalies à valider » demandent une décision métier avant toute publication.\n\n## 1. Sources et empreintes\n\n| Fichier | Octets | sha256 | Id d'asset |\n| ------------------ | ------ | ------------------------------------------------------------------ | -------------------------------------- |\n| `Main.svg` | 232 | `1043b19b834804e2f852c30fdcc9ca390c649bcce2758497c5b71fe009211edb` | `1e485f50-f39f-5560-b9fe-1f19efebf17d` |\n| `Head.svg` | 106 | `4b79df6d4031757c90cac20d3c6fe7c183dec8d08d0030e1d10bf1c33fc9d111` | `022b9733-a668-5a48-9fd0-397b6df8968e` |\n| `pathologies.json` | 251 | `35be56f6ea5df224da206aec5b58591905d66be74488eeab1ddd89562e12e645` | - |\n| `vertebrae.ts` | 34 | `47f0fb422934bdb2ac234e79c6faccd734ffa2af96846e1f91434f961ac0e734` | - |\n\nLes ids d'asset sont dérivés du sha256 du fichier (UUID déterministe), les deux SVG sont copiés à l'identique dans `assets/`.\n\n- vue `main` : viewBox `0 0 1 1` (view_box du document laissé à null, le SVG porte le sien)\n- vue `head` : viewBox `0 0 1 1` (view_box du document laissé à null, le SVG porte le sien)\n\n## 2. Volumes\n\n| Mesure | Valeur |\n| ------------------------------------------ | ------ |\n| Annotations | 1 |\n| dont vue `main` (Horse.svg) | 1 |\n| dont vue `head` (Horse_head.svg) | 0 |\n| Annotations reliées à une zone de constats | 1 |\n| Déclencheurs de vue détail | 0 |\n| Vues | 2 |\n| Zones vertébrales avec code de région | 0 |\n| Annotations bilatérales | 0 |\n| Zones de constats (catalogue) | 1 |\n| Nœuds (catégories incluses) | 2 |\n| Feuilles | 1 |\n| Orientations vétérinaires | 0 |\n\nContrôle entrée = sortie, compté des deux côtés (sources lues, document écrit). L'importateur s'arrête au moindre écart :\n\n| Contrôle | Lu (sources) | Écrit (document) |\n| ------------------------------------ | ------------ | ---------------- |\n| Annotations (data-anno-id distincts) | 1 | 1 |\n| Nœuds (catégories incluses) | 2 | 2 |\n| Feuilles | 1 | 1 |\n| Orientations vétérinaires | 0 | 0 |\n\n## 3. Annotations\n\n| Id historique | Nouvel id | Vue | Type | Latéralité | Région | Zone de constats | Géométrie |\n| ------------- | --------- | ---- | ----- | ---------- | ------ | ---------------- | ----------------- |\n| `m` | `hip` | main | point | unpaired | - | `hip` | cercle (1, 1) r 1 |\n\n## 4. Catégories d'annotation\n\n| Id SVG | Id | Libellé FR | Libellé EN | Origine du libellé |\n| ------ | ---- | ---------- | ---------- | ---------------------- |\n| `os` | `os` | Os | Bones | importateur, à valider |\n\nCouleur : `null` partout (les couleurs du SVG restent dans l'asset). Dans les SVG, `data-anno-category-name` répète le slug (`articulations`, `os`) : ce n'est pas un libellé, le libellé lisible de la table de l'importateur est utilisé.\n\n## 5. Configuration vertébrale\n\n| Code | Nom FR | Nom EN | Vertèbres | Origine du libellé |\n| ---- | ----------- | -------- | --------- | ---------------------- |\n| `C` | Cervicales | Cervical | 7 | importateur, à valider |\n| `T` | Thoraciques | Thoracic | 18 | importateur, à valider |\n| `L` | Lombaires | Lumbar | 6 | importateur, à valider |\n| `S` | Sacrales | Sacral | 5 | importateur, à valider |\n| `Cd` | Caudales | Caudal | 21 | importateur, à valider |\n\nNombres de vertèbres : `vertebrae.ts`. Noms de région : écrits par l'importateur (aucune source ne les porte).\n\nCodes de région déduits des libellés (racines `cervic`, `thorac`/`dors`, `lombair`/`lumbar`, `sacral`/`sacre`, `caudal`/`coccyg`, FR puis EN). Déduction faite une fois ici, le document porte le code :\n\n| Annotation | Libellé lu | Racine | Code |\n| ---------- | ---------- | ------ | ---- |\n\n## 6. Arbre de constats par zone\n\nCopie fidèle du catalogue : ids, libellés, descriptions présentes, orientations vétérinaires et sources. Ordre des zones et des catégories conservé. Nœuds = catégories incluses.\n\n| Zone | Nom | Nœuds | Feuilles | Orientations vét. |\n| --------- | ------ | ----- | -------- | ----------------- |\n| `hip` | Hanche | 2 | 1 | 0 |\n| **Total** | | 2 | 1 | 0 |\n\n## 7. Anomalies à valider\n\n12 points demandent une décision, 2 sont informatifs.\n\n### À valider\n\n| Code | Objet | Détail |\n| ------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| `label.authored` | name | Libellé écrit par l'importateur : FR « Cheval », EN « Horse ». |\n| `label.authored` | description | Libellé écrit par l'importateur : FR « Fiche anatomique officielle Faunosteo », EN « Official Faunosteo anatomical sheet ». |\n| `label.authored` | views.main | Libellé écrit par l'importateur : FR « Vue générale », EN « Overview ». |\n| `label.authored` | views.head | Libellé écrit par l'importateur : FR « Tête », EN « Head ». |\n| `label.authored` | vertebral_config.C | Libellé écrit par l'importateur : FR « Cervicales », EN « Cervical ». |\n| `label.authored` | vertebral_config.T | Libellé écrit par l'importateur : FR « Thoraciques », EN « Thoracic ». |\n| `label.authored` | vertebral_config.L | Libellé écrit par l'importateur : FR « Lombaires », EN « Lumbar ». |\n| `label.authored` | vertebral_config.S | Libellé écrit par l'importateur : FR « Sacrales », EN « Sacral ». |\n| `label.authored` | vertebral_config.Cd | Libellé écrit par l'importateur : FR « Caudales », EN « Caudal ». |\n| `category.label.authored` | os | Libellé écrit par l'importateur : FR « Os », EN « Bones ». |\n| `vertebral.cd.capped` | Cd | Caudales plafonnées à 21 pour le sélecteur, alors que l'espèce varie (non précisée) selon le commentaire source. |\n| `finding.sources.none` | pathologies.json | Aucune source bibliographique sur les nœuds, alors que la règle projet en demande au moins une par entrée. |\n\n### Informatif\n\n| Code | Objet | Détail |\n| -------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| `finding.id.shared_across_zones` | 0 identifiants | Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, adressage par zone + chemin). Les plus fréquents : . |\n| `annotation.geometry.hitbox` | géométrie | Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur visuel n'est pas importé. |\n\n## 8. Données non importées\n\nAucune donnée métier écartée.\n\nNon repris par construction :\n\n- `schema_version` du catalogue (`2.0`) : version du format historique, remplacée par `schema_version: 2` du document canonique ; la valeur d'origine est citée dans `attribution.notes`.\n- bloc `species` du catalogue (`equine`, Cheval / Horse) : porté par `species_id` du document et par la table `public.species` ; le nom de la fiche est écrit séparément (voir anomalies `label.authored`).\n- second élément graphique de chaque annotation (marqueur visuel) : reste dans l'asset SVG copié à l'identique, le document ne garde que la zone de clic.\n- `data-anno-category-name` : répète le slug technique (`articulations`, `os`), ce n'est pas un libellé ; le libellé de catégorie vient de la table de l'importateur (section 4).\n\n## 9. Résultat de validation\n\n- Forme (`AnatomicalSheetDocumentSchema`) : conforme.\n- Intégrité (`validateSheetDocument`) : 1 erreur(s), 0 avertissement(s).\n\n| Gravité | Code | Chemin | Message |\n| ------- | ------------------ | ---------- | ---------------------------------------- |\n| error | `view.unreachable` | `views[1]` | No detail_trigger in \"main\" opens \"head\" |\n"},"parts":{"assets":[{"file":"Main.svg","sha256":"1043b19b834804e2f852c30fdcc9ca390c649bcce2758497c5b71fe009211edb","byte_size":232,"svg_asset_id":"1e485f50-f39f-5560-b9fe-1f19efebf17d"},{"file":"Head.svg","sha256":"4b79df6d4031757c90cac20d3c6fe7c183dec8d08d0030e1d10bf1c33fc9d111","byte_size":106,"svg_asset_id":"022b9733-a668-5a48-9fd0-397b6df8968e"}],"sourceDigests":[{"file":"pathologies.json","sha256":"35be56f6ea5df224da206aec5b58591905d66be74488eeab1ddd89562e12e645","byte_size":251},{"file":"vertebrae.ts","sha256":"47f0fb422934bdb2ac234e79c6faccd734ffa2af96846e1f91434f961ac0e734","byte_size":34}],"sheetId":"503dc301-a8b1-50d4-9e44-0919b2fc2916","viewBoxes":{"main":"0 0 1 1","head":"0 0 1 1"},"annotationRows":[{"legacyId":"m","newId":"hip","viewId":"main","kind":"point","laterality":"unpaired","regionCode":null,"findingZoneId":"hip","geometry":"cercle (1, 1) r 1"}],"regionInferences":[],"zoneStats":[{"zoneId":"hip","nodes":2,"leaves":1,"vetReferrals":0}],"stats":{"legacyAnnotations":1,"annotations":1,"annotationsByView":{"main":1,"head":0},"linkedAnnotations":1,"triggers":0,"views":2,"vertebralAnnotations":0,"bilateral":0,"findingZones":1,"nodes":2,"leaves":1,"vetReferrals":0,"missingDescriptionEn":0,"sources":0},"anomalies":[{"code":"label.authored","level":"a_valider","subject":"name","message":"Libellé écrit par l'importateur : FR « Cheval », EN « Horse »."},{"code":"label.authored","level":"a_valider","subject":"description","message":"Libellé écrit par l'importateur : FR « Fiche anatomique officielle Faunosteo », EN « Official Faunosteo anatomical sheet »."},{"code":"label.authored","level":"a_valider","subject":"views.main","message":"Libellé écrit par l'importateur : FR « Vue générale », EN « Overview »."},{"code":"label.authored","level":"a_valider","subject":"views.head","message":"Libellé écrit par l'importateur : FR « Tête », EN « Head »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.C","message":"Libellé écrit par l'importateur : FR « Cervicales », EN « Cervical »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.T","message":"Libellé écrit par l'importateur : FR « Thoraciques », EN « Thoracic »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.L","message":"Libellé écrit par l'importateur : FR « Lombaires », EN « Lumbar »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.S","message":"Libellé écrit par l'importateur : FR « Sacrales », EN « Sacral »."},{"code":"label.authored","level":"a_valider","subject":"vertebral_config.Cd","message":"Libellé écrit par l'importateur : FR « Caudales », EN « Caudal »."},{"code":"category.label.authored","level":"a_valider","subject":"os","message":"Libellé écrit par l'importateur : FR « Os », EN « Bones »."},{"code":"finding.id.shared_across_zones","level":"informatif","subject":"0 identifiants","message":"Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, adressage par zone + chemin). Les plus fréquents : ."},{"code":"vertebral.cd.capped","level":"a_valider","subject":"Cd","message":"Caudales plafonnées à 21 pour le sélecteur, alors que l'espèce varie (non précisée) selon le commentaire source."},{"code":"finding.sources.none","level":"a_valider","subject":"pathologies.json","message":"Aucune source bibliographique sur les nœuds, alors que la règle projet en demande au moins une par entrée."},{"code":"annotation.geometry.hitbox","level":"informatif","subject":"géométrie","message":"Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur visuel n'est pas importé."}],"issues":[{"code":"view.unreachable","severity":"error","path":"views[1]","message":"No detail_trigger in \"main\" opens \"head\""}]}},{"name":"schema","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\n \"schema_version\": 2.5,\n \"scope_disclaimer\": \"Périmètre « test »\",\n \"zones\": {\n \"2\": {\n \"id\": \"2\",\n \"name_fr\": \"Deux\",\n \"name_en\": \"Two\",\n \"categories\": [\n {\n \"id\": \"weird\",\n \"name_fr\": \"weird fr\",\n \"name_en\": \"weird en\"\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n }\n ]\n },\n \"10\": {\n \"id\": \"10\",\n \"name_fr\": \"Dix\",\n \"name_en\": \"Ten\",\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n }\n ]\n }\n ]\n },\n \"hip\": {\n \"id\": \"hip\",\n \"name_fr\": \"Hanche\",\n \"name_en\": \"Hip\",\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"name_fr\": \"hip-dysfunctions fr\",\n \"name_en\": \"hip-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"Épaule Gauche\",\n \"name_fr\": \"Épaule Gauche fr\",\n \"name_en\": \"Épaule Gauche en\",\n \"description_fr\": \"seulement FR\"\n },\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\",\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name_fr\": \"deep fr\",\n \"name_en\": \"deep en\",\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name_fr\": \"leaf fr\",\n \"name_en\": \"leaf en\",\n \"description_en\": \"EN only\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"name_fr\": \"spine-observations fr\",\n \"name_en\": \"spine-observations en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n }\n ]\n }\n ]\n },\n \"spine\": {\n \"id\": \"spine\",\n \"name_fr\": \"Colonne\",\n \"name_en\": \"Spine\",\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"name_fr\": \"spine-dysfunctions fr\",\n \"name_en\": \"spine-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n },\n {\n \"id\": \"x y\",\n \"name_fr\": \"x y fr\",\n \"name_en\": \"x y en\"\n }\n ]\n }\n ]\n }\n }\n}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"[\n {\n \"code\": \"not_finite\",\n \"message\": \"Number must be finite\",\n \"path\": [\n \"annotations\",\n 5,\n \"geometry\",\n \"r\"\n ]\n }\n]"},{"name":"no-zones","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\"schema_version\":\"2.0\"}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"pathologies.json: \"zones\" object missing"},{"name":"catalog-bom","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\n \"schema_version\": 2.5,\n \"scope_disclaimer\": \"Périmètre « test »\",\n \"zones\": {\n \"2\": {\n \"id\": \"2\",\n \"name_fr\": \"Deux\",\n \"name_en\": \"Two\",\n \"categories\": [\n {\n \"id\": \"weird\",\n \"name_fr\": \"weird fr\",\n \"name_en\": \"weird en\"\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n }\n ]\n },\n \"10\": {\n \"id\": \"10\",\n \"name_fr\": \"Dix\",\n \"name_en\": \"Ten\",\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n }\n ]\n }\n ]\n },\n \"hip\": {\n \"id\": \"hip\",\n \"name_fr\": \"Hanche\",\n \"name_en\": \"Hip\",\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"name_fr\": \"hip-dysfunctions fr\",\n \"name_en\": \"hip-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"Épaule Gauche\",\n \"name_fr\": \"Épaule Gauche fr\",\n \"name_en\": \"Épaule Gauche en\",\n \"description_fr\": \"seulement FR\"\n },\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\",\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name_fr\": \"deep fr\",\n \"name_en\": \"deep en\",\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name_fr\": \"leaf fr\",\n \"name_en\": \"leaf en\",\n \"description_en\": \"EN only\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"name_fr\": \"spine-observations fr\",\n \"name_en\": \"spine-observations en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n }\n ]\n }\n ]\n },\n \"spine\": {\n \"id\": \"spine\",\n \"name_fr\": \"Colonne\",\n \"name_en\": \"Spine\",\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"name_fr\": \"spine-dysfunctions fr\",\n \"name_en\": \"spine-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n },\n {\n \"id\": \"x y\",\n \"name_fr\": \"x y fr\",\n \"name_en\": \"x y en\"\n }\n ]\n }\n ]\n }\n }\n}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"Unexpected token '', \"{\n \"sche\"... is not valid JSON"},{"name":"no-cd","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\n \"schema_version\": 2.5,\n \"scope_disclaimer\": \"Périmètre « test »\",\n \"zones\": {\n \"2\": {\n \"id\": \"2\",\n \"name_fr\": \"Deux\",\n \"name_en\": \"Two\",\n \"categories\": [\n {\n \"id\": \"weird\",\n \"name_fr\": \"weird fr\",\n \"name_en\": \"weird en\"\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n }\n ]\n },\n \"10\": {\n \"id\": \"10\",\n \"name_fr\": \"Dix\",\n \"name_en\": \"Ten\",\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n }\n ]\n }\n ]\n },\n \"hip\": {\n \"id\": \"hip\",\n \"name_fr\": \"Hanche\",\n \"name_en\": \"Hip\",\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"name_fr\": \"hip-dysfunctions fr\",\n \"name_en\": \"hip-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"Épaule Gauche\",\n \"name_fr\": \"Épaule Gauche fr\",\n \"name_en\": \"Épaule Gauche en\",\n \"description_fr\": \"seulement FR\"\n },\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\",\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name_fr\": \"deep fr\",\n \"name_en\": \"deep en\",\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name_fr\": \"leaf fr\",\n \"name_en\": \"leaf en\",\n \"description_en\": \"EN only\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"name_fr\": \"spine-observations fr\",\n \"name_en\": \"spine-observations en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n }\n ]\n }\n ]\n },\n \"spine\": {\n \"id\": \"spine\",\n \"name_fr\": \"Colonne\",\n \"name_en\": \"Spine\",\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"name_fr\": \"spine-dysfunctions fr\",\n \"name_en\": \"spine-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n },\n {\n \"id\": \"x y\",\n \"name_fr\": \"x y fr\",\n \"name_en\": \"x y en\"\n }\n ]\n }\n ]\n }\n }\n}","vertebrae":"const V = { C: 7, T: 18, L: 6, S: 5 }","ok":false,"error":"vertebrae.ts: region Cd missing"},{"name":"no-formula","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\n \"schema_version\": 2.5,\n \"scope_disclaimer\": \"Périmètre « test »\",\n \"zones\": {\n \"2\": {\n \"id\": \"2\",\n \"name_fr\": \"Deux\",\n \"name_en\": \"Two\",\n \"categories\": [\n {\n \"id\": \"weird\",\n \"name_fr\": \"weird fr\",\n \"name_en\": \"weird en\"\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n }\n ]\n },\n \"10\": {\n \"id\": \"10\",\n \"name_fr\": \"Dix\",\n \"name_en\": \"Ten\",\n \"categories\": [\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n }\n ]\n }\n ]\n },\n \"hip\": {\n \"id\": \"hip\",\n \"name_fr\": \"Hanche\",\n \"name_en\": \"Hip\",\n \"categories\": [\n {\n \"id\": \"hip-dysfunctions\",\n \"name_fr\": \"hip-dysfunctions fr\",\n \"name_en\": \"hip-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"Épaule Gauche\",\n \"name_fr\": \"Épaule Gauche fr\",\n \"name_en\": \"Épaule Gauche en\",\n \"description_fr\": \"seulement FR\"\n },\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\",\n \"requires_vet_referral\": true,\n \"children\": []\n },\n {\n \"id\": \"deep\",\n \"name_fr\": \"deep fr\",\n \"name_en\": \"deep en\",\n \"children\": [\n {\n \"id\": \"leaf\",\n \"name_fr\": \"leaf fr\",\n \"name_en\": \"leaf en\",\n \"description_en\": \"EN only\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"anamnesis\",\n \"name_fr\": \"anamnesis fr\",\n \"name_en\": \"anamnesis en\",\n \"children\": [\n {\n \"id\": \"age\",\n \"name_fr\": \"age fr\",\n \"name_en\": \"age en\"\n },\n {\n \"id\": \"use\",\n \"name_fr\": \"use fr\",\n \"name_en\": \"use en\"\n }\n ]\n },\n {\n \"id\": \"spine-observations\",\n \"name_fr\": \"spine-observations fr\",\n \"name_en\": \"spine-observations en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n }\n ]\n }\n ]\n },\n \"spine\": {\n \"id\": \"spine\",\n \"name_fr\": \"Colonne\",\n \"name_en\": \"Spine\",\n \"categories\": [\n {\n \"id\": \"spine-dysfunctions\",\n \"name_fr\": \"spine-dysfunctions fr\",\n \"name_en\": \"spine-dysfunctions en\",\n \"children\": [\n {\n \"id\": \"ok\",\n \"name_fr\": \"ok fr\",\n \"name_en\": \"ok en\"\n },\n {\n \"id\": \"x y\",\n \"name_fr\": \"x y fr\",\n \"name_en\": \"x y en\"\n }\n ]\n }\n ]\n }\n }\n}","vertebrae":"nothing here","ok":false,"error":"vertebrae.ts: formula object not found"},{"name":"inline-sources","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\"zones\":{\"hip\":{\"id\":\"hip\",\"name_fr\":\"Hanche\",\"name_en\":\"Hip\",\"categories\":[{\"id\":\"c\",\"name_fr\":\"c fr\",\"name_en\":\"c en\",\"sources\":[{}]}]}}}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"1 inline legacy sources found: map them to references"},{"name":"key-not-id","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\"zones\":{\"hip\":{\"id\":\"hop\",\"name_fr\":\"Hanche\",\"name_en\":\"Hip\",\"categories\":[]}}}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"zone key hip ≠ id hop"},{"name":"truthy-referral","main":"\n\n \n \n \n \n \n \n \n\n","head":"\n\n \n \n \n\n","catalog":"{\"zones\":{\"hip\":{\"id\":\"hip\",\"name_fr\":\"Hanche\",\"name_en\":\"Hip\",\"categories\":[{\"id\":\"c\",\"name_fr\":\"c fr\",\"name_en\":\"c en\",\"children\":[{\"id\":\"d\",\"name_fr\":\"d fr\",\"name_en\":\"d en\",\"requires_vet_referral\":\"yes\"}]}]}}}","vertebrae":"// varies 18 - 22 caudal\nexport const FORMULA = { C: 7, T: 18, L: 6, S: 5, Cd: 18, Cd: 20 }\n","ok":false,"error":"zone hip: vetReferrals 1 in, 0 out"}]} diff --git a/crates/core/tests/oracles/r5/markdown-sweep.json b/crates/core/tests/oracles/r5/markdown-sweep.json new file mode 100644 index 00000000..22be5e6a --- /dev/null +++ b/crates/core/tests/oracles/r5/markdown-sweep.json @@ -0,0 +1 @@ +{"baseline":{"schema_version":2,"species_id":"equine","name":{"fr":"Mini","en":"Mini"},"description":{},"scope_disclaimer":{},"attribution":{"authors":[],"license":null,"notes":null},"vertebral_config":{"regions":[{"code":"C","name":{"fr":"Cervicales","en":"Cervical"},"count":7},{"code":"T","name":{"fr":"Thoraciques","en":"Thoracic"},"count":18}]},"references":[],"categories":[{"id":"joints","name":{"fr":"Articulations","en":"Joints"},"color":null},{"id":"bones","name":{"fr":"Os","en":"Bones"},"color":null}],"views":[{"id":"main","kind":"main","name":{"fr":"Vue","en":"View"},"svg_asset_id":"3f6c1b52-8a4e-4d17-9b0c-5e2a7d91c4f8","view_box":null},{"id":"head","kind":"detail","parent_view_id":"main","name":{"fr":"Tête","en":"Head"},"svg_asset_id":null,"view_box":{"min_x":0,"min_y":0,"width":10,"height":10}}],"annotations":[{"id":"hip","kind":"point","view_id":"main","category_id":"joints","laterality":"bilateral","geometry":{"type":"circle","cx":1,"cy":2,"r":3},"name":{"fr":"Hanche","en":"Hip"},"finding_zone_id":"hip","vertebral_region_code":null},{"id":"neck","kind":"zone","view_id":"main","category_id":"bones","laterality":"unpaired","geometry":null,"name":{"fr":"Cou","en":"Neck"},"finding_zone_id":"neck","vertebral_region_code":"C"},{"id":"head-trigger","kind":"detail_trigger","view_id":"main","category_id":"bones","laterality":"unpaired","geometry":null,"name":null,"opens_view_id":"head"}],"finding_zones":[{"id":"hip","name":{"fr":"Hanche","en":"Hip"},"categories":[{"id":"hip-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"mobility","name":{"fr":"mobility fr","en":"mobility en"},"children":[{"id":"flexion","name":{"fr":"flexion fr","en":"flexion en"}},{"id":"extension","name":{"fr":"extension fr","en":"extension en"}}]},{"id":"pain","name":{"fr":"pain fr","en":"pain en"}}]},{"id":"anamnesis","kind":"anamnesis","name":{"fr":"Anamnèse","en":"Anamnesis"},"children":[{"id":"trauma","name":{"fr":"trauma fr","en":"trauma en"}}]}]},{"id":"neck","name":{"fr":"Cou","en":"Neck"},"categories":[{"id":"neck-dysfunctions","kind":"dysfunction","name":{"fr":"Dysfonctions","en":"Dysfunctions"},"children":[{"id":"stiffness","name":{"fr":"stiffness fr","en":"stiffness en"}},{"id":"vet","name":{"fr":"vet fr","en":"vet en"},"requires_vet_referral":true}]}]}]},"references":[{"id":"atlas","type":"book","citation":"Atlas of anatomy","url":null,"doi":null},{"id":"paper","type":"journal","citation":"A paper","url":null,"doi":"10.1/x"}],"legacy_id_map":{"views":{"head":"head"},"annotations":{"legacy-hip":"hip","legacy-neck":"neck"},"categories":{},"finding_nodes":{},"assets":{}},"cases":[{"probe":"*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *","en":"Title"},"rationale":"Raison * fin.","reference_ids":[],"question":"Question * ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*"}]}]},"changelog_raw_sha256":"77926ee5c69c45be2f9576e04a7e3430b45c203bc667c5f1b51ac3a21e7ae4d9","changelog_sha256":"a84644e09477bf50e413ebe1e8240ccc04657488381b093755d349a35e494843","review_raw_sha256":"a3fc194f01e61c8ae010271894c962b40b8ef4b23987adb9d7712190839734df","review_sha256":"6b2208027f21d2b663a202a8d39accb640f9cae26bbceaa701b2754bdd6f8342"},{"probe":"*x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *x","en":"Title"},"rationale":"Raison *x fin.","reference_ids":[],"question":"Question *x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*x"}]}]},"changelog_raw_sha256":"a29af5d1b46d52b0de4a334e31e16aa4765c976865fee8ed0b2e00b7f60af4f4","changelog_sha256":"b150e9617d14894c9c33a2c95feab51b4b59245b74a78d48015569ffc300dec3","review_raw_sha256":"0e6605a31ba79a30d66e8ab8fe3858b4c305a816ea7b1e130201e8300611e218","review_sha256":"8693621d140233c9c7708c943621e61586289d0f8a72b93ca2e071eb58a5d45f"},{"probe":"x*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x*","en":"Title"},"rationale":"Raison x* fin.","reference_ids":[],"question":"Question x* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x*"}]}]},"changelog_raw_sha256":"9e5ef50f93456c0b45cad4be873bfa45e1d95d072b90a012839818874237bd40","changelog_sha256":"daae773dcc4e69ef4eabf9155211fdf173d7e6f67ff64b523d0e57b1f7b027be","review_raw_sha256":"43a30eb4d22ee651c8309af710eb177e90e15295fd166aab6673aa248e6ebca5","review_sha256":"aaa322dccb5490bfee8d3c7c477e6246881f29f914ae01633026425e0ee5b68a"},{"probe":"a * b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a * b","en":"Title"},"rationale":"Raison a * b fin.","reference_ids":[],"question":"Question a * b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a * b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a * b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a * b"}]}]},"changelog_raw_sha256":"cc13a3278e0e2342112eaa41c36943f306f95b4af15ba2bd993c313cef56c88c","changelog_sha256":"0b4bc56193debb1b284de8713da5e51721c2f69e7606ccc75943622e4bce2d8a","review_raw_sha256":"65665bbe6aee464911e1825f38e8203f9a53741470a655f429b81d1ecda09dd0","review_sha256":"dd1b5cd4a6dfeab98f5578b731752014fc7cb76844ae5c9bbc7b437b7669c59c"},{"probe":"a*b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a*b","en":"Title"},"rationale":"Raison a*b fin.","reference_ids":[],"question":"Question a*b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a*b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a*b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a*b"}]}]},"changelog_raw_sha256":"b9a95d3588c28c6d9e2146c70915facd622e6d72f6697f00b012369f92c4f40e","changelog_sha256":"947246b317dd77734dc0efe9a0fe9106a74b3759ff2d436fe1b6aeac2ed6b7fa","review_raw_sha256":"419b635f2586bf068b08838a6a89bd18f4b3a85c8ed9aafa3746c1a4641c750a","review_sha256":"1994c6fcc64efc437e104cfeb6c178572b64824ab4c17372002e767ff49ff9b1"},{"probe":"**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **","en":"Title"},"rationale":"Raison ** fin.","reference_ids":[],"question":"Question ** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**"}]}]},"changelog_raw_sha256":"f0c23317d70c8e19f2110ce33b7a1dead50617fd2460215ec4677a903707c476","changelog_sha256":"4c0c4474bff01c032249de7e50aa4746129f7f6b3ab1e86d3a014e702e3baa57","review_raw_sha256":"a1e6f86b86f7bce8b91d043bae066a48728a36e23fe2c91f004d71f52bb77011","review_sha256":"47c21a8d946a23aec7cd3a6c260a5e830a02877a0e6b9730e9a23dc372c44ed1"},{"probe":"_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _","en":"Title"},"rationale":"Raison _ fin.","reference_ids":[],"question":"Question _ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_"}]}]},"changelog_raw_sha256":"6912c39377c06c076a15c51588a9a2671518d6f2f53be9bcd6b1822a5259fcc2","changelog_sha256":"c58a7ec91184edde3fd585376d0383d3f52234dd1e984d17c59a7c7ba0945481","review_raw_sha256":"a0daddf1e09947a06888c3e7dd5ce7acc7be08608733fa7a789ecb6895ddee0e","review_sha256":"896d3620314ffe0d4217d050a9ce23fb6d4ce7f664ecf0fab20947bc6084d69e"},{"probe":"_x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _x","en":"Title"},"rationale":"Raison _x fin.","reference_ids":[],"question":"Question _x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_x"}]}]},"changelog_raw_sha256":"7b543c50d2014a7000a99584618f5a8983c1cfe39041699b889d528bc550a146","changelog_sha256":"16da960d33f6e2b8512cd78be8abd66c83cf98fd803952ac8d3c22976bf35c75","review_raw_sha256":"0349bb2c6c773d469473e08f6658e741e303b8d0686a71e68c9ccc5647949317","review_sha256":"ec5d05d0f1ecc59b4b9a228147435da488c701d2d2d96ae0fa71dffb399556fc"},{"probe":"x_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x_","en":"Title"},"rationale":"Raison x_ fin.","reference_ids":[],"question":"Question x_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x_"}]}]},"changelog_raw_sha256":"73093014b29faf557f9b559c6f4a1195b447f1d98b1c209b37ff5ff47e77c1ba","changelog_sha256":"c34c540f224cff15d21063c7a1d39d97757ec9540804ace01bb57ad4fc756a3f","review_raw_sha256":"b8b5b528fe6baee268d9c2a07cbfaf1759ef312c8ddf8021f9e6372c6c290bbd","review_sha256":"45722bee76f3d611605ccbab5001197b1d4bd38f6081dbf60b23293b9145f506"},{"probe":"a _ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a _ b","en":"Title"},"rationale":"Raison a _ b fin.","reference_ids":[],"question":"Question a _ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a _ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a _ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a _ b"}]}]},"changelog_raw_sha256":"aeadb7869d4e2120e8d1d15c132cd4666669fdd5dbdb1d3360716b191a7cc536","changelog_sha256":"cbd8ffddc9eb88a8973fa81994b56e29b7dd7f7aa94fddce9a15438f472ed835","review_raw_sha256":"47828de5710393ae0a336e9c62387301c8bdc2af8583bbdec615003701620d64","review_sha256":"87b387650753bb705339550ae8c70ae858a1ab24f3854e88799eff8a3561a5f8"},{"probe":"a_b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a_b","en":"Title"},"rationale":"Raison a_b fin.","reference_ids":[],"question":"Question a_b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a_b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a_b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a_b"}]}]},"changelog_raw_sha256":"c0385f84a74836ca9e5a448997df331d8af91fd61722f4760f68d974a61000f2","changelog_sha256":"5e1c6c99cd87ce05936850d7d841a4f63621fe3ffb72cf54e95b8d360db0ff15","review_raw_sha256":"a8a9fd3bb387714544971e94f26572a561eeb070e59da2faebffd81ed95e6211","review_sha256":"c09337a82096ea687495e97ad2cc66b8ae9a2af13c5b3844d98b410b0f271462"},{"probe":"__","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre __","en":"Title"},"rationale":"Raison __ fin.","reference_ids":[],"question":"Question __ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation __","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label __"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"__"}]}]},"changelog_raw_sha256":"ae9fe3953c97f607c8c0417094efe435cfe278894c3ef41d2e509a8e18482e28","changelog_sha256":"e4219a7da0297de3aa3f7543fa56819af571a6498d9fe804abad12d47687d131","review_raw_sha256":"8d47a6cfafd66f8b39e4bca639092023c41af9b93b80c7e32403f886c5212b74","review_sha256":"a16b08acbf7c968c2ded09fe0c53d8adb676c447e3b1ef2c7053b1478611babd"},{"probe":"~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~","en":"Title"},"rationale":"Raison ~ fin.","reference_ids":[],"question":"Question ~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~"}]}]},"changelog_raw_sha256":"8be164153436669011f1e22aa2e29f2023b00849eac8a0d83bc0ca7e5540fbf9","changelog_sha256":"e8eb63b61abce509b3a9b40da927bcf60f91dede6f075c824aef8b14bf5641a3","review_raw_sha256":"089fe30470c5a084c4c064d0c1b6e439bc870ecd12c6b00a9c48e4f67770682b","review_sha256":"afa22fc5c69ff30f92594389ef46c8c315fa0f8aa3843a824fd96912ebd14a37"},{"probe":"~x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~x","en":"Title"},"rationale":"Raison ~x fin.","reference_ids":[],"question":"Question ~x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~x"}]}]},"changelog_raw_sha256":"36dcbb82611ae1dccd8ce1e29f2e7bc5fd3264830922403a4d104d5ec93a1975","changelog_sha256":"9041fd30e767e50ad491b6a1f7676b9361a8ae9d040f98815c803f4e6d80b308","review_raw_sha256":"47b1139dc36f4fc663cb5021d41ba6c0b0ebb915bb28a89b5405c6f045135481","review_sha256":"a6af46be79f7fcd7896793532fc67e1bd8d7c8c6c1659b1e59d0731c59bb37ae"},{"probe":"x~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x~","en":"Title"},"rationale":"Raison x~ fin.","reference_ids":[],"question":"Question x~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x~"}]}]},"changelog_raw_sha256":"4c37f55a0c8695e446a58a08ebba50c3cfecf24f2eb29a4864ce65fcc31ac3fb","changelog_sha256":"87628ca8fcb5e3893dac1ff0720ed487aa7d73b207b491ae5864f8810cc00d34","review_raw_sha256":"5111269628a13597ec0b6f566bacfeb88466352e2550f99c837e92c83ec7aa51","review_sha256":"234f261d7a7135d6d3ac804c47474ae87c520be1f5e68016bf3400decb04a3e3"},{"probe":"a ~ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ~ b","en":"Title"},"rationale":"Raison a ~ b fin.","reference_ids":[],"question":"Question a ~ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ~ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ~ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ~ b"}]}]},"changelog_raw_sha256":"8983789997674ac395b388f8804d3899085a09e8c1fe2745ef656de310891725","changelog_sha256":"15e2a610f66d5d2ac7296a03c97b2186af3e89656dc0797bd2fda14960a1e5c1","review_raw_sha256":"531172d05b6a57e27a5787db1811269abc2c714e53c6400ab56464aa087e9724","review_sha256":"d02ebf3ea8283d6e70bd9b8dae18434767d459e30ff40734f6e066119498c8bb"},{"probe":"a~b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a~b","en":"Title"},"rationale":"Raison a~b fin.","reference_ids":[],"question":"Question a~b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a~b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a~b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a~b"}]}]},"changelog_raw_sha256":"bb3550eab81ad24d6f2d214aa9b840549c1f2040475a52a28583733394b8c384","changelog_sha256":"cdf96ed1196a8dc8066c08bca70e77ea37ab6228740407f99ea761985cd3d534","review_raw_sha256":"ddb97eeecd87e2d58cd874be3e2acfceb7ec6d13a30d481b19932131f655674a","review_sha256":"d919d2e33b7c87b68c3a44a44ac193c2d38174dbf2e18cbe6d0a6b1956deed9d"},{"probe":"~~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~~","en":"Title"},"rationale":"Raison ~~ fin.","reference_ids":[],"question":"Question ~~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~~"}]}]},"changelog_raw_sha256":"3132f638531e6f8ab1df4868761ce3b2f5e7ebc5b7dcaf78d1f0b2ac68fbe591","changelog_sha256":"85a562d7211ee711428ad933654563ad8f66d90a7e8b5e5177754ff46093bf8d","review_raw_sha256":"63c3baab135e16dbda36d9c1dff54cc2ee777335de6951f6ec9bdf2944ca6896","review_sha256":"8fad5ab50e630d6ed6b3ed0f699dcdc98759cd14c4c54686aa11eb5cb4273a3c"},{"probe":"\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\","en":"Title"},"rationale":"Raison \\ fin.","reference_ids":[],"question":"Question \\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\"}]}]},"changelog_raw_sha256":"7f617660d818870ecf16738b789e6428c20eff92599fd8853dcdc0cb07267100","changelog_sha256":"10115a886ef80c5b85c9fded9fce88d30b80fa32625befa2552efc7f9850c53a","review_raw_sha256":"dfe5d469ad2d665336a5b7ed82362dce729d484e0361a57ab6ea02892e627f92","review_sha256":"dc51f76401cf60b0db300c4aeb4ea67717938053a1b0fd987c79998c2191d8b8"},{"probe":"\\x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\x","en":"Title"},"rationale":"Raison \\x fin.","reference_ids":[],"question":"Question \\x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\x"}]}]},"changelog_raw_sha256":"c7be1c11065bc40df7345145d8da88263da9a5f23359aeba88d5ba1081f9cfa6","changelog_sha256":"c1c2492042f8920fcc3737c9b36523be0f069bde2f40f60f139289d3af227885","review_raw_sha256":"7bda7995e6aac184a6f5771ae95cca46e026f78f6b7dec6f46c4aeac32b88bf2","review_sha256":"1e09ee64c0205f81c1797353d8a83040116eba9fa8fce653275a05e3ea39c7c5"},{"probe":"x\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x\\","en":"Title"},"rationale":"Raison x\\ fin.","reference_ids":[],"question":"Question x\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x\\"}]}]},"changelog_raw_sha256":"096f3384837b66bdb54099a9a3b41cc42ca2a221e0124e5ba15a7a7cbb232650","changelog_sha256":"53699a79a67c555042b0603f103531472c728809744b17e70997955a0863ab12","review_raw_sha256":"0f596cb9bd5da737fb1a66f2e5c2152d58c733d5bc9d13e9403a58e4411c8340","review_sha256":"daa669975f94e72cb523e7f9861e5956e11e509cc2e43d9c18cfbf924173f104"},{"probe":"a \\ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a \\ b","en":"Title"},"rationale":"Raison a \\ b fin.","reference_ids":[],"question":"Question a \\ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a \\ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a \\ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a \\ b"}]}]},"changelog_raw_sha256":"928783d9091286e9ba691bfb0d02168fa4ba488dc7f04ddccbd878e1771fa5c9","changelog_sha256":"3bbfb05b60afe686d02301597fbc57ca3e97abd815ac03f94fc9598616118736","review_raw_sha256":"34b7073f0a107062c1f2d386ccf95461bcd1a2624c8bb404ca73531cf28bccc1","review_sha256":"d22e5c4e31b3e2db4bc8dc76cd96fbcff5eb44332b4f1543904bf9b6d19c9398"},{"probe":"a\\b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\\b","en":"Title"},"rationale":"Raison a\\b fin.","reference_ids":[],"question":"Question a\\b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\\b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\\b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\\b"}]}]},"changelog_raw_sha256":"0eebba0685ba6f4b4c919adfd56b6bceb4b406f17177acecdc977e1a5a009d6b","changelog_sha256":"0c60491ceb66fb5a850c209e37482ec36b3dd5ef63366d68bae80c5155799da6","review_raw_sha256":"c4dbf6cef812e6d4e3e1f01c4dc62784134235a05431f66f004b5b367f5f857a","review_sha256":"a2812ded178b14f2dcd6d14c6dfd17ffa49b74fc3c9296a1b508234d37e7cbde"},{"probe":"\\\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\\\","en":"Title"},"rationale":"Raison \\\\ fin.","reference_ids":[],"question":"Question \\\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\\\"}]}]},"changelog_raw_sha256":"6478d5f27f19d7e2cc8278e12815bcf580152ddce94672f16fc2a330c7feefe1","changelog_sha256":"40eab24f408a66a157a5859ea0301120b78bc427ac6662348b2c6cde01210fc3","review_raw_sha256":"7b0795f81bcad710443d85d7f3b0b9391ef7d57527b0a1289d4356956969dcd1","review_sha256":"94cc5d471868bcea92230723d705ce39b57f1f4cd21be440575159fe351f18f5"},{"probe":"`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `","en":"Title"},"rationale":"Raison ` fin.","reference_ids":[],"question":"Question ` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`"}]}]},"changelog_raw_sha256":"4862a874dd17b679bab3ae6cc332ac1b68a00a6be28b43f6fe2831dc36cf3bf8","changelog_sha256":"bcae3e96da87256e8ab2519e5f8374b6955b7c1f9ab5ab8a617c0112dfeb8633","review_raw_sha256":"c3b9e73afc72d8ca5933062dd0c7d109921da86ea473c0c8644369ef72022c7a","review_sha256":"4ebb00569ab5a8df1aba9d68e2f2318cf9da74e8b3f4122f6fb40375c7c42279"},{"probe":"`x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `x","en":"Title"},"rationale":"Raison `x fin.","reference_ids":[],"question":"Question `x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`x"}]}]},"changelog_raw_sha256":"80e08f260a179aae36c3dab3c98f454900b8422917295bb50036e725700d7237","changelog_sha256":"4ef60278905cffddd0f5e8b695f761bdd03c8082ba65d62a530012fd4e08f3c8","review_raw_sha256":"24f5660f795668b3c04725563af7680e31ed803a13042885747a0e9b1bcce69e","review_sha256":"5410ce986da84651adf5f44b3768196aa4e740fc7b8916bf1c51ae92cf236dcf"},{"probe":"x`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x`","en":"Title"},"rationale":"Raison x` fin.","reference_ids":[],"question":"Question x` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x`"}]}]},"changelog_raw_sha256":"d5c1666d6d6c27bf2f702b1d8653326689f9fe9635a1116fb671765de3d0b2c3","changelog_sha256":"39d9670bd89bc72da50634978bfd45431948be8dabbe8a89b096fd8c2602bf8f","review_raw_sha256":"64ef6e00f412b7e1fc933196747c5fc0a5ecd5bdf40616c044541d878e120756","review_sha256":"7870ab952492973644fe309a7e926b031406be8c870253382499e458bbcbc6fc"},{"probe":"a ` b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ` b","en":"Title"},"rationale":"Raison a ` b fin.","reference_ids":[],"question":"Question a ` b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ` b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ` b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ` b"}]}]},"changelog_raw_sha256":"3d3c98a4889e6beee7d142e03c897b1d3ac053ccc1563ab9c860a316b5ead4a0","changelog_sha256":"7e6adb10229dd57a354141878aa5ae3921b046a9ec0582e9cb4396722a514d25","review_raw_sha256":"c08ef7b1ff7c5c7b74da8afd3e02b6be67c1b0bd533efcfbb3f655b74be49c74","review_sha256":"c595dba4c3a940b900dd97313f47c76d2b880efe612a4ddb3183fca6bb283fbf"},{"probe":"a`b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a`b","en":"Title"},"rationale":"Raison a`b fin.","reference_ids":[],"question":"Question a`b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a`b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a`b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a`b"}]}]},"changelog_raw_sha256":"d060f998c8bb90a3a56cded6e887a9f10ecd11f570fbf4c5dabbe05ff691a215","changelog_sha256":"02868764f1f8c9ee747f24add8b58bea2b6b78cea01716aff423518d30703424","review_raw_sha256":"ce12b55c68f55d71d8dc59b94574aea81dec9baec21ef74b6b8814ed9ec9482b","review_sha256":"1af2b2855c6f1de81396c3927d53ac43965ec339f306c0afd4e612fd92b43e15"},{"probe":"``","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ``","en":"Title"},"rationale":"Raison `` fin.","reference_ids":[],"question":"Question `` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ``","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ``"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"``"}]}]},"changelog_raw_sha256":"4b957038fb5b2a4cc72a39c076a83553872f530809c8f15202addbf9f8c0e4de","changelog_sha256":"4969a6242743fba931d84d89ac1ab95241d7b95bb456fe12209e2248a5b20168","review_raw_sha256":"7cba3d58ef93a9f5c7ffe5cb21bffd7e5985e9d9ab84be0a0b807c036344c16f","review_sha256":"f7284a2aac746e4e5d653e1578d4c36cae138e4fbf6e6ad46ae8e0e2a06115c2"},{"probe":"<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <","en":"Title"},"rationale":"Raison < fin.","reference_ids":[],"question":"Question < ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<"}]}]},"changelog_raw_sha256":"e3b9f30ffcf43e89b93d54ee5dc5909136caece8c1ffa2a1cffb6f1baafa083a","changelog_sha256":"57ea275743dd8daef60d236ff280a21c4d1076f7b7693d36e14d854646517bf7","review_raw_sha256":"d745e8f227a05d2f92c73a8fd074a689abdb614df59b20d64b47373ee1549e4d","review_sha256":"2b52724be8b0f7eb3f8b54e173b063bbe5b24450356e85c43278c22050a9cdee"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >","en":"Title"},"rationale":"Raison > fin.","reference_ids":[],"question":"Question > ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">"}]}]},"changelog_raw_sha256":"8f005620358fd1a3972caaf8be4be7269436a0ccfa70e542a1fc01934c883434","changelog_sha256":"40e790eeca9a9cc397cee6e9cf2e3194e359eb73db37cc27228e1f3d8726077e","review_raw_sha256":"7007adcc82d1cf16def5127305a6713aa26bec5ba6a62f7ec37a569de48068ba","review_sha256":"f72d391d9cf4de96b256b6cc7e3792936cac18cc60c72259b187bc249ca7a789"},{"probe":">x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >x","en":"Title"},"rationale":"Raison >x fin.","reference_ids":[],"question":"Question >x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">x"}]}]},"changelog_raw_sha256":"78562dec796b9d787a88f69ec118710420a18d732cb9dced8c5c752f803f7474","changelog_sha256":"9261a660218b13aeb1843ccbeee0586c9f05de33ef737bc1d3070b1577db4072","review_raw_sha256":"d6b17de4526ec648dfda5250ec355839d071d3a45c442abb65d98642d88cd3b5","review_sha256":"e2cfda4e8ef98a22dff0f2d398a11e7b6600eab34ffc63cb61e3471dfa89f77a"},{"probe":"x>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x>","en":"Title"},"rationale":"Raison x> fin.","reference_ids":[],"question":"Question x> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x>"}]}]},"changelog_raw_sha256":"f5bddc35c5b5b44ad7f27b52f37a1e64b279296e939c657bc6913324f34572b9","changelog_sha256":"183362be68f7f98219c72553c2cea631107104d90ff94e34c9cbcc261c9a85ee","review_raw_sha256":"693358919dabab5fb6abb5163dcbbed2c6d3e88401432cb528edbcc8e69633a2","review_sha256":"34e5628327493be3fd5176cbde172271ba15afa9084c43ed68e8af6c64d5a03f"},{"probe":"a > b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a > b","en":"Title"},"rationale":"Raison a > b fin.","reference_ids":[],"question":"Question a > b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a > b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a > b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a > b"}]}]},"changelog_raw_sha256":"e26f54dacfe79ae553ae98eada72260a9bd6f999bb61a52c179cdf38fe4cc081","changelog_sha256":"e834d5ed8909abe69a71d39ac132edb4a4588bf03d4c0448d8cc2b1003c32ac5","review_raw_sha256":"fd9e1c0fd724b6ff569626badfd89d0836a9c0694154ee44cee97556151862f0","review_sha256":"b82b9593b0d9e2a6347fdd111d1c87d4b9ec1b1ea6aa062cffafe9abf4d4ab9d"},{"probe":"a>b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a>b","en":"Title"},"rationale":"Raison a>b fin.","reference_ids":[],"question":"Question a>b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a>b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a>b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a>b"}]}]},"changelog_raw_sha256":"f6cdc04805eb286d036c3ac5d6ed58632569792808d4df6967e6e5fa0bbbadb0","changelog_sha256":"9bcff03684adc6732172a88ffdf4fe979aa96555cb9f87086715b3b59415851b","review_raw_sha256":"0d8f554f1820d6e661b28af9050be85121886e519f432e194eaf215b94007525","review_sha256":"8088419c7f00c2bfd4e3a7721ba6b47ce962114061505db14e56cd57e9187fc7"},{"probe":">>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >>","en":"Title"},"rationale":"Raison >> fin.","reference_ids":[],"question":"Question >> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">>"}]}]},"changelog_raw_sha256":"b64ca1cc41b4cce540c64ba8b5098128d75819d7a97fc9a4dbab44c13a820a05","changelog_sha256":"b3c81c740c4ce12b05bdfe12cf2c3ffce254e72b26801269f09e9610fbcef7a8","review_raw_sha256":"a51c1efec0549a429c71d5753950369837f10a6805c64a6e0861a36a332e8b70","review_sha256":"f0f5e30108b2d905e272b0234b78098c669de7d6a44bc89df25cd09eda394f6b"},{"probe":"&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &","en":"Title"},"rationale":"Raison & fin.","reference_ids":[],"question":"Question & ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&"}]}]},"changelog_raw_sha256":"73a1c243616f885b1e97a0230918d647d08e0261fa194e1c22789e05cd0e903b","changelog_sha256":"eddc9c98067fd6315fb12c78d95dcca8ef04f0f4d305cc6deb831fd9b9343793","review_raw_sha256":"7da85fbb8c1960cb09be9298df478460b7e7ad79e3c0dc297882fd6c72107a0d","review_sha256":"b9237410c3bce307d7e35986d4131c04ed6be9f3cda333ed34ebeebcafab17f6"},{"probe":"&x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &x","en":"Title"},"rationale":"Raison &x fin.","reference_ids":[],"question":"Question &x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&x"}]}]},"changelog_raw_sha256":"181a75fe68726e11ae1d008c5d3e11aea8322b531205c959159dd52646b3018d","changelog_sha256":"f7b673a0a421ef4236e152b75bc5254ecdeb530fde258947ab7d3bd03c1c47ab","review_raw_sha256":"036bef95a0a410b79bb7863607a97af88f76dcf78b358b1dbfdea8e64971bb4e","review_sha256":"b6c04191c59b2da3616692926282f09d64f433628737268073b2992206fc8176"},{"probe":"x&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x&","en":"Title"},"rationale":"Raison x& fin.","reference_ids":[],"question":"Question x& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x&"}]}]},"changelog_raw_sha256":"b2eac202a4736fd7491e157cb64e0cf5f89a080005275a5bbce7f378f1b720e4","changelog_sha256":"178dc68f87e95034be5bacee84d4f912c58472857da1efef83678e304e28f14d","review_raw_sha256":"f50c51bea6ffb84d53a84dc6383ca281cd47482a4807c20042908e1a3e0a62ec","review_sha256":"35a73614fd296c2d8ab9880120dadd178f6a4d38f095c9ae207492e3d4a15bcc"},{"probe":"a & b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a & b","en":"Title"},"rationale":"Raison a & b fin.","reference_ids":[],"question":"Question a & b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a & b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a & b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a & b"}]}]},"changelog_raw_sha256":"261d5bf6794e052a1e55bd7c836df1ff0480af39c98429d18996166c5452d1d3","changelog_sha256":"b002357c5397979bff31a070a47a08075d939847b28dd0bf78a91f3490d3583c","review_raw_sha256":"d91ffc3605a35d0e1c5e704348b2b44a1e32d327de64044d828b5f123bfb5919","review_sha256":"a99ae3933ed3e2544458c4ea037649630bea89c5743fe4cf288146edd66b4f0f"},{"probe":"a&b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a&b","en":"Title"},"rationale":"Raison a&b fin.","reference_ids":[],"question":"Question a&b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a&b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a&b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a&b"}]}]},"changelog_raw_sha256":"69ba5c909da114334112d726aaf78a660b994f1cbec1f1cbe1f7236293375599","changelog_sha256":"0e5b8e5f2f949d0a6a05a2e708bc9b068b0a462f1fc656116dca12855fbc91c2","review_raw_sha256":"59eba4ab3447e8001ad2bc69bc64b6f4b1e046fc8ff1d98707f613fdc7ca15ae","review_sha256":"9bb7b9cca17b7ff786fe0dc5660ec02e71b56c8fd8d3bbb2222164a462f42ddc"},{"probe":"&&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &&","en":"Title"},"rationale":"Raison && fin.","reference_ids":[],"question":"Question && ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&&"}]}]},"changelog_raw_sha256":"16e326f5253d942155b378c0806f4fee73dc9cb367c3ea00ac3dd9473b6eaffa","changelog_sha256":"3007d262bf4b82a3a552ff6d8375a502a2a0bc6b1b549007364f89a8dfcde87c","review_raw_sha256":"1a6014b0ab51209dd2c930e6b4783378e165aa06ec3c384e100360e3da6558e5","review_sha256":"c3673a61e48f4f014b4767ff15ef382bd359e0fc5e574f7e361e8b8bf463945b"},{"probe":"[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [","en":"Title"},"rationale":"Raison [ fin.","reference_ids":[],"question":"Question [ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"["}]}]},"changelog_raw_sha256":"415fd28abe34c5cc01a65c62c5f0ac464bac51526118e6a87fdc9d88c123063b","changelog_sha256":"14ebeead9bee0fcbab113e4d6c9a65f822b87df1747944e4e2dec2f66ddfa6ee","review_raw_sha256":"6161b0daf04e1d45963a13b391f8444b62936eb85a87a17aa52053cb52220bb5","review_sha256":"ab3a4972283c901be053d0fdf66b86627a9c5b2ec38df9c1e6b1cf9ca5c618c1"},{"probe":"[x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [x","en":"Title"},"rationale":"Raison [x fin.","reference_ids":[],"question":"Question [x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[x"}]}]},"changelog_raw_sha256":"5ba4ca5331f0f6716701e785066ad3282a75b9ee4e05699e3ee01b002421ab9b","changelog_sha256":"c94f702338864d761e09e4aa997a6510f9f0839be3e1bd4da9b8ff7ecbcb0e5d","review_raw_sha256":"bc349c923269e349851ac78b84d7d32defc7dbb2b3436b1d54144274f10456b0","review_sha256":"e2724c4d20ebd2a536b65ea15389e3f9d33dd28b97f80f22bcb9f781bcf5c62c"},{"probe":"x[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x[","en":"Title"},"rationale":"Raison x[ fin.","reference_ids":[],"question":"Question x[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x["}]}]},"changelog_raw_sha256":"9f2ea6c2addc373aeba696139c7e373fe51ce5e4c83999130ed46888afe4cfa0","changelog_sha256":"84e8ad5a018fedbfce9c04cb78730c7ea2cf42c67d23ccc1c165bfa003a1bad3","review_raw_sha256":"e43102b0597460236bd1efc3c53d38ad3374903a557fb2ebbddaa0c3dd91b9c7","review_sha256":"4abd32d0e0f142ab17ed349241f6597eaf2b096c55a4738b312f2ab9296b35de"},{"probe":"a [ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a [ b","en":"Title"},"rationale":"Raison a [ b fin.","reference_ids":[],"question":"Question a [ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a [ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a [ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a [ b"}]}]},"changelog_raw_sha256":"20fe79e5fabb4d4a3f2e77e97d44cd5865a8b8e3424b8f2078a7fa81df93a6cf","changelog_sha256":"c3e7e081bd4d24c46470eb77bb8a0b7083516d3a53cd85fdf2db27d2609bfd04","review_raw_sha256":"68e18cba6d054c7a41d246b8f411b3b8749b25a96daa6bccd50d29159827ab2d","review_sha256":"892f86345fa34d70b17a727be8d9bd47f4ac8d71ea7c81b9785bfa4f53393cf1"},{"probe":"a[b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a[b","en":"Title"},"rationale":"Raison a[b fin.","reference_ids":[],"question":"Question a[b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a[b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a[b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a[b"}]}]},"changelog_raw_sha256":"6aa38b0609493c76a549152804305b5f1384352c094feb0c41dc8b2d3a6d51cb","changelog_sha256":"2a410d2314de70b49f8d31b94cb6534c6468a85d3dcff41e90f88d2969f30d22","review_raw_sha256":"e8e02e78e02ad0da0ad355ceacf6184eaddcf1568a2d40a551a83ce8b941b4c0","review_sha256":"ddc12efd2022e797947e64bba55c6ac0a1ad0e26907a5eb634f05ddab8c9c973"},{"probe":"[[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[","en":"Title"},"rationale":"Raison [[ fin.","reference_ids":[],"question":"Question [[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[["}]}]},"changelog_raw_sha256":"af443446331e9fc2db47fab8e2d7b830fbef4eda1ea54b113f10c70507144a51","changelog_sha256":"a8169a414fa82d19351e2b13f5eef017b5c3a00b982e3ff5903bb6ddea3ab6e6","review_raw_sha256":"149eacbd1bd1192faa6bcbe19b0573a165295714f74459256b830fdb3f66a805","review_sha256":"ae23c5cac77af17b31f38ba95a048548a44f10529adfd47f6fd04c3f86c9ca4f"},{"probe":"]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]","en":"Title"},"rationale":"Raison ] fin.","reference_ids":[],"question":"Question ] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]"}]}]},"changelog_raw_sha256":"2d69a884c8f9a9118c303490239fb8d608b77e7b6ec820f9e1e38097b62d27ab","changelog_sha256":"ecb8a3dc4b184e91baf44f41187739ac29f38cc1c49c6f4aadb92c63a9d003d5","review_raw_sha256":"49ca9ec9cd2f39aa3ad05458a0d967f2ca8ddbb2593e3a1685da7e48b67f1487","review_sha256":"d0c72c3e08cf8024a2042bf3dad3267970eb551e4387253894d138e7c9e469af"},{"probe":"]x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]x","en":"Title"},"rationale":"Raison ]x fin.","reference_ids":[],"question":"Question ]x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]x"}]}]},"changelog_raw_sha256":"06f03abaf921621cab5c54d9b7775d6197ca73709a480d06a7357bbf0d5ea8fd","changelog_sha256":"b2ad619e39a46a9f2d1908dc084c72e1dd2de8143d650b79b02d108d249684af","review_raw_sha256":"fdb2da9e3295091cac80c9fab64c923aa6dc6af543dbd5cd1eefaa3521a32ad3","review_sha256":"e1ec67c639663b62ede7b4f888ed966d73e9af5e842a171b5f655f9421f2aa48"},{"probe":"x]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x]","en":"Title"},"rationale":"Raison x] fin.","reference_ids":[],"question":"Question x] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x]"}]}]},"changelog_raw_sha256":"b10de55edd089d75b11134920c5adb9b08e41b0ed4f55689ed8e327a2992485a","changelog_sha256":"9f5e33a936c1711c0fd70c3c999e065c981580982fdca35ff4055d69c7647d2e","review_raw_sha256":"e9cb42b2d04a383ab23bbade80bfdd1a73a56e6cc913c688edc1caec86b9f29a","review_sha256":"bc042db33a05f2fd0e5c386e6c0f6c88c7d8ad9ad766fd43afcc0ed67079e4d5"},{"probe":"a ] b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ] b","en":"Title"},"rationale":"Raison a ] b fin.","reference_ids":[],"question":"Question a ] b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ] b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ] b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ] b"}]}]},"changelog_raw_sha256":"e24aeaacdd8c17c5f568e6e3ea23822fc1b4226c8cb980a568c016c6e8eac351","changelog_sha256":"eab23ed19a0c7036fac9e08fe5d61a5b74034fe9dbc3d5d2025842cb6e28a4e2","review_raw_sha256":"f79a545a393bc92fd5cf133ea2b91b9b88c45415eec578636b885fd2b608eded","review_sha256":"81652501c734d50474d562b422ba263c199f07246a67b842fe595c1130c0f9d6"},{"probe":"a]b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a]b","en":"Title"},"rationale":"Raison a]b fin.","reference_ids":[],"question":"Question a]b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a]b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a]b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a]b"}]}]},"changelog_raw_sha256":"eac6babbf93d7f539cd0ae8fdae5d59a7f0250d2cae96d63e1eadbe545a1b710","changelog_sha256":"be8efeb73815359e3ec20a91167ee2aa6c56b59f578c68d67b9842377e1768e1","review_raw_sha256":"21c1b603692f2873bf8efc25a9044c1e9cf309781f6c0d989298bb8d93c36fa5","review_sha256":"3e52eea519a292f25d1897ca5eb71c3a06075387e6a3a748ada043367f744c36"},{"probe":"]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]","en":"Title"},"rationale":"Raison ]] fin.","reference_ids":[],"question":"Question ]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]"}]}]},"changelog_raw_sha256":"0b6513d1f73f6ba3a47135083a44c878e013cb8f8b3f658c39929e4afe4bde64","changelog_sha256":"12ccd17fd84657b4b53765a59b97338a5dbc5b8863552737ed4ca1309671db43","review_raw_sha256":"8d1dea8cf9919c7e66c9bc48d591e4004c6db05250450efe30ac5fbac0a4ff32","review_sha256":"a8fe5c38bcecb944db7160e487dc132f0bc32dd9f99a991e29e7a66af248e275"},{"probe":"!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !","en":"Title"},"rationale":"Raison ! fin.","reference_ids":[],"question":"Question ! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!"}]}]},"changelog_raw_sha256":"13b91a4337870f607c52d50e043fda8119f10ef10a3204fd243e87c75d680f58","changelog_sha256":"d2baec2300a03aaf9ef405f77057ac04d3e7ad398d68fdc0522ab89ce262f71e","review_raw_sha256":"d9d8c388473702c5e8398afbb57186a6082f018ce0054827590c26acbb56bc79","review_sha256":"b236e24443485e41b057771229ba090ad223bbafe2e752a6cacf4d7f91a0ea1e"},{"probe":"!x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !x","en":"Title"},"rationale":"Raison !x fin.","reference_ids":[],"question":"Question !x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!x"}]}]},"changelog_raw_sha256":"7a801572873543b50892069a858e0f385c5bd0c68dda7276a481aa55687a9976","changelog_sha256":"28c41fed0d32d645410b272883433b34b997fcf2b5984e617c45b9876082c261","review_raw_sha256":"961a08efc2e8067a6e2670e47c013610d5e69e4eb6a8cb26f7987ce216b2c224","review_sha256":"113c64aba3d9d1b8bca9edb4cea00822e8dd809f2a17cd72c00c0ca8c1d6015e"},{"probe":"x!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x!","en":"Title"},"rationale":"Raison x! fin.","reference_ids":[],"question":"Question x! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x!"}]}]},"changelog_raw_sha256":"50cd86da3601d772c91365f949bf72b165d09a5c4d8d8e8373e65aa890f6158b","changelog_sha256":"df529b9b28671a9f8b055cbcb517b412178dfc4f2333f095303bf068d4d9f3e6","review_raw_sha256":"8fbb31aad59bd636c648740cac8ccb5782ef9fd8e7ef64d38d81576133e0e825","review_sha256":"f86733c038687bf6e2fb896d3d9714340201eded3509035e37091737fc476769"},{"probe":"a ! b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ! b","en":"Title"},"rationale":"Raison a ! b fin.","reference_ids":[],"question":"Question a ! b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ! b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ! b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ! b"}]}]},"changelog_raw_sha256":"e82e24b74ea0a0576fa54cd303f825a1f62e49b083a4769e16eebedeea07b217","changelog_sha256":"6eac33783efe15f1ce6822364b560550571d346d91e4c3af15383fff245d8a77","review_raw_sha256":"73985f11b45ff8edfaec8e38d9ecd277cf78c3fbb74c41d42d6e671e9d66c871","review_sha256":"89c5444b4090d0c1e250612d6ca91b97f920183e950638a3bf2b74679a8e40fe"},{"probe":"a!b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a!b","en":"Title"},"rationale":"Raison a!b fin.","reference_ids":[],"question":"Question a!b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a!b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a!b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a!b"}]}]},"changelog_raw_sha256":"62e8b5a0d0c48bd99ed20f9176c38d63c55217075f3486366b76e1e39bc67d0e","changelog_sha256":"8347e43932023fa1b1c7362a986e7fbe8c594f802d911d86447c2e30ddccdd36","review_raw_sha256":"0a44ab1c07946e096a3af46106ad104055cee83dd2661fa8014883e567f4cf5c","review_sha256":"08e0748ccfd65c2e2c6dca0af3a746ea051908f32184f4f72273eae305a5be69"},{"probe":"!!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !!","en":"Title"},"rationale":"Raison !! fin.","reference_ids":[],"question":"Question !! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!!"}]}]},"changelog_raw_sha256":"d4fcd4fbec692787ee0dcce4656fc62067975e13cb7215cbf8bd43446a8ccf38","changelog_sha256":"9d862925542a057d3599057c17f4f1e42310d5f6ba44b1e6942e04eabbeb3123","review_raw_sha256":"8749c003d409afb5f583bbb6fa833c91c8d6a96e6e6bbbc072657d0e93de6f72","review_sha256":"bde93651d56b038b40ba0b231f192b205d035ef27a4bedf08d9a02a3364845a3"},{"probe":"#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #","en":"Title"},"rationale":"Raison # fin.","reference_ids":[],"question":"Question # ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#"}]}]},"changelog_raw_sha256":"f41be542ab1803d99eb2ea8f09acf13ba3646246408eef030db6d6dc4e196c76","changelog_sha256":"0e02638a26035b205ffeacf804420f852804da1e5f40b375040d4e8f739eec67","review_raw_sha256":"343d4637759864cc6aa334983c5399aa1d1cd98440ecd122653cc9190db3ced9","review_sha256":"7131be65d27425c36c419be5ed0d2f889ffe074fb6a9d19aa0c4acfff06b8c75"},{"probe":"#x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #x","en":"Title"},"rationale":"Raison #x fin.","reference_ids":[],"question":"Question #x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#x"}]}]},"changelog_raw_sha256":"a611adf95aaf8bcdc551f39e414f73ae3cc7ba86fdd574bc8654dee26a2fca22","changelog_sha256":"b4dcd75198c950d2f39cdb7e97dafb94dea101da4711248c9fa50d50919e539a","review_raw_sha256":"2393bd3775029466ea8ce5aa80edc1368abef3f1560b56e815523ef1402b4352","review_sha256":"8d14b166e41532bc4c28061818b7169ff3f1894e46d364a3b25787d0b6ba721b"},{"probe":"x#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x#","en":"Title"},"rationale":"Raison x# fin.","reference_ids":[],"question":"Question x# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x#"}]}]},"changelog_raw_sha256":"a4d71f566e70c9a8323b25a3637a968465fab5eb5260a140d098d0e432e714a5","changelog_sha256":"149e001148a2414300024a1170fe0bac65df780fac3221382be9b99e867b27fd","review_raw_sha256":"6c40106111d1d87b1e35a386d36a86cc865c7c0fa16a400cd3a48bf294dc23e9","review_sha256":"033c5264a23d22b64cd97c5f092bc0b42aef2cb56a248c3cea9bb8ca157a5275"},{"probe":"a # b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a # b","en":"Title"},"rationale":"Raison a # b fin.","reference_ids":[],"question":"Question a # b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a # b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a # b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a # b"}]}]},"changelog_raw_sha256":"bb090623a9219fcde06af83c2973fccc8e1e2d3c3cbe3f8f9f936da7fa6d28e9","changelog_sha256":"64b70f2e24acbf35df25d9d8f94f63918aad2257711a3993bed691d8416cf3a2","review_raw_sha256":"bcb750ca9970053f7c681ace1fc68eade2cc50a7224215497e04dcf07bc438ca","review_sha256":"51476e2bbdf15b49210fa11b72b5d6b5ce0943762a256f879a41093b3e21c19d"},{"probe":"a#b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a#b","en":"Title"},"rationale":"Raison a#b fin.","reference_ids":[],"question":"Question a#b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a#b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a#b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a#b"}]}]},"changelog_raw_sha256":"7f0a53530ed7aa3c11bdce4f763f454727e37435a27a0b85bad46d989fa9a84d","changelog_sha256":"5f3f08430a48f663f84eb05bfff9b20460dd02a32b3f3ecb0a36f1c8dcbd2963","review_raw_sha256":"4efe57092aea9c659eed8df1807a5fd0a2ade300b9a91d3090f2ca0b4c7a13a5","review_sha256":"e7fb36bbc014e6b0d1e9c202ccc676e38f9d538547f8125f26b32eeb16c3d874"},{"probe":"##","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ##","en":"Title"},"rationale":"Raison ## fin.","reference_ids":[],"question":"Question ## ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ##","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ##"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"##"}]}]},"changelog_raw_sha256":"45b26423e2ae7958988d2c31f5f68c5f696966faf4691fca071eae8d7173b222","changelog_sha256":"f52c5d1e1ae51f129492898ceea4a65cab4ecbf0462cd61061c9da1c82eaced0","review_raw_sha256":"e047c20bb37e42884b5e409c78b367ade2339630c4c17fab28688d0271ea6a48","review_sha256":"7caca90dd89c3fa53ea80ef4b93f9f62207326f4d6a3ed9f96b11c9ee0f6c229"},{"probe":"$","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre $","en":"Title"},"rationale":"Raison $ fin.","reference_ids":[],"question":"Question $ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation $","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label $"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"$"}]}]},"changelog_raw_sha256":"a0b9816c9270be0944214ffc23fb578b18ca02d703c6f3fbf057ecaf38b6fb7b","changelog_sha256":"166883ae4e7989a729e7deef3d0cd4c418b06299936fde5ec571806682724350","review_raw_sha256":"92e0d9e2811bf1c4f160a43a9d516e4e9c575faf93eabef555c3f1b5c8ccd0af","review_sha256":"4b36209ccf55cf6fdfc8bc65b7dec32f94ce93c59420af6c57c8f23d7d0a6cf2"},{"probe":"$x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre $x","en":"Title"},"rationale":"Raison $x fin.","reference_ids":[],"question":"Question $x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation $x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label $x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"$x"}]}]},"changelog_raw_sha256":"49fc8d4a44d974c16211482f74ab1726ba38658f6cb19d6fbb8b30cea8c0839e","changelog_sha256":"06be8ad6f7e0f53e7208a4255a45090522d669cfff4b883e32a0c92a37be5449","review_raw_sha256":"7a039fd59ea43557798aff3cc3ba84e3b7972a755e1c6b5c196f8b3fbce85a18","review_sha256":"e5e1975cbec12318c9613f1807bd163a4ad465efd74e0f077b50883a9d04d567"},{"probe":"x$","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x$","en":"Title"},"rationale":"Raison x$ fin.","reference_ids":[],"question":"Question x$ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x$","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x$"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x$"}]}]},"changelog_raw_sha256":"eebfe5d450bd49a8ce4c6753d086a36f6ecf702e0b303ac8f58bc4ab590cc971","changelog_sha256":"7203d6066b40c7db41ff301ea799bb847ffc1fbaa859952c3737cf7d083890f1","review_raw_sha256":"291caa41b2f6ac1ce1b4494ddfe103a0222c05e9f4f44848bebc9d32abe5cb0f","review_sha256":"1bb10614a28981339f98cdb613514e7ad30378ddfbe774606b3dafa0f1f4fbfe"},{"probe":"a $ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a $ b","en":"Title"},"rationale":"Raison a $ b fin.","reference_ids":[],"question":"Question a $ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a $ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a $ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a $ b"}]}]},"changelog_raw_sha256":"276aa9cde0400d5d605a2ebf9381e4f1f81b1296e26a2a4706babf91f22b319a","changelog_sha256":"e505bef7b854449f589fb9f92e5022d7a2410a4b15f42f0e089005285e1d30fd","review_raw_sha256":"46502d86e969ee8b4ec154ca981e59b950a5010ce067e5103206e81c694f14a1","review_sha256":"8aa30f1a4358bdc7ecbe5d4a543b6287406f024b620a29067a340e989fe1afd5"},{"probe":"a$b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a$b","en":"Title"},"rationale":"Raison a$b fin.","reference_ids":[],"question":"Question a$b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a$b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a$b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a$b"}]}]},"changelog_raw_sha256":"2f456fd351695fd530209c32263c7fbae62cc2ae7204b40fa155233c18b77aa6","changelog_sha256":"873e467d0ddf02007f27ba4271b60a371e01d0445362f4c5d1855bfdba70ad2f","review_raw_sha256":"4db73f8f688bfa4802e4400b1785493d020a606ab75ffc05c0ab1a606bbedeed","review_sha256":"ba4a5a3347224c0a1e1638b10a6ca27df4af09835f3aa7c39e1d66cf9b6ed9e0"},{"probe":"$$","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre $$","en":"Title"},"rationale":"Raison $$ fin.","reference_ids":[],"question":"Question $$ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation $$","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label $$"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"$$"}]}]},"changelog_raw_sha256":"81d7e653131c6f8586268f04bb2086ae70c11601fbe39064166189e01766cdcd","changelog_sha256":"b8fefa4de37bb1b54f1a0c2ec6c2f8a9859afa9e2a36c45f8f11257d4ef5a68f","review_raw_sha256":"c26c42f65d05d23e2a2887478f09719ddb0c98d19778f65f8e28ec3bf50833ce","review_sha256":"7855bcebe838013639dcf0b8381a4487cf4261e0b13fbfe0a3c99e0bcf17b52d"},{"probe":"|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |","en":"Title"},"rationale":"Raison | fin.","reference_ids":[],"question":"Question | ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|"}]}]},"changelog_raw_sha256":"11d60c4a7791190b1e675e0222a07493670096cda476854dff0be6b6287fe145","changelog_sha256":"ee0c5285109670f0bfbfd39d5dba8233b7c69a05e0c99ca882a670f98a6cacea","review_raw_sha256":"15aa79243507a9172fc5084e9ae2f7e0b581f3bce0e0bb8617cce5d0e3b6034c","review_sha256":"2a97afc65077e40d9b515cf504746b0850d620fa5b289a5ed44f6978eef2031f"},{"probe":"|x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |x","en":"Title"},"rationale":"Raison |x fin.","reference_ids":[],"question":"Question |x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|x"}]}]},"changelog_raw_sha256":"ebb74967ebb072531e10c32816ee2597f35a68ebe007fcdfb3d38ca17ab85d48","changelog_sha256":"c2b8c421f64e456b04b91afeaab69798392ca7054aa69dbe9a4f39f404a9ff77","review_raw_sha256":"592149078cb909eed8accb34efc09d2403f22bfd5188d07018e9b60dadeeabf0","review_sha256":"0b03cb204a2037ef17a3d2059c2898513cb3c6873cda405090ec138a58a23146"},{"probe":"x|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x|","en":"Title"},"rationale":"Raison x| fin.","reference_ids":[],"question":"Question x| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x|"}]}]},"changelog_raw_sha256":"234b154df7080bdf5822a9ec8259f9a6926f17bb29bc485f5a20aa3d95fea251","changelog_sha256":"650c089e9a7e50eb93ef7911d1484d9156bfdf3a73af5fe231403933dd4aa286","review_raw_sha256":"c4fc87425a237aa3d5af1d5adb7caf96fdc5ee93158c97c85d55ad642219eb43","review_sha256":"5e5808d91781a5d3547955fdcb84e137fe8b213907d3859ed8278aae09633006"},{"probe":"a | b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a | b","en":"Title"},"rationale":"Raison a | b fin.","reference_ids":[],"question":"Question a | b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a | b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a | b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a | b"}]}]},"changelog_raw_sha256":"2b52bfcaf97c21d77237d676756b703a38c7c823f0a1b38a2e40339e29762435","changelog_sha256":"129c9e25683b1c920a6555dde63a6572f366611d4445b0ea07855886837201ee","review_raw_sha256":"18518fe8e7bf732a87880e3e7aae4f7d888683e5835d10e32a19a290ab1ee919","review_sha256":"16b6b0aea8e73ad5c92e8dc4e5c7ff81420d1cd94c298cb7b97df8ebf9e9feac"},{"probe":"a|b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a|b","en":"Title"},"rationale":"Raison a|b fin.","reference_ids":[],"question":"Question a|b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a|b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a|b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a|b"}]}]},"changelog_raw_sha256":"9c6d60119b7af4e5308a640a26bf274864f0644071031d8e7613a904afd63dc8","changelog_sha256":"15ec3b89ee69e5fcbc3a8a2730bed5a5aae1c0f3930d56184ac4ce995fe2b2aa","review_raw_sha256":"428690f9cb5e1646f0bc2d4033212f17f905030f94a587c6885a1e2b4aa207d6","review_sha256":"2741598b1c00815007dae4d3b8753e64d0bdea959453a548d97cb2b5c1adf01c"},{"probe":"||","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ||","en":"Title"},"rationale":"Raison || fin.","reference_ids":[],"question":"Question || ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ||","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ||"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"||"}]}]},"changelog_raw_sha256":"81894fe4b6c5deefa25661a3bde31cbee5f181ea06f6e2e8547f9738bd9d6a3c","changelog_sha256":"0bfa3bc109daa65ea83b4aa866f3f35dba58617b772aa339a9be4dea8484eaed","review_raw_sha256":"504894ba101be0e6dd3d73d79bfbe77d0d8bfd5c844ec8b139eb7c6637d38c3f","review_sha256":"c6e94d029fae08070b42ae07000bc6fd098598476e7b31cf45d6f04fcc31e20d"},{"probe":"+","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre +","en":"Title"},"rationale":"Raison + fin.","reference_ids":[],"question":"Question + ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation +","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label +"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"+"}]}]},"changelog_raw_sha256":"01126dfed0075daa636c7f889144325148fbb0abc507eada12499a0092b4ec84","changelog_sha256":"57bb2777632a96f89be49c5a3da2183d370187091d768f019a3b36e54a273114","review_raw_sha256":"173cb4152dbc3cf741673404c064b57843791c1f16e6c23691e98ae4a6280882","review_sha256":"16a0bb56e0b474c614e0d6cf78a59f999f6c106ecda6bdb4775231d02fc317fb"},{"probe":"+x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre +x","en":"Title"},"rationale":"Raison +x fin.","reference_ids":[],"question":"Question +x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation +x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label +x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"+x"}]}]},"changelog_raw_sha256":"06f6de367517b0ca63a1f0ef031950c0fc1148121bb20af7ee543373a4e65cc6","changelog_sha256":"f0ea9f6a9b2d0c64406c683143d998a16ae42d749a079887fb4dd805a95b5973","review_raw_sha256":"b7a837a6a0d9f89185756feea8439657fe0dce20f405ed260468f5a3eee302d0","review_sha256":"262c168e813c361ade9fd7a4752151936bc94865340ec25df8d10339d7af839d"},{"probe":"x+","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x+","en":"Title"},"rationale":"Raison x+ fin.","reference_ids":[],"question":"Question x+ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x+","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x+"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x+"}]}]},"changelog_raw_sha256":"9a809efec74e8ce954d56baaf8a1275e78a3a2fb7c67d4ef4e73f9d685a729cb","changelog_sha256":"186ec1469a86675dd6f5252f16249a2956a3544e8cfb835013bee6090d6c1e4a","review_raw_sha256":"383908731d3ac2bbb84252787505a5605b7b693e7608d918a3653922fe82c610","review_sha256":"5b4fa2de6491409d8926ad54030af66ffef787fe2da4ae9e4567b0f959ff566e"},{"probe":"a + b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a + b","en":"Title"},"rationale":"Raison a + b fin.","reference_ids":[],"question":"Question a + b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a + b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a + b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a + b"}]}]},"changelog_raw_sha256":"f29d213f4bac51b91583658362029e6ea18021bf968229dedbc75857cba760df","changelog_sha256":"fd3291b1ce8f907f9235c1b40e5427d70f5d1205b957ae7d1987fc4cc0c395a2","review_raw_sha256":"deb189ce8c3ebb1d11d8e96f6a0f07041322d428f0fcb66783c9f6dac87136e5","review_sha256":"e40c2559d941bb9d25069fa7ca0a3ece8e1320b8f2a182a71cad6ead499ffcba"},{"probe":"a+b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a+b","en":"Title"},"rationale":"Raison a+b fin.","reference_ids":[],"question":"Question a+b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a+b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a+b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a+b"}]}]},"changelog_raw_sha256":"72d3d3801e94c712b2ab57b173a25185c9edc5970600fc1bbfe922d318c810cc","changelog_sha256":"429126f56b28b2106aa9bb863a677f7f213d87a13dbf2393b8f2d84b98e0f34c","review_raw_sha256":"050bcb7c84112ee628f19f4f347447e52eedd236bf38f6f9baa255b540f39b29","review_sha256":"f9a36f7d3abb5f71470cbd3d2168e20bd5674105b8047d1993a22c0b5fff9013"},{"probe":"++","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ++","en":"Title"},"rationale":"Raison ++ fin.","reference_ids":[],"question":"Question ++ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ++","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ++"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"++"}]}]},"changelog_raw_sha256":"5dadd3f011e43f8854223574e74df76afc84fcaa446d7294e55a77dab7b459b4","changelog_sha256":"7bd338b358200e89ecfe5029326ee2699291f3393c33b014cb493b3b670ff715","review_raw_sha256":"aa1886c1286152efddf5cd2af2cb1272159511f809e42d8bab27bb57a57c0b6e","review_sha256":"b1017bad673bfcedf86e8aaff334f8811625fe318a926f804bae0ea82f899f24"},{"probe":"=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =","en":"Title"},"rationale":"Raison = fin.","reference_ids":[],"question":"Question = ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"="}]}]},"changelog_raw_sha256":"b791aab3e8da10576fb400ebb5e84ec08d10e606541f4ecf879c34d980d898af","changelog_sha256":"22b58e44eae4e07d9453301f9cc2bfb3fd8e0607c8c954a8acddb2c346005e16","review_raw_sha256":"abb650837f8c50e230783a9a5e62d736091288dccaf190c2f448e97b247c4efe","review_sha256":"191c8ab775ba547de2093ba8a7815e52a98c4ba9a6f5f5c4b48e2e51952faced"},{"probe":"=x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =x","en":"Title"},"rationale":"Raison =x fin.","reference_ids":[],"question":"Question =x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=x"}]}]},"changelog_raw_sha256":"741b344b15990fab54aed503e7d7917bb99dc6320628755c7fbba199175ff28f","changelog_sha256":"d35131be5e06b4b9201204e4eecc7183f18eee92e86001420accfe8bb3b810ac","review_raw_sha256":"0c080c485dc5c4e68cfa02dccf2117681f6beef368f5cb56e926ea36187611c9","review_sha256":"2eae3ae18de0be21d8403eb356c69ff2fc88aa72f1b4e91fb23d452a4c145e6a"},{"probe":"x=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x=","en":"Title"},"rationale":"Raison x= fin.","reference_ids":[],"question":"Question x= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x="}]}]},"changelog_raw_sha256":"6024b2a2eaa57953ee945e5fab262c025e9f92193783f3d71ca89f8a08348c04","changelog_sha256":"788294161f2a11285b88f6e3a124bd62e26837621a663d09af6b6854d12f2dc6","review_raw_sha256":"f1986e1b58cd44814a1985ec8da9d415266fc5ebd03ae57fadff634fcd1b2553","review_sha256":"191da42e6558a917827e89d4625926802a7f47d8ae27078f47877cd23335fa5e"},{"probe":"a = b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a = b","en":"Title"},"rationale":"Raison a = b fin.","reference_ids":[],"question":"Question a = b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a = b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a = b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a = b"}]}]},"changelog_raw_sha256":"0cd608f8b8d3fd85062b56c8fb8b47394aca0f8bf4be74a79fa249caacae5bb6","changelog_sha256":"c4ca971ea65347dd83f498dc5151a37d9da3645467fd651b8c7e44a73570799b","review_raw_sha256":"e313c0a56be78e9dec6cd490591479c8240f5a83e9b16940653b3870c3abd50c","review_sha256":"368826b8b104277d94826468b0472d6cdcc89086be62eb7ccedb7ae2a993e5d4"},{"probe":"a=b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a=b","en":"Title"},"rationale":"Raison a=b fin.","reference_ids":[],"question":"Question a=b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a=b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a=b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a=b"}]}]},"changelog_raw_sha256":"6be4e18180d722308b119af3c11795e89659e1aac21c40793457d21ed715bfc2","changelog_sha256":"42f42ce84f96d1999515645b1f274a8f4c798bb1f9faac28fba05bcd11b6e801","review_raw_sha256":"a7eaea8e5dd9101f22380270c6626d42b545af425347093e01c75fb596119c5e","review_sha256":"78a05177a8c801400d2ab5c2d3e5d4e97ca782140ba7a71d139be1c14f520921"},{"probe":"==","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ==","en":"Title"},"rationale":"Raison == fin.","reference_ids":[],"question":"Question == ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ==","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=="}]}]},"changelog_raw_sha256":"d42ee305402363476c3f93a0a1ae0114fd6e8ee29de33a7b38ffa3203e6d8d6e","changelog_sha256":"a36e725d4a32d5c16bd9e7437f02283358b0823a1132e2a86640ab64aa2acb50","review_raw_sha256":"4d9b71a0d3204bcc567ecfd26edcdd70e6b368066e7c9fe0e043a04eacc71647","review_sha256":"a2a6e5e4fbd1c28f9295eb253acb7934c8252996425c32326f96939eb2b45052"},{"probe":"^","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ^","en":"Title"},"rationale":"Raison ^ fin.","reference_ids":[],"question":"Question ^ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ^","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ^"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"^"}]}]},"changelog_raw_sha256":"121be26705022a30f7d4fcb5d39239fd560fcbb094ef2b602918ba28c7bb79fe","changelog_sha256":"5f33e792283df26dc19579d43d93b813bb2a03b19c4cf0a366758d9c19bf0fc2","review_raw_sha256":"cb96791442f1fb011e1e914a2d20a59aba9e14ad20ded63648307691a9fa06ae","review_sha256":"1bec79887a9c0d46690ac0a6e0efc0e7283896bf0a7dc51a6479480bb59776d6"},{"probe":"^x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ^x","en":"Title"},"rationale":"Raison ^x fin.","reference_ids":[],"question":"Question ^x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ^x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ^x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"^x"}]}]},"changelog_raw_sha256":"5ea987c6da1d02facee8763dca8ad220214f26a60820d758bb54e68c5bea0959","changelog_sha256":"dd15826067fc07d3fd010b2787322592bc7658100fc5400f091a67feb5328a56","review_raw_sha256":"f0c5c09dab58c81fa67c1df06e9201be250598743996c8010b22ae241cf6a840","review_sha256":"d5658e1cf84b3da93ca005536748f0e151ad5b5022f46b50d56f6d6eac610907"},{"probe":"x^","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x^","en":"Title"},"rationale":"Raison x^ fin.","reference_ids":[],"question":"Question x^ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x^","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x^"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x^"}]}]},"changelog_raw_sha256":"04831c19f3dbf2c7866c3b7e6d5b074da1d9c3b7e12af333e7b9cb569f1e8d15","changelog_sha256":"69a373a0e49e37378f867cb34feb6889bbd478a2178a641478c11d14ed42abc1","review_raw_sha256":"21ff54f121b66872a0edcc1dc73fad17796545ea6acaeb0e8c559e4da898d5a2","review_sha256":"518527c45ecd4f462fab04a80b966ca70aeab60e52031dfdf9a47db41d8a1544"},{"probe":"a ^ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ^ b","en":"Title"},"rationale":"Raison a ^ b fin.","reference_ids":[],"question":"Question a ^ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ^ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ^ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ^ b"}]}]},"changelog_raw_sha256":"6c7056953df55b7be017a757e9ab2df9778126a13a0d3a87a3feab6f038ffbc2","changelog_sha256":"0acc09049d9aa8ff31f48dd64bf1acea7e93aa0b4ea1af40163cdbb809107e82","review_raw_sha256":"7d70a8417584bd3be5f0f0f67292dd8a323ffbe095a84e9c2f8d3d75869dfa91","review_sha256":"ab2161cb4247387044271bc790c6e9d006503bcab63c3635a1bd00783b8ad75b"},{"probe":"a^b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a^b","en":"Title"},"rationale":"Raison a^b fin.","reference_ids":[],"question":"Question a^b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a^b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a^b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a^b"}]}]},"changelog_raw_sha256":"bba6431c5a112dbb2980d9b6feeb45cd4dd222ec1a73482a1e486043bd5a0c52","changelog_sha256":"c67802a439527f8f0ffc10a5ba2011ce18a79ee76ddda39b8d7c7835f11af261","review_raw_sha256":"978636b2c1893c51cd8d686c94e341e48cd3e4658ea5d5cf27635d4e593816b4","review_sha256":"468e9f0e2879768c146d7a6585a82d1870ebf6d3b078e9c9c81027374ee22dfa"},{"probe":"^^","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ^^","en":"Title"},"rationale":"Raison ^^ fin.","reference_ids":[],"question":"Question ^^ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ^^","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ^^"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"^^"}]}]},"changelog_raw_sha256":"b3bc843f5e9eb1c9dde5cbb63c225d708024449a2880dadaf93344db90b2e7c7","changelog_sha256":"f6cc87b8ece7e40eb2cb816587ec96a55715a009f88164a33c344aa5763dd77e","review_raw_sha256":"033d706d08eec95449ba397de2c7dd2b1ea19f5f0706af4d79705f7607ad694a","review_sha256":"f42d6154f93279e832626ba47525bf931ae20915db74d241d04e682c52e46dfb"},{"probe":"{","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre {","en":"Title"},"rationale":"Raison { fin.","reference_ids":[],"question":"Question { ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation {","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label {"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"{"}]}]},"changelog_raw_sha256":"3e4ebaed608bfe19918d35bedfff161a636588730ccb994f0c4666433689e52c","changelog_sha256":"8cdf7eb47ce9d004695db1f4dc414cd98f0a5242bc0675c4276222d255490397","review_raw_sha256":"f0489beb2c5a48877cbf52cf17335a6b3e7be619a8cbcd45fe9bcf5e92cd217f","review_sha256":"0306e4119b91065e721bcce91182d02a6cb7e30be14f2afc285e2a7cc0cd818b"},{"probe":"{x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre {x","en":"Title"},"rationale":"Raison {x fin.","reference_ids":[],"question":"Question {x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation {x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label {x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"{x"}]}]},"changelog_raw_sha256":"cf248c87f471b53d714a4a01636cc70971a6143bd305b74bea582405560b586b","changelog_sha256":"88a6801be9d559943e7a2b3d9d49dd7f2d9f697f9f9b2cd57d209d2c2e2a6445","review_raw_sha256":"f3cc82920199023a7b284f7fa285962440121873a44b5502906d3abbecab0f74","review_sha256":"6c421f4433bdac792641eae9dd0fb22a0e2ac91f2e26f536253df23bd76f2dd8"},{"probe":"x{","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x{","en":"Title"},"rationale":"Raison x{ fin.","reference_ids":[],"question":"Question x{ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x{","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x{"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x{"}]}]},"changelog_raw_sha256":"46cda6e5ffaa32d6a0ec3f45583135dd4ead38a962821ff57d3bc1bfe94d5d0f","changelog_sha256":"580c2a6aa3180071e7b09cadd63a8e00c0806517a3bf564ce7e321e4afc7d39f","review_raw_sha256":"e3107bffab167d8bd8c7775103ab76253802e66a87fc2f5ff0ebc7fbb8ae8df1","review_sha256":"67589186f54d71eeb1a0c4f65b4c4ccc6c1d78554fb05794cf2ef991a81c91dc"},{"probe":"a { b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a { b","en":"Title"},"rationale":"Raison a { b fin.","reference_ids":[],"question":"Question a { b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a { b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a { b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a { b"}]}]},"changelog_raw_sha256":"be75a63ad74bb2a9e6acef2f6ac736ff5f8d892ffd9824681952a5b7ad293fd0","changelog_sha256":"dcf6ece9d00caf0f8b2ac19d194aca7cd75561e2e58a3fa21df305e9fcb4271d","review_raw_sha256":"c8757728275c8dbd43cb6b911447aba3d01ea993c474d5e74f4750f9ea66879d","review_sha256":"f1425eeaee673a300ea260ef0404f19825ce810b62a2f3aa507f9283dce12afb"},{"probe":"a{b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a{b","en":"Title"},"rationale":"Raison a{b fin.","reference_ids":[],"question":"Question a{b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a{b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a{b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a{b"}]}]},"changelog_raw_sha256":"9de6710c107200516fbf14f7fd890342fbc96120a89c46e03b2fdc61666725f0","changelog_sha256":"d4aef808932cefb52d16f18c3038832f0842e172fab26e30773cc50ebbff9bbb","review_raw_sha256":"d71f41e67c41f31286f0dd6e912f5af3725905feddea2a4d648852525358e63a","review_sha256":"7072ea0d875e90a870e20d14e6f9fce416fceb8033d2f8cb2510178f8d3f3dec"},{"probe":"{{","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre {{","en":"Title"},"rationale":"Raison {{ fin.","reference_ids":[],"question":"Question {{ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation {{","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label {{"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"{{"}]}]},"changelog_raw_sha256":"6e206944502ed938e41bccfc1560aa63b71ab10f1d572abf986bb4a627dbcdd2","changelog_sha256":"c042bca5d8a4cec96de18b2bd0efb1f9b03c0b1e3842bae8e344e32f01e21b3f","review_raw_sha256":"1d2e7fde8e5a49b726b64d6c98470185a5e43f6d5fbfbfe1bbf5a82b43d940b4","review_sha256":"7040ef03ccff1778be14977ad67500f3e67ebab41f2b48cbeb5625c763218daf"},{"probe":"}","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre }","en":"Title"},"rationale":"Raison } fin.","reference_ids":[],"question":"Question } ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation }","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label }"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"}"}]}]},"changelog_raw_sha256":"7981a525b5d21db76bc4864592fecb1088bb5255f87b1da6985d10c4b2cf353e","changelog_sha256":"c2c5f8c7afa6765d30e0c1f039123d7b6f0d0d72a94c63a9f83dfcf9268fb26e","review_raw_sha256":"e1b9142e9edb02d7e3b13f91e6ea3fec4f88931f4bc0ecaffe67645338be48c0","review_sha256":"be39153a25d73eba8cb05c49df4d32355838b3d04db2799bcf13844dc782f1e9"},{"probe":"}x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre }x","en":"Title"},"rationale":"Raison }x fin.","reference_ids":[],"question":"Question }x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation }x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label }x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"}x"}]}]},"changelog_raw_sha256":"4f0392d650452487893069f54e08776ea9384239f9842d264f676c90eab34de3","changelog_sha256":"c3c2e62ec08636e4e54fe56bdf3accf0301c091baf2324191d55e483c7b07b79","review_raw_sha256":"7fec993f6fc9302a40c9b4010376f834d8bdfb0a1230e77936146746e99ae6a1","review_sha256":"2385fb0c5e571b081b3c52555309a2c5b71cba1019e11661d21859e18624b3b0"},{"probe":"x}","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x}","en":"Title"},"rationale":"Raison x} fin.","reference_ids":[],"question":"Question x} ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x}","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x}"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x}"}]}]},"changelog_raw_sha256":"3e4246316163ea8e554959ce66993d51a4471635d227b6fcf3795e76001e1988","changelog_sha256":"70a1b2e3e820857d460d6c3f50086b03aa4f0efa6762d0f16b7d7f15bc385e05","review_raw_sha256":"a5d50e57e82346edfe1fd5db8454ed2ccdc4f684b3ecd4177713ea0ebeae3812","review_sha256":"8b63b172cff7c40388c07625f5d327af18138739c5ba4a9ce96bae8cac0a45ab"},{"probe":"a } b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a } b","en":"Title"},"rationale":"Raison a } b fin.","reference_ids":[],"question":"Question a } b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a } b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a } b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a } b"}]}]},"changelog_raw_sha256":"1226cf382699c339bc65b0c2d7b0a7b2143e3fea3cde50447ef7bdf12877d7d2","changelog_sha256":"8d1b32db404548acd54930a9aab92bb53c5e64ae433f395d1de14fd0b0beb1a8","review_raw_sha256":"ff2497ec1333cef71bc4b7ccaf624c52f771e97db608043ba1c533e9452ab1cc","review_sha256":"f52a2884726c512788cf80792ce1e74126e3a8a683ae5635c82c58be1d8e4ab5"},{"probe":"a}b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a}b","en":"Title"},"rationale":"Raison a}b fin.","reference_ids":[],"question":"Question a}b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a}b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a}b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a}b"}]}]},"changelog_raw_sha256":"67959520fff2e426d853ff40f1f3bfc625a238e0e6235ff6a9ca349d9fd253ec","changelog_sha256":"199d2dc2ee98cf22980eddc35cf0fee6e4bae662b192b336ededaed76238673b","review_raw_sha256":"3ab23fbd0d2877d2cc716e46354cdb88c694cb9c8c1de1700441627df601650e","review_sha256":"75499706287385ade251c9b5bf168c36c2c8d4b52fdc2a992cedded05f0a1b21"},{"probe":"}}","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre }}","en":"Title"},"rationale":"Raison }} fin.","reference_ids":[],"question":"Question }} ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation }}","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label }}"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"}}"}]}]},"changelog_raw_sha256":"55d0c04c30b79542efcd1002188f98ae30c43050f0c22f2109de81df0d1974ec","changelog_sha256":"5708a0b76a4bc9f2ca30659af7b1aae65e91ff21535635516865e1dbd6d8fa9c","review_raw_sha256":"5fb026955f69ea6f8d5f0cbcab425a97c1685e64417f05d02483dafd61e4692b","review_sha256":"9b94b64a1ef704d1d64ee7dfe66e2c9acdf370596a33e9f942db89e1549344d5"},{"probe":"\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"","en":"Title"},"rationale":"Raison \" fin.","reference_ids":[],"question":"Question \" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\""}]}]},"changelog_raw_sha256":"de023911a1a1dd9a5dd430132cc9f1c4c87a8a1cbbac6daee185abc699a2de7a","changelog_sha256":"b73e1b8d7ecde9127804d761c83900be0e42d91ed489e92279e500a61f49e6cd","review_raw_sha256":"5f6c652099a3fde99259e2646a0219b30135f772a07fa3ecea652a0b69c1f267","review_sha256":"f1f4b9da0db23465240dd077559ed71ccc405ef049f85d1995a75288bc5ebae3"},{"probe":"\"x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"x","en":"Title"},"rationale":"Raison \"x fin.","reference_ids":[],"question":"Question \"x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"x"}]}]},"changelog_raw_sha256":"a9958c88c44c78c86afa9fc91e7380f3fd678fe77837d7a511b7dd304ed94600","changelog_sha256":"ef4f4b4752eaaac2c82622389e83643959f83c95ef0595a4e0ab44280f1e3e00","review_raw_sha256":"e3e1ff4e759eaa196d7b8e11199a2d2acb2f000e5e962b1d02ae767fa94b19fb","review_sha256":"30deac661e482d8e3ef3220b685ab37aacaf94e0ef114af5284cdc46b0d900de"},{"probe":"x\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x\"","en":"Title"},"rationale":"Raison x\" fin.","reference_ids":[],"question":"Question x\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x\""}]}]},"changelog_raw_sha256":"b7a48e4ae792978603ac9efeef53e3db01439f931f67f1a32c7bba589585d422","changelog_sha256":"ce21ef84d35afb6215720c6924df9764ff680de9904acbbe847334d022c1bf41","review_raw_sha256":"b33d134f385d4990035d89bb7a75d56e3fccd58958bf3c79cf97361f3ed6eeb7","review_sha256":"9f6608ea6d8690bb259ee2363186523fca2fde1a0e9b56899fd2facecf009764"},{"probe":"a \" b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a \" b","en":"Title"},"rationale":"Raison a \" b fin.","reference_ids":[],"question":"Question a \" b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a \" b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a \" b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a \" b"}]}]},"changelog_raw_sha256":"b470f06014e356988c3037c2d5016f86e9fb0ef2b8acb2bc688df672bfdd9226","changelog_sha256":"538f3647f1dfebc227762d805cd4f00f1aa11c48c4425456abe0bccf4010a7ea","review_raw_sha256":"509f1672af177687c7fb3d262dd0c1af7df2b595658647eb87d1debdbdb4a9bd","review_sha256":"b2e422fe74efb08ba7eea6e445dcedb742526111fbcb5fd7eb8c51ea0bfbe04c"},{"probe":"a\"b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\"b","en":"Title"},"rationale":"Raison a\"b fin.","reference_ids":[],"question":"Question a\"b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\"b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\"b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\"b"}]}]},"changelog_raw_sha256":"1fc3ba3eb99e2d9656b9a0a391338cb90243e19965477ca4dae2387e051056f3","changelog_sha256":"b06f34817de30e915cf9f5a32719ac03a70989b6b2ce33aca2e94bae1854601a","review_raw_sha256":"444f4daf75f177f7633e05feade1dec56e3686901febc23736ec2720d305cec2","review_sha256":"f0edd9cb2a80695bafc0875fc6c13dcaf1d500e41415526fa2c1a002d0b9ae40"},{"probe":"\"\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"\"","en":"Title"},"rationale":"Raison \"\" fin.","reference_ids":[],"question":"Question \"\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"\""}]}]},"changelog_raw_sha256":"4f0a59c369597ecdcc2d9ab991e81abae70bdc0b420bc84317a7da395a47861d","changelog_sha256":"68d1115baf6952f9642a9473f077a333eface80b0f14a0f8ffc193f5790856a5","review_raw_sha256":"db5eb6a9608c71a6b9dce8919f3a0bf4c69958b95bff610bcd93beb3bfde04e2","review_sha256":"8885a7750ff8c51383cda4c583a736f79417fd3b1e43e8e0bde8c3906f387e00"},{"probe":"'","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre '","en":"Title"},"rationale":"Raison ' fin.","reference_ids":[],"question":"Question ' ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation '","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label '"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"'"}]}]},"changelog_raw_sha256":"2211382874ab3fce58b59645605acfe1920a73328b7d235e37699b3810738534","changelog_sha256":"737a60ac7f43d0f5141e17a65d182bf0112c4fb22247a0b5dd408d55ec56b428","review_raw_sha256":"ffca0813768fec15cc9ff4222f7a2fe76be2d272c801c467c6f217ed01efb780","review_sha256":"89f4a4cb0dc7434783cc617e8bbe4a7d4627b9f797cf15955070b6cae3032443"},{"probe":"'x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 'x","en":"Title"},"rationale":"Raison 'x fin.","reference_ids":[],"question":"Question 'x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 'x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 'x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"'x"}]}]},"changelog_raw_sha256":"71083069e904af6b51ee36c4687920deef9e20a779e42d2cdc1e894c6657deb7","changelog_sha256":"1e2b407a1f8df008512aba3428c0c92b4b2ef35b66d0bdbaf473ff3fffeda4b7","review_raw_sha256":"178655910b18b563af0f78ff99cc4e8ab57f815f65809447eddc87a99dcc5bdf","review_sha256":"370cfc98f5eabeaef4f40dbb73a741b6c69e3dba86b4d7d21b2e05f23d83e543"},{"probe":"x'","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x'","en":"Title"},"rationale":"Raison x' fin.","reference_ids":[],"question":"Question x' ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x'","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x'"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x'"}]}]},"changelog_raw_sha256":"06479ba91bfa8ad246de6236eb9d8787d03ae4a148765c057c876ee8bc3efc3a","changelog_sha256":"49e02bf5e2acd6946880e03860dc054440e961dedadae1af163155aca466e19e","review_raw_sha256":"f4dae15b367ccaaa823cd287d42a3020be6a0e247c916020fd795c77d0c0f70f","review_sha256":"736b054c3199afc39365aa5e787745712ca5491028171694b99cfaa80e2e20f5"},{"probe":"a ' b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ' b","en":"Title"},"rationale":"Raison a ' b fin.","reference_ids":[],"question":"Question a ' b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ' b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ' b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ' b"}]}]},"changelog_raw_sha256":"8c68042d0b00bdc2165a1befdfeae0b244b6b31f50cb67b3248067ca929757b7","changelog_sha256":"31a6adbb0530e32c9972623c7fba717a5eb4d9b8baaea6212d923a58b7c7e957","review_raw_sha256":"9caf9169a836a99b0072c35ed9c7484643171f25d4f124d7da64e286272cd70e","review_sha256":"66eac699d2220afc57fb13f6febec35e049a1801144878c87d9f7e475d25c116"},{"probe":"a'b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a'b","en":"Title"},"rationale":"Raison a'b fin.","reference_ids":[],"question":"Question a'b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a'b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a'b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a'b"}]}]},"changelog_raw_sha256":"cf4f7c07ddcb1aab5c51745457d4e2179ce019518386d2bfc24a841cd553372f","changelog_sha256":"67c1311083a39b7c0dbfb41372250b114e007c3cfc4df475eabfaefc1423a013","review_raw_sha256":"8df7b5c65711cee6e238a47294144210516c869dbd8cfb84e3422b187724cbfd","review_sha256":"4a528ee898865f727abb84638e1151d5ceabdba7a27295a6ad35c19aa9049acc"},{"probe":"''","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ''","en":"Title"},"rationale":"Raison '' fin.","reference_ids":[],"question":"Question '' ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ''","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ''"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"''"}]}]},"changelog_raw_sha256":"07a2f49fa18f4a33c69496cec45476bea96f3c04e80dc4a2820f5fe3607380c7","changelog_sha256":"b7d42dbe23e938c7875547321426b80153bb10874828f5242999d8733c337529","review_raw_sha256":"6f6b0b6f4afadc6e970c78d7d8fc3eb5bd1ca2f9f91a386228c2b92a7120004c","review_sha256":"a085bf2c3d1bef0b622cf86c3920d76ea7efe4d921e61d3d4385aead71039b2c"},{"probe":"%","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre %","en":"Title"},"rationale":"Raison % fin.","reference_ids":[],"question":"Question % ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation %","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label %"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"%"}]}]},"changelog_raw_sha256":"65a5d3b3989f3e1d1b953e2b2a8f5e8ce6370f7cd9f5560a1e4195f269219931","changelog_sha256":"da9b0f1cee61d773103607a3b99cd1e1812919996e983bf0201fa397b9fbe429","review_raw_sha256":"8a48e659ffc22d75e8244587d0cf0d9ed5f1adec27cc9b88c3cd7bc505fc76e0","review_sha256":"b9bb71838c4638f743cba2dd86b3a2a263f532ffe6b6b29260d0b8dab232e918"},{"probe":"%x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre %x","en":"Title"},"rationale":"Raison %x fin.","reference_ids":[],"question":"Question %x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation %x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label %x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"%x"}]}]},"changelog_raw_sha256":"bc1a939f5ebfa41d8e0b2240c512b6a24843610329ef48b5489395b3697a2fab","changelog_sha256":"bc54958606379982cb703e701518bdf28d84fd5b0d0cbf5a5ff489331de9eb81","review_raw_sha256":"21208fba8213f35ccd10437dcf9d84b6f7ef5c8fd597bdec54515a2c0d5e4715","review_sha256":"844dbad47d42c5ee29ce3c11649d90f78ee5044f72922d4c36f40eef1401061a"},{"probe":"x%","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x%","en":"Title"},"rationale":"Raison x% fin.","reference_ids":[],"question":"Question x% ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x%","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x%"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x%"}]}]},"changelog_raw_sha256":"e20078b0b3f250e592e3c44f8fa6dc49f97dc9d81107da83871f8b6696be45ed","changelog_sha256":"5bd0c6969cddde0fede1aab2910ce6fdd9aa399bcb3f943e39a3e965f6c7251c","review_raw_sha256":"aa1ec655ff559321e7528836566991ff7a3be843b8ad2ef21504b1ad223ccece","review_sha256":"aeba15d28b8c335c042f7f3cf2a1897e69771ed5ff93a5cdcca3f5d7bb03d120"},{"probe":"a % b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a % b","en":"Title"},"rationale":"Raison a % b fin.","reference_ids":[],"question":"Question a % b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a % b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a % b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a % b"}]}]},"changelog_raw_sha256":"91c5522142e8564a9cf3a4b2a9ac3354d9a934621153899b9b59f8871137ee73","changelog_sha256":"67bd898eee7f00ce02f97537da9482269ab937031e45973e72637115b1c1c91c","review_raw_sha256":"9817c118adfb68ddb8e0374169d7b17abe3f086cf330e105967b225cedb5c814","review_sha256":"6e82c513d2f78ce8d3b90a8e0af393be7df4e1aa5e644b06369d987720ffe638"},{"probe":"a%b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a%b","en":"Title"},"rationale":"Raison a%b fin.","reference_ids":[],"question":"Question a%b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a%b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a%b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a%b"}]}]},"changelog_raw_sha256":"b05507b6fa575fd9227fe2d71596c45fb273a031b93b052838a62f71561303f0","changelog_sha256":"3d87eb54321343fa0714d2dbbc4c8ffc776580bec19ce172169aa7bb1cf83eaa","review_raw_sha256":"76d830a5e3a3daa7c310a8ac690c23886a53d5fe96be77acdba9f2dfbbdc6dad","review_sha256":"4aaadaef1fc10f782c4c5afe96a5575dfd012e77b849ea0b18610445b92e17be"},{"probe":"%%","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre %%","en":"Title"},"rationale":"Raison %% fin.","reference_ids":[],"question":"Question %% ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation %%","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label %%"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"%%"}]}]},"changelog_raw_sha256":"8b7f752568930677f0536abac9b19e8656e1fb73e23b2a0e7bd804b1aedf1cdb","changelog_sha256":"b19e886cdeb60b6f59576af64d3efbc735cf7787048df1c74c28db0b542ce069","review_raw_sha256":"a777502bdfa5f026cc9a96da74b8051e8d99477acb0e10e53881e62c2eed98e4","review_sha256":"d6ed89a5cf18658b0cee780e6682965eb4be1715139dbee136d6af517321aa01"},{"probe":"@","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre @","en":"Title"},"rationale":"Raison @ fin.","reference_ids":[],"question":"Question @ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation @","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label @"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"@"}]}]},"changelog_raw_sha256":"38926e0fa6ef7578037344be6ddf6942a25b11be66a5b6d3c9316246d6266fc6","changelog_sha256":"ca5e51f69f97635e0a24ac3f7acbf64a9c2900faa6526b6ac9e26c7020a1e40a","review_raw_sha256":"9267a36ac3a61e7615b823fc5bbf191e9cca67d66965291f5c3fb8c653b4e19e","review_sha256":"05b57e94296c235e32ffc2ff282d08d753e4217669d81174cf49262e6daf7750"},{"probe":"@x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre @x","en":"Title"},"rationale":"Raison @x fin.","reference_ids":[],"question":"Question @x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation @x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label @x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"@x"}]}]},"changelog_raw_sha256":"5ac4844000a94daa6a9b0310c8c8b1e47321086504255a3216e042a6881cdab8","changelog_sha256":"5b561234e2200ef6c4271b092216de18d9c2b92eb884e34ed5d37fd722f199f7","review_raw_sha256":"d80cae08d70beb2d68472d6bcd956578a26df9881aac3ef0585933606d361a2a","review_sha256":"ada228ac0b5d4983336771a2025d1930fe701992af6a59f3a21ac5fc400e60e0"},{"probe":"x@","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x@","en":"Title"},"rationale":"Raison x@ fin.","reference_ids":[],"question":"Question x@ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x@","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x@"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x@"}]}]},"changelog_raw_sha256":"88e3d20e8453dd72a78ceec86bfb3ee9ff49e9a9f7e7381e434bc3c7d74825c5","changelog_sha256":"78282bf1ac5a95c0a81a941dc372d7149375df4b6dc9811e1f788e264f494eec","review_raw_sha256":"afb922bf2e98de1fa23c16b05f4038ffd871c2428ebfde16a7bd2f8cda85191b","review_sha256":"b5ec63e1ac6f8eef69b82fb7a4e81b73f038df7b2784720d03cf8692b63e458a"},{"probe":"a @ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a @ b","en":"Title"},"rationale":"Raison a @ b fin.","reference_ids":[],"question":"Question a @ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a @ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a @ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a @ b"}]}]},"changelog_raw_sha256":"3bb2b0f6efd4f75b84a6421190bece8ba04dcff201fb6e3eff440755b2a54229","changelog_sha256":"0d7a02c381501112caec6d0b562dae242a0c208ce0a1ff5f738661dc0ecce24c","review_raw_sha256":"9d1c40742eec073d56e6995fe30aeaf4feac0381ce519f56584fd146f0b37917","review_sha256":"92764c095c76ea1999ca95f3934548f0b6258538caa231bea4f1db1cd8795efa"},{"probe":"a@b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a@b","en":"Title"},"rationale":"Raison a@b fin.","reference_ids":[],"question":"Question a@b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a@b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a@b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a@b"}]}]},"changelog_raw_sha256":"66fffcee23529b515b8cd98a1d08c9a9c209ff89bb18311a27b722c93c47e83c","changelog_sha256":"ef4be76af0db2d4d25f21ba95f32cc220282daa964f88f09ea0274af985e1f8e","review_raw_sha256":"ff431602703c77ae36ecb1b2b9c757dbe3a2c1b8d2a419df1c760cfe78e82b9e","review_sha256":"a92b804da1e8ace24012cae42fe43822a4f35b9abe3658146754f3e5159872b5"},{"probe":"@@","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre @@","en":"Title"},"rationale":"Raison @@ fin.","reference_ids":[],"question":"Question @@ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation @@","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label @@"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"@@"}]}]},"changelog_raw_sha256":"32ebca7c0f897f0649473fc523531d04e74423970d148d85f3990554032e5509","changelog_sha256":"7f7c4f3ee6572a9d33f2e777ec3176f64909c9273bf9959b805ac0cf50818c46","review_raw_sha256":"861068c6301eeb026fe94cee45d532c2f0bc5208ee4a5b7dac1b971f808111a8","review_sha256":"507033ade35950599da131842e44adc26d74ab4e32c7ca7625922d5c470abb71"},{"probe":":","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :","en":"Title"},"rationale":"Raison : fin.","reference_ids":[],"question":"Question : ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":"}]}]},"changelog_raw_sha256":"a3597e6fa37b179cacbd8e0b0b5cdc30524c3d28fbb6089be2651690f2d8db3c","changelog_sha256":"e7877415b5251712a8dd16da36182b73712ac9f53bd5cde5cb1c2261457124c2","review_raw_sha256":"0ab101acc411016b829917dbe055baa78df60c34a7675d47198df354eabf0a80","review_sha256":"9c3f2a0016d1f2c07539034296e858a62351e6178597d286c61ab826dba1a382"},{"probe":":x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :x","en":"Title"},"rationale":"Raison :x fin.","reference_ids":[],"question":"Question :x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":x"}]}]},"changelog_raw_sha256":"19ec90faa701e1fa1a797801d3d0125dc127a9708db4e053fbebfa5b0f614652","changelog_sha256":"44295a466438aee9d3687ba3614ac782d255088d298cbcaebf2f4210d11dfe00","review_raw_sha256":"7ad1614b58a15ed9996176b285dfbe983f7ea78f30cbd9d37581a920e9fdf1bb","review_sha256":"7c9b18497ac5832dcbf021c17c0c040c5d57556df097029551c00aada9e4d9f7"},{"probe":"x:","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x:","en":"Title"},"rationale":"Raison x: fin.","reference_ids":[],"question":"Question x: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x:","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x:"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x:"}]}]},"changelog_raw_sha256":"b095f61509c39a87727ce0a24a00be0ada239cc110583e5a5884e38390f9db0b","changelog_sha256":"6087da26660a21b939321335f13ed344d807004265ecb057b2200f536474ea92","review_raw_sha256":"24af1ce229583411a15bafc00f6b83f5477b8276fc918c646fad8ba2c98ed20f","review_sha256":"4a909ac970d3cb40d9a8d5b415db67aa0fd9dc3552299dcede476eeda88f3e22"},{"probe":"a : b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a : b","en":"Title"},"rationale":"Raison a : b fin.","reference_ids":[],"question":"Question a : b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a : b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a : b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a : b"}]}]},"changelog_raw_sha256":"d9e7f8d42f0ea5b61a36bf014247d3537381f6b06b5454e7a4e53a390edd91b8","changelog_sha256":"88739eb70aa91ced011afcf1d54f58278c735703d4f5caa51e6280a5ceff4809","review_raw_sha256":"8b7d2063a2338067b55026f7cfa6ab5248d29e632447d53aa30f3c5303956e7d","review_sha256":"39b63fecefe5adcb586d3c9ba76777d9ca28f556bccc86b7a8b943595be0c7ae"},{"probe":"a:b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a:b","en":"Title"},"rationale":"Raison a:b fin.","reference_ids":[],"question":"Question a:b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a:b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a:b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a:b"}]}]},"changelog_raw_sha256":"ecf3f3f34f92566de9f14b1992a9039b3d29ed50d29359810d9f1dffe206a930","changelog_sha256":"056c0c47da2851ca433b88fea4ff90b5070b2b669f8bbb63611bf609bd91f1f1","review_raw_sha256":"b765b0687ee31c1445bac4e96f9527b02f27554967a1684722739191480fdfa3","review_sha256":"76faf134834d6e7bc7a12743d6001102585baa2a3686bbee2ed8b342c9e8db76"},{"probe":"::","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ::","en":"Title"},"rationale":"Raison :: fin.","reference_ids":[],"question":"Question :: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ::","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ::"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"::"}]}]},"changelog_raw_sha256":"1df1a92c0bdd5379176998efdea203b82c678f6d4e3e579e5f26abc3cd1f9cc2","changelog_sha256":"e2fe68903f15b3646fc9bd20f3f61005fdbc1453df5db5ec7ecbb8b448745977","review_raw_sha256":"bbed765fc2b2118eb1cf8333228c31205d109c7254ec826c90f1e9b58cd98171","review_sha256":"980e92b42e5ca898ee0586569d7cfd595fcde7ba536cd05415668bf3a2f9f221"},{"probe":";","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;","en":"Title"},"rationale":"Raison ; fin.","reference_ids":[],"question":"Question ; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";"}]}]},"changelog_raw_sha256":"e5d39edf1a2aa71ef948fc54b79c8b6b45e7e1ac534e1a5f1b11b040e0efb134","changelog_sha256":"e92a9b451d9bb0d91d0936ac75e8d44d1b64ccf36a65c7d5116f622b9578dcf7","review_raw_sha256":"3c2958d119ea3b4c1cae07e05b53564443f6579c603307200b96962cc3506718","review_sha256":"875d1e103dfb5248212283ca12fff87714576b04febc76a08792ae76580ca36c"},{"probe":";x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;x","en":"Title"},"rationale":"Raison ;x fin.","reference_ids":[],"question":"Question ;x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";x"}]}]},"changelog_raw_sha256":"d66722a6777568e9564e49e521def4e51219219168b3413df97fc200897a0c4c","changelog_sha256":"fc847b45d3a698293b904d76013a03375d7a08c1752d25d0a021a663e9acba42","review_raw_sha256":"833fc030fb51cff19c516774c20e45ad74e930db7e7b8d1816210e4b532fd84c","review_sha256":"5ba85d828167d8351db135021276863ef3464ca89622689793a245939ce66d27"},{"probe":"x;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x;","en":"Title"},"rationale":"Raison x; fin.","reference_ids":[],"question":"Question x; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x;"}]}]},"changelog_raw_sha256":"df9ec75e1b1f5478d8ffbcc4419d67959a62046f6b476a0170ca176f4d703a6a","changelog_sha256":"b94f76d79b14983a4b5e6e57dcdaba9e3b2a99870af2c251701ab327a607ab00","review_raw_sha256":"afa06418a4e0729b14f2023bcd85f384b68bae952ceb9d83695c8925dbfc4cfa","review_sha256":"29b8e564232256ec83ef907ee43ac46207a3b2850bdb8688a521a96a26fa8543"},{"probe":"a ; b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ; b","en":"Title"},"rationale":"Raison a ; b fin.","reference_ids":[],"question":"Question a ; b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ; b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ; b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ; b"}]}]},"changelog_raw_sha256":"213882a254a0807913b1c9f3751986335078ab1632b2af91e2aec830baf7d27a","changelog_sha256":"9d276cbffac6881aceff119897693bb88a7016259aed2d5d986609573b41efdb","review_raw_sha256":"5beaea1c2a37b86d16e2b7ce2a1bf25bfa49670ff1343e58f195aeec4711022c","review_sha256":"2c8d84822ece93e3ad1357e5c51b73b736ee6d0500f77458375f7bbbfdf75ba6"},{"probe":"a;b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a;b","en":"Title"},"rationale":"Raison a;b fin.","reference_ids":[],"question":"Question a;b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a;b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a;b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a;b"}]}]},"changelog_raw_sha256":"7b72599829053698224ac95b07c8ec8a72d76569eb6ef1cd84ae67b57fb535c3","changelog_sha256":"89cb4d1bbf34a91f6bfa3e1730d2293bb1b3fe7694a50095917d1e63be667a3d","review_raw_sha256":"fb0f60ebf7db1c28e036bdaac1940b2dc2e96395251b927dd09b92d5c07f640a","review_sha256":"6f8cf7b32bceca97ebcbf0855aa23a555e33fd7a1b991f60e5034cc4751b26e0"},{"probe":";;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;;","en":"Title"},"rationale":"Raison ;; fin.","reference_ids":[],"question":"Question ;; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";;"}]}]},"changelog_raw_sha256":"96196b291a81e0ec2eadeaf4f8ae85697139ea5048a98862d1808272cbe62974","changelog_sha256":"311d2ca7e02b7d89476988a494b2f1f03b28905949d2d99ce4fab495dd928023","review_raw_sha256":"a6948cd6bf76805ed614d8de69e6fac7d815cbcf861a73c62a3fcbd9fafa5d3a","review_sha256":"30417f3b1336fb8872189aad53f18ee25fa0e1b0ee8fd9f3eb4550e66bf9038b"},{"probe":"?","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ?","en":"Title"},"rationale":"Raison ? fin.","reference_ids":[],"question":"Question ? ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ?","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ?"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"?"}]}]},"changelog_raw_sha256":"b18adbefb7cd3d04bc6fdbce61f3fb9bc8d75b9d2284b87f6cadf10f95a4f449","changelog_sha256":"f9b544112c049c7e4d941ecb7a01fa12d078ad58ba102da42a5722ef35cb8dbb","review_raw_sha256":"278861a7255b041f92e976531198dac726449e71d2e10e0e14d2900d0f47fa14","review_sha256":"0065f69e5e0c35ad00392f02d8d11a070ca135aec8e54ea17f29735cfc80f34e"},{"probe":"?x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ?x","en":"Title"},"rationale":"Raison ?x fin.","reference_ids":[],"question":"Question ?x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ?x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ?x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"?x"}]}]},"changelog_raw_sha256":"749cc761346528b2d3b478802716a490233660648b0b333907da5c23b4d68ac7","changelog_sha256":"530b2e30ec871ff4433cc10070addbe153fa06b9f2539c58d3b4a68e59111dc6","review_raw_sha256":"95ab1462273f9765d22ca86a743884cf5ebf41ac9e6e52abb22f0ad181cb48fd","review_sha256":"9550dcda456626f787d4cc0b7bd9e2ed01caea18de6b305ae468dbf1c6424bb1"},{"probe":"x?","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x?","en":"Title"},"rationale":"Raison x? fin.","reference_ids":[],"question":"Question x? ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x?","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x?"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x?"}]}]},"changelog_raw_sha256":"cb0f92618d97a816c4b331d7b7865b1fe0705fc06e7bd20e2af58adc569864f8","changelog_sha256":"3fcf3116e0c7b66201ac3e0875ba41273365ec17dc718a75b7d40f9d5bfd0e43","review_raw_sha256":"8e2edffb7d1ece11e61e3f130677fbffcc561f12a44e5f905d1f3e875720ae9c","review_sha256":"294a05341d04d612ec1ca601aeb59e59d67dcf491a66a443e0e33a3d33893894"},{"probe":"a ? b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ? b","en":"Title"},"rationale":"Raison a ? b fin.","reference_ids":[],"question":"Question a ? b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ? b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ? b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ? b"}]}]},"changelog_raw_sha256":"42bb6ffd9a2989ec26f9b96bef928b7e894b47e277840a834ffce17e0f87a111","changelog_sha256":"834e6187f07ad14464e92cd98c3eb052361650297031ad300446ce0203e9a3c1","review_raw_sha256":"896a529f2316a76d6afdeee49aff4b64b57a96ca596da18ae9d5545188fe2361","review_sha256":"780fb3a69365ff37f43852b9fcf6f36c7dfd9b82f16cd0db3c34cd120414b6b5"},{"probe":"a?b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a?b","en":"Title"},"rationale":"Raison a?b fin.","reference_ids":[],"question":"Question a?b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a?b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a?b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a?b"}]}]},"changelog_raw_sha256":"a282d8ee240cc9cd6295173492857f2c7892ed43805909c0dc42a29138cf6461","changelog_sha256":"a7bf08f97b6149f5346c7db7d5f614506b612ae03692b7545123b3b1a701af68","review_raw_sha256":"8c5177f5910e29ec7d021d5463ff249469de0060d022c87fb6ae95fb1ad4b282","review_sha256":"0685438e26bd11658eb63150dcbf035b6b7f9b16552b40283cbcff3a9e0c162f"},{"probe":"??","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ??","en":"Title"},"rationale":"Raison ?? fin.","reference_ids":[],"question":"Question ?? ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ??","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ??"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"??"}]}]},"changelog_raw_sha256":"84efd46488f655896c5271f87a9d13519d8c055f287a62da2693c98d049fa782","changelog_sha256":"907342e7962b9c1be2c11c919d366b51b601a49275d069e9387d0b8810291e2b","review_raw_sha256":"77d36b777599e1f9b67483f018bba4d1694e8b0d75751bcee04b956f58889ea2","review_sha256":"8163de0c748e576e897b2e75ff90ac4accbd265aed22043486c644db58f1b014"},{"probe":"/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /","en":"Title"},"rationale":"Raison / fin.","reference_ids":[],"question":"Question / ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/"}]}]},"changelog_raw_sha256":"63854a132d78e5acf2018d84901e2ecb1e605975b8ebf599df6b6b8a1f5952fa","changelog_sha256":"c4228f786b0e3a86ad8588f724fa88de198e336aec93f38f4af07a46c15237c7","review_raw_sha256":"b25671f318586b051358f4eb7682fdffa369b40d047025dcf504ce623fa97205","review_sha256":"afd7f7a57d88752d1e3346637f56794b842928fc2a554e01694e4de8535b174b"},{"probe":"/x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /x","en":"Title"},"rationale":"Raison /x fin.","reference_ids":[],"question":"Question /x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/x"}]}]},"changelog_raw_sha256":"1721867018631aedd4bde82592568b672b6f86dc5fd2138c54692605e972d2c6","changelog_sha256":"4e54dea85e02c9d8bb7f1f19de8f7b1b06008172ef916c20e9c1cad4968609b3","review_raw_sha256":"7b252c43386530ac68fafcc239578dbb02043740a8492caeceab7d59100f12ed","review_sha256":"dd672b6767812a92b66a7dcb358fdc94d045e138415a63b84184deb43d999fce"},{"probe":"x/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x/","en":"Title"},"rationale":"Raison x/ fin.","reference_ids":[],"question":"Question x/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x/"}]}]},"changelog_raw_sha256":"055e04b7c904cef8da8378dfcac14084178112d4f10edea19fe9a3e6aa56a800","changelog_sha256":"a69bb7fa41db5a44f77baf1d1caba524698c2cc087923ceada19b9ba91915b6e","review_raw_sha256":"aba69f7fbb788811cc4d340bb006c360de57ec15cdceeed41a9b58944f884832","review_sha256":"c0ad425d3248f44864d6f56bb59c658de9db3117ed723b07d175eb72e2ea4bec"},{"probe":"a / b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a / b","en":"Title"},"rationale":"Raison a / b fin.","reference_ids":[],"question":"Question a / b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a / b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a / b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a / b"}]}]},"changelog_raw_sha256":"8716244d62e48bc410981fa09699a172e534eea9520a7fdb30d84741694421ae","changelog_sha256":"57d2679780c3843172fa1f44dc64e6728961c084520fc46e6b5d8593e82d0180","review_raw_sha256":"799cd91559e7da18a0ce4810eaaa7d563f279225f8d7a851014c286919be0e79","review_sha256":"759e5b7e5c941791b90155efcccd3d3a95393b41be3cc5d81bf2d04fa916a4b5"},{"probe":"a/b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a/b","en":"Title"},"rationale":"Raison a/b fin.","reference_ids":[],"question":"Question a/b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a/b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a/b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a/b"}]}]},"changelog_raw_sha256":"2c402f88cdfe7e8e7d5139642b30a7bdb126bddf49aa93bd446c3cf9826ebe4e","changelog_sha256":"fd2f271903c055c504b735b6afd628a9ec2d839e978699c1ce69b32f7a94e651","review_raw_sha256":"0722f11fecff545bd7786a5035173074c53c6cc2c5df542d8b056760517d985d","review_sha256":"0d98e503963e11cdff0a133a4b4fafc5018b35f939f5387eefdb2566f255e1dc"},{"probe":"//","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre //","en":"Title"},"rationale":"Raison // fin.","reference_ids":[],"question":"Question // ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation //","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label //"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"//"}]}]},"changelog_raw_sha256":"98a7af42027cf48c343706d47143824d8e828ec4c5899d8d25ba7e7a74bebf0a","changelog_sha256":"f5136d6bcd681f0500f33dade056e4a1cace2b2e0717b3795ada9b163c7bc1f1","review_raw_sha256":"7d9c4b0201f61cd98bc9d270b230b96393ccdf04451e1e77eb96d7778b73193e","review_sha256":"1030c2bfd73a767ceb9f2850924b7e2fcbe0c762244b55344422f5b404fb32ef"},{"probe":"(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (","en":"Title"},"rationale":"Raison ( fin.","reference_ids":[],"question":"Question ( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"("}]}]},"changelog_raw_sha256":"4b7f6c724836ee8cedbea43c7228cf46a5a47a217366d63cbfd410310c8a3ce9","changelog_sha256":"71e2d6671aabb149de3638e2fb0c331307fcdd2a3b8fb585afacdf375dad88a3","review_raw_sha256":"f503d54167c95554f8bfeee849a03998473bbb0ee1a8a4f41ce3ef0b4386fc60","review_sha256":"57d36990cc2af27017f4ac91338a7fe11d8e584db7921edf337f4f853ab3ec30"},{"probe":"(x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (x","en":"Title"},"rationale":"Raison (x fin.","reference_ids":[],"question":"Question (x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(x"}]}]},"changelog_raw_sha256":"b2e8dfa45c59d3c75ab2446c4e48aa9eecb6833f91e708f7edbee82e491420ae","changelog_sha256":"40b52c115b26f7c7749d46493c978d2591821c5f8f9bc4c9fb018f46f90bad01","review_raw_sha256":"1affd48132c138b9444768732054213e72c1f00d5765ea8c97828aa44985ee57","review_sha256":"d0fd7b6c20a6d894ceb61d74e7714c0843f1909a25b9c29ba848c1fc834b4c26"},{"probe":"x(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x(","en":"Title"},"rationale":"Raison x( fin.","reference_ids":[],"question":"Question x( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x("}]}]},"changelog_raw_sha256":"c880999de3a4335277e84bdc0d82f59c223ed62585f372dce3993ee2e77dcc90","changelog_sha256":"e749914c283ebae8144cbe4013d634ba96a7e7322aa8d331d712777a236721bf","review_raw_sha256":"7310a11c4cd19de871b80eab63d64e5383508aaf58730e509f3e86841285567f","review_sha256":"ed9d1cb73638e20c1e2427ea0375e89d2ff878e2ee531f6a874013495868818d"},{"probe":"a ( b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ( b","en":"Title"},"rationale":"Raison a ( b fin.","reference_ids":[],"question":"Question a ( b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ( b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ( b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ( b"}]}]},"changelog_raw_sha256":"8f0cca6259cc06b267c5d2e0784204b8cdea203d611b3807cb67f0caa5935646","changelog_sha256":"6b2ff835e524019035633c4ede0d0b1aaa6457ae88909e6994cc4496391fc569","review_raw_sha256":"9f445ae4c968b4d7c2107664f64491647b9a2e73e7fd6abbb59b8ab61c788216","review_sha256":"8f0a9560a88e049271e9f6879d2cf4734c9b37024e303c8be31daef5fbbd276a"},{"probe":"a(b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a(b","en":"Title"},"rationale":"Raison a(b fin.","reference_ids":[],"question":"Question a(b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a(b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a(b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a(b"}]}]},"changelog_raw_sha256":"0bc812f5957ea84811fe491806d7c42facdc884d73e55f0d95a36eeb205cba5b","changelog_sha256":"67f906eceeecb635d5dcca15b7dd70e50c5697e4a0c9fe69b600cdd886f8f15e","review_raw_sha256":"0e61fe6f5f641dba3dca6d40a4b886276236025ed0221b19e2ac58ae965ca234","review_sha256":"27fc57b3e415cf8039ade17630b592667c843cd1e2e8865b4017b948de659434"},{"probe":"((","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ((","en":"Title"},"rationale":"Raison (( fin.","reference_ids":[],"question":"Question (( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ((","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(("}]}]},"changelog_raw_sha256":"8edf9f77ab44f6464a51147f9916b192ad4de865655c462cf39d01aa50b4eac3","changelog_sha256":"50cfe692a407bdc7a316f3c2f4eb38487156fb84a541621f84d0bc267ed2f7c7","review_raw_sha256":"1829f6943ded855c5e90c527eda47bd0aed9d9835314fdaf9e57d0ad8c67c2c8","review_sha256":"7772db2d323aa34c21e509ad047326afced3857c3a136376e61d217779945bb3"},{"probe":")","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )","en":"Title"},"rationale":"Raison ) fin.","reference_ids":[],"question":"Question ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")"}]}]},"changelog_raw_sha256":"849de93d43e035e2e7789426cc0fba06533518c13352ed212e6439f473e53e7b","changelog_sha256":"a53b165cb00fe9e80a1cd7b342c6cb5532e5c49bf94303d714453e91ecae06f7","review_raw_sha256":"5e8c5e817654952940f1af9db5ced7a7d2d3898a647da7f5dec34bae44ef5fa2","review_sha256":"b60959924793a2a5cf4d8db17d8412c9211ab86fc15777fc3d0d2171fb53d4b4"},{"probe":")x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )x","en":"Title"},"rationale":"Raison )x fin.","reference_ids":[],"question":"Question )x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")x"}]}]},"changelog_raw_sha256":"82005c2cc8a16826c51d14aecc46256ed09e5f58de38a466d9b38ab415102b63","changelog_sha256":"d7627c4fe42ccf46ddb026df634e2325392664ad3799d53031e0e721d7b5b330","review_raw_sha256":"d75d5d329b056cb86c7bb2e7b606818e1e7175ce27246b3fb748ccd2b9c03027","review_sha256":"6338c682b3b2baac603e15d47ee4846a8efae30408c8763da753f6dab0abbca5"},{"probe":"x)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x)","en":"Title"},"rationale":"Raison x) fin.","reference_ids":[],"question":"Question x) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x)"}]}]},"changelog_raw_sha256":"79c31c46b208b5f43c7e8ed74b7fcb21df56994a70600274ea618625d65fd09c","changelog_sha256":"724b521d1dc65098efb6882978856887bc56004e15b221efd2b561d1c75ed732","review_raw_sha256":"053bceae50b3c386f306ced3b4de3848fb99f86b6afcd99227ba8ce587cde4ca","review_sha256":"362a497108d808a36a314c46a1a4018133a731214ec602df3cc4f92d43b8e550"},{"probe":"a ) b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ) b","en":"Title"},"rationale":"Raison a ) b fin.","reference_ids":[],"question":"Question a ) b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ) b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ) b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ) b"}]}]},"changelog_raw_sha256":"bc4818a148d8fb1b63f8ecfc5a00b92461903a3ab6e5a4a555cb31572d515c10","changelog_sha256":"8a91e039e7264e441ded4a4eb263f63fe80f1bf1f525ed357c24ef7f70bc72e1","review_raw_sha256":"f486be2e292791874958293421bac6c27f1f0fe46cf143e9254a16464c4e79d1","review_sha256":"4483176e985f5811edfca29e5704d06244daa22f018b88123e039dbc6c0d0df7"},{"probe":"a)b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a)b","en":"Title"},"rationale":"Raison a)b fin.","reference_ids":[],"question":"Question a)b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a)b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a)b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a)b"}]}]},"changelog_raw_sha256":"5ffe3ec0d94980b8c36c7ae070ac9fbff10eb14b6985a656ab5ff7eacf4d0f93","changelog_sha256":"484b55dbf120b9b10d4bcc5e17271a0b3468fc721d88133be971335076d2afb9","review_raw_sha256":"38e480ae0c1d7908c395adeab67053c62764560a3504bdea94438e55898aa963","review_sha256":"8469867156ca9eb8eadab82eafcfd9d903f55983c236e5f474149daf062cd39a"},{"probe":"))","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ))","en":"Title"},"rationale":"Raison )) fin.","reference_ids":[],"question":"Question )) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ))","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ))"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"))"}]}]},"changelog_raw_sha256":"89c3caf9d607c401a23eaff66201335e806a0e00d5e47a00302e2db91c4d597f","changelog_sha256":"367e2e7209ba3366caf250481c217fc10e2d156320f4b1d8454c7d0355f352d3","review_raw_sha256":"1bf9514de5a15591951d959c6217eeed99d76539a1c3d5c18e05218509498c76","review_sha256":"dfb3b9cc8415427aa7d2a50a949b7c78f1941415326f9012fd122ec38c366b74"},{"probe":"-","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre -","en":"Title"},"rationale":"Raison - fin.","reference_ids":[],"question":"Question - ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation -","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label -"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"-"}]}]},"changelog_raw_sha256":"d0eaf5362cf2f84fcc4e624abafe5f19e13825dd6762b78de49d4723bbe04fc4","changelog_sha256":"94b5772c25da5f9e9abdb8e9588fe94e119965f1f5d84173fbb6d12fb5fe5525","review_raw_sha256":"1ed6fcf15343fa819d2460a3d803567e43629d4b67f128f82a7eca030341aac5","review_sha256":"9fecac27d5be50ecde93d3edc564c4dd46f4faf034f59f031b684c5fe8f70014"},{"probe":"-x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre -x","en":"Title"},"rationale":"Raison -x fin.","reference_ids":[],"question":"Question -x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation -x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label -x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"-x"}]}]},"changelog_raw_sha256":"eef2c03cbcc0c23d08caef8b9529f0b0b124fe7c7297a04e80e7c368a40001f8","changelog_sha256":"811923e0a799dd6c9f99a2629324b6d295799af3a0127086d2b7d4f047f5b9eb","review_raw_sha256":"88fa3de356533e3a1ed23d36be6648b720824fd7e75149e8c0f41109cdfa7015","review_sha256":"b9cb6e342a03ea43ef2bcd590b63e76a7323f9c40cac8c4629af0d0245a406d4"},{"probe":"x-","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x-","en":"Title"},"rationale":"Raison x- fin.","reference_ids":[],"question":"Question x- ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x-","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x-"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x-"}]}]},"changelog_raw_sha256":"45e9de8e2f37b990fa2af3ccf1596a8236ee1fa4ca6592f509e8ef1115409f26","changelog_sha256":"d9caacac5f27acd32fa828cb19edd598e726199a71b94cc717cce5dc58e9e0ab","review_raw_sha256":"86483c8ca0361cd42798b4adb443585f8e87364c441e421d09cd2cd85dcfc71b","review_sha256":"3d245a717020711b20f92cd2011af1c6d7930087022609bcf406472c46ea5616"},{"probe":"a - b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a - b","en":"Title"},"rationale":"Raison a - b fin.","reference_ids":[],"question":"Question a - b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a - b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a - b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a - b"}]}]},"changelog_raw_sha256":"4c41d558e130517cf102d145522cddc4be8b2f708c3307cb20734a61f019efe1","changelog_sha256":"bbb6156c03cd38f7ec6e6de6ded038eb785b33944f6202694bec4288d2fbf4aa","review_raw_sha256":"5e50bc9c5f5bce882ce60285045fb31e948a4fde2bf1974bf819f6b0492ce6ad","review_sha256":"37e6899d0f718f30bda3ed37b104203a64eba3e0dae46d4635f3919ffb72701e"},{"probe":"a-b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a-b","en":"Title"},"rationale":"Raison a-b fin.","reference_ids":[],"question":"Question a-b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a-b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a-b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a-b"}]}]},"changelog_raw_sha256":"6c5f4984a8e485259e86ddce2a77cc1b3a7a31e75b2c045b6682ec86e6f122d4","changelog_sha256":"9e59f9f5e9c390b72b6fc3dd377974ee7c27ffc9e0d2385a43a535ea901279b6","review_raw_sha256":"48de1b900c6d612a7ef162269a24c06792086508d4f560a0ff2cd2c90ad71972","review_sha256":"b774f772f461bf364e88fd39a5ecda553704843cbedc0c8839798e71218b9925"},{"probe":"--","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre --","en":"Title"},"rationale":"Raison -- fin.","reference_ids":[],"question":"Question -- ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation --","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label --"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"--"}]}]},"changelog_raw_sha256":"ad53be955d0c989232ce780c8ff1956c01e67315b47401e01e918353a580bd9f","changelog_sha256":"5a9869089b01fdba970f415fc2e9810e28dac881d76747678b51345ee7244650","review_raw_sha256":"b10485d9ec59a906d243ac23c47ba95bea7fa2e10be11f4629173944ebdbb191","review_sha256":"7cef3850cb7713b75c93c122f046b9e019cef5b8365830c48847280207328435"},{"probe":".","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .","en":"Title"},"rationale":"Raison . fin.","reference_ids":[],"question":"Question . ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"."}]}]},"changelog_raw_sha256":"0fec491f7c51ee3adb2e7838acd82e5b8af3dd18a338e187d2f06749f91e2fcb","changelog_sha256":"37a1c40918533e49104c21b2815ea6a94bc57118e81f1cae63e6b851169a7aa6","review_raw_sha256":"450e8cfb4334c32e258e9267ee66daaf0dac91d0fbe92c0692dd3fb819b6f60a","review_sha256":"5b69f580b5919e31efb8ce68839dd23b256c212cd07a30f6ca7bddec5f803098"},{"probe":".x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .x","en":"Title"},"rationale":"Raison .x fin.","reference_ids":[],"question":"Question .x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".x"}]}]},"changelog_raw_sha256":"e722b3bc90f9ba77da7f8c3a9cf2b06e6eee7d207a894cc6a26f54141aaed1d2","changelog_sha256":"80d6935fa454e8e3e969e26e815f0f000b64cf577cef2e4241e09af3898c2cff","review_raw_sha256":"009c8053f7e92d6459be4ce19111a3c6299e3ebd958b9bd4d5b97c54665c3b72","review_sha256":"ee1428a1b2fd3a4402565cfe2ff44a5fe0f8359e560eabc78db4e88387fb8250"},{"probe":"x.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x.","en":"Title"},"rationale":"Raison x. fin.","reference_ids":[],"question":"Question x. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x."}]}]},"changelog_raw_sha256":"440f40572ebb1eee684fc1680e8b6902262ea9493f4f380e4aa4ea948531d4f1","changelog_sha256":"d933069c4da14a3105cf552ea0d7ece18164090bdfa7c9bd222f5022c050e915","review_raw_sha256":"f3a186d8a596af233b27e45ca1eed44d45722349f71eff47d06ba29bdd0d68e4","review_sha256":"92d8a69cde23bc6b302c13fd2dceb89afc8bd26bffb51e7e4892ab8eb147f2d4"},{"probe":"a . b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a . b","en":"Title"},"rationale":"Raison a . b fin.","reference_ids":[],"question":"Question a . b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a . b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a . b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a . b"}]}]},"changelog_raw_sha256":"c4d8a193ba2bad68c218a75a319078103393e97d2bb82cb0181a8d721a69c75f","changelog_sha256":"34561d88520db47d006c421823239a8d0112868f82b3838d594b80ffbf17cfc8","review_raw_sha256":"56ebd3a2e24efe212f30a2ed46b33282d2cc259ab9b3d7c2a0f294ea27eddb40","review_sha256":"0ca2b64a6083f777515ea86bf0e16306c312f8fd1f30fb68f035a5a50069d5d5"},{"probe":"a.b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a.b","en":"Title"},"rationale":"Raison a.b fin.","reference_ids":[],"question":"Question a.b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a.b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a.b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a.b"}]}]},"changelog_raw_sha256":"80df1cbfa3983b4862715cc385418c3e52f9fe1d4844e7d893454049e4cac8df","changelog_sha256":"46e0a1ccf30eb6b953e2a57507fe274faf5ea96693ce333e58a0c90fac40ac56","review_raw_sha256":"4b6aa846a7f1cd47f5de1a628c54698da85e19154315011e1a1e8723ac514315","review_sha256":"f4271d629525f4e11927f3724660d6e71fa311405cb7efdcdcb0fad6ed6f762d"},{"probe":"..","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ..","en":"Title"},"rationale":"Raison .. fin.","reference_ids":[],"question":"Question .. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ..","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".."}]}]},"changelog_raw_sha256":"80a1a05f4a7b99faf52b196e67c7eadb4066f246b02f0df0a2d5f66575516fcc","changelog_sha256":"5ec91b17441961fb21928a6c3b41939e38d0ef48eb817d330e41bac8c7a6e41b","review_raw_sha256":"37dde33ee7d613ad2cdead5f47cba31a19884c725ef84cac91add0815486993a","review_sha256":"5ef1dc3a8545684b70ce504dfbcf7382e2befa2b3df637b554ccf5c6c31d2039"},{"probe":",","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ,","en":"Title"},"rationale":"Raison , fin.","reference_ids":[],"question":"Question , ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ,","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ,"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":","}]}]},"changelog_raw_sha256":"93e3b60f5d42b7f6512117bfc620cf3017107a560428ab0bada258f1302fea1d","changelog_sha256":"71f92be4b087bd2bab16681c2810d5e68d959cec58bbf882487a85aa3ea08e9e","review_raw_sha256":"0abd0360d8e61abada37121ea00dbbff7f42d851cd54c4d5d2b0427a8565cafb","review_sha256":"a91024391b762c4501bdd3830018a064a8e082fcb41e12f55dd31943e5012187"},{"probe":",x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ,x","en":"Title"},"rationale":"Raison ,x fin.","reference_ids":[],"question":"Question ,x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ,x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ,x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":",x"}]}]},"changelog_raw_sha256":"f5636f98353fd7e81ce8e5806e3c60b3c457ceba543b4628b6e4d05776033163","changelog_sha256":"cb73db8ec190820ce9f1fde44c93c174e294b47ef73792c0cd3091812bc0c824","review_raw_sha256":"ca9440ee4604e139d0921e545a98b45e423e7e0cd7dcf4bcb47750820214daa7","review_sha256":"36e7e3859a5d4cffddbd8feea995ffcbcfa4da1b8dbddd69b2eba379e658b3fe"},{"probe":"x,","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x,","en":"Title"},"rationale":"Raison x, fin.","reference_ids":[],"question":"Question x, ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x,","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x,"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x,"}]}]},"changelog_raw_sha256":"a90e343cea944e6d6f96c1f8e2a3c9d59abfe3a8061109cc5f0aa0df3028a6e8","changelog_sha256":"2d897a03ae40b9919f1775a687ef7dfac281192b61b4bdcdffad46e3a8c6581e","review_raw_sha256":"ee7a161672ae4eb0af8094ca28d488a088c258cbbb69a8d5c4835d85e2238371","review_sha256":"08795a8d610f58e84f93297f3e833668b32cea1ac8499dd91ee33dd863c236a3"},{"probe":"a , b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a , b","en":"Title"},"rationale":"Raison a , b fin.","reference_ids":[],"question":"Question a , b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a , b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a , b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a , b"}]}]},"changelog_raw_sha256":"2ec0bf1760a93f5f7933794f1cb77afe13c9a25215a4acb9a6db2169803c1f57","changelog_sha256":"5dfa6d081168ba74a72ef718ff714fc108f45eec413a283d87697a11e5d30487","review_raw_sha256":"0a6c5971a12f27314d41f67ecdfeedafac622ddb68e452db222ce6410411024a","review_sha256":"0bf5d3b1ab170d6516bb7d2223bf572bec019d363e57516a8c9705ee6ae8f66d"},{"probe":"a,b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a,b","en":"Title"},"rationale":"Raison a,b fin.","reference_ids":[],"question":"Question a,b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a,b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a,b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a,b"}]}]},"changelog_raw_sha256":"e74aa80bb919f61cee8f47fa3fec5fd13e04b9499261faa4782dc624a6e10c81","changelog_sha256":"90eeb0265b3261f597139f67a98c843314497bc2137e462f2b89a9ecf79be65c","review_raw_sha256":"f5d2c7e0a239bfe381f387a75affdfc0fafc2c7c1bd97b2fe7a7417eeca346c8","review_sha256":"9e60301e1f8556679d1e695c2811377b9d1e1b2c3eb05d612d54577a6cccb421"},{"probe":",,","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ,,","en":"Title"},"rationale":"Raison ,, fin.","reference_ids":[],"question":"Question ,, ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ,,","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ,,"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":",,"}]}]},"changelog_raw_sha256":"cb5325f8d31513112ed80ad891d887173a9a36a34e9be473e85266bd6804d44c","changelog_sha256":"86e8705ac5c0be5ad87759722711c9b5c2937996728ba67f94524af265bad8ae","review_raw_sha256":"d2cd8c2a1c5224c27592b19b8c054763b3d641cf8cb2b3f8e69024a21c2e29d3","review_sha256":"b1573dcd1a5c3ac412dc3945fc114447f3b0603d2cee8b717ca7449aa3e7361f"},{"probe":"’","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ’","en":"Title"},"rationale":"Raison ’ fin.","reference_ids":[],"question":"Question ’ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ’","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ’"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"’"}]}]},"changelog_raw_sha256":"90f66f39f6baf3e86b55a50d2addcfdd5abd1601141c8d76ad039e3dba0d1833","changelog_sha256":"11777912c888987850d251c041c7c947e0082f4f73a0504bfefcd97732b54173","review_raw_sha256":"4c06009d436cfa23dd3c7b39d580a64b4db73855fdf20643340464e5dd4a4440","review_sha256":"a0f83322b632f78cb4f88319e83666ef0eb38a2a278d44364300c69a9a6a356d"},{"probe":"’x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ’x","en":"Title"},"rationale":"Raison ’x fin.","reference_ids":[],"question":"Question ’x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ’x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ’x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"’x"}]}]},"changelog_raw_sha256":"ff0eaf1d23cc591593e408b38a403c3e0bdf9c95794b85fe2f0b181b4aed00bf","changelog_sha256":"e1c5a4fae55031d2d7995325c81b0ee60cfa80a2a3e77c56a5c1873e730f273a","review_raw_sha256":"60127ad4e51bedf3824fd3c4f7caa5f62bb7fddbf419f4039a342c416dec82da","review_sha256":"020679e139c52ef818334e0bd6e9c71b96e0958056cb1e6221ffd5d8ed04bcf5"},{"probe":"x’","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x’","en":"Title"},"rationale":"Raison x’ fin.","reference_ids":[],"question":"Question x’ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x’","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x’"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x’"}]}]},"changelog_raw_sha256":"a42fd91297ddd55fd07b9ad9b658d349e74dd2f9fdbc9983793dcc3ae9640f4a","changelog_sha256":"4c5c45cb9e5069c78b11326ee61cec554e5dbe925bca9dc3dbcfcec574e12c35","review_raw_sha256":"f29d4e53299abd5d5b61b3cbc40fb23bbfff78b40ae59d10e072b046d3c3b0eb","review_sha256":"36a7b24592f74d735c6fcf50095f60ed2ab78c351f3d794663e765ce0f7743fd"},{"probe":"a ’ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ’ b","en":"Title"},"rationale":"Raison a ’ b fin.","reference_ids":[],"question":"Question a ’ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ’ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ’ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ’ b"}]}]},"changelog_raw_sha256":"eedbf5a36bb4c6053c1b9be3ab76e502c830baecaaafae223b22e6a11ab6411e","changelog_sha256":"b9bbe72cfdf7075cd18a5c6f3503e188a2e29a2ba6af90173da0139b3d8c2eb0","review_raw_sha256":"9f09a0722fa5048794226412b356162555b046db5914be2f013505c471d55463","review_sha256":"9ce54177a04c3ba1383090ef2066e864219fdb9b96c6f89a2e95263ce15b3365"},{"probe":"a’b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a’b","en":"Title"},"rationale":"Raison a’b fin.","reference_ids":[],"question":"Question a’b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a’b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a’b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a’b"}]}]},"changelog_raw_sha256":"ded1387cb7e34881b3a0b5aba5a767a0ad4e1f572f7ee3ba3c4553f603a4a91e","changelog_sha256":"9a7ea8b30ca80961d72d91457abf18a8137f4e59a8b42347c983cbec8a34abf4","review_raw_sha256":"87374107d33b4e8a0faacdb6582f4575a2570d41bd22a7f543d84c31b1d172de","review_sha256":"311ab8f07ddd3889188d21a574fbce3fde621c84e680a93f9cf5a16727b2d572"},{"probe":"’’","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ’’","en":"Title"},"rationale":"Raison ’’ fin.","reference_ids":[],"question":"Question ’’ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ’’","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ’’"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"’’"}]}]},"changelog_raw_sha256":"a18b4af1c2e85984f731bddff093c96690134308185989fb3d0ec2d2f6c1a9f4","changelog_sha256":"ee898fd67c512c29e08db53e0cefd41e1b2e67aaf8b06ec23439e35127ec640b","review_raw_sha256":"db126848cf1f12b47bd9def6f740516334f12cd0c75bff905d98f43d6449e3c3","review_sha256":"8dae0656b13df54d2ac6b0d6d3452d3c4487525ccf294f8392aa8d9a9f1e5911"},{"probe":"‘","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ‘","en":"Title"},"rationale":"Raison ‘ fin.","reference_ids":[],"question":"Question ‘ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ‘","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ‘"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"‘"}]}]},"changelog_raw_sha256":"e8187602ed6cd8e811358d4926430af783a8df5ac12f7292eec9558c83c7c5a9","changelog_sha256":"c5a8f7de95c3489bf05ea001bdeb71b629c84ab4ca9d6f2bb4d73e0a64cc2ca1","review_raw_sha256":"be516e57da47ab6c74ec230fb54d3e560b7a09efd153b32aaf4041a8974963f2","review_sha256":"3058b9034cbd1dcb011f1a693a0d53ad2c5244fea6b9c409eaa145ce23ab8b5a"},{"probe":"‘x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ‘x","en":"Title"},"rationale":"Raison ‘x fin.","reference_ids":[],"question":"Question ‘x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ‘x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ‘x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"‘x"}]}]},"changelog_raw_sha256":"bfb4146957c65b099db88b2d0dafe7441632b733f535f506151504597b722887","changelog_sha256":"044ff847f6dda8b7c6affdc75b6065542168f001481371ca6d6b93da635144f2","review_raw_sha256":"29d958d724be87fa253f3e5b6a8080f38a35499c46ba730ffd3a113bc10186db","review_sha256":"38f4d426aa3f9892f5f95bbf724954a24e746f57050044e6e767f79b0a85223a"},{"probe":"x‘","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x‘","en":"Title"},"rationale":"Raison x‘ fin.","reference_ids":[],"question":"Question x‘ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x‘","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x‘"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x‘"}]}]},"changelog_raw_sha256":"2000eee48bdf563548b309fe442424dca87ed18b5d12d8fbb09ca69b47a69b7b","changelog_sha256":"d459632b19696345e5c38764d54a3067d4b1f25181bcb4fa1ee0d671ac5fe62e","review_raw_sha256":"af17c8e5f9c3651584dec9b1bb53b8f966d9c07eb588754699ec2c301a459a58","review_sha256":"d503f978e9d0442c52f0291dd668dd14dd3079df6447283b9a15b9129d0754b5"},{"probe":"a ‘ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ‘ b","en":"Title"},"rationale":"Raison a ‘ b fin.","reference_ids":[],"question":"Question a ‘ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ‘ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ‘ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ‘ b"}]}]},"changelog_raw_sha256":"dc9985dd28e8d0db4a44046ec5a53c89688ef8966bc79c37a09c4cf1418abb88","changelog_sha256":"e4ea8d7aa2453af81bc3eb406bc9cf28439c73287c5d795264203a542d4c6138","review_raw_sha256":"4674762e90783a10c59515a6a363a569c535478b5c74716453c30b590bf3ae06","review_sha256":"eb2832ce219dee750607e240dfd3738e697117ce0800a207d6a4e3eecc2d3af3"},{"probe":"a‘b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a‘b","en":"Title"},"rationale":"Raison a‘b fin.","reference_ids":[],"question":"Question a‘b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a‘b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a‘b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a‘b"}]}]},"changelog_raw_sha256":"9a10f1e7f46f2bd131c027e2dc5876f65f131f04a7607e3ced0395bf03a65380","changelog_sha256":"a9776c2317517c2fe5f7a14bcbaf6adf393a7be2f0e49915210cfc91b194a803","review_raw_sha256":"0b66af906a9c984a249fb3ac3ee9a025b2d2aab15afec421d81e0e73f2bc017c","review_sha256":"2eb8c82b00b6bf7e791be04f2a12809d640f5eb70cf097ae8351cc9794b1ada7"},{"probe":"‘‘","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ‘‘","en":"Title"},"rationale":"Raison ‘‘ fin.","reference_ids":[],"question":"Question ‘‘ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ‘‘","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ‘‘"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"‘‘"}]}]},"changelog_raw_sha256":"c821a0622996501dcaa8a7fece2ea8c462612d2f7296e6b2b87dac0a2f09d761","changelog_sha256":"cb34db95db0bc6283f0cccf79893107ada915c6c3a593315f04cff36cd51e141","review_raw_sha256":"6afc5a0278246b2844adabc92353ed4c57b03f55823f934ce464b193622e4fa9","review_sha256":"c462c805518dd607e9002293abb7d4a2a6f511b682c42e1215e2519b18885268"},{"probe":"“","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre “","en":"Title"},"rationale":"Raison “ fin.","reference_ids":[],"question":"Question “ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation “","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label “"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"“"}]}]},"changelog_raw_sha256":"99c7c24c8b92ba2c462bb602746e1628282fad8188e3a2e1efc9b459ef455647","changelog_sha256":"c6f7a7f9c6fc8198d51cbabd35de4a230db4b2fc6a46b3298f58fa7a14ac5d34","review_raw_sha256":"fd0e7764e1e67859ebb009900bced3a2cf6ab4f597b838cc821f529352686b4d","review_sha256":"5e645c8cc535ee5ab6979886278dc93aaeb17576737200889315ce47a9f6e179"},{"probe":"“x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre “x","en":"Title"},"rationale":"Raison “x fin.","reference_ids":[],"question":"Question “x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation “x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label “x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"“x"}]}]},"changelog_raw_sha256":"5d43cd3862a775553f21c66ac5e39ce828f2eed97cb0c29db1b7023d3f3035da","changelog_sha256":"f727c984d525c216b491a33416e1c1304613039020db507d6a7028611c3f683e","review_raw_sha256":"eb99a9e0390afc0082a9d53bc77db82c27cd8820f651d62f2496931c60235dd6","review_sha256":"b44197657f7c7abbd244fad44074cbea238d17071066b78a1127b9e45e58aa81"},{"probe":"x“","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x“","en":"Title"},"rationale":"Raison x“ fin.","reference_ids":[],"question":"Question x“ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x“","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x“"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x“"}]}]},"changelog_raw_sha256":"ec30a3b1ec93e43e893f28a5f85e02ea348aea7faef39828c68f6ae50276610d","changelog_sha256":"60a352f1eef47433b347876c7ccdb76c405fedef54a40ba1e640061003587c45","review_raw_sha256":"f4152e28123c3b4ae4dcd1b2e6c1141b621c9b476ac59243ca43b26a4bc46e7f","review_sha256":"7dd0ca4076e4a1f60f1add9a57bd7ba5d582c08966267377ce65ce4b6a37316c"},{"probe":"a “ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a “ b","en":"Title"},"rationale":"Raison a “ b fin.","reference_ids":[],"question":"Question a “ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a “ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a “ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a “ b"}]}]},"changelog_raw_sha256":"78762cd67ee7d2b5e0eb55657bf63ee4e95b199dce5a5101a3bdb42c57d94d72","changelog_sha256":"305202a41b612a0b838cd6273dd4995ff1eaa23c0abfd8824e99b0597b202127","review_raw_sha256":"c7f04b5419bcccfed66c7b51e3a6b998d13046935ffe60e6b06a29aef4c050f4","review_sha256":"6188760da4c586e2aea5597c34286ac0f6b15dadbfa8087b3dec473757e7106d"},{"probe":"a“b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a“b","en":"Title"},"rationale":"Raison a“b fin.","reference_ids":[],"question":"Question a“b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a“b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a“b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a“b"}]}]},"changelog_raw_sha256":"831bfc65d3ba97f4e89c600ab72e97e01fba365aac8307049f7cce1ebdd77a7b","changelog_sha256":"4190b326f176adc05a66bd3425007d470098f5660f3502d6d583c4bb47c02093","review_raw_sha256":"73c58d687d5be3df1d2fc6dc152025ca5577c5517209d8ac4ac259549a2af7bb","review_sha256":"dfd6fc0e3777a1a30deb18de45df2498d0ef7d248da9791fe50f92612ac38372"},{"probe":"““","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ““","en":"Title"},"rationale":"Raison ““ fin.","reference_ids":[],"question":"Question ““ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ““","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ““"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"““"}]}]},"changelog_raw_sha256":"b1b10d9408cbf5990bbfb6bf63e362e2fc04be4db63643717d6825ac8177ae0d","changelog_sha256":"d8a7cb6592bfbec6ac2365cc6ecd57a2d3d4eca0668d680af45748c1c447fa7b","review_raw_sha256":"6ed1fb7e090c18489b57b316f8402d912912ccf99005c2ed7c6a11f12d6e3d4d","review_sha256":"763553aa0e800ed44d03475684bb9f9ea1f32bbb8ae6afdca190b1f745b2d613"},{"probe":"”","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ”","en":"Title"},"rationale":"Raison ” fin.","reference_ids":[],"question":"Question ” ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ”","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ”"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"”"}]}]},"changelog_raw_sha256":"06859e773a32bfee5315fa51ce7745b3058abb649c097d7ca9098f87953d9098","changelog_sha256":"4b59ab79812a791e6b29b9c6a3a0d5c004ba01b63327c59806d960afa6cde81e","review_raw_sha256":"03f8f740a664f80a3315da6c77a01ea97d6d8e0946939b922550b194ffa77cc7","review_sha256":"18bb6affefc35185d2b00dc4e7bf4a91862b1c2d807c80f67796517a046fd729"},{"probe":"”x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ”x","en":"Title"},"rationale":"Raison ”x fin.","reference_ids":[],"question":"Question ”x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ”x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ”x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"”x"}]}]},"changelog_raw_sha256":"adaa6b8ce379162955b6aee4a7b406fd523a7c95b22e4410a4eff8fa3f41fab1","changelog_sha256":"0a805ceedd04f4a7f87ed2e5f4e0483f4be6a3d1015d6127230cbf9f48987565","review_raw_sha256":"5eadcf845df3a34afc71e0f11bd3647120cbc4455f6d210c3375a85e4ef6063c","review_sha256":"1819464704641d9db131073a5d5964f50edfa33be529a880b2dec25f6ecd802e"},{"probe":"x”","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x”","en":"Title"},"rationale":"Raison x” fin.","reference_ids":[],"question":"Question x” ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x”","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x”"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x”"}]}]},"changelog_raw_sha256":"99da6fa8722566ab640dd373a60e059dd91f3d8ddf864a520a82fb0660821d1d","changelog_sha256":"5ab9f3b0a01565202013a884030f40b44e8c601e022c50c2039a9f6511fda9ff","review_raw_sha256":"37c23c3fccbffeb18fc7be4581354f2a1cea8e45b529c67b9176af79c56b4cd9","review_sha256":"28abbac50cc8d6f9ec5a739ed25f1f6405ec548fdd05e920b799b87c1fc9bebf"},{"probe":"a ” b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ” b","en":"Title"},"rationale":"Raison a ” b fin.","reference_ids":[],"question":"Question a ” b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ” b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ” b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ” b"}]}]},"changelog_raw_sha256":"9ed984564f1f505529bd1d019f1e289a06e53f74b6164360f30a9c57204df353","changelog_sha256":"6970a6d6347dcdf962ed61bcd5050a1f09cc6f531fb869f6cb7046f0bc2a9c99","review_raw_sha256":"9954235d9252f570832c3c280b872a0fa1e5ee264db768d451cbd3b9f4d2ad2c","review_sha256":"7003b9a9a2d0bfe1318aa73d2c48bc20c6d334b1b3c55f4443e968ae5cbd3232"},{"probe":"a”b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a”b","en":"Title"},"rationale":"Raison a”b fin.","reference_ids":[],"question":"Question a”b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a”b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a”b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a”b"}]}]},"changelog_raw_sha256":"1436331b8cd473be68a07a85a4196c032548d6f4d0d25d7543465cb5142c3929","changelog_sha256":"92fe735cafd3d816570209fc182baa000f2dbab3cb921175c12f67d84488ae08","review_raw_sha256":"f5f6cec899f23d1959dbe244274bb7d0774d142cfa26233d39b9cd34fa74cfd8","review_sha256":"5335f2b1eeb9e47f880eb870819074a0496a59647db69858c004bc006369b10b"},{"probe":"””","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ””","en":"Title"},"rationale":"Raison ”” fin.","reference_ids":[],"question":"Question ”” ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ””","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ””"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"””"}]}]},"changelog_raw_sha256":"d2bb2635f088d86c2194cd14f416455aa801b315b78a6ce9361e644332537b3b","changelog_sha256":"9547af5c3ebe97680b5ca5c7ee4c87a6473dab220fe2c6c4e39f77d2f70e3fff","review_raw_sha256":"795475320b08253357f73390691cf02f7de14203dfb79fdc08b6750b670d370a","review_sha256":"17ddbc6e03ec0f9a412c33709e1d9babcfcda3a219943674ac9ac6cb0e60246f"},{"probe":"×","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ×","en":"Title"},"rationale":"Raison × fin.","reference_ids":[],"question":"Question × ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ×","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ×"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"×"}]}]},"changelog_raw_sha256":"ce2ffc2462c226d93aa1a824e394133335f89bd53d55980be860e62cc4de2fda","changelog_sha256":"06ea734be3d4aeff14e3a08b644b3f30dca8464337d539f371695b412b46d6b8","review_raw_sha256":"fb9b5881c81841b82dd96f82c8c9c415dd1149a2187875636fed1bef0073bae9","review_sha256":"ae90ca842437ffe0bfa762fa746d2bcc96e9e610a28cab1f2f9c11a36614753a"},{"probe":"×x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ×x","en":"Title"},"rationale":"Raison ×x fin.","reference_ids":[],"question":"Question ×x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ×x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ×x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"×x"}]}]},"changelog_raw_sha256":"1d11b74af17996c1cdff2ab837918fa619cd31e399c4fffb6d46db30b7df8fce","changelog_sha256":"79ab0c145f6fd71e48936293eb2fdb568d56c2fe33859726d62df4a802e5f6ea","review_raw_sha256":"968f8d1cfb05a4efe5c207c7f970276eb65f60fe04732f604eac5933ffd7e507","review_sha256":"b2795962c877d49502b766c23910e217aac5a7a053a0ae7d98ae313bcf09f3b6"},{"probe":"x×","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x×","en":"Title"},"rationale":"Raison x× fin.","reference_ids":[],"question":"Question x× ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x×","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x×"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x×"}]}]},"changelog_raw_sha256":"69a487d542ada1e542e77c94528a530b28a66ed16c895e45177cce60c43ec2d5","changelog_sha256":"0504705b99b2126830266d736e35273c120d645eabfaf16d04be381866e3de91","review_raw_sha256":"6849828be897cd5e6d60f2d17f142d48896049107ccf89494f28a94bc8dfb58d","review_sha256":"9cfd97a8d3a6e52de45e3119bf04f26ec936e0d1390460e0b7175cf86615b133"},{"probe":"a × b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a × b","en":"Title"},"rationale":"Raison a × b fin.","reference_ids":[],"question":"Question a × b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a × b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a × b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a × b"}]}]},"changelog_raw_sha256":"e9c3923c8e1a1e7fbb9e588f07e85006b104349231b18199623184624c5b4ba5","changelog_sha256":"0086a1ea3578f916bd51dc48af05aec013b11926956f11988bf55b7a815b81b4","review_raw_sha256":"f6bf1dfc37f83f68ca09dacec52976bf00fdc6f735a0ab11e72a6e8684fd5853","review_sha256":"d0839eba7942bb087cc98761b52133b68c59400af918037d62fc5dec0f67b814"},{"probe":"a×b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a×b","en":"Title"},"rationale":"Raison a×b fin.","reference_ids":[],"question":"Question a×b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a×b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a×b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a×b"}]}]},"changelog_raw_sha256":"0b5c32a38e34d53660817805a86939b09a19d3feeb2dea37e5dc6b5105d19551","changelog_sha256":"d1889fb89b4ccdfdfe620c83c0a7a6c3590d43ebdf35a958eba7e32ae2ec8ac9","review_raw_sha256":"4f81f1aa0a478156bc2fb44ca0e9070b74eacd3c9480a0922982561df3de319f","review_sha256":"bc3752742acbc19fe7b44b3fa2a5caf68cf4b2830019415acbd6a05dc8265669"},{"probe":"××","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ××","en":"Title"},"rationale":"Raison ×× fin.","reference_ids":[],"question":"Question ×× ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ××","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ××"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"××"}]}]},"changelog_raw_sha256":"6b3c1c4174fb66fd6e9c104c3b40914cc97f2e82f69761a3d609f227dec7874c","changelog_sha256":"03b21f9a84bf7fd5dd5a955873df5dbec4784304585a4745e2d88830762c8ae4","review_raw_sha256":"c77c76237df1fc29404f29ca663867e5285ada48468b45b4e355486723fca19c","review_sha256":"a961a3024d331d7685959f5900f435102b0195f4458755df83e6790e6daefaf8"},{"probe":"≤","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≤","en":"Title"},"rationale":"Raison ≤ fin.","reference_ids":[],"question":"Question ≤ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≤","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≤"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≤"}]}]},"changelog_raw_sha256":"014d69fd6257f3733dff651326a0ec57002c0ff917703407dbdcc89f94314dfe","changelog_sha256":"058ef27cafac4591260dbc45d07a5a59dcfeb2002033fbe01f6d440d2a757f92","review_raw_sha256":"d90ccdad57320ac7fd9e0184d478e7d24ac31cd74ad99b885a80a5dd5df84f07","review_sha256":"1b1fcc6151c0b71427fac97a15b217c1707374a237003703dae1534d911f609f"},{"probe":"≤x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≤x","en":"Title"},"rationale":"Raison ≤x fin.","reference_ids":[],"question":"Question ≤x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≤x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≤x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≤x"}]}]},"changelog_raw_sha256":"bdc33251aedffd7635087788ce53eb25ff98527ba7c95fc072a16c3eaf75509a","changelog_sha256":"f21750c2f4d99f5af510f2802b232a4b38b0c6043b1879f590f4e3845b1c1401","review_raw_sha256":"737bc02bc28a76e4bf366f223892f5a559bddac7497142479f74db83effc727d","review_sha256":"4ecf4cc484e77d19157227a374df673b4c8e68c14fa9af9b374cc1d5094ad272"},{"probe":"x≤","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x≤","en":"Title"},"rationale":"Raison x≤ fin.","reference_ids":[],"question":"Question x≤ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x≤","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x≤"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x≤"}]}]},"changelog_raw_sha256":"6a242f34d4398d765e8f6d2df6da92a53c085c510db8fcaf89e634be8e401cf8","changelog_sha256":"ebebad538fb037d07024e7bfe4fe77c9fda37bdfd78432a5e74101cdc2fac0c4","review_raw_sha256":"be51a6bc3d87b96de5c524d5a53b841cc1262a3c38cd9027b290487f120338ff","review_sha256":"8c48a29a217d5acc3b1f1c55bd66fd1eb35fca6f8912dbd25354377ac1f702a8"},{"probe":"a ≤ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ≤ b","en":"Title"},"rationale":"Raison a ≤ b fin.","reference_ids":[],"question":"Question a ≤ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ≤ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ≤ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ≤ b"}]}]},"changelog_raw_sha256":"4e21442bb51020b32e220b61e2ebf2a08fb47e6a9d0865f9bf6c24d55ac3850e","changelog_sha256":"4bd5fe8cdaa804577522449a399c72065710cace2bbc00ea0ae7b317d4c8b0d4","review_raw_sha256":"2d03f4101337c137c4b881c0901d2e8eaacde9c3e982f5988270de434ddd24e5","review_sha256":"53eff14447c0b090290e3893449e665da2d43c53d13603d5f19c755a2da36f09"},{"probe":"a≤b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a≤b","en":"Title"},"rationale":"Raison a≤b fin.","reference_ids":[],"question":"Question a≤b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a≤b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a≤b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a≤b"}]}]},"changelog_raw_sha256":"ce6259a683f8511c47512c94e1b6a4c5e740eb08e47067c21264a434b24985d0","changelog_sha256":"301b0f98f8165e5f67cd5195193b3c9c183d17ab0f4ff14d92e918530cce7c3b","review_raw_sha256":"755b8f593dcf437accb26d875110034b121c7ca82afbec4e998f03500dbe6896","review_sha256":"9086667660ca3cf520185fc9486c40a0ad501bdcfbaeabab9a2f44cd1616e4b1"},{"probe":"≤≤","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≤≤","en":"Title"},"rationale":"Raison ≤≤ fin.","reference_ids":[],"question":"Question ≤≤ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≤≤","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≤≤"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≤≤"}]}]},"changelog_raw_sha256":"8824556aa2081cf76ebd80309606211ec9aa4bf3f8bf02f7aaab8d6eda7f398f","changelog_sha256":"178af800291351a3e8746af269af1dfc48be03609c49ae3b052132f1663c5792","review_raw_sha256":"5568b9fb2913610f8350f7e951e40b11b00ee4c41810a514ded95250fbafea00","review_sha256":"9f7b4cce3c70ace184fcf288e76a88cdc596510cc222de638292d0734923ee51"},{"probe":"≥","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≥","en":"Title"},"rationale":"Raison ≥ fin.","reference_ids":[],"question":"Question ≥ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≥","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≥"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≥"}]}]},"changelog_raw_sha256":"eb975356aa9a91385c323ce990cef7fece07aa50b1471f804d1026ff66035f33","changelog_sha256":"28b5d1e13e95a9896e74565e9d92af3005e87b65ae92583c07c7fd6350744050","review_raw_sha256":"82dfbe9144d3dbca115c5453e66715927f76131f23391a44d85b1369248f4ccb","review_sha256":"f6f3d91abbee0343df21337a710b2cb05aeeca064698611fc89f29f720320ed2"},{"probe":"≥x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≥x","en":"Title"},"rationale":"Raison ≥x fin.","reference_ids":[],"question":"Question ≥x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≥x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≥x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≥x"}]}]},"changelog_raw_sha256":"9f5d99bdc17ae70b6ab4f3559622d86e5ff21d885c84f6f02edc8bcfa2f977bc","changelog_sha256":"640eca8628c96ab1f7a00f095e16c80333e6a8a7ee63b679b7a5b9c58ccb2860","review_raw_sha256":"3698804cc9be2c3de386a85a8c01a02e8d808f59cb1fb278a41facd236076a7e","review_sha256":"cd0b23faac8db089aee0d2adbdfd0669f04caea5d846f6153ccf83a6576db217"},{"probe":"x≥","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x≥","en":"Title"},"rationale":"Raison x≥ fin.","reference_ids":[],"question":"Question x≥ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x≥","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x≥"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x≥"}]}]},"changelog_raw_sha256":"bbaab5e2cd84f533342414c9eab0f00680f3c6217da19b9c9ebf1470cf63fd9c","changelog_sha256":"d221aa7ef3edcc67e3f8794d0181682c60d732088165d19f80578cca9f150b8e","review_raw_sha256":"11d2feb1a90a03140229d74a271f7a4a2672edde68bbef94cdbf5bcebb7d2001","review_sha256":"a1625c74b58934296e2f433e088bedde4409f63f539113b795558bf3e4a85475"},{"probe":"a ≥ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ≥ b","en":"Title"},"rationale":"Raison a ≥ b fin.","reference_ids":[],"question":"Question a ≥ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ≥ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ≥ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ≥ b"}]}]},"changelog_raw_sha256":"241c6596d69c66e94ad6306aaad8f05a78a17b0de253a70d1d2034adf2ea46c9","changelog_sha256":"343041f3070eccc113db5b84fcf3f8c6f78fedd51060380ffcd82ee9f14fd4ab","review_raw_sha256":"b2fb24f24113998eb9118db8e74082d30e37adb3451951fa5a42fe380c1f6cc7","review_sha256":"0a56d9f8236f2d5e4866df73a5c37df48e7b4764dd3e608c8136d62cb1b0afc9"},{"probe":"a≥b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a≥b","en":"Title"},"rationale":"Raison a≥b fin.","reference_ids":[],"question":"Question a≥b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a≥b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a≥b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a≥b"}]}]},"changelog_raw_sha256":"2d03e46831df1159ba7f5f56225ec85baaf0ba3888a5e902f07f2ed07d53f87e","changelog_sha256":"f566546db537a9ebac57e4787ee17666670d42f4b05109355d08a717bb901f38","review_raw_sha256":"f507b7171be5878d1c3ba0a0e1e6b1572825496524dd05ab953170714d7f772c","review_sha256":"79c6e32a8ae9c0b4da9c609eb867e9af3260272b8e1b7118ca56d88a807d1e07"},{"probe":"≥≥","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≥≥","en":"Title"},"rationale":"Raison ≥≥ fin.","reference_ids":[],"question":"Question ≥≥ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≥≥","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≥≥"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≥≥"}]}]},"changelog_raw_sha256":"b99689399bf55634e2ba95f740d57bfaa85494d6ae9f31b5cd671d9daab4a044","changelog_sha256":"959771f1e96dccf4af3c32e6308e363a03dfd7df770e38783ea65118e12c98f4","review_raw_sha256":"d6dc099e3f7568cc30007b21ee729f769b4de5a78971b48d5f9895958f525ff7","review_sha256":"40ed479147a561ac1fd42e4afb1c5280ea699ed34b04f32a1b9fb99dbf0108ec"},{"probe":"±","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ±","en":"Title"},"rationale":"Raison ± fin.","reference_ids":[],"question":"Question ± ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ±","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ±"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"±"}]}]},"changelog_raw_sha256":"b4dd9ced055a88c59e3f11b1afa6ba16dea6164dc22990f6434159e0cb640417","changelog_sha256":"94ee6fa63ab016d0e8ee161ca46b6158a7a44c2b8abddd84698891d5fcd40225","review_raw_sha256":"354cd45f58e5f3459756e81bb30a1a6b09724e5eebd8e65a1497f056533078bf","review_sha256":"4a6d13c323537c9f70ee984a6868d03043af217f912b3a9ae5db947dd1b7e51d"},{"probe":"±x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ±x","en":"Title"},"rationale":"Raison ±x fin.","reference_ids":[],"question":"Question ±x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ±x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ±x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"±x"}]}]},"changelog_raw_sha256":"a538715d72cd9762209a6467804b4f51974ee8a12ae190f581b4f2fa86ea7fd1","changelog_sha256":"950d50bb2de3f5deb5570c984ccad6b2b984fe55aecbdbd7f8f80daf88cb959f","review_raw_sha256":"3722fc16a32426449a31c2abac2b8c923c074967d7c37eda2c79cb77223c04b9","review_sha256":"2d112ca651805fff185dc1337931ac8ee0523ef5f60b206328a3f4fdd38c16c7"},{"probe":"x±","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x±","en":"Title"},"rationale":"Raison x± fin.","reference_ids":[],"question":"Question x± ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x±","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x±"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x±"}]}]},"changelog_raw_sha256":"3fb6ffa26b774dbdc253ab205ad80730009c93ee538d90eae9a0bf89f65d48f5","changelog_sha256":"234300d6da031785b501a1b6424239509306b1072d4c9b77a1072323f1a32e44","review_raw_sha256":"f4a43c59608dfab79ef4592af5a6d11858d5de3e3f24a0007a86f4f8697a5517","review_sha256":"f7bf8b0a5e1d11395df87f21f02def0cbc696ab61f5f80037232369025e22590"},{"probe":"a ± b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ± b","en":"Title"},"rationale":"Raison a ± b fin.","reference_ids":[],"question":"Question a ± b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ± b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ± b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ± b"}]}]},"changelog_raw_sha256":"585de9abfa38c6a3c1013493ae93c3fba2f6ea1b91cf923dda572de502d0330a","changelog_sha256":"58deb7079e107b8bddeeae46f0c1e571336cd883252ed673fe7ed49fea0f818a","review_raw_sha256":"4e2569fe347831a256fbdcfac46779c7ef1a6f437f45fa8afc6968d99ba412ff","review_sha256":"e39b89b7c816e0315a8e6034d13f942a457951fa97f13daf63155e23762a62dc"},{"probe":"a±b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a±b","en":"Title"},"rationale":"Raison a±b fin.","reference_ids":[],"question":"Question a±b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a±b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a±b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a±b"}]}]},"changelog_raw_sha256":"a8117ed823ebeb4bd919fbad1f0e488655c070b62bd42d5d86503e44d43cec09","changelog_sha256":"050e3e84134d051918974034a4d9e70efd7cf4f61f67bb669588b265a9f62190","review_raw_sha256":"f1cdb5e06b9a0eb10bec4819386c202bde07cdd853ef341c8561e66394ae3499","review_sha256":"d61a67eb87f4905c865f19a1182936764beee2700191f3ae63590e7a65823203"},{"probe":"±±","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ±±","en":"Title"},"rationale":"Raison ±± fin.","reference_ids":[],"question":"Question ±± ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ±±","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ±±"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"±±"}]}]},"changelog_raw_sha256":"f251f4de8aa488b6d75c64874b1562bd20b88b6cb7cd05084814d88693d2ac4c","changelog_sha256":"4b7a3757a8b15eb6c41f64749ca69491d7a183031589aa779c583bd6a19e478f","review_raw_sha256":"35d4794932ff8650be594733ed69ef00c50e84a633fea79221c0a98f9fdcd52a","review_sha256":"13599cfaed96a2ea7d5194519f98e8c6a9d231aa6ae0996af5ecd184e36ce0b9"},{"probe":"→","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre →","en":"Title"},"rationale":"Raison → fin.","reference_ids":[],"question":"Question → ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation →","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label →"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"→"}]}]},"changelog_raw_sha256":"f0e6b11bdb13331b89035df034aa553a3f06906b6438124e619df02bb05636d0","changelog_sha256":"b08252c1c9558f37c00a0c4f8ddea26c22d2e2022145734b65946b4de9b49540","review_raw_sha256":"15bd4e52320449c802deb8a2d930dccf177b2697fb5553b9f2f3c32d38c94b86","review_sha256":"fd58b6d44accb904a641394f4d4be42efd81c47a12b3bd16e7fbb4b34d24d200"},{"probe":"→x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre →x","en":"Title"},"rationale":"Raison →x fin.","reference_ids":[],"question":"Question →x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation →x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label →x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"→x"}]}]},"changelog_raw_sha256":"7e04470828363e612cf2786f945de45e72085a014ef00bfae8e7832b6ab46daa","changelog_sha256":"f49b2c5589b73312513a5e34d163e935236c0c92a927a1d5544f983a234d1bd6","review_raw_sha256":"9eba64805c92c03d682c9626260d584e783b9c9d11c03adba496a32fdbb16b08","review_sha256":"f0be0245a90025f82a909b1ad5e67749d8ffb12331a5efb6de4a348048f75312"},{"probe":"x→","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x→","en":"Title"},"rationale":"Raison x→ fin.","reference_ids":[],"question":"Question x→ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x→","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x→"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x→"}]}]},"changelog_raw_sha256":"489fd1f219d7a1459a266107111b337f22444f8e55795abedef2a425729d45b6","changelog_sha256":"6f386d069950e72cd839a5d17648041298f5be6a5e396f918c09ef277b85ce79","review_raw_sha256":"be6163f7b0d236f4cdb38d8ad05f1bd2f187a5f336219920b78b263c10b05ddc","review_sha256":"783c125b14fe8efe5de476d30ebea8feeb94783cf23b44bb33d496adc063a1cd"},{"probe":"a → b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a → b","en":"Title"},"rationale":"Raison a → b fin.","reference_ids":[],"question":"Question a → b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a → b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a → b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a → b"}]}]},"changelog_raw_sha256":"493cbc3f60a99dd9ad6834610eeef323f0bafa97e4a0f76d2cd76313fe474679","changelog_sha256":"3189417f65b5c539c17d679d25b658a0c14778c5badf9d8915b4d2023d7e79bf","review_raw_sha256":"cb567e792b511c9c564d7be75a362ebc81d3a3014097c8a33ee3e98899767d9e","review_sha256":"4c8363a251c0dba06452582bee57adf0a2166cdfbc1c3b0abcabdbc04da34355"},{"probe":"a→b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a→b","en":"Title"},"rationale":"Raison a→b fin.","reference_ids":[],"question":"Question a→b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a→b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a→b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a→b"}]}]},"changelog_raw_sha256":"854be6ffb7be005abe12243af11f66118b5064c7ce2b2508b277e20c1705b2ae","changelog_sha256":"6e6b5bc72ae4a950eb536dc12b6dab1771f2bfcc3685c69aad55debaf2d50f2a","review_raw_sha256":"04543d222fe4e8767bbe647376049150d0f3a1277e5d683c071e2360c1fd9426","review_sha256":"fd9cd053e05c7ca6b945aea938a1476030c40c18cddf07ab6064083b3dd057ea"},{"probe":"→→","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre →→","en":"Title"},"rationale":"Raison →→ fin.","reference_ids":[],"question":"Question →→ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation →→","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label →→"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"→→"}]}]},"changelog_raw_sha256":"28d9398510b6d97fb65b5e76d56009750d73d9cd5940dad329209d16ec7aab97","changelog_sha256":"ac80e842d45dbf4dfee501a99590674156910babbd0c28817782d6e341f164df","review_raw_sha256":"401c13d2008dd113fd7a432001c5027bb6a2e19397bd7a3a38023efc42a32821","review_sha256":"44298147d87f1480929d48b7cb9e8f2b9104d73c389eae49e973fefd5486356c"},{"probe":"–","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre –","en":"Title"},"rationale":"Raison – fin.","reference_ids":[],"question":"Question – ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation –","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label –"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"–"}]}]},"changelog_raw_sha256":"888620b21e1a2c6480d6bc891a8b728d784519a6d2cf3fed8aa37b335e1be1e7","changelog_sha256":"e039487007ede2669e3453f87a74a1075c4b103917cd61b682933466af6f9ca0","review_raw_sha256":"c99c65ff96cb1024b4645816e18629af72b4670b0da8fb7e8a236ae400683028","review_sha256":"e7a947561f584f7bb40ecdbf30adda0aa54dcddbe9e92c7084f34aac3dde62c6"},{"probe":"–x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre –x","en":"Title"},"rationale":"Raison –x fin.","reference_ids":[],"question":"Question –x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation –x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label –x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"–x"}]}]},"changelog_raw_sha256":"408f1daa165b3fe0eaae8c7d9798d82b489f5b6e75aead42bcb2d64cae666517","changelog_sha256":"419b4b46b24db2e702103352f6d5f34233287e6bf1cff14ab8f36c62e48d299b","review_raw_sha256":"d86603e17981156fd2b3876427b689390269c2862d8ec790d01187c74ada636d","review_sha256":"c9b713394a8835d51b4fad833ee2ae01b12936ebef68f49f7c5e1cfeb482b88a"},{"probe":"x–","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x–","en":"Title"},"rationale":"Raison x– fin.","reference_ids":[],"question":"Question x– ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x–","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x–"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x–"}]}]},"changelog_raw_sha256":"b4d123a14ea8d45925bc33f9cce04b3caaab18d2e7ae726fe3bab2c9859b9655","changelog_sha256":"ee8ff9af8feaa589bca52ed0bed1e292b6acef612cdcee6ff3237c0c2fe7a03e","review_raw_sha256":"c853d379780a5231b6a9364ee8dc405d93ba14646273e490e2f51c121b53ac66","review_sha256":"4403013decbe94d0b91c06056802a834d15654b7cc15e17e1f101d238c5498d4"},{"probe":"a – b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a – b","en":"Title"},"rationale":"Raison a – b fin.","reference_ids":[],"question":"Question a – b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a – b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a – b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a – b"}]}]},"changelog_raw_sha256":"87156f9fb1ab035b2ec7af38ee7556cac91ca032b9ac31b58e6fdf41e81e16b4","changelog_sha256":"5b2bcfbb7802f59bc2dfd688f358407ca5cdaa584c28ee84d5ac9609a2df9274","review_raw_sha256":"ba7e83f7a3fa7410f5d802b5752edffb17a273177704842b5b4de19d9f0373c9","review_sha256":"3a5668be8272eb3fba728a90f68c66c827a53ea344af512d6ade577acf884be7"},{"probe":"a–b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a–b","en":"Title"},"rationale":"Raison a–b fin.","reference_ids":[],"question":"Question a–b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a–b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a–b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a–b"}]}]},"changelog_raw_sha256":"96e6c9a4b8728e52dadbc439d5cfbd4192c0793cbbef5678cb647da972eaadc5","changelog_sha256":"32bba015e27179706f7612b524b572852e6a47f04833ea1d51a57cc150c80076","review_raw_sha256":"6dbd177aef26e2f3b9a72087374a96d51b378a820ea51c2a74f0d6b142f1d967","review_sha256":"36af23f8db64dcf3310a0e123a25c39d57827a18c62fb97f9001fd842f41e76e"},{"probe":"––","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ––","en":"Title"},"rationale":"Raison –– fin.","reference_ids":[],"question":"Question –– ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ––","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ––"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"––"}]}]},"changelog_raw_sha256":"585d801469517d0971ac08bce853b1f1697428f49e37a519a4c179d6a9746a37","changelog_sha256":"3a51cbb882f53c2349b1065b9f04ee2096b7fe0045144ab4c26de0048a594826","review_raw_sha256":"58bb48b74eda5ecd616e40cc36549a0324005976748323e407727b52d4cb82fa","review_sha256":"7d186445feda17b7f4d1dc4e8a01a99881a63d18010c995cf57f7deacc08ad63"},{"probe":"—","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre —","en":"Title"},"rationale":"Raison — fin.","reference_ids":[],"question":"Question — ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation —","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label —"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"—"}]}]},"changelog_raw_sha256":"2eb5a4fcbbb6ff6c23161e26ac995d79a4c867090248c7fb9bac678ebb9d048c","changelog_sha256":"4e6d95bc1bde1781129f922b099d3d6f96315135b034611d30294a1066265118","review_raw_sha256":"801d0a0b599bcd7e73c791fd1c5f7024e3c409c776af6a635a5558bd118dcf7b","review_sha256":"c6691f4fdfd6005c6fa22da1c812ac707185c0bd4899f89c9ad84969e020fe99"},{"probe":"—x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre —x","en":"Title"},"rationale":"Raison —x fin.","reference_ids":[],"question":"Question —x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation —x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label —x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"—x"}]}]},"changelog_raw_sha256":"76dfcd55b5008e3d4e96563f9d2d2a48053fab19eeeea825c20b91b00736024d","changelog_sha256":"73f1cd67a4b62b8469d1f8ce22da62955b5bd8a774006f38c29463afa328c15b","review_raw_sha256":"e65ce809cdb97dbc492b6a072ddc20729145f0b3bcf4f6b70112fa16d309153b","review_sha256":"e3e156830dc25afa379ba26b28173db0771fd1a139f253dfd2b2243a1480272d"},{"probe":"x—","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x—","en":"Title"},"rationale":"Raison x— fin.","reference_ids":[],"question":"Question x— ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x—","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x—"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x—"}]}]},"changelog_raw_sha256":"872dbc99f3f5f772b3b08f45327c1f60ac7a7cabe7eb2350bdbbd5bb7438959e","changelog_sha256":"ef60057ed9939058ae10d83b0a63c3cbea983cb4aad56493fb964308ee17971f","review_raw_sha256":"8a26e705c65e1441fbb786d2e9ae3be946d2626fd1e607e14abd3d9b57463e35","review_sha256":"545818f8ff8f4bc1c7f059173c3b7ce0564027be94ad6a3fd8f08c8a4e33f18a"},{"probe":"a — b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a — b","en":"Title"},"rationale":"Raison a — b fin.","reference_ids":[],"question":"Question a — b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a — b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a — b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a — b"}]}]},"changelog_raw_sha256":"ac78064e4c918b6c1634ecb7a87264f69c4a6edf4dec1f3c8d9fd773c745c9a0","changelog_sha256":"b7f7fbe6ba45da12686f1bc574fe21042b08c9ed684d0a7e3c5fba904831c0ed","review_raw_sha256":"e69eb12cb68119e27346404741e388a0988fe9cdc673bfd7687bd82e609682da","review_sha256":"cfb022382770498edc2534b09150e642c54a88d098edc8b3cb2507013d03f3d2"},{"probe":"a—b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a—b","en":"Title"},"rationale":"Raison a—b fin.","reference_ids":[],"question":"Question a—b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a—b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a—b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a—b"}]}]},"changelog_raw_sha256":"778838a3b026251622ac9ec4db4b90944cdb2a26d6492c25d75687c2fd9f9940","changelog_sha256":"051e826482a55fd7048c9c875298ad1f059d7f48468957b9ff068aca1d2aec92","review_raw_sha256":"967982daa94a47e8df0c15244407aeddb01352cc4afaa776381047ae3999fa87","review_sha256":"844d73639392f9e19ce0f4c4c38a3fd3fa5e0893963077866e8c126b2b00edc1"},{"probe":"——","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ——","en":"Title"},"rationale":"Raison —— fin.","reference_ids":[],"question":"Question —— ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ——","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ——"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"——"}]}]},"changelog_raw_sha256":"b558d1daeb8800c0f9366f285e0ae30f68d9878ec6ade7b5a8b3f72dafe01d82","changelog_sha256":"d62eedce608746b2a7eab8502387f68b827ae00359c5703d7da0b60eed993524","review_raw_sha256":"04c8ef97d7c998932a9fb1c037dbd401f9bbe0c0a027f3ca05fec1d4e98fbe48","review_sha256":"26856e0decdef97e4940bed2098ef7778748f5477988c9e2f9558e4bc1ed1113"},{"probe":"…","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre …","en":"Title"},"rationale":"Raison … fin.","reference_ids":[],"question":"Question … ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation …","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label …"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"…"}]}]},"changelog_raw_sha256":"2ecfc7af9f3e7208b06abba097570fa8b1e8b48b0e4e73c579fbef85e0d499ba","changelog_sha256":"313566df928702c74507b8cae5fb524deab27fb7e285660574c2bf0a073a799e","review_raw_sha256":"23789b8f23e126b825e9325aec60954d1d8af942be20349c3e407ad2079206bb","review_sha256":"5adc3172570c9eb99e0923a8793f8cedbf6b1ba9dab6f6db275ec325fe2bb704"},{"probe":"…x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre …x","en":"Title"},"rationale":"Raison …x fin.","reference_ids":[],"question":"Question …x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation …x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label …x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"…x"}]}]},"changelog_raw_sha256":"ca47b072bb2b7231fef65c08fbd8e51c30b77ad9a0f27132154ed09db0143d9a","changelog_sha256":"6ef84c981886f9c3cd66eeabb6548403bcab0ed0adc6ef7f843a36eb8f8947b3","review_raw_sha256":"8ac4883b517d94a0942a15825836f0aa6ad433b05ee8913ddae85c20124395b2","review_sha256":"d95ac2f415aa295c56d3194cbab59200f23bc081807662efb0206387638501c8"},{"probe":"x…","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x…","en":"Title"},"rationale":"Raison x… fin.","reference_ids":[],"question":"Question x… ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x…","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x…"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x…"}]}]},"changelog_raw_sha256":"c3d1fdf188eb08e08e6c91e9e31fe055a30a7e462f619abd0855783d2c874ea0","changelog_sha256":"05fa789786a759e510f1e0f29d9f24c9eaa5b7048b9065ccbd54c345f622594c","review_raw_sha256":"d6a634d90154a27b2fba0aac2ac54108e3b177cb6acdf073c51688ff407eda1e","review_sha256":"0b95ec4ee5b17eed230cbe0c236b5056ddad920d0698dcc16897abb3b7696230"},{"probe":"a … b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a … b","en":"Title"},"rationale":"Raison a … b fin.","reference_ids":[],"question":"Question a … b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a … b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a … b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a … b"}]}]},"changelog_raw_sha256":"f70c50a97c9aea22185c8bcb50f05d26a9812f63c608f17d9e2896e8ca511a5e","changelog_sha256":"1bcfabe7a215b52257ed75a4601a01af9c3c6a891b544ddcf274ad0c9c8246b7","review_raw_sha256":"0b8b5cad8bd74d4a0540eb1bbac7a97e49745e275f53b46b31dd0ae8c15369ff","review_sha256":"efbdce4d2777e9bfd4ee6fc3eb7d7b9a830bccc37060fb42b19afce28500a446"},{"probe":"a…b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a…b","en":"Title"},"rationale":"Raison a…b fin.","reference_ids":[],"question":"Question a…b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a…b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a…b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a…b"}]}]},"changelog_raw_sha256":"ecf5597a58a4c17d001e7f84ac21999a3335d45a22e379de12d77cb72ab5931a","changelog_sha256":"a1c7883b179f3acf6ba3d5da83434065395e081d58a9debda774f73a3baf3e41","review_raw_sha256":"a96920ba802c8388e56b3d8f2602956e1e5f09c4cefdafddf35d1020cd2c1d60","review_sha256":"9e3f189a6cc63780d10731d5fb88b2bd7a0a220ab00775223fb552119876647c"},{"probe":"……","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ……","en":"Title"},"rationale":"Raison …… fin.","reference_ids":[],"question":"Question …… ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ……","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ……"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"……"}]}]},"changelog_raw_sha256":"71c7a92609ba908bdbaef4b899e92dbf1022ef766290b94fb0ebe44cac3b3914","changelog_sha256":"c78927f969e79adee0b62995ad0bbeed255c3de4aa8bc9afe8a0fb77626c2b34","review_raw_sha256":"90c612f16566d0bf3674939fbba613fee3c486f7a935d85048fc7ad3a89bc25a","review_sha256":"4b7e8e471b6d8ca4dd16d0309b2b024f9c7eae736bf45aaa649be83600ac272b"},{"probe":"«","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre «","en":"Title"},"rationale":"Raison « fin.","reference_ids":[],"question":"Question « ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation «","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label «"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"«"}]}]},"changelog_raw_sha256":"82a4337d904b0ee4ae247898ca1ce370a1b4ba6c556c664f4c9e6e4f140a7c17","changelog_sha256":"ea3df98b2af136d2410ee9c49aee51ee1dc13f5d54c22c2d02293dcdc6de246e","review_raw_sha256":"1afd4d7508b3373f609f33282223d4fb5802b7409621cdf673ea9aeca1d8a771","review_sha256":"68938a3b4ecde30ea4ad660649dfe9af39e19b4dac45ad6798d239b9c88f2ec2"},{"probe":"«x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre «x","en":"Title"},"rationale":"Raison «x fin.","reference_ids":[],"question":"Question «x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation «x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label «x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"«x"}]}]},"changelog_raw_sha256":"2cad744cfda1a2c31989551f94d26b6d2bce95ede3ef560a41d70adc246263b5","changelog_sha256":"2d6020685c6c15a402e74d9eae946298bea5da26955282a138d2d449ce446e4a","review_raw_sha256":"e57ab01d6296d322516b703cb7a7aecdac324789f7319720e562911ec56e2777","review_sha256":"4bb022e3840cd3a4e6aefdd870e1e37db22fe113057d7d0162a80c7db36524b5"},{"probe":"x«","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x«","en":"Title"},"rationale":"Raison x« fin.","reference_ids":[],"question":"Question x« ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x«","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x«"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x«"}]}]},"changelog_raw_sha256":"6338f8ce77c5d28108ad6810e17bd46f687507bb67b5533daef50d7932837436","changelog_sha256":"9df8cab39f8520880641b369abc339ec5d41bc2fbea26c59f228bfbeb2e56a17","review_raw_sha256":"8702d8ff4145f3150a898d6d58007bee8a472ca59b3b4bbfa5ee7125f69550e2","review_sha256":"d8bd02535c9b62cd33afceafdcbc682860c727923651e605882b5a5ad366fb30"},{"probe":"a « b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a « b","en":"Title"},"rationale":"Raison a « b fin.","reference_ids":[],"question":"Question a « b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a « b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a « b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a « b"}]}]},"changelog_raw_sha256":"ddba6b99340b97e0ff29b8928f67f7fa48922d323a010c48b46ea5a9c13f4a8c","changelog_sha256":"4f23d434a5a8b2242d598fa44e6511b3878766b5474a0f7de536cabf9ec7cead","review_raw_sha256":"c2ffbb2d1a6d5468b3079c2e78839a170a13e263de3fe56b409ae333f1b3ca4e","review_sha256":"47a207b32e3d98b185ea6e87cc31613d881a6d2e32d9d25fbdf7270849350747"},{"probe":"a«b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a«b","en":"Title"},"rationale":"Raison a«b fin.","reference_ids":[],"question":"Question a«b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a«b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a«b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a«b"}]}]},"changelog_raw_sha256":"d1a86fe3554aab0485b42a588deca72a098f8a27e47f667d746c8cebf0e54db0","changelog_sha256":"b7d98dd2b87fe0d7f9194173799e2d1c434eba0c2a115ce20a158b521d59e481","review_raw_sha256":"4bb3cdfdbd7a3fa578ab9f4c22a51ba9e4c87c137eaa43a237ded696e3fc0986","review_sha256":"3da5178531275678437b3c54f7678be3f4b47450deb70384f3e3ed5c2a041943"},{"probe":"««","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ««","en":"Title"},"rationale":"Raison «« fin.","reference_ids":[],"question":"Question «« ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ««","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ««"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"««"}]}]},"changelog_raw_sha256":"3e366a2b187c13cb13b0b84de22baae09236215613aed55d5bb21a1fa94b30f7","changelog_sha256":"86c328b60bf515a78792b6285de509b1afaa82a621daf09fe88ba1c07fbacddb","review_raw_sha256":"ec6be8b99affaf13a26412d4f9b76e165e1828f4d4d0893ff31bbb7e70b54ca8","review_sha256":"ab953d5874dc977d3deb60f3dd064e5ca8abaa0ecfd9375f7dbea46fa057a873"},{"probe":"»","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre »","en":"Title"},"rationale":"Raison » fin.","reference_ids":[],"question":"Question » ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation »","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label »"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"»"}]}]},"changelog_raw_sha256":"9ee14915b470c2136a09e6b3f79f1f1b371da331869789e8cd1b1c1932f917ae","changelog_sha256":"4d3c72bb9da5d1a2b7ca475e81656035597bebb1314e9de2d90c4c005caf1de6","review_raw_sha256":"15e1a6c0756550fe238bd4e9f8661bd382280e431e0ce707b59d31fa9296f788","review_sha256":"387b9001c5c65b445bcfe2cca68eabd04ea34af5e67cbb107a768399c821e407"},{"probe":"»x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre »x","en":"Title"},"rationale":"Raison »x fin.","reference_ids":[],"question":"Question »x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation »x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label »x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"»x"}]}]},"changelog_raw_sha256":"1f9fc4d898400950c03c21472f257c04db2c5eac99e0490daad7eebc7b40d6d2","changelog_sha256":"0bc59211ace7bf1e79de9267d6d70ec4ec2a44a6b08cc1c8d3ad9c256e77fbd3","review_raw_sha256":"fc9bda923e6699ead0f6281352c2bdebf08669ae7ec565205eb013b0b4740cbe","review_sha256":"79238526136fc24ab5cfdc0e34249605966b85c95414e0cb8cc6b310b622fd16"},{"probe":"x»","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x»","en":"Title"},"rationale":"Raison x» fin.","reference_ids":[],"question":"Question x» ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x»","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x»"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x»"}]}]},"changelog_raw_sha256":"2c60080243b92bd69f40a4be1b3c07a8d570b0d716a48db6d207a7d369e5811f","changelog_sha256":"ad971603feb2737b6b0a63979929996d7aba24bd87db7dc01de3d4ec7b028076","review_raw_sha256":"1f970b09c692ba946793c8a9ca6576193a1955654a9ff54292a5f265f6a65090","review_sha256":"9348b1cbb61bcc1b621ec033485b210518d20fc042329ea6f443c60ec52f17f9"},{"probe":"a » b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a » b","en":"Title"},"rationale":"Raison a » b fin.","reference_ids":[],"question":"Question a » b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a » b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a » b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a » b"}]}]},"changelog_raw_sha256":"468fba7ea74ea55e52cecb8e45a14c67712e502f386354b9026a80512b287adc","changelog_sha256":"b3b0e5c4fa9f2127df08aed5b579edf5864a64d1d55236d9b22e3505904d5fc9","review_raw_sha256":"4a794f53c02ef110a0c04e0ee3292a9f8f867f26f8a2a0492a5a4b5f228f1306","review_sha256":"98391d4cc92bb211a7256871fbb6dec21733fc2f7a78b633715027d452104e9c"},{"probe":"a»b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a»b","en":"Title"},"rationale":"Raison a»b fin.","reference_ids":[],"question":"Question a»b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a»b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a»b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a»b"}]}]},"changelog_raw_sha256":"888634f217a756b0ec2ff05ca745fe653b222fc0430462f2234d1b87d1b36942","changelog_sha256":"a3706141f293c0b8525e7156fe53376be98ef64928c7471536e3d07dcfb8c029","review_raw_sha256":"7bfbffbbc11b69a320422e761b014a464595d94891c492caef02ebeae802f20d","review_sha256":"9cc09ca80d549c8ffbbeb8688b2a504e22f7b97103e9d3b8fefbc64f08955ae7"},{"probe":"»»","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre »»","en":"Title"},"rationale":"Raison »» fin.","reference_ids":[],"question":"Question »» ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation »»","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label »»"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"»»"}]}]},"changelog_raw_sha256":"94d6ca6ae1d352b0cb42b9bad6330283635c2ff4c3833fc9d001de1255830d6b","changelog_sha256":"cbde01afc2de2f4740bc62e5ccce8530e8b5691d3232d1035e12b9ccf71fc896","review_raw_sha256":"e2aa9df9f373e86612900593e33dd6e264397c950b6c6adda844618dee6ee731","review_sha256":"8f8ea5e527ad89bdec05bc9169fec7cb6527fb46c49e027a84bd3c5a927f49c6"},{"probe":"°","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre °","en":"Title"},"rationale":"Raison ° fin.","reference_ids":[],"question":"Question ° ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation °","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label °"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"°"}]}]},"changelog_raw_sha256":"b8c6b2aea9c3f9c41fc010fa7d9f430cad9212db3278dadf961c3148e6993cc0","changelog_sha256":"9d604391782b7c2d1008e85aad361973658d8c002a1d47e60f8fc13540b3e44d","review_raw_sha256":"c01e9ed455080618a6c96d87f5881d9a54da9337c3fe09d5f4397be30d0b61f4","review_sha256":"9695cbf5276d445c16e517047696c1866447d712fe120c2b18b62e47078645de"},{"probe":"°x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre °x","en":"Title"},"rationale":"Raison °x fin.","reference_ids":[],"question":"Question °x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation °x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label °x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"°x"}]}]},"changelog_raw_sha256":"1bf99cd57a668d5f1e86637261191044ed6ed545f9c4a63f27ef6aaf6e7238d5","changelog_sha256":"a491979e5fe39c497b596c53428b21809b6cbe07f8041d08088d09976cbde9c2","review_raw_sha256":"3255778ba336e11f93d2f2ca5f5e598905391f4c50fbb8dc4d29635d1d95b617","review_sha256":"4536141f5b8e5083b19ccc1eba25a685022a683c6b16e124c54c83b67a45bc62"},{"probe":"x°","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x°","en":"Title"},"rationale":"Raison x° fin.","reference_ids":[],"question":"Question x° ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x°","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x°"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x°"}]}]},"changelog_raw_sha256":"68f0f1046d2ccfff6c1077a0f12f6fa0cc0505ebd5d062749ba13e43cc25ae0b","changelog_sha256":"deb5a726158cb7bb77e609cad68ab1a0ced0a9e103cb8023f26489855e86e9ad","review_raw_sha256":"2a2fa08cbb9330036aa89ac6373346e24bd1634bd2ab0aad3168926a47721ee9","review_sha256":"7d78e2d04c96eab07547d8715143282955b3ea8049160bf8e5f02a5a4d8fce3b"},{"probe":"a ° b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ° b","en":"Title"},"rationale":"Raison a ° b fin.","reference_ids":[],"question":"Question a ° b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ° b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ° b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ° b"}]}]},"changelog_raw_sha256":"403c28fe7a7115076517faaf2eb5a33ee8e54bc10acedef704917a7f81005caa","changelog_sha256":"2853a687e646d4628d525aba45cdca3f2eabf68496dc7abf2a90a1d987b72a0a","review_raw_sha256":"a65c86a430899404d6e79cfd8dedd32d98e2aba75238e38cf62cb204e7f5d570","review_sha256":"2160f65b67eaef7b4dbdc2bb12926ea99d3ec43b6e8625365697c4a8a6b47663"},{"probe":"a°b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a°b","en":"Title"},"rationale":"Raison a°b fin.","reference_ids":[],"question":"Question a°b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a°b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a°b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a°b"}]}]},"changelog_raw_sha256":"487d09b16902dc7135af8ea9230c1561ce4bd65d255111df5c5d7647342af1e3","changelog_sha256":"91ae4861094acd7430595b61157f3078ad20014e7583360a1aa071b936941008","review_raw_sha256":"f8599cd11058f593fe78e63a787d5f5bcf3fb91c46d8178749152b03242b5123","review_sha256":"698ef4042bfb778789bef239cfd294fa34ff872ee5b3ed113c6eb7f4a3aa1e2f"},{"probe":"°°","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre °°","en":"Title"},"rationale":"Raison °° fin.","reference_ids":[],"question":"Question °° ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation °°","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label °°"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"°°"}]}]},"changelog_raw_sha256":"955057e98b174c336af246fa16b32bfc2194e9b1eefc895a8a3de55488d4d214","changelog_sha256":"6a168eb2f5aff937d157e15529e999c9644a99f8d2d570d8da843c84c2dc87e8","review_raw_sha256":"e4ef267c2356041208ff4dbd5e99838e926b48512e4de996a931e6d4fb8a4866","review_sha256":"c8ee423824f72bbdde1fc799a2dfeb9d3d038304ea01250cb81365080e2885ee"},{"probe":"≠","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≠","en":"Title"},"rationale":"Raison ≠ fin.","reference_ids":[],"question":"Question ≠ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≠","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≠"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≠"}]}]},"changelog_raw_sha256":"819dc81da2e06e6d0e0fda29af4fdcdc577196ad7fd09796535c0d4b77121c4f","changelog_sha256":"009effe7b08f34301d000b61a23593f00b8db4b200c74207193d142388aa01d6","review_raw_sha256":"72fabd2021fa90190f9fc3fd20907fcf341890a1a4749091d0ee21222e98dcbb","review_sha256":"fc064866b6107a5e7078f0b74b9ffc6601e969edc20dc7a9a0a759618d940c56"},{"probe":"≠x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≠x","en":"Title"},"rationale":"Raison ≠x fin.","reference_ids":[],"question":"Question ≠x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≠x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≠x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≠x"}]}]},"changelog_raw_sha256":"a4ee05c127701ddd3b52fe1480adb81dcf1309cccec8a7f26ce8c2716412a60c","changelog_sha256":"6da716a4e387b5873eb8f0963ab584e85e00127bd45c2d8e48d0ef2bd9903e8d","review_raw_sha256":"d06cdb4350c9d0aff7126bc5af914a9a3e9a33ad24f293ffc7aad41173d4996c","review_sha256":"e1b9d0c31ed0f848ab27fd8db1ce4b9cfb214d3ea7f712213f8c384ed241dea8"},{"probe":"x≠","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x≠","en":"Title"},"rationale":"Raison x≠ fin.","reference_ids":[],"question":"Question x≠ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x≠","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x≠"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x≠"}]}]},"changelog_raw_sha256":"46c5d107107218835856dccdac03ee8dd48d48c5052a4a1831ba7793a75a8bb6","changelog_sha256":"509b410d01d8857a7afde1b81d7258ba20b97263f7846101ee6be9eba22f1f66","review_raw_sha256":"795a0eaf2714549936f48adfd54616de11a699edb4387b859ba89f369a52d8ae","review_sha256":"c537e8f70425d02a43d12b9f4b070d13699754fe3d84d9a9b99f21fb2a62ec46"},{"probe":"a ≠ b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ≠ b","en":"Title"},"rationale":"Raison a ≠ b fin.","reference_ids":[],"question":"Question a ≠ b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ≠ b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a ≠ b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a ≠ b"}]}]},"changelog_raw_sha256":"0f5861c6f63594509f709451d3f1c0406b5ee531d4e643d5cf3f186f2e9f1fcd","changelog_sha256":"aa2e9a97726b50367adf3401667865f0520a00f5d8215456449e37663f6f06f9","review_raw_sha256":"1f19c028788b37156e514441f08a7b928bc8b75e9ec417dc807f3b3f75b3f512","review_sha256":"6bc3db3ebf376b480e3e512a63a99d8ae6c0e454f13055fbd6652dd84975257c"},{"probe":"a≠b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a≠b","en":"Title"},"rationale":"Raison a≠b fin.","reference_ids":[],"question":"Question a≠b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a≠b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a≠b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a≠b"}]}]},"changelog_raw_sha256":"02ae7cc7b7ecc804dbefb153d4c5f2e8c7ce12533af9700f6b9aa07e7beab74a","changelog_sha256":"db88dd19898dec74c5be7158d31ef747a34221101351d3370582ed16da587d07","review_raw_sha256":"66ae43c7cd222e6a0bb7dbc8c5c502b9694c8a1a50c9bf72e5ac17f3f0b9a5a9","review_sha256":"aa6240c53cabc6a12d380d746a262ad4a1cc691d41d6d92cff914b1dce8dfd88"},{"probe":"≠≠","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ≠≠","en":"Title"},"rationale":"Raison ≠≠ fin.","reference_ids":[],"question":"Question ≠≠ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ≠≠","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ≠≠"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"≠≠"}]}]},"changelog_raw_sha256":"849f8f16ce0ad8bffb692f8760ccf761290681bee5d25f1fb4d3da0aa8bbf3e5","changelog_sha256":"5cacc5d8d01d28febb511aa9359fa7984c0c43d4d1c7ba943e411b6ccf0d811b","review_raw_sha256":"d16b95bef8e9d19d0c2198643e747f87cf1cb585358600787c3c92db99e22384","review_sha256":"23c64ab316f1012af4fcae71c1d909ad1372acad491c792717cbf1f42e590a99"},{"probe":"a b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a b","en":"Title"},"rationale":"Raison a b fin.","reference_ids":[],"question":"Question a b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a b"}]}]},"changelog_raw_sha256":"d04b72930aad0ce6c4de85ab28490327b18808d9ff3af8d8bfd0429a8dd9c5f5","changelog_sha256":"85bc6194ebcc80eb401e50db0e7d9134857fa03b67d77b4f0cc385ee1f017f3d","review_raw_sha256":"a1e740d98fa1242b0779a9d8c515488f2874d959a560395a9014858e62e6089d","review_sha256":"4698f4a4d55b7e045422e8e680abc07618394b98ac6e6d67ef6bd5a6903c4052"},{"probe":"a\tb","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\tb","en":"Title"},"rationale":"Raison a\tb fin.","reference_ids":[],"question":"Question a\tb ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\tb","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\tb"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\tb"}]}]},"changelog_raw_sha256":"f7099a871d406da05261361d9a6f0c4c8245566a76b29b1f31aead0264c45342","changelog_sha256":"3a92130b139b7cccd40a6e7e94ef5c6ac423154b662e84f8af16b972a0766e7a","review_raw_sha256":"798470ee0dbc30ad2912288ed3ce49e593add7b5fde3b66a1fd012395a9c8598","review_sha256":"4698f4a4d55b7e045422e8e680abc07618394b98ac6e6d67ef6bd5a6903c4052"},{"probe":" a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a","en":"Title"},"rationale":"Raison a fin.","reference_ids":[],"question":"Question a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" a"}]}]},"changelog_raw_sha256":"d02bfb65afa91ecddde5b84c2c6eb2c215dcbb065d07c9e068108485cd05bded","changelog_sha256":"bf0626faa59bd9427d4620155dfe7aa7fc4bec35f6188452ec8ba8fcc3d00aab","review_raw_sha256":"0751b4db50326e0c42f9bfc311c45e4b04ae116a70bef1ae84f73925b302e18f","review_sha256":"166a134d098405144a04d51b42595b2e6ba7db3a5924b91ba530c6ae90c75b2a"},{"probe":"a ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a ","en":"Title"},"rationale":"Raison a fin.","reference_ids":[],"question":"Question a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a "}]}]},"changelog_raw_sha256":"c2e56776147ae390308b427a06d869d3caf940c75641eeb65795271bdffeea6d","changelog_sha256":"b84d08238e6068a4f8475dfa3ec44895d283d975adb51525a6f44214a79be777","review_raw_sha256":"b62dfc77790c659166d5a8bd62cb2a43c91a26d4d61bcf4ad005fc335fa41734","review_sha256":"2f4d45731aa3b49009fada13385b7d194fac9da1466347ac7138930144e04257"},{"probe":"a\nb","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\nb","en":"Title"},"rationale":"Raison a\nb fin.","reference_ids":[],"question":"Question a\nb ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\nb","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\nb"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\nb"}]}]},"changelog_raw_sha256":"9a9cb2f04ed20fcee3a24a394829277c14ced4225ee90e175342f1998e12d99c","changelog_sha256":"7a7662d9421ce4a067ae960e139d0686c24c061fc65f1a8e95ef894d7292c2d8","review_raw_sha256":"418e9324b7ad7e0b7dbaaff9777986611c073a591ac3e7c1da72a490cbfc272c","review_sha256":"5b5583acf04b44bad8f5a0305c40d587f2b95856707fb3cb7e56096a1efba97d"},{"probe":"a\rb","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\rb","en":"Title"},"rationale":"Raison a\rb fin.","reference_ids":[],"question":"Question a\rb ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\rb","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\rb"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\rb"}]}]},"changelog_raw_sha256":"84508e0575acc2a176d70d664347c43fadace55a67cdaaac799a451762d7566f","changelog_sha256":"dec21eb40abd65f41634e4a4ac9aae40a486454af989018635558a6a0e466868","review_raw_sha256":"8c3b4a525101902e2a1a926a6f3662b67f967491101825974a64b34aa68a2944","review_sha256":"5b5583acf04b44bad8f5a0305c40d587f2b95856707fb3cb7e56096a1efba97d"},{"probe":"a\n\nb","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\n\nb","en":"Title"},"rationale":"Raison a\n\nb fin.","reference_ids":[],"question":"Question a\n\nb ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\n\nb","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\n\nb"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\n\nb"}]}]},"changelog_raw_sha256":"1c0d5fee463227962c567bf27a0843d18138ad77c1cd5b53ec16e6c8a9481701","changelog_sha256":"bf20c1caa6905b47972694100b78d6d223b3fe08329d2a1eb347062c2da70a41","review_raw_sha256":"99351dda31b57d497319d31492c7430f74f17f5f5df3f950c22a4c909cfe67db","review_sha256":"8559c8c0fef63bebf24307a7d34116df13a9658ef9477f3dc3f9fb7380963cc0"},{"probe":"*important*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *important*","en":"Title"},"rationale":"Raison *important* fin.","reference_ids":[],"question":"Question *important* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *important*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *important*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*important*"}]}]},"changelog_raw_sha256":"6bf59c5f3341b9c80797831fc3721500948c65cacbc4a4646006100a630b0e42","changelog_sha256":"5f4cb784f5cd2be1878cda60bed33c6d8f3b295a7251b2bb57a23f21eeab30b8","review_raw_sha256":"ff0c769bd481e1fc9fbdbc70995a2cfbbb8de8ba2e2236c0681022b7d75e265a","review_sha256":"0fb96915a5e912f19a6c4a37bf3f6e75a46d514711a0a2bf6d2720725435f738"},{"probe":"**gras**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **gras**","en":"Title"},"rationale":"Raison **gras** fin.","reference_ids":[],"question":"Question **gras** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **gras**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **gras**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**gras**"}]}]},"changelog_raw_sha256":"2c879a1c3475747b25f02f3c302b510d440664ae2925aa4c1ad5a07c700d016f","changelog_sha256":"c469df09084ec6292f7a6cd31916298341b13cbe2c2852e56c07f1ceec02bfdc","review_raw_sha256":"a0d74686366fb21f01aac9145f88215919d2639780d368bafff82d5bd5d2d4dc","review_sha256":"947583f95ec94d821f4b1c724271344e223e925deca95675f7cb985550e3590f"},{"probe":"a **b c** d","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a **b c** d","en":"Title"},"rationale":"Raison a **b c** d fin.","reference_ids":[],"question":"Question a **b c** d ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a **b c** d","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a **b c** d"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a **b c** d"}]}]},"changelog_raw_sha256":"3b454d034b5da0284f965b041f758993ba1f3497e961386de30ffbee688e5394","changelog_sha256":"fbec4df2d5d0803a583cc531e1a0c9a15e7aa7516b66f7254b666f520d9c9101","review_raw_sha256":"6985568583a51a3654cbc4c76a0486c7ffff94434f6dc0892c22922550551611","review_sha256":"fa871e97566dea27a90d63da65cf4a19b8734caeedc9168f239d89a70caf8d39"},{"probe":"a**b**c","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a**b**c","en":"Title"},"rationale":"Raison a**b**c fin.","reference_ids":[],"question":"Question a**b**c ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a**b**c","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a**b**c"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a**b**c"}]}]},"changelog_raw_sha256":"172fb012663f7516942ed0ae063cdd9d253225bc1ff238dec5e031d2b6d59aaf","changelog_sha256":"32b9eaf2b25f64fd278e29c821854b24d4e50097c72bcb5776e1fe79a34ba00c","review_raw_sha256":"5f08a5e0f18e87c880953d0a17c91b06dba6b9eac7ce6b6c2f992c13d06b89b1","review_sha256":"eb5ffbe6e91246d0085ea486be5d6cd3b93a03e18ad8aebd1eddeb775875d14b"},{"probe":"__init__ et _x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre __init__ et _x","en":"Title"},"rationale":"Raison __init__ et _x fin.","reference_ids":[],"question":"Question __init__ et _x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation __init__ et _x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label __init__ et _x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"__init__ et _x"}]}]},"changelog_raw_sha256":"2e4c0d15c559b0028b44c2300f76b9da002f6b5d23cf0f5f1c3213bca38329c6","changelog_sha256":"e216e0520f70953ac81a9c4b61c92d7322918c3fc8c8f4771fc8a1e8d824b462","review_raw_sha256":"df662a554d3e7f660bd6e31ec5b16774bda98ded41d112a5f95a3fa0f77fea1c","review_sha256":"ea9674b5225027b5d2e13f5643d02d6d730e4c3efd834a0bb45417ff496668c9"},{"probe":"to_confirm","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre to_confirm","en":"Title"},"rationale":"Raison to_confirm fin.","reference_ids":[],"question":"Question to_confirm ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation to_confirm","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label to_confirm"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"to_confirm"}]}]},"changelog_raw_sha256":"1fb7b4c5215de444df53d39a8884409e6177f2e4ad5a8409ba51d8e53bebe689","changelog_sha256":"0403ce0f7845258ec0dadfc7f4e74ba79d52c3ad540bcb48ac2e429c5a16e513","review_raw_sha256":"4baeb268600e5cd00e514c017695651f1cdd057dee8b1426ed6b59b5ab9941b4","review_sha256":"34ae583a675f0a6048f9a1eb97ede6daaf74c8ac998c6e06cbb44df043871fdc"},{"probe":"`code`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `code`","en":"Title"},"rationale":"Raison `code` fin.","reference_ids":[],"question":"Question `code` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `code`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `code`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`code`"}]}]},"changelog_raw_sha256":"d012b1c27192ae942cba5c448e36c076396d2a19dad0471a277c7a7ee9522e58","changelog_sha256":"f076001fe508af066600ca3418220db8c3c934025adf79539476cd41b8e11e1b","review_raw_sha256":"262221e43c561a2caa446922753f3f85faecfc119400a52a8d8f8bf3f08af0a1","review_sha256":"407aa72d22cf28e4a18e996b812c7074672e94437e159c9a27146881140a3708"},{"probe":"``double``","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ``double``","en":"Title"},"rationale":"Raison ``double`` fin.","reference_ids":[],"question":"Question ``double`` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ``double``","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ``double``"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"``double``"}]}]},"changelog_raw_sha256":"021543d2777089326bd99c1e9bc1eac3fe043140e770e7c4de5d0c3bc2c525dd","changelog_sha256":"e45c81e960d4921f1fbb467bd69363949e7ed4d76bf4970828771a0388df16f7","review_raw_sha256":"3bf6c07ddacb428dd476e9a17ecb39553f960eb53c6b9bca685af58ab68d11dc","review_sha256":"5836ae94b217f57d675c0e654a495b9e9455efb4908f166a082d447233d73eb2"},{"probe":"a\\|b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\\|b","en":"Title"},"rationale":"Raison a\\|b fin.","reference_ids":[],"question":"Question a\\|b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\\|b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\\|b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\\|b"}]}]},"changelog_raw_sha256":"e38feb52e7025924447b80b3ca8f6a330e98104e80f55ece9054339e2d822aed","changelog_sha256":"c0fe87b985d8e496d4c233d5dc6dc91fbbe4a83c3871d58deedc2220c8492285","review_raw_sha256":"85e99fc040603d4df6731c3188a3f4c70551527eb38c8cdd6d9a82b34d0369ee","review_sha256":"2cd83ddd8b6d40cf3efcebd230f262d97bb175c1f3342f73498f39223e259e5b"},{"probe":"a|b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a|b","en":"Title"},"rationale":"Raison a|b fin.","reference_ids":[],"question":"Question a|b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a|b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a|b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a|b"}]}]},"changelog_raw_sha256":"9c6d60119b7af4e5308a640a26bf274864f0644071031d8e7613a904afd63dc8","changelog_sha256":"15ec3b89ee69e5fcbc3a8a2730bed5a5aae1c0f3930d56184ac4ce995fe2b2aa","review_raw_sha256":"428690f9cb5e1646f0bc2d4033212f17f905030f94a587c6885a1e2b4aa207d6","review_sha256":"2741598b1c00815007dae4d3b8753e64d0bdea959453a548d97cb2b5c1adf01c"},{"probe":"gras","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre gras","en":"Title"},"rationale":"Raison gras fin.","reference_ids":[],"question":"Question gras ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation gras","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label gras"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"gras"}]}]},"changelog_raw_sha256":"57098b0cd7c2b8d14b86270231cfa35b2fdf972f586188063882644cd6d1ba6b","changelog_sha256":"388e4758dabd31615b3261dfa030267c5dc3c5db84d6913915ca5f6d642c89c9","review_raw_sha256":"787356cca994caffdc11d9863f7096e0471f62297747ebeffdcb36d71c76ae03","review_sha256":"df78c84930f6a2d0402454ee3ccfe40da6f082774c717b1084a33af6f9183105"},{"probe":"[lien](https://example.org/x)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [lien](https://example.org/x)","en":"Title"},"rationale":"Raison [lien](https://example.org/x) fin.","reference_ids":[],"question":"Question [lien](https://example.org/x) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [lien](https://example.org/x)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [lien](https://example.org/x)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[lien](https://example.org/x)"}]}]},"changelog_raw_sha256":"95390127cd524d9552e8ac85070f5773dd3bf9f562149565b795322d44f44b03","changelog_sha256":"46bb9ae3a74ba60510515be944fab7465cfd265124721092340edf70b2e26941","review_raw_sha256":"432c8715a6986b8c7d5439d79ef0d3ec4e488e0b53ab3322dae5f339ab204a6e","review_sha256":"43290dc33d9c23fda0501fbd1a59cc21298697bf7702efeeec8ca99a58e73a2d"},{"probe":"[a]()","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a]()","en":"Title"},"rationale":"Raison [a]() fin.","reference_ids":[],"question":"Question [a]() ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a]()","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a]()"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a]()"}]}]},"changelog_raw_sha256":"70fc4e333dc7db71223620f7521900ecc0e56e2492f37b27e84eb53ae0f618bc","changelog_sha256":"94a0318436e448d7a1c505d80ebf975055096d0c0caec6bb3ce54515d57d1124","review_raw_sha256":"e1460a751ee6a4d20cc014974b40656775129d56fe6e0a6db7bae222e846dd30","review_sha256":"ea34b5046ef62ac03bd4641d9b7d052ff55c3423fbc82902ceec14d5da9c780d"},{"probe":"[a]( b )","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a]( b )","en":"Title"},"rationale":"Raison [a]( b ) fin.","reference_ids":[],"question":"Question [a]( b ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a]( b )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a]( b )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a]( b )"}]}]},"changelog_raw_sha256":"55103cf2234dd61e45c9abee146b44e8649afa9f34e334693b1f11ed24349e19","changelog_sha256":"94a0318436e448d7a1c505d80ebf975055096d0c0caec6bb3ce54515d57d1124","review_raw_sha256":"d39a5c490cbbfabadb2ac46d137d9c79ad90df6ff142d2295aa3a48f0a82e034","review_sha256":"ea34b5046ef62ac03bd4641d9b7d052ff55c3423fbc82902ceec14d5da9c780d"},{"probe":"[a](b \"t\")","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a](b \"t\")","en":"Title"},"rationale":"Raison [a](b \"t\") fin.","reference_ids":[],"question":"Question [a](b \"t\") ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a](b \"t\")","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a](b \"t\")"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a](b \"t\")"}]}]},"changelog_raw_sha256":"9227bd84be4ec61ec23b83937e0c8d89f8cfadc3a8f683e10a7846b2c2dfdf57","changelog_sha256":"8d593525a8a4af270265b58b80767200df2a761cf44192eaf75fc6876d6c0edb","review_raw_sha256":"22b39a442a20518ec81fdc7093d8b10340598938f13b835cf69b3be1650edb36","review_sha256":"ea3c49bc3c77e96b26d1c15e79faaa42f0361b9dc5c3000973c8e62415cde3ff"},{"probe":"[a](b (t))","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a](b (t))","en":"Title"},"rationale":"Raison [a](b (t)) fin.","reference_ids":[],"question":"Question [a](b (t)) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a](b (t))","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a](b (t))"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a](b (t))"}]}]},"changelog_raw_sha256":"95ce737835445051847b3124d788ca6aa3b06e8ec9db709a348ce370c02f047d","changelog_sha256":"04ad15c3b6abb53f69bf879b8f83fba0644bbbe4c9be1761254eb2b3e7ea8be8","review_raw_sha256":"98f042997c50ed9edf80945d11f731fc280d3510535cecb17515268820f3362b","review_sha256":"ea3c49bc3c77e96b26d1c15e79faaa42f0361b9dc5c3000973c8e62415cde3ff"},{"probe":"[a](b&c)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a](b&c)","en":"Title"},"rationale":"Raison [a](b&c) fin.","reference_ids":[],"question":"Question [a](b&c) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a](b&c)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a](b&c)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a](b&c)"}]}]},"changelog_raw_sha256":"bfd52386f13857d53eda43bb05db1967df20c2be48ca7fcaf43396de6920cda1","changelog_sha256":"7513c0891e1b2980a2e1c0591a6eaff34d6d716f3e0864d699bc45c115c147ef","review_raw_sha256":"ac7798088f0b78ae91a6de3d5b8aef0dbe11fb958c79d87556fdd29aace85b33","review_sha256":"c667d57be647402ad5ba2c138ce4143bf5bad0519d7f3297cd91b4251675285a"},{"probe":"[a](b\\)c)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a](b\\)c)","en":"Title"},"rationale":"Raison [a](b\\)c) fin.","reference_ids":[],"question":"Question [a](b\\)c) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a](b\\)c)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a](b\\)c)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a](b\\)c)"}]}]},"changelog_raw_sha256":"5483eabd16edac281d408809495865f2b16a0937b2446c5e1299f2d09c23ef4d","changelog_sha256":"c452e17bed5b7e6d2f3ec3310bc912071c786df7021d9ab73a6d6a066d5185c1","review_raw_sha256":"69a5d0fb9910dc10dcddee594ea92888722028c42bfd69c4f52d8608a2c9c1b5","review_sha256":"8b2658f8ee92277c7863dd04381ade6f862f83ee3298236c85afbc9dd1d26200"},{"probe":"[a](https://x.org/a(b)c)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a](https://x.org/a(b)c)","en":"Title"},"rationale":"Raison [a](https://x.org/a(b)c) fin.","reference_ids":[],"question":"Question [a](https://x.org/a(b)c) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a](https://x.org/a(b)c)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a](https://x.org/a(b)c)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a](https://x.org/a(b)c)"}]}]},"changelog_raw_sha256":"fb1e9b27b3bd7925919d84a1b8549c626743a35b5af77a42951174913f06aa32","changelog_sha256":"6da4199247f2e4cd8dafee2092ca3b60db94dd1e71978649ba5836852fe6625c","review_raw_sha256":"b627e521e2eecbab547b6c4aa54afdd8404d70ee0f78c08db6595cc581b9e26c","review_sha256":"56faede8f8b4771baea02e4041a3f0e4e62482cae027ce80fb1990509dd040bf"},{"probe":"]( )","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]( )","en":"Title"},"rationale":"Raison ]( ) fin.","reference_ids":[],"question":"Question ]( ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]( )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]( )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]( )"}]}]},"changelog_raw_sha256":"361b8e83966ef31cd81c7f04d9feee02de25302bf4f9cc39517aebf389107b1d","changelog_sha256":"1ae329072ab358c52743868bd97f20b8bcaffb60353f0557ed3d7261bf9c4e95","review_raw_sha256":"c9a544aaf5389b2216577c11cc305a6f4f8820612dbc4fd879995aec827df2b6","review_sha256":"c5d9cfbe0d6df043a38a6d995d7342365588a7c22b96321e8f05611444087fa7"},{"probe":"![img](x.png)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![img](x.png)","en":"Title"},"rationale":"Raison ![img](x.png) fin.","reference_ids":[],"question":"Question ![img](x.png) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![img](x.png)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![img](x.png)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![img](x.png)"}]}]},"changelog_raw_sha256":"b07fdcd535a3fb878d9579cd6b888a8dea82bd7c42e858dd447483faf9c35153","changelog_sha256":"ec471e4b693720f636a75ceafb734a48588aa88ffdc151e195e3a624b672af5a","review_raw_sha256":"46521fcb8e127a9cf18c58f0264c99d9d5109780074e8e43daf52cef5d0c0a32","review_sha256":"7877ca471258d23a9e00b312330346efda6608348568cd0f9bb16c3c64240c39"},{"probe":"[a][b]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a][b]","en":"Title"},"rationale":"Raison [a][b] fin.","reference_ids":[],"question":"Question [a][b] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a][b]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a][b]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a][b]"}]}]},"changelog_raw_sha256":"c3fa4a7686307a410d3b8f53b08576a80ea428fea24de7aa9186e1c5fa3af6d7","changelog_sha256":"aa9a16b3e54f00452b55ec997c5294fbaf7b95568e53535de1331b53d34ecf23","review_raw_sha256":"64ae148c5ad1c137ea94dc0aacdba226c314a61e4094000e16bfe333c4a7bd27","review_sha256":"c8a15a92a1ddf5b0f6d21c4ff99a509b30798172d95fa54f772252188fd9ac62"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ","en":"Title"},"rationale":"Raison fin.","reference_ids":[],"question":"Question ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":""}]}]},"changelog_raw_sha256":"bb6ba7f77c98d1d97eaaceaa48e813702bd132a455a3341fc920714aa3ad09b8","changelog_sha256":"6bdd277c4bf67d90e951b5eef9ca28d277c2a2fea45b4957d9b41c006e75df50","review_raw_sha256":"ff205f865db619423e5c186d73bb371f898dbde18486ec36d0b801ac3e6576b7","review_sha256":"5300d7ec360e522a415724e59290d145fa8fe5813eb61d1f15a6e2932e12ce46"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ","en":"Title"},"rationale":"Raison fin.","reference_ids":[],"question":"Question ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":""}]}]},"changelog_raw_sha256":"31500a0b94fd692d596014cdb7b2913c6ce78412015cfd4523d2fc741ae3f7dd","changelog_sha256":"7a624877292e7e382e1abaabe55180d1989d38a69c5ca4c00375b4dc2774ee2b","review_raw_sha256":"c6df3510d2b245f07e15ff4376b62a09e27f42adadd16d82cdd6e959d8d35d3a","review_sha256":"c8f9520181bd090a557cb2d271055d9e300a89070fb0d6e5b6b1eddc5bc3776c"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ","en":"Title"},"rationale":"Raison fin.","reference_ids":[],"question":"Question ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":""}]}]},"changelog_raw_sha256":"4f3118d952f791f4a7cbe0d5ff4767f4794af17bdd3d7ae0b03cf8a7d88a1341","changelog_sha256":"5a93cbc0273ece6ef31fba7b1e6b86c83c7384c254593f427cb942bcfd4f10fe","review_raw_sha256":"e35d3ea5dc80e5ec95dabfd95505a20a7bd9790b561ed366c6bd43415c880dff","review_sha256":"7a8fff0cc05c0d397688eb44404ce08b42743bba101bdd109911cebf0e648d17"},{"probe":"[[ a ]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[ a ]]","en":"Title"},"rationale":"Raison [[ a ]] fin.","reference_ids":[],"question":"Question [[ a ]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[ a ]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[ a ]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[ a ]]"}]}]},"changelog_raw_sha256":"f1cbf1b19e96de5c63ac0fbc05252e2d91094bcdb8c1476b859618042329d151","changelog_sha256":"db80c0244c726cbfaf2393e9913a6ce15d22fb63cc223aec4314e3e1e9db27f2","review_raw_sha256":"1449e0c77d62ddcf50f0d8b8fa263021eef9e202952eb3acd2d49ed4aa920486","review_sha256":"e7a91cffc034ea538ee0a47cdb588a58c845bb385baace34317795b8afd6f130"},{"probe":"[[a]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[a]]","en":"Title"},"rationale":"Raison [[a]] fin.","reference_ids":[],"question":"Question [[a]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[a]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[a]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[a]]"}]}]},"changelog_raw_sha256":"4721fba3cbf00a00367025bfa1c29070a7e1939239d44876e9e375ea905b037f","changelog_sha256":"db80c0244c726cbfaf2393e9913a6ce15d22fb63cc223aec4314e3e1e9db27f2","review_raw_sha256":"1c2bebf99b108a99f62f7cf6484acec970a8ba586f4170c48d577a1c209bad2b","review_sha256":"e7a91cffc034ea538ee0a47cdb588a58c845bb385baace34317795b8afd6f130"},{"probe":"*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *","en":"Title"},"rationale":"Raison * fin.","reference_ids":[],"question":"Question * ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*"}]}]},"changelog_raw_sha256":"2a4d171b3c2092172adfeff892005d421fb1afa604ca7926f52d12dd5208bb2d","changelog_sha256":"a84644e09477bf50e413ebe1e8240ccc04657488381b093755d349a35e494843","review_raw_sha256":"c0e9b45b87137d27c6ac09eb4e9d537cfb706c9bbc46b7eba52c9e56c2679869","review_sha256":"8d14de8ebc877ef18c0d16c5d4fb606290f4257aae493c2a1c8df157e0552255"},{"probe":"*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *","en":"Title"},"rationale":"Raison * fin.","reference_ids":[],"question":"Question * ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*"}]}]},"changelog_raw_sha256":"a4c61e0774719b6285c398c3d09eb1cbf00fcfe572f7cb84e1cbdfd34e49f6c8","changelog_sha256":"a84644e09477bf50e413ebe1e8240ccc04657488381b093755d349a35e494843","review_raw_sha256":"f6d64b0b72877616084e6cd18224bbec1795ac06b04fa37557aa280dd9abc05d","review_sha256":"8d14de8ebc877ef18c0d16c5d4fb606290f4257aae493c2a1c8df157e0552255"},{"probe":"*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *","en":"Title"},"rationale":"Raison * fin.","reference_ids":[],"question":"Question * ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*"}]}]},"changelog_raw_sha256":"62905b6a70edfa3518f75a8d2ff7f4885e72e72259bd2cf55639a0eb5d45482b","changelog_sha256":"a84644e09477bf50e413ebe1e8240ccc04657488381b093755d349a35e494843","review_raw_sha256":"b2856c107a4cc5502268f3ae3a135e926f724519a14ffd556698d83b264edc33","review_sha256":"8d14de8ebc877ef18c0d16c5d4fb606290f4257aae493c2a1c8df157e0552255"},{"probe":"_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _","en":"Title"},"rationale":"Raison _ fin.","reference_ids":[],"question":"Question _ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_"}]}]},"changelog_raw_sha256":"8e9859620bc246104876acd60ec48263c3e0183ce6aa2c11bb795c025f274ad1","changelog_sha256":"fc3c663fed85e2057fb465a4bf75410e7b9e712405fa2152f425c33cd76c92e1","review_raw_sha256":"f8d820ccdd58aec2ec215c857f9b439bef0cc9423cde6c6b6a5e6d3f37749d3b","review_sha256":"31d1d02e0a226a7a23d5f9fa6ffd30d8dc389700f8084d37ecd7ca1c3529ee3a"},{"probe":"_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _","en":"Title"},"rationale":"Raison _ fin.","reference_ids":[],"question":"Question _ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_"}]}]},"changelog_raw_sha256":"60443ad8a1d7f5d2a00d69f1656ffbf6f1a65fd0e535c89d6d23f499b793d9f8","changelog_sha256":"fc3c663fed85e2057fb465a4bf75410e7b9e712405fa2152f425c33cd76c92e1","review_raw_sha256":"4aa3d82b0e0c07a48e416bcd5ee47fd5c9b588e9263bf6d422fde602c02ec8fe","review_sha256":"31d1d02e0a226a7a23d5f9fa6ffd30d8dc389700f8084d37ecd7ca1c3529ee3a"},{"probe":"é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é","en":"Title"},"rationale":"Raison é fin.","reference_ids":[],"question":"Question é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é"}]}]},"changelog_raw_sha256":"69f1b71e922e131b76d4a782d789e7d4ec9a3e846af9e043185177f281f9289c","changelog_sha256":"d899c1a014b1a8e9bd8a58196207da7c771d5db998ccd92f61757b3f57677cb9","review_raw_sha256":"715836eb2a2721d47e109c8c213349c2db5ef811f48457dd6582ed71056901e5","review_sha256":"cca11eebeb988707b9958faafda25d878fcb4c9c4450b4a6821a5721c2639987"},{"probe":"doi 10.1/x<0697:toih>2.0","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre doi 10.1/x<0697:toih>2.0","en":"Title"},"rationale":"Raison doi 10.1/x<0697:toih>2.0 fin.","reference_ids":[],"question":"Question doi 10.1/x<0697:toih>2.0 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation doi 10.1/x<0697:toih>2.0","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label doi 10.1/x<0697:toih>2.0"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"doi 10.1/x<0697:toih>2.0"}]}]},"changelog_raw_sha256":"2ff0d642de7b64b2abc0bed19d0be93a89ea1d0251c90dcdfb02e6367be8068a","changelog_sha256":"ace2f7c7fcc2b6806929d1c8562209dd83da69bf5f8ed48286599a3e55ac8d43","review_raw_sha256":"bc0447d8a460744b2589538e0b1bfe988f4fcb951970a88b758b7d547093ba5b","review_sha256":"98bfb8b9b64482d4ba9aa0be0aec6ede8f3ffa7c5c7d156a11f9598561ca8534"},{"probe":"中_中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中_中","en":"Title"},"rationale":"Raison 中_中 fin.","reference_ids":[],"question":"Question 中_中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中_中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中_中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中_中"}]}]},"changelog_raw_sha256":"2e9e7c51436c59934df089c8a84c8c5308eeb706c818b965d0cb92f0bd26f515","changelog_sha256":"f46b3ad030c3aa19a3524bf1b8b76011c4dd5a26acf750257d9a2cac01d7cccb","review_raw_sha256":"c70034096ade8212ed1aabfb03e54a59faaf676704919419885e4943957c62a2","review_sha256":"730b8317837cbc7f8f6f677a731b9a9986e16ef6877008472c795a3eef106e44"},{"probe":"ア_ア","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ア_ア","en":"Title"},"rationale":"Raison ア_ア fin.","reference_ids":[],"question":"Question ア_ア ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ア_ア","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ア_ア"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"ア_ア"}]}]},"changelog_raw_sha256":"e8ff235bd5b6cf1690061389920ed35f6b2c32847989e52ecd8e472d848a162c","changelog_sha256":"664967f6bc98e61dc9454a882ca6105814f193a8b7786200d76e224dbd080f17","review_raw_sha256":"162ea6bd0867ca46bf5cc50a5d6e5355bf5ca14c5d5038143ace5cff022eaea7","review_sha256":"e260146cd3c367d20523c753fae6f6817260efd151e677bd85940d2cb74f804a"},{"probe":"한_한","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 한_한","en":"Title"},"rationale":"Raison 한_한 fin.","reference_ids":[],"question":"Question 한_한 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 한_한","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 한_한"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"한_한"}]}]},"changelog_raw_sha256":"3c8a5a991e7d6aa8b28796b40cfe349fc4de679e5d9fce917d8c399db1215d31","changelog_sha256":"2793144cadf58105b6f2356f99924f13991ad446007342766638d69c627b3745","review_raw_sha256":"de5b0b61bc5e4735b2fba0b46809ee0392b4267faeabb06a024cb396caf986f5","review_sha256":"378545e156e9321e4523ea6ba89292e7bbf1350aa345e012107fd885889c5bad"},{"probe":"é_é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é_é","en":"Title"},"rationale":"Raison é_é fin.","reference_ids":[],"question":"Question é_é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é_é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é_é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é_é"}]}]},"changelog_raw_sha256":"24797154ddf15def078f2e2fc9bcaf3b3a0882e889d0cd6078f76b67f73eec16","changelog_sha256":"daf5c2651166c34777a250e02ff6046f31058bc32f842dd81e6e49991a8578c1","review_raw_sha256":"cf0d18b440b4f178746089e7858c13609f30ed9385c84cd3c4b4637b429a579e","review_sha256":"d2dbd447e65c0d155c5127b51e6516baf0475700900e95685bbeca21b538ba74"},{"probe":"[a]( https://x.org )","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a]( https://x.org )","en":"Title"},"rationale":"Raison [a]( https://x.org ) fin.","reference_ids":[],"question":"Question [a]( https://x.org ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a]( https://x.org )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a]( https://x.org )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a]( https://x.org )"}]}]},"changelog_raw_sha256":"7156e9e4ba6681fd3fe40b44c2cad663cd6c9b4c87b163849f3b0d68ab5963e3","changelog_sha256":"057df787024c22a7b4d1a2e1f89313db1719f6ad9f5c4109fd16de36af5a3001","review_raw_sha256":"65208d1122d70a45f9f95c6d9c72c65515cc553175814601a670a594f0ee53f6","review_sha256":"e5a7f0875a085ad57460334e3fc9760e80387f05ecbe9993eb544cac0a6b5d3c"},{"probe":"**a****b**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **a****b**","en":"Title"},"rationale":"Raison **a****b** fin.","reference_ids":[],"question":"Question **a****b** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **a****b**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **a****b**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**a****b**"}]}]},"changelog_raw_sha256":"e928bdcd415d3df9786ee050736b968357359c70086b04964c039ecfb5b4aa2b","changelog_sha256":"415b6c382696926e65b140b77ce4b3c3cc1a821e5c7666091641f4658e39d20d","review_raw_sha256":"5ded89e4fa4c4e96ad4abd0a7e18a1bebe0da0851bf1dcb74b68d303eb14e569","review_sha256":"5179c33ac2bb41ffd455b146407e09670730b88b11310a04fd08438453a939ab"},{"probe":"\\**a**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\**a**","en":"Title"},"rationale":"Raison \\**a** fin.","reference_ids":[],"question":"Question \\**a** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\**a**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\**a**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\**a**"}]}]},"changelog_raw_sha256":"9880cb6f9d113337bf50df06a9b0d2a1a885c2180e11ea4d97a164607f672760","changelog_sha256":"2110c9b8db2e980a795a76c9e7871fefcf52918c2e1975d0c3c5c0b46bde45e7","review_raw_sha256":"9e7522620678cb6ec877a5b0356a5c1d49e85c2eb03e5a0060e69e34f92c6ad3","review_sha256":"71030718764cae13fca2c7f4dbe0d2aa4309eb69fec10fc82eb428243da184c5"},{"probe":"x_**a**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x_**a**","en":"Title"},"rationale":"Raison x_**a** fin.","reference_ids":[],"question":"Question x_**a** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation x_**a**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x_**a**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x_**a**"}]}]},"changelog_raw_sha256":"7f636cbf2cf4af72c76cd5e449f65f517532378bf584df5d02b65f3635d3d54d","changelog_sha256":"661e27edc56c21abf4c6b3ca34a9d3a515b3cd0e6ffa21b922e165f7afae3522","review_raw_sha256":"deb8be2b0af760881a80e25bd44de21fd1dfb62ccdbc565be77ad6e8c516cce9","review_sha256":"26fde7f25d9b3b519d1b1aa7fd8441252b174286f59e786153416f0d02b54780"},{"probe":"**a**_x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **a**_x","en":"Title"},"rationale":"Raison **a**_x fin.","reference_ids":[],"question":"Question **a**_x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **a**_x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **a**_x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**a**_x"}]}]},"changelog_raw_sha256":"1157d06a36ac744b01ff6622b17fd85c26088726f252f610151e609969b77af8","changelog_sha256":"851505d7325e0dcf58a4811b35ee0547d32f5ec55a6dec43d715dc5e89b3a384","review_raw_sha256":"5347cbe23ffb616a488e0a45666da40f4d5ec1446085e47f9522fba2ae0a9883","review_sha256":"c01e9eb7e545978365901369d59ee85d15a28e2c50fc4a8871911fa22c48aaed"},{"probe":"** **","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ** **","en":"Title"},"rationale":"Raison ** ** fin.","reference_ids":[],"question":"Question ** ** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ** **","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ** **"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"** **"}]}]},"changelog_raw_sha256":"0f2f9310c524a386501551ecf9dc97260c616d889c6d00d678de012d18ffe88b","changelog_sha256":"a56db4d409c34a79e95a281fbb3ab6007db689af5d818f83daed533601037bcc","review_raw_sha256":"f8b5f816f34ff52b4de032ff9479a18e9a135cd753fee3bcacda43f5571f1592","review_sha256":"b5f4486cb048a640b17b344d25e65584bca53e34e7de817209ecda7e6fe9e921"},{"probe":"**Total**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **Total**","en":"Title"},"rationale":"Raison **Total** fin.","reference_ids":[],"question":"Question **Total** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **Total**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **Total**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**Total**"}]}]},"changelog_raw_sha256":"3693b6f65cc85cdc7922b7b3c8ab7970d4e0754462fd0d5228c44c559124c5e9","changelog_sha256":"f06cc7d746572e966ce3b82af084d28688b074e75efbba1fd52ed39307dfa7df","review_raw_sha256":"f5dcabf2480fb15c072e01a3ed5e8a9bab6c9c8ad6eafae2e7f596ae80c6cc9b","review_sha256":"f8e766f7179332a15f280730586c7ff17ea7669c774573b050f5795deb357e5d"},{"probe":"(**a**)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (**a**)","en":"Title"},"rationale":"Raison (**a**) fin.","reference_ids":[],"question":"Question (**a**) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (**a**)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (**a**)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(**a**)"}]}]},"changelog_raw_sha256":"80799cfc4ce6e86d9fa85b55c5a72e3d6661c491b894481fb3a37d5e7ef7592d","changelog_sha256":"2902ff297d9feabae7fa92f6ae894c0b74f086f459e8c0c9ef315fa7451f2f38","review_raw_sha256":"bb2f6dcf2a7fbd49618deaca744ac718cbb8dc477be0f02d87213a979807366c","review_sha256":"de4b06ff0dacb5b04be4d2009ecf938d15bcc3fa274b657996d9c70112f49099"},{"probe":"a **b** c","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a **b** c","en":"Title"},"rationale":"Raison a **b** c fin.","reference_ids":[],"question":"Question a **b** c ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a **b** c","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a **b** c"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a **b** c"}]}]},"changelog_raw_sha256":"a76ae1c6d17ac567471bcabe9aafb46d5b4025ced30a4ee98a6883ee9d4fe4f8","changelog_sha256":"744d5ac4b08a1ae34163603d6623cadccded004dc9f9f57fbb5b647c1b05a817","review_raw_sha256":"11e07d9c20608b16ddb0f30607f300f7900c92a1dd78d54c06116c46e382e685","review_sha256":"75d6380e0ca2af6378fba6269450f39c9b88971c4e84faca59ef99d41c46459f"},{"probe":"Voir_https://example.org/x","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Voir_https://example.org/x","en":"Title"},"rationale":"Raison Voir_https://example.org/x fin.","reference_ids":[],"question":"Question Voir_https://example.org/x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Voir_https://example.org/x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Voir_https://example.org/x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Voir_https://example.org/x"}]}]},"changelog_raw_sha256":"7360cf89028c483b965bfda63ea023b1124d50344de06603ee8d54b5d9cd3ec2","changelog_sha256":"c056506785856c45e53540ea88767df3948d2652b746706e4c929f2875066b50","review_raw_sha256":"ef6243967ec5143a68918cc9da0c9458c34c87fedbdb7ce4be1aa15cf47988dd","review_sha256":"fb250f696bca03a73ddf43ce3298d1d4e505342cc639c1a39dd5bb5437d9657c"},{"probe":"Voir_www.example.org","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Voir_www.example.org","en":"Title"},"rationale":"Raison Voir_www.example.org fin.","reference_ids":[],"question":"Question Voir_www.example.org ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Voir_www.example.org","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Voir_www.example.org"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Voir_www.example.org"}]}]},"changelog_raw_sha256":"9ce244eb5e99ccaaf07a71a301e78ff7b835b875cd97072222eec153c122c26f","changelog_sha256":"54acdd58481d6d7e6f1b28503b1c0865ed9a003238fb3261f70309575eea4773","review_raw_sha256":"792142fc101b42d088df7ee67903c44c684b34e6838e3279b11093a8a48005cb","review_sha256":"42a7b81b3ec076706afff6ecf0f811b1d73e0b3e6322c7b007d2de517580a558"},{"probe":"https://x.org/**a **","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://x.org/**a **","en":"Title"},"rationale":"Raison https://x.org/**a ** fin.","reference_ids":[],"question":"Question https://x.org/**a ** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://x.org/**a **","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://x.org/**a **"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://x.org/**a **"}]}]},"changelog_raw_sha256":"f0b61c5812ff9acee5c2fb1a3841b5a2f7f571923275f61b64f847bc5ee52abe","changelog_sha256":"07466858dcaa67dbb99920191a591bc84b5be4c1d5688e05049058eff5be431f","review_raw_sha256":"dcdd531974fc3a5aabfc6df07bb28bfa859bed86cf3c9517e3c3e173ecf83679","review_sha256":"eb7941a1b06fe13445ee5b3dba25b4cecb8565da8f892a5510b4ad1f921d46b6"},{"probe":"https://x.org/a_b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://x.org/a_b","en":"Title"},"rationale":"Raison https://x.org/a_b fin.","reference_ids":[],"question":"Question https://x.org/a_b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://x.org/a_b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://x.org/a_b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://x.org/a_b"}]}]},"changelog_raw_sha256":"75fab4339da2113fe5e017ebf73526fc8174dd955b1edccceed2468cb0ea4668","changelog_sha256":"125b31c1999527fbdf4fe5d56feaed015581eb27e44bbcc89fe4ce297b95f8cb","review_raw_sha256":"6c99083105c028c46079f8afd71060e0bbbcecf23fc6e526722e77768b96336d","review_sha256":"75b1e794a00a6487e0ca1c97b2b387ab80de230010df6f916c2c87fb280a953c"},{"probe":"Lien https://x.org/a_b fin","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Lien https://x.org/a_b fin","en":"Title"},"rationale":"Raison Lien https://x.org/a_b fin fin.","reference_ids":[],"question":"Question Lien https://x.org/a_b fin ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Lien https://x.org/a_b fin","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Lien https://x.org/a_b fin"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Lien https://x.org/a_b fin"}]}]},"changelog_raw_sha256":"49d668ab7af83bdf6a00439ad15d49daabab870741bea0a63b58a02eaf41f03b","changelog_sha256":"302db816682dba7e0bcb19a2673f4aabeb034cfed74143fea5d5ffbf2741b712","review_raw_sha256":"6dbbc2f92f69e935bcb22ba0259fff50175c1484ba9bd89786d39b7a5ad6ae84","review_sha256":"be9f67e72fd591563022dc006d71fcc3306adaec476887133bd7bf5e0ac82597"},{"probe":"a b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a b","en":"Title"},"rationale":"Raison a b fin.","reference_ids":[],"question":"Question a b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a b"}]}]},"changelog_raw_sha256":"43846cbc5afe4b657b97be64738cdbd1a74918b4b44392ed46f6a3055f7a08cf","changelog_sha256":"76500423aa9aa9cc9bbb9a645a4a7f002c921bed3903be1279478d3ecbe7f680","review_raw_sha256":"c6715f438ca4c6b19205f229e25eae1fdee7aab5a04c3b0dae5740eaa106da64","review_sha256":"8fe73e3ded935c8b10530c14bd651dc918314f770990bb104dc86bc6ab7f8de9"},{"probe":"a b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a b","en":"Title"},"rationale":"Raison a b fin.","reference_ids":[],"question":"Question a b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a b"}]}]},"changelog_raw_sha256":"f3de753e518c9df842552b41118fbbcac7e547d5cf12a8021bd19b6ec6b18c58","changelog_sha256":"4b4a6849d8d03cc3f5b35e4886d24800aa1c599d7aebc14b0dd97f62bd475ca6","review_raw_sha256":"a38e9fd83f04fc080944a22f0f1396e4707144c61f1d320c0fe6f0967245a7ad","review_sha256":"54f5ea0d0007d0ac062e53930538ceebc66bddbd68a616dbcc3c1bb30dd17414"},{"probe":"a b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a b","en":"Title"},"rationale":"Raison a b fin.","reference_ids":[],"question":"Question a b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a b"}]}]},"changelog_raw_sha256":"123bbc113bcbd75c367b000b4b9dec323794a6ff88ece9125098437d3979b4b3","changelog_sha256":"9e71ca23a7228f5271fb2de3b9433589e987f597c1b14df884ffcd020d799398","review_raw_sha256":"a095344fc9e81fd0896c91cec82f4bc74a030df7160bd32359e5630d43bb3a05","review_sha256":"d6c26ce4b26f123bb51bb15bbe4b703d499b55867a3aa4bc160a626537b731dc"},{"probe":"中文","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中文","en":"Title"},"rationale":"Raison 中文 fin.","reference_ids":[],"question":"Question 中文 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中文","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中文"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中文"}]}]},"changelog_raw_sha256":"3965b341024d2275071a9cbefbcb1ab22ab09e983201dd22ea6916f071c72b34","changelog_sha256":"0684d41e225df35fd076a45a76e70e8d40ad639ee8c91b6c78e21e73010ba2b9","review_raw_sha256":"479397ccabb9a2f47e89079d6ee03167ea81e28ce78350af7194260f4ad409ad","review_sha256":"5efcd29103b97cdb05d6fba3e74e0f3292f3acf21d775dd2bcc22b1823db5890"},{"probe":"مرحبا","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre مرحبا","en":"Title"},"rationale":"Raison مرحبا fin.","reference_ids":[],"question":"Question مرحبا ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation مرحبا","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label مرحبا"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"مرحبا"}]}]},"changelog_raw_sha256":"c52823913ed55d3d093783ee969b26ef77b5b34ec5c728d7c55ed3a756ee55cc","changelog_sha256":"602a7fe21c082cb6bb24882b5d66f5d0888b9feb1ff6d83a85cbd05e72b67e09","review_raw_sha256":"26ee08666e58898de160a5a258972ffb9aedb58cae9ecdc6b3e1554f4513ac78","review_sha256":"a12ff3f381f19c4e4c0958d8a2cb2ef6820df189763ac76736d4f2d9973b39c3"},{"probe":"é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é","en":"Title"},"rationale":"Raison é fin.","reference_ids":[],"question":"Question é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é"}]}]},"changelog_raw_sha256":"e06b6a670e2f8d62c93457147516bee1191bdd4e491b03a49f0c9d8bbcd83cbb","changelog_sha256":"edbc60657ebceec9d1687b70e14ff6a52d2ad46db471bff23c65677fb334f807","review_raw_sha256":"12694d93b81d7a77a4f0b012decfc5cfb56c103322d8a5754d809994bb02eb17","review_sha256":"1939aa7211edee6b1674a1777d44685dd747b9cf3416086d3b2c1026c005a8ac"},{"probe":"Mesure a_b `c_`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Mesure a_b `c_`","en":"Title"},"rationale":"Raison Mesure a_b `c_` fin.","reference_ids":[],"question":"Question Mesure a_b `c_` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Mesure a_b `c_`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Mesure a_b `c_`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Mesure a_b `c_`"}]}]},"changelog_raw_sha256":"eb02afa3374017e51dbbe7aa17f65a1eb0e89cce5a5d1158d5435f76f6a2d460","changelog_sha256":"ded0885b41d99193bfc1a7c8e40822d1a342c3bc3ede5286ded136a4492396a7","review_raw_sha256":"b39a9b87a9407e4b4d4e45869f6538b3dd9cfad504b66c3aa71176436aa0b133","review_sha256":"445be94ba56e9a170edfddae8a519ccde62cf665ce933cc8bf359b9bfff3c598"},{"probe":"Champ snake_case, voir x_y fin","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Champ snake_case, voir x_y fin","en":"Title"},"rationale":"Raison Champ snake_case, voir x_y fin fin.","reference_ids":[],"question":"Question Champ snake_case, voir x_y fin ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Champ snake_case, voir x_y fin","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Champ snake_case, voir x_y fin"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Champ snake_case, voir x_y fin"}]}]},"changelog_raw_sha256":"164e339b8315922a42b223c9529d3303bb6162c2a43cadb1e91a5e09a5331350","changelog_sha256":"33cacf199b3b3437301927e5d1472e4e80014e27b34c260d3d7cba91b2cbb927","review_raw_sha256":"527fc63e7112cc2b086fa3236eadae3318dc39bd0aeb34246e14c6546de22913","review_sha256":"d7b1483fcf681a7a1b827d697250ad1c49546f6ed02395b43e6ad14eec550084"},{"probe":"to_do","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre to_do","en":"Title"},"rationale":"Raison to_do fin.","reference_ids":[],"question":"Question to_do ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation to_do","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label to_do"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"to_do"}]}]},"changelog_raw_sha256":"8655d2a30f190b375671ecb04816ed77b6e84bbb2ea4475843818410098ad507","changelog_sha256":"0522c43e7cd5f300c8bd87f45ce8ccdee03d95c19b04fde932b0077202700bb7","review_raw_sha256":"ae377f686dda3589b5f5c98655b70e74bb38082652252cfbb444e030079ec2fd","review_sha256":"8c700d22472301fd32f7ea3c3e8658f133978a190f1d6336621e788e7b2b3753"},{"probe":"voir [a `](b)` c","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre voir [a `](b)` c","en":"Title"},"rationale":"Raison voir [a `](b)` c fin.","reference_ids":[],"question":"Question voir [a `](b)` c ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation voir [a `](b)` c","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label voir [a `](b)` c"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"voir [a `](b)` c"}]}]},"changelog_raw_sha256":"d69ba2d21e8d12e3a4d73a2694efed98d3b032c13a539426ff4b3c68d0aa484a","changelog_sha256":"56df6c8a3712eed61982bb4d84ce01683d19f6b0b894fcbe1538b9881b20ac97","review_raw_sha256":"345cbf222dc16f707691acdf42938b247c83f9356a24d1be8b63a9adf8481626","review_sha256":"aaa0d516f942afbb06b2aee43eefd5acfa5eb0fa7a5b56549c689bdc97ea4cee"},{"probe":"voir https://x.org/` citation","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre > citation","en":"Title"},"rationale":"Raison > citation fin.","reference_ids":[],"question":"Question > citation ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation > citation","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label > citation"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"> citation"}]}]},"changelog_raw_sha256":"0827e2916084a1c73f6864c573e9e24b07f2f47d94a21d44c78644f32fca1b4f","changelog_sha256":"7c9a28ddb61ebc67d3c3ef80eb136f67ee78232d735b110f08347897e76bc904","review_raw_sha256":"1daba271c2b31bfb6b0b0f6a8265c0f07aab5b1776b746ff468d991ce2783b70","review_sha256":"f092de8e2587c8d98a1705e3add47c6dac0dce49ee12ec0df48ab8039a793efd"},{"probe":"Carmalt 2013 (≠ « palpation »), 3 %, 40 °C","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre Carmalt 2013 (≠ « palpation »), 3 %, 40 °C","en":"Title"},"rationale":"Raison Carmalt 2013 (≠ « palpation »), 3 %, 40 °C fin.","reference_ids":[],"question":"Question Carmalt 2013 (≠ « palpation »), 3 %, 40 °C ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation Carmalt 2013 (≠ « palpation »), 3 %, 40 °C","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label Carmalt 2013 (≠ « palpation »), 3 %, 40 °C"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"Carmalt 2013 (≠ « palpation »), 3 %, 40 °C"}]}]},"changelog_raw_sha256":"712876f603554064a3f6b2d8d17f30fa102706a9a8ce75a66739d18994298a8b","changelog_sha256":"46d273ab90d086fc13ede9a943abc48764fbdd3b41ee59d76176196e830f6685","review_raw_sha256":"fcb0732b6a5d0260a9c1712e6749f93e31ad5759bd1880ab6196b44c379b8aa3","review_sha256":"7d14565b082a026850d627a252efd237d384ea4784838f4784878b2babaf1c1d"},{"probe":"a = b; c ? d : e","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a = b; c ? d : e","en":"Title"},"rationale":"Raison a = b; c ? d : e fin.","reference_ids":[],"question":"Question a = b; c ? d : e ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a = b; c ? d : e","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a = b; c ? d : e"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a = b; c ? d : e"}]}]},"changelog_raw_sha256":"cc602e0b231c8d9a4b856459b237b9c0d601ff23085eda0c4ac8b632453333bf","changelog_sha256":"a4c4f02391a274a770c4642e3e46edc7fe661799143293116a57a1154086c68f","review_raw_sha256":"c5c4a3b0f5a92e2a239745368eb540a34546ec0ea7063014f704fefafd7a2562","review_sha256":"11744135836380b1eb23e883b9ebe37d5eacb2699c84c67f102de2d9ed10ee25"},{"probe":"{\"fr\":\"x\"}","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre {\"fr\":\"x\"}","en":"Title"},"rationale":"Raison {\"fr\":\"x\"} fin.","reference_ids":[],"question":"Question {\"fr\":\"x\"} ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation {\"fr\":\"x\"}","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label {\"fr\":\"x\"}"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"{\"fr\":\"x\"}"}]}]},"changelog_raw_sha256":"1508b92ce55c31cc003a1fced8c02d83b5b313eb7d6d0eb19c98a9eea4e692f6","changelog_sha256":"d1bd816f0bde81819bea3684818925787c44f491045d125ed2f90f8c31163040","review_raw_sha256":"4c9f09d93e4b05998151a75344fdadf68d91310a0ef244daef3272f9956d6490","review_sha256":"0a051fb46bcdc2b47835e0272fc4758edc6a0347a75331a21c6dfea1c6f2ce73"},{"probe":"é ü ß ø Ω 中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é ü ß ø Ω 中","en":"Title"},"rationale":"Raison é ü ß ø Ω 中 fin.","reference_ids":[],"question":"Question é ü ß ø Ω 中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é ü ß ø Ω 中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é ü ß ø Ω 中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é ü ß ø Ω 中"}]}]},"changelog_raw_sha256":"10c523582c8c3c61bcf1c165389bca7be73f496c90fdaac442d2ffab69adf355","changelog_sha256":"2e7652b696237e30386cd8fdea276bbc32d3793e216d4636c1ce4393afacbcb1","review_raw_sha256":"e55f5c4b90d94a18f60e453d98aa1057eb591973887f34b035a641f6da9330b7","review_sha256":"1ed89697576072380bd2bb7e7f9d912ab9c0db5ba86e7afed31e5e3a2c04be32"},{"probe":"中[[中[[中&#| ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中[[中[[中&#| ","en":"Title"},"rationale":"Raison 中[[中[[中&#| fin.","reference_ids":[],"question":"Question 中[[中[[中&#| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中[[中[[中&#| ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中[[中[[中&#| "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中[[中[[中&#| "}]}]},"changelog_raw_sha256":"62384c2d8d5a3dbb44d875b4076f5e2e881d69d1a4761ffdba81addbb1d7dc53","changelog_sha256":"e58609895f044360c94bfd8c81129321a1810a10c1dd6cee17bb92c25dca3b59","review_raw_sha256":"c19f17bbb5ea92266c248d13a1adfffec13a6e7b515c8ccd1b614870506a3e15","review_sha256":"8a777c32a64e8ce9d54439c150fa200280d60356e6df6e9b9d70dbe42d6ede5b"},{"probe":"];<[&https://(中&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ];<[&https://(中&","en":"Title"},"rationale":"Raison ];<[&https://(中& fin.","reference_ids":[],"question":"Question ];<[&https://(中& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ];<[&https://(中&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ];<[&https://(中&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"];<[&https://(中&"}]}]},"changelog_raw_sha256":"34a7db60e380d5614382df1bdfbd625aaaf56c9fced7a04f3796e2cf71892fcd","changelog_sha256":"a6067addd16403e72afb3878b1034f7e14ea14e2e1713e52d28b8f3861fcab98","review_raw_sha256":"725eaf40ea4f2ca88a6179d51345b318de0c46a961a5be333c1f1cc03224732b","review_sha256":"b19d8b0a947712e016858666f6bb0e70fc63650c052991855255b8c55a5c76d7"},{"probe":"/*]*#*|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /*]*#*|","en":"Title"},"rationale":"Raison /*]*#*| fin.","reference_ids":[],"question":"Question /*]*#*| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /*]*#*|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /*]*#*|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/*]*#*|"}]}]},"changelog_raw_sha256":"667623ac32a6f86cc1d0b10c2e9d6a9044ea9cceadd170d8d0d45d3f68ac39c3","changelog_sha256":"144fcd171263ed2031c295760db70a06ce53fb7fb75bbffa55bc260906d8a709","review_raw_sha256":"c946ff37cc5e688b1dcaf481f8802e8462cc1e06435a520ea3687d41b46e33b4","review_sha256":"2060cf7d7a02dce6ab3d6721a899278aa65efa5bd86fb5628789406acf2701e9"},{"probe":"[b<&\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [b<&\n","en":"Title"},"rationale":"Raison [b<&\n fin.","reference_ids":[],"question":"Question [b<&\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [b<&\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [b<&\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[b<&\n"}]}]},"changelog_raw_sha256":"135b3f1466ed4ece72a500fa5a32cb474b8cf6d0070bca6fb49b6c6744309a38","changelog_sha256":"be0baa7788c20a29013a564dd010e951cfa9ce4075da2ebc1863065e8d9e13ce","review_raw_sha256":"f6e0f8ecac0d2402e6fd2cc8a22ca6ea22bb87e501226c000ba535f994c65138","review_sha256":"0da9d1ec4a4ed2d25e056727592252a595cd43f54ab636e9c777d3fd8883ff90"},{"probe":"/]]/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /]]/","en":"Title"},"rationale":"Raison /]]/ fin.","reference_ids":[],"question":"Question /]]/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /]]/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /]]/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/]]/"}]}]},"changelog_raw_sha256":"d6c78491772519a01823dc29b68ae65046f4d723f2e9f705e63bfab6e68b914e","changelog_sha256":"01f461ed123d2f466d66d4d24840cc13542f76ce447f3df150f75253c7ab0244","review_raw_sha256":"ba6d563acf60f777e9193566382838b6770c6988a73159ff16562a337ae9309f","review_sha256":"5badf41819f9878cb917cb6563c53a9e7d563b54186f993d3d3af86dc0f4d1f4"},{"probe":" _# .~&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _# .~&","en":"Title"},"rationale":"Raison _# .~& fin.","reference_ids":[],"question":"Question _# .~& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _# .~&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _# .~&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" _# .~&"}]}]},"changelog_raw_sha256":"1e7d2b97ee9ed6f79159562f64409ed8701e3773b12173c0e2cb83a85ee00bb6","changelog_sha256":"c9ffef00110f58a01c70e75b12e048071b5c11da6cf931bccadfc30f945303f3","review_raw_sha256":"33839422a9e69a7034d437609d012252a7bfcd9e928e7b2a8a1f7ecedb1495ca","review_sha256":"510793156cc018e408aeda373af24f238edf9435d582611226ad68d659323da1"},{"probe":"&#~]`中]]中:`[/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#~]`中]]中:`[/","en":"Title"},"rationale":"Raison &#~]`中]]中:`[/ fin.","reference_ids":[],"question":"Question &#~]`中]]中:`[/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#~]`中]]中:`[/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#~]`中]]中:`[/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#~]`中]]中:`[/"}]}]},"changelog_raw_sha256":"082cde6dc6ea17710a46f4243e0f5a3a2347aa65c63103dd391b827931ae8110","changelog_sha256":"92f2fe60c73fd76fb5307967287e9aff9f6aa13898b375d03e2b53dec16fc10f","review_raw_sha256":"afe7b1268318e2a581b384f9c29818358564044e7c9b54c774a7a95f0f316146","review_sha256":"510c663537d874715b183c3ee272b38316b5758e3583572ed857ace852081215"},{"probe":"!&# >/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !&# >/","en":"Title"},"rationale":"Raison !&# >/ fin.","reference_ids":[],"question":"Question !&# >/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !&# >/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !&# >/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!&# >/"}]}]},"changelog_raw_sha256":"5645ec9cfa7da79e3c5bc7c793853ab2a13e78140e9b66448dc7f8790d3cde26","changelog_sha256":"6bfa5e2ac686cb104b287fe2e080f2ebdf195bbe8ed7df14910493116677b1a5","review_raw_sha256":"81b889cf929e272a3fa0c2947c24787a4fe333b1c6ba04d755e0270a516ada7f","review_sha256":"1670b2d4bcbe99b5069d45d1efd661e28ed6822bc82218b6eabc514070641736"},{"probe":"\n中中!![ \\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n中中!![ \\","en":"Title"},"rationale":"Raison \n中中!![ \\ fin.","reference_ids":[],"question":"Question \n中中!![ \\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n中中!![ \\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n中中!![ \\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n中中!![ \\"}]}]},"changelog_raw_sha256":"c7318dc539acfb946b39d0617af3b708cabd386f6bfe82e7ad012ab3fe4c5854","changelog_sha256":"145b18b86a3a4b5232b26f71cd5082db8674119b46a625e321f7ab822f525d16","review_raw_sha256":"5508dc4008d59f3ecd3e6c88395a30770f21be7e166e132011c8c0107c88097a","review_sha256":"0d3029ad3c9478cb5ed93847a5f48bb336de5750986bee67560e46de83fc8b3e"},{"probe":"`< */& ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `< */& ","en":"Title"},"rationale":"Raison `< */&  fin.","reference_ids":[],"question":"Question `< */&  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `< */& ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `< */& "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`< */& "}]}]},"changelog_raw_sha256":"679fb34a1224e76e9b087f834b8901ecb68cd2f6b550e428976dd5980ecc0a3f","changelog_sha256":"11337c0e6f3a3870e74db22768f146e5159be8741e33974cc3cd71ae5c85f3b2","review_raw_sha256":"24efb73aee59ee010c38e54ce2bea227aff058c7c5e9f86b4525bb6cc8b460b7","review_sha256":"d8db282a7b57ce93fee6b5fa0409a9ea06cab73be1691666d757e7cf8c9ed3e1"},{"probe":"[[ [:bhttps://*[[![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[ [:bhttps://*[[![","en":"Title"},"rationale":"Raison [[ [:bhttps://*[[![ fin.","reference_ids":[],"question":"Question [[ [:bhttps://*[[![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[ [:bhttps://*[[![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[ [:bhttps://*[[!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[ [:bhttps://*[[!["}]}]},"changelog_raw_sha256":"dac4441571ccc800bc833b2b1087860f26765c97dc8b4960b551459f55d9fc8f","changelog_sha256":"6468bf93782dbe4f163630ae85c6e54549b258b4ebe2a9b112761d81b454ec7c","review_raw_sha256":"90665cbd10f9d5671d8dede558c7a45ded6f3a46c89970b6a15dd15ab469e891","review_sha256":"887d4a19e868c7c93508820de013633669c329dbdd48f072328be25192511015"},{"probe":"<:.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <:.","en":"Title"},"rationale":"Raison <:. fin.","reference_ids":[],"question":"Question <:. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <:.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <:."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<:."}]}]},"changelog_raw_sha256":"e5acf0f7835bd6959968c68c4e38f0122b9b4e7a0b86474a00f1538cb52a510f","changelog_sha256":"70b9cb7c7283f23d433daf29fbe36e28d8c82b9dcdf32fea2f16a909c295cc85","review_raw_sha256":"f4c89d06dc34e69455dda793128d1a27316f497a464234d0b8dc15278da100cb","review_sha256":"d0eb2d5ac4eb83b9bc6e944004538366277556e8721ae5d0d1f3f9495d02f9c0"},{"probe":"=*_=https://\n|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =*_=https://\n|","en":"Title"},"rationale":"Raison =*_=https://\n| fin.","reference_ids":[],"question":"Question =*_=https://\n| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =*_=https://\n|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =*_=https://\n|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=*_=https://\n|"}]}]},"changelog_raw_sha256":"a9eaab6c32ae831eeed34afa1e1552c4827e267ee46f019c0920de536a9f07df","changelog_sha256":"1444742fef6ccf355fdb15313a3840b599b2d697e9eab63a6ff1cd1db3458239","review_raw_sha256":"4ea68c4eb864470ddeb8d61a5b3c6d3a511ecbbf5669617d96167eb78e0b70bc","review_sha256":"7fb96c7be340d3b98142f2daffea418386acf061b7d4aaf2493e021c8fd5f617"},{"probe":"&]**\n;([[!!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &]**\n;([[!!","en":"Title"},"rationale":"Raison &]**\n;([[!! fin.","reference_ids":[],"question":"Question &]**\n;([[!! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &]**\n;([[!!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &]**\n;([[!!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&]**\n;([[!!"}]}]},"changelog_raw_sha256":"a0acff9dff252a8594d237c40e4296b7ada5e38236d18d6ea977aa93ed86d251","changelog_sha256":"a4c7f3fe3fb381ddd5dd9ed7bf6cd671b6109be1920d70ff38c1078c95fbf641","review_raw_sha256":"1a14742c77613309a77cd80e1e73c6345716ef4e58c9ec3e877900242904438e","review_sha256":"9d8e8d4b5487dd660049223eb4db906a45943807c39d6380fdf75d06568c24c3"},{"probe":"é<~<;\\:","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é<~<;\\:","en":"Title"},"rationale":"Raison é<~<;\\: fin.","reference_ids":[],"question":"Question é<~<;\\: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é<~<;\\:","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é<~<;\\:"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é<~<;\\:"}]}]},"changelog_raw_sha256":"efd9f686181815d9e24aff27e27365b18b57aef501458fa7d3f5242c1d2ace5c","changelog_sha256":"47da08c86addd70ac958989b88271ed6fa9899e6aa7e876729dc9016ab3327a4","review_raw_sha256":"6723f902a80655d659e15dd1edfe0363be97b1015b253386278f0f1040193a49","review_sha256":"d13eda9239be85b17f6a846016cd58b2991b8ee5c2c1d7c3b0bd9f84a3143b16"},{"probe":"\"\"((!a![b:>:","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"\"((!a![b:>:","en":"Title"},"rationale":"Raison \"\"((!a![b:>: fin.","reference_ids":[],"question":"Question \"\"((!a![b:>: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"\"((!a![b:>:","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"\"((!a![b:>:"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"\"((!a![b:>:"}]}]},"changelog_raw_sha256":"c1f5269e4b402f3493ce127496f86a321151d96fa137333e301368f70b756552","changelog_sha256":"f48aa5a59d9ff13cf9e5a8846c7918d81d43cd9eb3c39a49e9d584ca37375c2f","review_raw_sha256":"7bcfd5f617e337920fa1d071b696113c8c9548f501cf0b091bc4a6209294034f","review_sha256":"115b56843372f183fa7f491b92de8d0b66369f20ed3a7dfc0c24c43ce6d9eea4"},{"probe":"b|&_[[)#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b|&_[[)#","en":"Title"},"rationale":"Raison b|&_[[)# fin.","reference_ids":[],"question":"Question b|&_[[)# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b|&_[[)#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b|&_[[)#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b|&_[[)#"}]}]},"changelog_raw_sha256":"667e2fb7f264543ed8213f73d0bfe33eee3c9fdd87af221f0dbab13fca2b3656","changelog_sha256":"2d4d21208e5c9244ad3ef7fe1e76e0f5666ed63ecc9fed6ffc1acd16eca196bf","review_raw_sha256":"4b0291362ec3da0b439944291bf671deae1526bb6899aacea4b33a65073d44ff","review_sha256":"55012620bac45e11c01dda9d02b90ea8f7767751a0c6bc7971db01264e314754"},{"probe":"&https://>[aa]&é` ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &https://>[aa]&é` ","en":"Title"},"rationale":"Raison &https://>[aa]&é`  fin.","reference_ids":[],"question":"Question &https://>[aa]&é`  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &https://>[aa]&é` ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &https://>[aa]&é` "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&https://>[aa]&é` "}]}]},"changelog_raw_sha256":"ded4cf755bc1dcf1e49f42dffe93c523468d12ced78e9d915bd232b86de32799","changelog_sha256":"5e7d4f2761fbddf43142420c7fa2bc035765d380de67cae65ac41a528155283d","review_raw_sha256":"de03574f003d567a950a92e574e7774e35645b0e87bcdd0e9bfd1f72d6398c32","review_sha256":"6bfe307d3f9259e67e2f5f08335ec6d6aaa70605043c33100bbbe32ef6d1b4f1"},{"probe":"&中]]>&#]~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &中]]>&#]~","en":"Title"},"rationale":"Raison &中]]>&#]~ fin.","reference_ids":[],"question":"Question &中]]>&#]~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &中]]>&#]~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &中]]>&#]~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&中]]>&#]~"}]}]},"changelog_raw_sha256":"e99c78887fba9aaf8da7354c2f1b44d50921b5938333a9c9451675e351b8631a","changelog_sha256":"9b53b24333d305806c4ed0f369a26cd9d4d7ade5d2f36e48b8ae2111c5b97d15","review_raw_sha256":"8f04cafe4b17f3552b473455385ae899fdb5576837b8f6051de8ffe844af0299","review_sha256":"0f2f1c09f3c5033df18b7b65f64faad66408063214fee8e84b007465185929eb"},{"probe":"\\< ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\< ","en":"Title"},"rationale":"Raison \\< fin.","reference_ids":[],"question":"Question \\< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\< ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\< "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\< "}]}]},"changelog_raw_sha256":"fe62ec8ec1f2ed27d0e469c1d1e1826aa611f4f308e333dbfe7032bbf72f8e9a","changelog_sha256":"201fda12c83bd472bb6ff3154f346b41b74651021dda2a37db493707452453d4","review_raw_sha256":"a62354026c0fc40afddc578f6995db135339385b1c69195249db8cb32e7d52a9","review_sha256":"48991af7a4d484ed508bf7c42f2167e16bb24a903b8831db0695717283d43ab0"},{"probe":"中https://\\.<`**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中https://\\.<`**","en":"Title"},"rationale":"Raison 中https://\\.<`** fin.","reference_ids":[],"question":"Question 中https://\\.<`** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中https://\\.<`**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中https://\\.<`**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中https://\\.<`**"}]}]},"changelog_raw_sha256":"3920c8bdf6b8fc27d826c9779ff88acee9a6922d6c4824690d045c603f9d6a9a","changelog_sha256":"3756b9270a093a4e97a9e2dcbc4a1803763eb5b5805d9abd8752190148fd3e5b","review_raw_sha256":"e8456ab3b9af5799f999acaae171a22f151fd88ed2e4174e2b8d977efe13c72e","review_sha256":"6237a8ae35d15bd438ec208365d3a07bbfcb8208198c9702c27050939a3fb726"},{"probe":"&]b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &]b","en":"Title"},"rationale":"Raison &]b fin.","reference_ids":[],"question":"Question &]b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &]b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &]b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&]b"}]}]},"changelog_raw_sha256":"4200c87a5f6883ef22ab44340d4860a62f93efcbb000283c3c956d535cb17ea4","changelog_sha256":"be094394a8f6a8ca87df8dc8bd8bd72fd099e9a83964f2b404d3ffd451cbaf88","review_raw_sha256":"b2e5af22a0f3e6e9d3e5048667e3e96f5394f993a1bd11166d07aa4b8035505e","review_sha256":"bf8daef9a8726bb70497c75c4f3f75e3a9911d8bf85f36c761f65a7a858abb18"},{"probe":"https:// <.)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https:// <.)","en":"Title"},"rationale":"Raison https:// <.) fin.","reference_ids":[],"question":"Question https:// <.) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https:// <.)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https:// <.)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https:// <.)"}]}]},"changelog_raw_sha256":"2a4977d99db23f27a00a6a51d8c175bfa847bbf8a2644e582511f2231facc44d","changelog_sha256":"65a3a58a62068208985aeb1d57d2801f876fe8aa77da086584751b107e3ccba3","review_raw_sha256":"20621f2a83c2b69be1fcdf7cac1e64735f0ef5f191f86da6f53bb291b9afd78d","review_sha256":"501d47e8517af87a3d94e110f096ab9a4ad57040d7ce42b4eef7bddaaa52b51d"},{"probe":"* *\\\"&a`<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre * *\\\"&a`<","en":"Title"},"rationale":"Raison * *\\\"&a`< fin.","reference_ids":[],"question":"Question * *\\\"&a`< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation * *\\\"&a`<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label * *\\\"&a`<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"* *\\\"&a`<"}]}]},"changelog_raw_sha256":"67cdbe013f170246132951316f86c0218d80c971bf0931aa4970a4b6f65bdf9b","changelog_sha256":"41e19e40bb99655a5cd141225232fb51314f0ce8cfe64825e278969c1170a672","review_raw_sha256":"b9c09f54483a8079c99c7e373764311447dc86dbdbed44e9bf11864c6f5b287b","review_sha256":"e4922297684b6d49181da93264c3b92ca6a46fe05ff3757b1ef5cc7049c0326d"},{"probe":". =b&#]]\n&**\\\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre . =b&#]]\n&**\\\\","en":"Title"},"rationale":"Raison . =b&#]]\n&**\\\\ fin.","reference_ids":[],"question":"Question . =b&#]]\n&**\\\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation . =b&#]]\n&**\\\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label . =b&#]]\n&**\\\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":". =b&#]]\n&**\\\\"}]}]},"changelog_raw_sha256":"adf2696ab7b5cfa99498fbbeca2045b9b1702abeb15aac72767708651ad1c2a6","changelog_sha256":"1804a66dee53ffda56f5a6c4da0dd92bd82485eb14d87b6a1e80889bd1365eb3","review_raw_sha256":"63ff17458436cdb4bc324fa4b86df4fcf71227319ad19eebec201090b041e16d","review_sha256":"7305c669932e11d87fe699ce4c052866f2190593156bc949e6a04bfbdd601d02"},{"probe":"<.&**[(!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <.&**[(!","en":"Title"},"rationale":"Raison <.&**[(! fin.","reference_ids":[],"question":"Question <.&**[(! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <.&**[(!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <.&**[(!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<.&**[(!"}]}]},"changelog_raw_sha256":"eaf314bcc3da992584bda2e3a3d76d34e706de346867d2d9be9d46e315bad8e8","changelog_sha256":"26c9363a3d7e13f33ca409843dfd5c55563f1d3f5bf3e0c1ad9883b79e0e8e6a","review_raw_sha256":"2ca6a5d4ab736b47dc93b26f41096fb0c5adeb4c041d2b11a9e05a5882b4788e","review_sha256":"7d1202fb72d86e4fb2c3b2c8cd69dbdffc24e7f32c08e81c7f2f95b50498c1ca"},{"probe":"\"a\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~/**www. ~>a\n","en":"Title"},"rationale":"Raison ~/**www. ~>a\n fin.","reference_ids":[],"question":"Question ~/**www. ~>a\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~/**www. ~>a\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~/**www. ~>a\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~/**www. ~>a\n"}]}]},"changelog_raw_sha256":"19d0f9f969986c13030c29f2464a2f8b86b2cb17ceac66d5d4d4c69de6019174","changelog_sha256":"9d89b6e53bacf9bca506e21712ed2932979479c85dba02f90a1c39f4e4ec3b2a","review_raw_sha256":"dc51ae60af10ef507989dbe604dbc90e9236a40cd8b31df00967454bccd95ae7","review_sha256":"5f307228f1cfba0e72b07dfe3958d6509360e4e87d5ad2069e8bde2556ac85b0"},{"probe":"<`!/https://_***<)https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b>https://_***<)https://","en":"Title"},"rationale":"Raison b>https://_***<)https:// fin.","reference_ids":[],"question":"Question b>https://_***<)https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b>https://_***<)https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b>https://_***<)https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b>https://_***<)https://"}]}]},"changelog_raw_sha256":"fa06ae527355286dca0fd38d5c82657f13a00b4b44f121ebc7bbb6c59b5aa1b6","changelog_sha256":"d593296df108bd853e94c009075fd5b054dc5e51e9bdb6b279247e453ed2acca","review_raw_sha256":"d13aed7668557be2a9304d0af53bf59bfca804fcdf92edb6619c5f83081288c2","review_sha256":"e4d0d1c5ac66fb53879bf88a34765dae8b99d261a63bdebe239500b048db7c4c"},{"probe":"[[\\b=<www../~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[\\b=<www../~","en":"Title"},"rationale":"Raison [[\\b=<www../~ fin.","reference_ids":[],"question":"Question [[\\b=<www../~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[\\b=<www../~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[\\b=<www../~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[\\b=<www../~"}]}]},"changelog_raw_sha256":"4aaf63d4a59eb0cbebef1a188a4d7708dfd2da5bc75a199637b62f86d39a6a28","changelog_sha256":"ef49833a1afe61975d8e8976720c77508bc471615d6edee6071b6a8774e146c9","review_raw_sha256":"e899360f7ccf10c2b4c286c157f86c0c2648c113aa62701e82c0f2ba4cc65696","review_sha256":"bffb452e30a46cc2b004d66a55d72d73fd6ab8ccc6c2e5e412e18ec460dc1f29"},{"probe":">)= ![https://]]#\"!(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >)= ![https://]]#\"!(","en":"Title"},"rationale":"Raison >)= ![https://]]#\"!( fin.","reference_ids":[],"question":"Question >)= ![https://]]#\"!( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >)= ![https://]]#\"!(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >)= ![https://]]#\"!("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">)= ![https://]]#\"!("}]}]},"changelog_raw_sha256":"eb7902936e2e9d02bab33c7407296c26640e8db70fc546c23a6d06ce630fb295","changelog_sha256":"e36b5b22dcf21608dcd7a71ce0970b3ad8581afebffda8b4b2fbf685de1f9f30","review_raw_sha256":"e9b51f26740e49f55720219a19414ecb5b5fd9b6de282741e29b01554091be6e","review_sha256":"9b102de7477fba06f091c0eca0602cebe914295cdc257195a9ad41ca7f36977a"},{"probe":"https://]&#www.中/]]_#[[=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://]&#www.中/]]_#[[=","en":"Title"},"rationale":"Raison https://]&#www.中/]]_#[[= fin.","reference_ids":[],"question":"Question https://]&#www.中/]]_#[[= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://]&#www.中/]]_#[[=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://]&#www.中/]]_#[[="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://]&#www.中/]]_#[[="}]}]},"changelog_raw_sha256":"507e55b87e2aeaa53265a551972d4756f1a18525af11269d85a65eeaa7564857","changelog_sha256":"7b5fa46890a625061abba1ffbce578556aa6b1f8c3cedd10d1d3edceacd56caf","review_raw_sha256":"035105f7170182ef7707ba2ac90fa748411e4939811c9e805cb332615daca267","review_sha256":"2f96b808aba433cb4ea0c9105cdba536c29858914c9079492cf765740addc569"},{"probe":"~a ![[\\![[\"(&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~a ![[\\![[\"(&#","en":"Title"},"rationale":"Raison ~a ![[\\![[\"(&# fin.","reference_ids":[],"question":"Question ~a ![[\\![[\"(&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~a ![[\\![[\"(&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~a ![[\\![[\"(&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~a ![[\\![[\"(&#"}]}]},"changelog_raw_sha256":"1d223ea672128b1398e0eb723255f0f59f8bf2fc706ab9fd44aaa85ddb50e1aa","changelog_sha256":"2e83777200c990043aecbe55c901254dd76fa3d46f52c1a6745164c432baf8b6","review_raw_sha256":"9659fc7c53ae7b9e104fa2dc662576bfb322bd7257bfdee2f92992be6e6fc856","review_sha256":"75bee05956e6b88377929c74cdd4336540f72deb2899fc3a5ac0e305c7f1f37c"},{"probe":")<)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )<)","en":"Title"},"rationale":"Raison )<) fin.","reference_ids":[],"question":"Question )<) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )<)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )<)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")<)"}]}]},"changelog_raw_sha256":"4343cbe8b96ba92dc03284ea26110be9070a8082d896a46babf770a4e9bdcf4b","changelog_sha256":"b5af6d1402246baadf51c7b7cd3d0768f8cbb97fc4bd73600d56bfe32d0ca113","review_raw_sha256":"fb8a666dd922bd9361be57d56774a21e45ffee051af9de16c163cd989121f304","review_sha256":"694c26e34bc4d51870ba78d5f6ee2e863094f044559f01c885058abb0523e63e"},{"probe":"#(:/https://\nb*\n<https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #(:/https://\nb*\n<https://","en":"Title"},"rationale":"Raison #(:/https://\nb*\n<https:// fin.","reference_ids":[],"question":"Question #(:/https://\nb*\n<https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #(:/https://\nb*\n<https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #(:/https://\nb*\n<https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#(:/https://\nb*\n<https://"}]}]},"changelog_raw_sha256":"6c89b92643edbc93118db837453619ac52016631acdbe7a3959aff6815bc523c","changelog_sha256":"7500df17fc4e9543f595b36c75d5160b084d09ec8f9e231b21831dad4a0f0625","review_raw_sha256":"27d4d64676925890e2ca713ddcb7425c1687384161872d48aabcaeaf726677a6","review_sha256":"de055f530ca94cdd6fc8167e57bf12d7597393da582c17da7f3d981e4813f707"},{"probe":"中|]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中|]","en":"Title"},"rationale":"Raison 中|] fin.","reference_ids":[],"question":"Question 中|] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中|]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中|]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中|]"}]}]},"changelog_raw_sha256":"fb68f64a9c9c3170f95590ca79584a4d879e0d6935d791ca92d96eceee13f8b2","changelog_sha256":"eda3ca80b87ef7b10a45ee20d0bcd4d86edd28495e6492fca178d26c0a6c6fd0","review_raw_sha256":"4868a92a5b28f4cf9a7d74ab28b0a8fb681343d353a2024c5218f598d1dfa0c1","review_sha256":"ac302bb20eb4737497f3e66740119befbcbb7702dd12c981dba2ef6cb5690217"},{"probe":";*|bé. ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;*|bé. ","en":"Title"},"rationale":"Raison ;*|bé.  fin.","reference_ids":[],"question":"Question ;*|bé.  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;*|bé. ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;*|bé. "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";*|bé. "}]}]},"changelog_raw_sha256":"3cc81272dde7f35867af7ebd6ff418aec313baa0a8de7d3a350d2515bc548d77","changelog_sha256":"1bd11f29ec194231a6144af0e30e1b63e3f3ebb7c6eb83cc0e4ce75f2b4fea9d","review_raw_sha256":"56da2f08cf9c28fc7975588de82400d53582cac75184413d1c2aa8a74dac43c0","review_sha256":"b00e4e299886adbda8a0af617c797f4347992b6a03790b088fd0274624e29472"},{"probe":" (\n\"|][[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  (\n\"|][[","en":"Title"},"rationale":"Raison  (\n\"|][[ fin.","reference_ids":[],"question":"Question  (\n\"|][[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  (\n\"|][[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  (\n\"|][["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" (\n\"|][["}]}]},"changelog_raw_sha256":"b436e78fbeab74eff4b9ac4284c39495b1d72698d6c051b2ddd4af743f73d119","changelog_sha256":"ed151000567d16e93381746192dcb55cb3c2f45f93257d42a4cf451fc3bd6d84","review_raw_sha256":"8352301a9832da60a2e50ec3f2bb4013ddc8aa3793e974ff225300095ffb7b8f","review_sha256":"d5fb8ebc843221b3ba5f551047c04cf8eb7cbe3da876885624049f80db7e6d31"},{"probe":"!; ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !; ","en":"Title"},"rationale":"Raison !;  fin.","reference_ids":[],"question":"Question !;  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !; ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !; "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!; "}]}]},"changelog_raw_sha256":"aaffed48abf09999de6b229a2f23ef699a1fb9ad5d10061fef8831d5517416ee","changelog_sha256":"27ecc1c4db136e203c417a11ca2731099c144ab1d2878dda4a1fb77359d23dfe","review_raw_sha256":"9cc8cda6a723d3a79fa2319f1dcd39a223705e88fb06fbc9208d6c2bfed8ca0e","review_sha256":"f8d47a6fe5bcc7218bc020fb104e0f26d427fe781e02d9a21a9f500340e9f0dc"},{"probe":" www.\n;)(中/[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  www.\n;)(中/[","en":"Title"},"rationale":"Raison  www.\n;)(中/[ fin.","reference_ids":[],"question":"Question  www.\n;)(中/[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  www.\n;)(中/[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  www.\n;)(中/["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" www.\n;)(中/["}]}]},"changelog_raw_sha256":"3ffa01d30e8b321419ae85dd9c9d5b47155fbc6607352ce5dddae7817d3a1b81","changelog_sha256":"06baf785ec737e456af8c4d1a87d7d63a88dfb6b97f36fd7d75328da4090fdb1","review_raw_sha256":"298ed81bb5a65ac520d1ffc85f90f2b0f691cf544e513895481e743c2049a945","review_sha256":"18a33dfbed5b24fe12e588a739da400f465cd46a649c6b325dd15a23f39afc87"},{"probe":"_`[.|&#<>**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _`[.|&#<>**","en":"Title"},"rationale":"Raison _`[.|&#<>** fin.","reference_ids":[],"question":"Question _`[.|&#<>** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _`[.|&#<>**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _`[.|&#<>**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_`[.|&#<>**"}]}]},"changelog_raw_sha256":"59e4b0787763486e418363e2609f29d8d19d0eae9f5fb6eb48b79dc00229910e","changelog_sha256":"985fcbf563d35c7c4cd15d7642303734938e3d3aae60dc60b149e85332d1701a","review_raw_sha256":"b43ff62ffdb571c124452e5ebee76dc81bee552fded5e7bfd58fecf74b5de8ee","review_sha256":"4e073b8d4181969a3bbbe400a9949cdce96489e8cdfce5729ea47724865b830c"},{"probe":" ));é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ));é","en":"Title"},"rationale":"Raison ));é fin.","reference_ids":[],"question":"Question ));é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ));é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ));é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" ));é"}]}]},"changelog_raw_sha256":"fc74cb13f9aecde084618615291308caad0f4cc3d9ee46aafe0d66419ed73d90","changelog_sha256":"ad28113f5a54f807373f80e0c6d1d0c8699acbfe2a781721ae9426858605d039","review_raw_sha256":"8551577dc9a9156645e03cd9220e59273d9ea302ddcd3d84d1da2f22657306a9","review_sha256":"4c4ebdd570bcff855af23c15cb497de4409336e7095288b74f1830aec0e9d66b"},{"probe":"\\ :![*a!;www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\ :![*a!;www.","en":"Title"},"rationale":"Raison \\ :![*a!;www. fin.","reference_ids":[],"question":"Question \\ :![*a!;www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\ :![*a!;www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\ :![*a!;www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\ :![*a!;www."}]}]},"changelog_raw_sha256":"5928601ddd3d49f077b33a92331590f7197e50ddd86d062dffd05a484eb5d954","changelog_sha256":"8ab390445bbe3f3b8c91464a56774b92da2e337ef37493bac9eadd3cea9e7c94","review_raw_sha256":"721781d0d01184f3298c87ae9ddb219b35d6162c66dfcf9b7e93aa5f29ed65e9","review_sha256":"b37d38f04479300b5be9a7a562d91887febf8b9e017e5280eb7cbfc057de4aee"},{"probe":"]]<<=\\![é|.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]<<=\\![é|.","en":"Title"},"rationale":"Raison ]]<<=\\![é|. fin.","reference_ids":[],"question":"Question ]]<<=\\![é|. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]<<=\\![é|.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]<<=\\![é|."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]<<=\\![é|."}]}]},"changelog_raw_sha256":"f6498b8dcc39b010aa47af33ffb47c00c6ecba049cb386a9fbc741c84c08e150","changelog_sha256":"372c430bdea0017838cf3567829bd7493f77665e2bfdcc507c1a3b5e8119aa10","review_raw_sha256":"cbce882ccb23050174936453d47f291e8e0fe101d3ee4c2e71e6b9885467d43f","review_sha256":"0a5c23bae7c3438181f9ebc6d42efd223a1c3a6c17a5e3a5d3c86ac0467c123b"},{"probe":"[[.\"&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[.\"&","en":"Title"},"rationale":"Raison [[.\"& fin.","reference_ids":[],"question":"Question [[.\"& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[.\"&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[.\"&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[.\"&"}]}]},"changelog_raw_sha256":"c050133fd697b1c79737277c974ea3b8b4d1b85302e990213b3c47c5f87e3a90","changelog_sha256":"819f741fe5df6edcd61ab8b468b2628ccf1bb09b3420477dba3087be28257b7e","review_raw_sha256":"5c6d0438cd3c62bbdebb6c1a3bafbb98e90c1042903f32f56bd7c9589ff3c87a","review_sha256":"b409a1414dadc5906cda6994e80a3aa705351ad2b8e3caa5a71ea3abe9fdd0bd"},{"probe":"=&*` ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =&*` ","en":"Title"},"rationale":"Raison =&*`  fin.","reference_ids":[],"question":"Question =&*`  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =&*` ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =&*` "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=&*` "}]}]},"changelog_raw_sha256":"27837f39e3367ef73501357260b558330c9d154acd74001815179971fb880c86","changelog_sha256":"4801664d51ddeb3ffb5b21f75d13cf71cb84564c8879d8b6686cd4bdde7442f2","review_raw_sha256":"5ec3ca6ac776e2ff84ddd29cce015a188881a274772e8d80a25137f6129aaddb","review_sha256":"b03c5827247392e4e4ad3a39d097dbd8aefe9aab5f5d24d43c90d205103522e4"},{"probe":"中<#b*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中<#b*","en":"Title"},"rationale":"Raison 中<#b* fin.","reference_ids":[],"question":"Question 中<#b* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中<#b*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中<#b*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中<#b*"}]}]},"changelog_raw_sha256":"bb88f2031d0e840bf1cb73f324cc38745274884ea3ec81f689cc7d57644bc1e3","changelog_sha256":"885de9649bb20f830a68dceb76a968a494fdfd7d60d7e1a16fc07cfbb6a2d0d8","review_raw_sha256":"c3ce7ee6a8f0d7c0baa8b7a58e24c9f371fcbc438c2775d87ba78d98df0b2349","review_sha256":"7595a496a01874e31a0864d3fe7d2eb96218f4e0d23958d191a5719ff2d3e0c2"},{"probe":"\n*a) \n~(_\n(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n*a) \n~(_\n(","en":"Title"},"rationale":"Raison \n*a) \n~(_\n( fin.","reference_ids":[],"question":"Question \n*a) \n~(_\n( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n*a) \n~(_\n(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n*a) \n~(_\n("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n*a) \n~(_\n("}]}]},"changelog_raw_sha256":"1b101991bb41ce3f84180aee900cb4a8f8d94ff633c21f5aefaced1cfb1d513b","changelog_sha256":"6f02d28883a56938b86b3af3f3a85e5df75255d038f08bf90466c0a5cc5dc585","review_raw_sha256":"bab208df08916650ad9c46f05197de590801e9f9c8d8b4459ebdb5af7cd86686","review_sha256":"c1901ce347f530d3d0f15dd3c89509cde98a3a755e2547073f4af13adb73b4e8"},{"probe":"]>><.! *_#`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]>><.! *_#`","en":"Title"},"rationale":"Raison ]>><.! *_#` fin.","reference_ids":[],"question":"Question ]>><.! *_#` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]>><.! *_#`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]>><.! *_#`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]>><.! *_#`"}]}]},"changelog_raw_sha256":"7bd83ac62655b0e20e96860dd56823df2e5ef3541c89ccd4480fe2fe5ff7cad7","changelog_sha256":"5cde58b4dd7cd655bc0cdeeb7f4a697d9e9ec78769c100d6152e93f4556f7c56","review_raw_sha256":"af2573e476250b1feb80ad219e3e2150be488abd04bb0ae489e5a407f9340ca8","review_sha256":"542fbd9b6da9b13dd3cbef6e63cfa0565fa6feebcec1450c5cb1653a8ae241a8"},{"probe":"*[\n&#\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *[\n&#\n","en":"Title"},"rationale":"Raison *[\n&#\n fin.","reference_ids":[],"question":"Question *[\n&#\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *[\n&#\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *[\n&#\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*[\n&#\n"}]}]},"changelog_raw_sha256":"56e440aad7a802b88b7dbc1d25a58a0e70a1cc760790c828aeab309d2e28ee03","changelog_sha256":"16657a6654499fd791232b8c1cff299fbb3765b614860eaa693e75108cade427","review_raw_sha256":"1740073a8ab3c8af45a2a738eafc5bb8e83c98640d7df1b53b38d050a1924bbf","review_sha256":"556bef47e654882804fd0ae0aeaa53cf9c304022c71814ece53367a7e9f82222"},{"probe":"https://`![b>b>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://`![b>b>","en":"Title"},"rationale":"Raison https://`![b>b> fin.","reference_ids":[],"question":"Question https://`![b>b> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://`![b>b>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://`![b>b>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://`![b>b>"}]}]},"changelog_raw_sha256":"bd1cab4ba31e9970d7bf4898e6a34f2dc413c66edeb4d5d7dc4bb32e45f096a3","changelog_sha256":"337d53a770a9bb44a63cd519c6228589828ff9fe2e92cf1f8eb6f8a3d2b09b79","review_raw_sha256":"fb129f403bf58eae4718b0126edcf95cf201d88922440719ff281826f5ed8cb6","review_sha256":"67a5dd4cd009a5fd41d8367e71c2ddc9c75c5cd3bb2a8637a190bfffe1c7b463"},{"probe":"]/)_/&# =_#&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]/)_/&# =_#&#","en":"Title"},"rationale":"Raison ]/)_/&# =_#&# fin.","reference_ids":[],"question":"Question ]/)_/&# =_#&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]/)_/&# =_#&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]/)_/&# =_#&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]/)_/&# =_#&#"}]}]},"changelog_raw_sha256":"2be56cfffed40197f0e90beca0b34a5e8f1abf0e54d926146ba849a49237bbab","changelog_sha256":"a225f6ae6cdcfe90916709e8ead92a0cd81aae7c62ac6ad699bd58bf1a178fcf","review_raw_sha256":"9b808c607acc8dd5e379b04a6187d8ad9e4ae62802ed3f90216e27b95624dbf2","review_sha256":"e30787d6c7ab44cb80337f2475660ac140608d50e134f0f8065a63e4785122bb"},{"probe":"[**https://(&#\n(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [**https://(&#\n(","en":"Title"},"rationale":"Raison [**https://(&#\n( fin.","reference_ids":[],"question":"Question [**https://(&#\n( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [**https://(&#\n(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [**https://(&#\n("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[**https://(&#\n("}]}]},"changelog_raw_sha256":"5b1711be602276b88be716a5c8ed689afe98016e1d9fd591eb6ecb6beacce95d","changelog_sha256":"35801e5258b65733025424335eef1164f34c434a818daec95b90ff3f41c1ba69","review_raw_sha256":"aa36fca165fc94e9a2260d10665190e961fc4fd8dba72c99025c3240a866d269","review_sha256":"9488a4f06fc24d6dd3969d5058b40e3b9a20cc133b8ce733b7150a06edf9d357"},{"probe":"[#&&#[#_\n<*\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [#&&#[#_\n<*\"","en":"Title"},"rationale":"Raison [#&&#[#_\n<*\" fin.","reference_ids":[],"question":"Question [#&&#[#_\n<*\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [#&&#[#_\n<*\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [#&&#[#_\n<*\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[#&&#[#_\n<*\""}]}]},"changelog_raw_sha256":"ab4340729dabbd7b15d11eb9c21e8c30f44f7892f260d0152fc103b648e73560","changelog_sha256":"52f575a764562cb5b417d25e61055a89c9832d7b08a584d86f95e424eed2891d","review_raw_sha256":"b78ec82d69e160ad3d5590eb3907d51260971b9d885213dd7b7eecdffbcffa04","review_sha256":"c6faa4a1dd4e89e88399d3249945c2755b6a59ac348d2b3bf7ba3224220fa8ad"},{"probe":"]][[]\"=www.é <[[]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]][[]\"=www.é <[[]","en":"Title"},"rationale":"Raison ]][[]\"=www.é <[[] fin.","reference_ids":[],"question":"Question ]][[]\"=www.é <[[] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]][[]\"=www.é <[[]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]][[]\"=www.é <[[]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]][[]\"=www.é <[[]"}]}]},"changelog_raw_sha256":"b39dbb2baa2d52bd6f970aa06184bd1bf2887d80ae47887a74a605548a2d3d79","changelog_sha256":"9e6199f0ce62e76bbc90f9c205cf4d08d1c62db651d9e2b0aae59e6270a142f3","review_raw_sha256":"9710b67701241bc353ca87d518f650c62b8fbc89a36def382066d80e5a3454d2","review_sha256":"a05e394fa2e6d1f5c9f348a88442bbd7c92cf16502ca64588896f52ee8f768b5"},{"probe":"*.b_:b&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *.b_:b&#","en":"Title"},"rationale":"Raison *.b_:b&# fin.","reference_ids":[],"question":"Question *.b_:b&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *.b_:b&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *.b_:b&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*.b_:b&#"}]}]},"changelog_raw_sha256":"1b74eb9b2fa8a5c95fd6f468c2229c6d393fafe8b67c33b90a5381c3db839cba","changelog_sha256":"20612d18aa987ef430dc16f58d2a66377044325adb08370a03854a038a4bd0ec","review_raw_sha256":"e94694f6ca70e5900c6a3155485bff8c80c9bac06780cfa8b28e2f13294cf3f6","review_sha256":"251097e6ac93939d781d304df102bfae48df2bb60cad7f7c98803c0341052e03"},{"probe":"*\n&#_>\\ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *\n&#_>\\ ","en":"Title"},"rationale":"Raison *\n&#_>\\  fin.","reference_ids":[],"question":"Question *\n&#_>\\  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *\n&#_>\\ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *\n&#_>\\ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*\n&#_>\\ "}]}]},"changelog_raw_sha256":"7b5a3577690092ed18eecac12d41c0412b5a9bec273100e6da6ed435eb828d68","changelog_sha256":"d9bde7e4260701dcdcc33c0c40a294f80d5d25d50c33d96fafec0431890d7255","review_raw_sha256":"e36ebe7907e6c7aed715d64ce358841c124676227fc07bda8914367e19f4fae7","review_sha256":"43d760375d393a7aae88c7f0b666a09579f99365e34165ec1b0fa78559060cd3"},{"probe":"a[\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a[\n","en":"Title"},"rationale":"Raison a[\n fin.","reference_ids":[],"question":"Question a[\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a[\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a[\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a[\n"}]}]},"changelog_raw_sha256":"701f3489ad45baaab9d895f7818f7920f5ec20e647c591cecafc4383f5ecc919","changelog_sha256":"5d8a61f96866ef2472e701b250b94c847a2bd0470127cf04dd14af3022f892d7","review_raw_sha256":"4b631cd1f4c42a3a80c03d1c5d8e83760ab20d4ded9cd03d1a99ec65da53437b","review_sha256":"65d9409e6300a15245a20012c935ef4cda7c38a8e8857bfaeea5ae6d8fa90fe6"},{"probe":"&b)__","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &b)__","en":"Title"},"rationale":"Raison &b)__ fin.","reference_ids":[],"question":"Question &b)__ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &b)__","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &b)__"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&b)__"}]}]},"changelog_raw_sha256":"6a3b67f3c968dc318607f82b2d7a075b366523146d2c1fed6bb5842a7c103875","changelog_sha256":"574159da8786e26f45549064ecd2f612f30de4fc6cf0018035e7d0163ae47b6d","review_raw_sha256":"d1ec521e4ad7ad0a8d04de5bea320640ec969f01e9687daf424e4a57be41bf25","review_sha256":"8d54157d880cf5c59b9228a6d0672e13cfb9ff96c7115a909b5d91880fad86f5"},{"probe":"[]]``.:)><","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre []]``.:)><","en":"Title"},"rationale":"Raison []]``.:)>< fin.","reference_ids":[],"question":"Question []]``.:)>< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation []]``.:)><","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label []]``.:)><"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[]]``.:)><"}]}]},"changelog_raw_sha256":"4aadd1c575cb49bea4535461e5649b072517ebe4dc884ff78d459ff79a852bca","changelog_sha256":"9dcbd5c8bff852290425da930051c2811424589bce1cf6282961554fa614af71","review_raw_sha256":"f06eb60205dca15a674e4c3e8ba713724cc2359136bc7461bd29774f49a3dd40","review_sha256":"98e6fa2cfb6e0f667a3c0b096bea0ce55f6722368986790e04a8fc38de5e62b8"},{"probe":".\\&https://[[`https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .\\&https://[[`https://","en":"Title"},"rationale":"Raison .\\&https://[[`https:// fin.","reference_ids":[],"question":"Question .\\&https://[[`https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .\\&https://[[`https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .\\&https://[[`https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".\\&https://[[`https://"}]}]},"changelog_raw_sha256":"93edd019a00e3c3367297873fe9622e8a91d6cf35da517dfa060715c1a2195a2","changelog_sha256":"6860d70e7fed40c7b24f62c4a5a9a768547bff61625dcf6b9101a28d32027c6b","review_raw_sha256":"2c3c7383ef675fbb21e05f4f85df708426995788a5c3d870d92605eb57726608","review_sha256":"2d5aa6ecb5b0fed9834740dfb727876b0f5accc1a83a23fa3a570370474864f0"},{"probe":"!` #((&#[https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !` #((&#[https://","en":"Title"},"rationale":"Raison !` #((&#[https:// fin.","reference_ids":[],"question":"Question !` #((&#[https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !` #((&#[https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !` #((&#[https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!` #((&#[https://"}]}]},"changelog_raw_sha256":"5b21b889c3ef5f7f2bc16eea8ed450584eb3ea48d7f23b5c5320e0addfa7a5df","changelog_sha256":"557fac8c5a0079cb248aa0d4b9176527a81c7c048766f75469128f14f92950ed","review_raw_sha256":"1f22376c594e80bfe70b9aed53eaf2aa05a0c7e1a2741f366c8def392c64bb35","review_sha256":"f153f22c4438cf49065d088d5d89731fe61cc7976c6db4556f6e2674fc20bfad"},{"probe":"]] #","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]] #","en":"Title"},"rationale":"Raison ]] # fin.","reference_ids":[],"question":"Question ]] # ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]] #","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]] #"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]] #"}]}]},"changelog_raw_sha256":"d96c929eda5491bdb837d057844bebf2ba426cb84c9d5c3a598cfecb58d20f66","changelog_sha256":"8e5138a27b950fa3ff3306634cb2cee116390a0a73312dbc1655e24cfeb53399","review_raw_sha256":"61bfa9c633135a577b5e8aed35b66f793ae33ccd67c1dd69ac4781d465e3b017","review_sha256":"b5b5627fa059dc5b86037626365d7bc0637bf0f062ac089bae68b4fdead5b427"},{"probe":"|:&#www.*.https://`_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |:&#www.*.https://`_","en":"Title"},"rationale":"Raison |:&#www.*.https://`_ fin.","reference_ids":[],"question":"Question |:&#www.*.https://`_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |:&#www.*.https://`_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |:&#www.*.https://`_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|:&#www.*.https://`_"}]}]},"changelog_raw_sha256":"23cb71e3245ea34062270ef552f7e05549738d3598ca8624159fdbda0f283cc0","changelog_sha256":"ac3ba812e4dd5a78e4a3b65745e3b10c9a7bd64763d0b9b1bcf02fa77ccce1ee","review_raw_sha256":"70396d0669938a86ab4eb10b0d69c22a46a3708f03c4f8179d56ba2958ffc3e9","review_sha256":"6429bae6b52070ce50d436092dbc4d22a585fb9315d733a3ef52263b465165a0"},{"probe":"![:\n<\"é|<[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![:\n<\"é|<[","en":"Title"},"rationale":"Raison ![:\n<\"é|<[ fin.","reference_ids":[],"question":"Question ![:\n<\"é|<[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![:\n<\"é|<[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![:\n<\"é|<["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![:\n<\"é|<["}]}]},"changelog_raw_sha256":"41a6164a95c98f8319a5bccbf898c8ff7b2e509e6c5769947b6cfb9038467327","changelog_sha256":"b1369e2f30733def7cbbbcc1b5fe9fcdd4d4465e89daeccf9a784360e42b843a","review_raw_sha256":"6d80bbea52eded5e662ba1ccdbc8a57fb4a59374e7bb76199f6608a8cbae8692","review_sha256":"1ec52c6114565e08856893cc69fb1bb3a9c3ccd7aa3b3591ea35be6dd9f889e8"},{"probe":"\"!_\"www.~; )#&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"!_\"www.~; )#&","en":"Title"},"rationale":"Raison \"!_\"www.~; )#& fin.","reference_ids":[],"question":"Question \"!_\"www.~; )#& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"!_\"www.~; )#&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"!_\"www.~; )#&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"!_\"www.~; )#&"}]}]},"changelog_raw_sha256":"90f6f6dfefb5861e7eed97a0ffee1292f466c7b3516121f1c8033689da2c1d1b","changelog_sha256":"d3428ae7e00784b36155773f92f850af768734667bdc6cdcbb22daa70202d046","review_raw_sha256":"7c621c149f63245dbcdfaafdbe62110bf80436edfddfba6865bbcbb78144ad2c","review_sha256":"2febcd49bd146d92c3e6bb4a6b25160c8e5470019aed5d8eb6ae57972e94290f"},{"probe":"&*中#[>_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &*中#[>_","en":"Title"},"rationale":"Raison &*中#[>_ fin.","reference_ids":[],"question":"Question &*中#[>_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &*中#[>_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &*中#[>_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&*中#[>_"}]}]},"changelog_raw_sha256":"086ebec24d682965f52e5ab09012bd76a705896caed563e8322af198662c3775","changelog_sha256":"3703d9048b93db4f482f4d61eb51858c737adcf8f7a02edfcabbf77c9df8d204","review_raw_sha256":"88e02bd6a331cab80f44e096e0d7b9c13d07e350b3b11272cc059916508fde4f","review_sha256":"7092c091e98ef620e6c23f012f6cc9077a4cb74fc28319cfb75f164b8075da95"},{"probe":"a\"!]]=]];[b]!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\"!]]=]];[b]!","en":"Title"},"rationale":"Raison a\"!]]=]];[b]! fin.","reference_ids":[],"question":"Question a\"!]]=]];[b]! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\"!]]=]];[b]!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\"!]]=]];[b]!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\"!]]=]];[b]!"}]}]},"changelog_raw_sha256":"926a9cd51b4d8dfb8b0f6152b27942c018fec8793091bd1c4740097650a453be","changelog_sha256":"e477ce09065191456f35da153db4d31afc0e7d96776b72b2826c3b650939b17f","review_raw_sha256":"0d4b2aa7d86fe1f3135eefb251dd98aff9cfd6ae5633f6e8ea212f948cafe42a","review_sha256":"2e119c45f1f10820ea22b6634c65d9a39b1ab277fb8fa409dc7a2a76a5ef3736"},{"probe":"\"![~)*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >![~)*","en":"Title"},"rationale":"Raison >![~)* fin.","reference_ids":[],"question":"Question >![~)* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >![~)*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >![~)*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">![~)*"}]}]},"changelog_raw_sha256":"b7bc2083f762f33a384ad386170355d0108ab80bb7407d22e69cf85c7975165e","changelog_sha256":"be21df23872c3fb627cacdef5da8e0710e630ec66cab25a8c4cfc2eb9794c9cf","review_raw_sha256":"ee41a780feeec82a585955412c2df2e8711a70f7ab9e65e4fb94108aa6fd7f28","review_sha256":"c4ddf6178eb64bc5bf3726b0222ecb6b65b7f9a62fc56bf5ff9997f8e74df014"},{"probe":") &#中~https://(&#\n:\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ) &#中~https://(&#\n:\"","en":"Title"},"rationale":"Raison ) &#中~https://(&#\n:\" fin.","reference_ids":[],"question":"Question ) &#中~https://(&#\n:\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ) &#中~https://(&#\n:\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ) &#中~https://(&#\n:\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":") &#中~https://(&#\n:\""}]}]},"changelog_raw_sha256":"1be96e6f917d8597c35558e5f5f2a10c3adc7856ce26295c42c30676efcaa54d","changelog_sha256":"78c4e74b86b5e25369f57e04a5140950f2a15094d813c1e45498aeed74262536","review_raw_sha256":"836c9b3fb9b2afb83ed0647c5f371f5e18b9d0fad099b52ae266e045f8781da9","review_sha256":"eca9b456fdcecbad36b84af392f3f71696b1fc5ed29668491173357754ffb4e3"},{"probe":"[#;`a~ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [#;`a~ ","en":"Title"},"rationale":"Raison [#;`a~  fin.","reference_ids":[],"question":"Question [#;`a~  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [#;`a~ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [#;`a~ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[#;`a~ "}]}]},"changelog_raw_sha256":"7941bfef3d14fbd95bee5c9b63cf49d8c16e81670491529b51ecee823535c523","changelog_sha256":"6d94321adbd032a916ca35fc8448676bca2af504914691435b1b7560f7621840","review_raw_sha256":"6a584cd642f39c67bfaef8851d6800c5eb5405c20e0d868213d96187307e2354","review_sha256":"3c9a0251da785b6986d387bb107963c5ba5901369693d7d97798e7e92ca41a1b"},{"probe":"[*__>*]https://b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [*__>*]https://b","en":"Title"},"rationale":"Raison [*__>*]https://b fin.","reference_ids":[],"question":"Question [*__>*]https://b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [*__>*]https://b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [*__>*]https://b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[*__>*]https://b"}]}]},"changelog_raw_sha256":"c5be8185bcb5605bad29c9695c9700f6b9a698752c04d58e13c1e067d47e1bfc","changelog_sha256":"aaf2941ba131f74a15b76a99e0822e3fdb44f8a9a05eb82f22f3aa3e675bbea5","review_raw_sha256":"24c3a1624b0c18aa4319d4e0ca6a02dbb520dc78f0a1513e38322482eaa7e277","review_sha256":"aec4b8c8f7a7342ad90e3aa7e9727e57f09ab166f91468ad9c6ca70389e3a6e1"},{"probe":"~ <","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~ <","en":"Title"},"rationale":"Raison ~ < fin.","reference_ids":[],"question":"Question ~ < ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~ <","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~ <"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~ <"}]}]},"changelog_raw_sha256":"2328e34f345ad636a4aca9e2c3164c65fb432532764492bfac7a489e6d810eb4","changelog_sha256":"182a9428028ac1ebbbe1a7edf7853262f6036c06f6bf098ab839a5eb2ea83b43","review_raw_sha256":"ac3cf0c428ff64f8f3f0dd998cb2eed05ce3c5621211570efd5fa998d8d7832a","review_sha256":"e1cc0efc5bbddb439322dfa07a990cab2ebc11f618b5156d58ad0388050789a2"},{"probe":"/![~=]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /![~=]]","en":"Title"},"rationale":"Raison /![~=]] fin.","reference_ids":[],"question":"Question /![~=]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /![~=]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /![~=]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/![~=]]"}]}]},"changelog_raw_sha256":"6db568d0f51e6f58aa8dedafbecc4c08b3fa2669307cf976ef3fe0717d9196ca","changelog_sha256":"1bc0d9b8e7a0c043668b3e298689843e9ac626856b134a3919f85eda65f9cb55","review_raw_sha256":"b148158ab97249261e4c3274907c3e3d8ab178e6b74ad73593b8af733d52ca47","review_sha256":"e3c82fe570e011a7543e343ab1d4555e3399d8cb5744494c5faf281f595272d2"},{"probe":"***[ #www.https://:中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &a*|> #www.https://:中","en":"Title"},"rationale":"Raison &a*|> #www.https://:中 fin.","reference_ids":[],"question":"Question &a*|> #www.https://:中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &a*|> #www.https://:中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &a*|> #www.https://:中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&a*|> #www.https://:中"}]}]},"changelog_raw_sha256":"02a01ad660572387de9ad51c1e16f12857ed1f69c013067bcbdd02f0c9fa584b","changelog_sha256":"120b79e969eadd52d30eefbf2b47d59647a1d913b12e1c40aa0e9fd5aa2491b9","review_raw_sha256":"8df7501219ded2bd734a9b18c8fd75d98f6d72ac1737dbc1014e496829a541bf","review_sha256":"93fcdf5658bf1b186b350ce8cecaf95a65644d55487c823b5b40a5bc152b6070"},{"probe":"<.) <","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <.) <","en":"Title"},"rationale":"Raison <.) < fin.","reference_ids":[],"question":"Question <.) < ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <.) <","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <.) <"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<.) <"}]}]},"changelog_raw_sha256":"c67afbba15f535738e1468c9bc12eb1f0c96da7f68f5fae1a80789cbc2a11dbd","changelog_sha256":"fec914d2a6b7f05250157ef2ba1d194bf2a39b317db676f02c4b12cd248e23a0","review_raw_sha256":"6effc8b6fa3d4426c7f77cbcad05492af0333bc347bebdbdfe8cd5ccfe034c2a","review_sha256":"b2e4913e267cab9a405b556c1a829f27dc3dc7a6a1cb5c7e724764861e29a18f"},{"probe":"\\![~])","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\![~])","en":"Title"},"rationale":"Raison \\![~]) fin.","reference_ids":[],"question":"Question \\![~]) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\![~])","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\![~])"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\![~])"}]}]},"changelog_raw_sha256":"dec3773c98122a60844e2b217890d2e57e98efb68e8820d2af14e2032eb149b1","changelog_sha256":"47543cf2123890fd89c9fb4af788ae610a2f2d576fd2e28ebac6d98d80cc7025","review_raw_sha256":"16186de81de6d105d96d3ef14d9011db19c1a79d094a769628f6a966367c40c4","review_sha256":"4652cb187f062b0741b6fbd24ff8ae1c62bcfbe49ca5957fac43f63b5a66e8a9"},{"probe":"\"é> &#(>`*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"é> &#(>`*","en":"Title"},"rationale":"Raison \"é> &#(>`* fin.","reference_ids":[],"question":"Question \"é> &#(>`* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"é> &#(>`*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"é> &#(>`*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"é> &#(>`*"}]}]},"changelog_raw_sha256":"c7fd7b8037503e07f08cd68e56c80432939fc29e771b063971c71450f7bd7cdc","changelog_sha256":"f3c613c8a6d0a8bf029fee682128f9cda26a8358988e09c819f25e458f496c45","review_raw_sha256":"98713250beddf375a1282de531663cfb9dd41ea64c1c3c1a126184c7c4b4d445","review_sha256":"8967318bc85e007692c50eeee91d4a01be36eb641d18e256feb2e028e750a893"},{"probe":"!<~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !<~","en":"Title"},"rationale":"Raison !<~ fin.","reference_ids":[],"question":"Question !<~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !<~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !<~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!<~"}]}]},"changelog_raw_sha256":"63575a6b6cae5fc159e552c832ed07c622e679766f7c381d2adc37cbe84c8c95","changelog_sha256":"2d3ba6c0af950415e1e44345f96267e66d18c0de88c9440b99c1dddb71339354","review_raw_sha256":"9b7c744e7d44099c60014bd6e6a87206908a08591c592a0083500ac5262cae0e","review_sha256":"8814e8b5a907cd5022bcaa0b023f20eff763188a9d31a13b98f7a7a0645d9aac"},{"probe":"~b![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~b![","en":"Title"},"rationale":"Raison ~b![ fin.","reference_ids":[],"question":"Question ~b![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~b![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~b!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~b!["}]}]},"changelog_raw_sha256":"0281e2fe18033f1d0ea4de296dafe1541060da05cb8874a7bac3f3ef5b7b5dde","changelog_sha256":"bfcf49c9317633c317ebfd6ca8ef1027bf423858c8f1a52fd4d2207a026abc9f","review_raw_sha256":"630861be4b4870bb7b195ce67463e8009a5d21dc547fef116a809101a3a2fd91","review_sha256":"521132c46e729985c38140d94413b8a55cc03442fdad271b1147413dd5df8571"},{"probe":" b_& ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  b_& ","en":"Title"},"rationale":"Raison  b_& fin.","reference_ids":[],"question":"Question  b_& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  b_& ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  b_& "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" b_& "}]}]},"changelog_raw_sha256":"dd66592f51b085b984c315f259270e8d7576956b1f6d0c3cb2f6c1ea8eff43b6","changelog_sha256":"4b1bb3a308a52fe6fa263b603945fe14c026ef85e22c7367cafbdbc792f72bf5","review_raw_sha256":"c879cbce18b03f50fd3d43498d06af4b7145ff949bc4ddeed849b50caba0a284","review_sha256":"e23e1f8b31f69cb2bff8558f0d03dc8c94ce16a6a95593d82a4f02ebf860a4be"},{"probe":"www.\\ #]]|_b***<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre www.\\ #]]|_b***<","en":"Title"},"rationale":"Raison www.\\ #]]|_b***< fin.","reference_ids":[],"question":"Question www.\\ #]]|_b***< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation www.\\ #]]|_b***<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label www.\\ #]]|_b***<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"www.\\ #]]|_b***<"}]}]},"changelog_raw_sha256":"73b8f170fd49cd7f06adf323621c658289527c0748e7ff3d14514fae16cd3380","changelog_sha256":"9fc3a0454c9e5a3febf1c0ebf379181c9ce9c2d37c2bef57eee2f229ef0d9b61","review_raw_sha256":"5d8d6d7e1fe531d92cf6f44100e0ca05db33904616e9d921381fc1fcfe7566c9","review_sha256":"dd6ef42b13c9ae9d5cbce6101834d910f7982e71b998082f65676127ae6ac946"},{"probe":"awww.\";:","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre awww.\";:","en":"Title"},"rationale":"Raison awww.\";: fin.","reference_ids":[],"question":"Question awww.\";: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation awww.\";:","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label awww.\";:"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"awww.\";:"}]}]},"changelog_raw_sha256":"68b67ba1c20724c5cd2a55c3f626a6cb42981855acc63eac052ac1b96e52fe97","changelog_sha256":"a2ba234c9c292f2b70fb2fd166ef91885f8b454ac5d9c69456f2c03444fb84f3","review_raw_sha256":"63757c2d2ec564f9c66099ee8a71d9796caebccf4d7612a09a68334fa74700f4","review_sha256":"74e47e77ad514a677bf5b34c03a6f38680a05f41d96f8350bbe52ffb10bbdd0b"},{"probe":"*www.`b\"]]**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *www.`b\"]]**","en":"Title"},"rationale":"Raison *www.`b\"]]** fin.","reference_ids":[],"question":"Question *www.`b\"]]** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *www.`b\"]]**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *www.`b\"]]**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*www.`b\"]]**"}]}]},"changelog_raw_sha256":"b51480c15e0bf2f60f6b30325257ec400e4eb5d2ce2373f3ccf0da0007e6758d","changelog_sha256":"27b39e136f554891b4d1523c59a66b26faf13a25be700a063d9fe70cc31f546c","review_raw_sha256":"d7c68573c9c3ba9bab5bf850fed36a51938b456f765bd48bc26ba399775c4a8d","review_sha256":"1217f940acac65fe9bcf87bcea53b02d7dbab3386cb72118a8b844e3bb97613e"},{"probe":"ba(\"a\n[(#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ba(\"a\n[(#","en":"Title"},"rationale":"Raison ba(\"a\n[(# fin.","reference_ids":[],"question":"Question ba(\"a\n[(# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ba(\"a\n[(#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ba(\"a\n[(#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"ba(\"a\n[(#"}]}]},"changelog_raw_sha256":"05499417bd34a313c09f28880cd78fb62af3a9f2eb2c4685a26765a5517feab8","changelog_sha256":"e0697d99fafc419c66578d5b4e3bc591c6fc075a752344a13dffbc54920761bd","review_raw_sha256":"97e4d880da4faa6ab8e6ffc52da178c38dc8959ff686895aed1d2a328879c872","review_sha256":"c0544c8d39a59e058b48208be0e28ed7c1c9a3aca3323ee22b6b443667a4af57"},{"probe":".*~:https://`)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .*~:https://`)","en":"Title"},"rationale":"Raison .*~:https://`) fin.","reference_ids":[],"question":"Question .*~:https://`) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .*~:https://`)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .*~:https://`)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".*~:https://`)"}]}]},"changelog_raw_sha256":"e4598a50056d003a4d2bc21b7eb7597ccd6847c413d25152c16c251b34630195","changelog_sha256":"081b5f6e3b54a3d3bea3da482f98bbe7513aa6d4e8f174c2de63a9e5bed4636d","review_raw_sha256":"95f4bbc1aae949d60e6fc75fc54bc58995b9e58c2028002bef18c77c708a1069","review_sha256":"24f41070a36cff82b6344df0dc7c0cfc776f39ba3d1fb5112f15135f011b226f"},{"probe":" =www.&#=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  =www.&#=","en":"Title"},"rationale":"Raison  =www.&#= fin.","reference_ids":[],"question":"Question  =www.&#= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  =www.&#=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  =www.&#="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" =www.&#="}]}]},"changelog_raw_sha256":"ab78594d8d0867be7f35ddb26abab68a04fccf72515126ad1cb2c23cd1ebac05","changelog_sha256":"41ced0ce5e925f72a512142f4712d81845413c8bbbd273abae85ecde58857e01","review_raw_sha256":"6f3106b8d234c3c6a7b8e65c484db653d810e125ecd634a848da7f816133bba2","review_sha256":"bbaa37383620d20f9e9412ff31acac6a9382822b372f03d69cbecd2d53763a5b"},{"probe":"]]&#.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]&#.","en":"Title"},"rationale":"Raison ]]&#. fin.","reference_ids":[],"question":"Question ]]&#. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]&#.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]&#."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]&#."}]}]},"changelog_raw_sha256":"592605068a286663b980e007aca3d3a610b7fcccc66e434bcab2d428877cb8d7","changelog_sha256":"5563aa7d8dbfe37522c22ceaf74dec3fb7ad0d3ee6038b2d9178be70a11bd5c7","review_raw_sha256":"6c536b7b3edbc9c87b5e72922bf5bfef730a262d233404225e548352317fa518","review_sha256":"935aee204115cb13a0a77c774472cb54b0d681cf124723ba7f567f38447b264c"},{"probe":" :中[[!*=**<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :中[[!*=**<","en":"Title"},"rationale":"Raison :中[[!*=**< fin.","reference_ids":[],"question":"Question :中[[!*=**< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :中[[!*=**<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :中[[!*=**<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" :中[[!*=**<"}]}]},"changelog_raw_sha256":"0dd99b614080a7ec661c984bfb64ac829858ae68cc7552822f1e4d7e251ff6a6","changelog_sha256":"26282a45580fba4725b292e2cf5b4ca167c02b25169371030c6aa8751d6d526f","review_raw_sha256":"d2ddd08df05c103390a761594d75f180d693efdc738645ddbdde141206360e2b","review_sha256":"e2cba3435b948c23ea50baed49c47d93bf2f408608a81cb6fe3d12f7d8814968"},{"probe":")*~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )*~","en":"Title"},"rationale":"Raison )*~ fin.","reference_ids":[],"question":"Question )*~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )*~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )*~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")*~"}]}]},"changelog_raw_sha256":"307f2278967e053be76935cf17ed12aa55f6e207d3d8b2ced573485241f0fc09","changelog_sha256":"5a7650c0b503d27c15083c03ad0cb9985286b1773a417301a028d988048f4645","review_raw_sha256":"bf8871bd13da6a0220cb71d4e1d73d27c071b0ccdd8412e4f0e129b10e69afd0","review_sha256":"5d6fc5a98155373a978d183e2faf86e77b03013609c20cb90d0cef328508a151"},{"probe":"*~=)_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *~=)_","en":"Title"},"rationale":"Raison *~=)_ fin.","reference_ids":[],"question":"Question *~=)_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *~=)_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *~=)_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*~=)_"}]}]},"changelog_raw_sha256":"55fac89e63b9a41692486db8dce908a44b9bf3dee9b5bdb1e4832bdbfd0f2d0f","changelog_sha256":"9a6028c1e7f89e904d979a79c3416476047c2daee393feba4ce46288394df991","review_raw_sha256":"847f4e5a5f4bfa8e66c5ccd6b708e445207e930f961622cad8ea738f1b9d6358","review_sha256":"43c8bf7e06667a777051c40d03abf7d7c4a062cc846b2f6ae25722d79d5c6e11"},{"probe":"|]`=<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |]`=<","en":"Title"},"rationale":"Raison |]`=< fin.","reference_ids":[],"question":"Question |]`=< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |]`=<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |]`=<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|]`=<"}]}]},"changelog_raw_sha256":"24826f95a907b827e0ab7dc99ac90037aa56f097b9ec51169e6631573f877685","changelog_sha256":"911aabcbcf3101556465f01989e7ef4eae498f0d4273530ce94beca056e245ad","review_raw_sha256":"67a91af945cfe24c4e470b111bce5d0e5b1cc530c38103e1892087a1c5bc11b5","review_sha256":"1aaa76bda16912587e8e7f50d9d2de540ad694f3ec27ac762156cb52e266d7bf"},{"probe":"![&>;é&#.中中<é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![&>;é&#.中中<é","en":"Title"},"rationale":"Raison ![&>;é&#.中中<é fin.","reference_ids":[],"question":"Question ![&>;é&#.中中<é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![&>;é&#.中中<é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![&>;é&#.中中<é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![&>;é&#.中中<é"}]}]},"changelog_raw_sha256":"3486ddbe2e7579f9b9b2b300234854e4a99532830c346a3f236a95a47bc983b2","changelog_sha256":"02d745d8c0d14361ee537d850cad83ecfb3b79a7d32696cc2c0452422625852f","review_raw_sha256":"6ebfb6a59432ba0da0f41221e5b4cbe8c6bbc6cff37d0efa1cc7def79c65a2b2","review_sha256":"faa81d9c3b592f5f54e10a9bc529ebd92a09ff92ba85d0afc4d43eaadfc4f22a"},{"probe":"中[[&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中[[&","en":"Title"},"rationale":"Raison 中[[& fin.","reference_ids":[],"question":"Question 中[[& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中[[&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中[[&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中[[&"}]}]},"changelog_raw_sha256":"e749bf946e27bdba38d614ccd3ac38469b491d9bb84ddc1bcbe9675e2b2cc2f3","changelog_sha256":"a5f1b18dea9ad9e223471098faaa2f21c4105e420508ccf1989af3cde13972be","review_raw_sha256":"fd299710a7330b7f26294de4b8665bfd5a2bdac21f032f9073d4952a9fc63394","review_sha256":"2ccc3c35ab3ca8c2c54f9b68bf26a0534fd78c03983dcf5d08b007a449ef0d83"},{"probe":":\"`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :\"`","en":"Title"},"rationale":"Raison :\"` fin.","reference_ids":[],"question":"Question :\"` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :\"`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :\"`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":\"`"}]}]},"changelog_raw_sha256":"c4c975564c30d30ca2a7d7f8237bf8fb91a2490ec6d3ab6d8338f8963347cdb5","changelog_sha256":"624418762880a93b8a59846dda250c418f2328d9908fe82637ae33453d6006e5","review_raw_sha256":"40a8a8ca25d41146ba8db126fff82e0266d2304e137636e9786defeeecbeb92d","review_sha256":"950c62edec3452169638274d2faf8e8f6942a2e7c750056ee97ed65d0d421c35"},{"probe":"]]]]_www.:!(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]]]_www.:!(","en":"Title"},"rationale":"Raison ]]]]_www.:!( fin.","reference_ids":[],"question":"Question ]]]]_www.:!( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]]]_www.:!(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]]]_www.:!("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]]]_www.:!("}]}]},"changelog_raw_sha256":"f2cf4769e0b6fb60c3e2d89f89a4190bf0eb4d275173484311e9970e14ab3fff","changelog_sha256":"dc4b87c1b1e8f70c60b72ba4bd45aaab9406a8e2a576992eef625732304a048a","review_raw_sha256":"52fdaef81f6541601e2ed313bedf711b06c8188d8263fa689ceab3c892004bcc","review_sha256":"f2418ed249aee0a38e3ad8ec7415ea7f2308f1363b16362f819d05f706186f6a"},{"probe":";\"b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;\"b","en":"Title"},"rationale":"Raison ;\"b fin.","reference_ids":[],"question":"Question ;\"b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;\"b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;\"b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";\"b"}]}]},"changelog_raw_sha256":"d1adaa4b3546cd0f1c8c343ff12578924f229d03fa390a282d320c5029f843cc","changelog_sha256":"54b84855a7e5d2b37cf88f21c3044dab92e4d05de20fe1a087903209a49abf1d","review_raw_sha256":"a4c3e6dd6eed272e1bc43c4bd113b0adafac8ee417cf2d14a4a151954d6bce70","review_sha256":"ce932261beca53349fa041998ef20bd7ce4118b444288f30e7bfaa333040090d"},{"probe":"![!|<&#& ~#[[<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![!|<&#& ~#[[<","en":"Title"},"rationale":"Raison ![!|<&#& ~#[[< fin.","reference_ids":[],"question":"Question ![!|<&#& ~#[[< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![!|<&#& ~#[[<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![!|<&#& ~#[[<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![!|<&#& ~#[[<"}]}]},"changelog_raw_sha256":"574c2062cbefdfaaa0fcd45b6d5b8a346ce3841e5e09d72a8e1ac1e1c2c95a04","changelog_sha256":"58cdf4e5cf4b8554374c196fc6075e9162748c7cd644bc0a5da155d3477414d3","review_raw_sha256":"01f3595b9bd0efe3485e7286783fa8f4b7f2c41211e19162dd1ed59b758ee8a2","review_sha256":"ca9f68af6b15a63a30adedacdade8530f55f2c91f2bcd95cc29eba5aa43ad1e3"},{"probe":"]]a&https://;|`[&_a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]a&https://;|`[&_a","en":"Title"},"rationale":"Raison ]]a&https://;|`[&_a fin.","reference_ids":[],"question":"Question ]]a&https://;|`[&_a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]a&https://;|`[&_a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]a&https://;|`[&_a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]a&https://;|`[&_a"}]}]},"changelog_raw_sha256":"0073d4dead44879d6ebc8c051312e37b2490688d985b924cee90f8d9632b8a27","changelog_sha256":"36bf4df9e9649ad9dd71b636b99b5cbcf1ef91481515977bce5752213886cd98","review_raw_sha256":"39b28a2681c22518c968f6876bb5074cf7011beda5ea4641c3e45d19a3e251db","review_sha256":"a82afcfaee2bb917bede74b0fea078745f9708d1c498fad377d496ed61ebc7db"},{"probe":"中\n;#]]b!|;&(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中\n;#]]b!|;&(","en":"Title"},"rationale":"Raison 中\n;#]]b!|;&( fin.","reference_ids":[],"question":"Question 中\n;#]]b!|;&( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中\n;#]]b!|;&(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中\n;#]]b!|;&("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中\n;#]]b!|;&("}]}]},"changelog_raw_sha256":"44c6415ca520b312f246b84f0601eb1d188ee88988ef2dd185d393843283c8fe","changelog_sha256":"845c365996175bbcdf5472466b5a5c8e5a8494b0eabe282c8a397cfb844548ef","review_raw_sha256":"7f9ab022a150cbc67f91878c52d8e300b2dd1096298f6416bacadb14af51d4c0","review_sha256":"c5f3b27137def66a8d97c6a686717b48c532358bf33eb93dad5dd4de6bbbd1f3"},{"probe":"中(\\\\_|é:https://<<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中(\\\\_|é:https://<<","en":"Title"},"rationale":"Raison 中(\\\\_|é:https://<< fin.","reference_ids":[],"question":"Question 中(\\\\_|é:https://<< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中(\\\\_|é:https://<<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中(\\\\_|é:https://<<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中(\\\\_|é:https://<<"}]}]},"changelog_raw_sha256":"8329a3877a2bcc0932c6f41882c1b513caa7b4501a96c94aa02031544c91a799","changelog_sha256":"72b490d50283fec79b20f42dd349aeb773c4c2701720f7902ad2488dcb9c4d63","review_raw_sha256":"f89890c6eb78e9c3521f625a43632e8de256ee28f90d0e662c99141c3fe3e74d","review_sha256":"279c4513d09524731740cb706fd071b6a5a6db29fdf21a3ce6b435a8202ae40c"},{"probe":"|>\na![]]#www.]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |>\na![]]#www.]]","en":"Title"},"rationale":"Raison |>\na![]]#www.]] fin.","reference_ids":[],"question":"Question |>\na![]]#www.]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |>\na![]]#www.]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |>\na![]]#www.]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|>\na![]]#www.]]"}]}]},"changelog_raw_sha256":"f80ea475f00bcede5edfcc04742bbec2610e264be4bf039c302e5c553e1490d9","changelog_sha256":"4df557652851cd90f88740f093459809aadfcf3ad20d5fdabf05cca388d33b0b","review_raw_sha256":"ec6ba49563011d30c9baccaf448482367d595279e7a521496996e47a5ea9d55d","review_sha256":"72b8cea86dc914338f7bb92df83a7541d07a59cabaf8731978723877011021f7"},{"probe":"> &![https://;&#!é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre > &![https://;&#!é","en":"Title"},"rationale":"Raison > &![https://;&#!é fin.","reference_ids":[],"question":"Question > &![https://;&#!é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation > &![https://;&#!é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label > &![https://;&#!é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"> &![https://;&#!é"}]}]},"changelog_raw_sha256":"bf175239631ab42641ebb172d35463a8f17a91b393a68ccd3ce6c9abb5f53571","changelog_sha256":"34e230c65cc023b140b86f0308f8b3759c228b1433c70fa6ed76b2a97ce514f9","review_raw_sha256":"4bf9f1761ce29fc75b9cf928e1486c46d0cf5577725b618a258d1ba87f9a7fb4","review_sha256":"b4cd62de0183607701c6b804309d6ff383b42f25f6e17e5b710a695b0f68dc95"},{"probe":"é\\\"!>b[)`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é\\\"!>b[)`","en":"Title"},"rationale":"Raison é\\\"!>b[)` fin.","reference_ids":[],"question":"Question é\\\"!>b[)` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é\\\"!>b[)`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é\\\"!>b[)`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é\\\"!>b[)`"}]}]},"changelog_raw_sha256":"4781b0a3c62ff7ea45d9fac9d057c18184ba605b8f817b77d827bd616dd7ec5a","changelog_sha256":"68490697713c025f60ac5e767215282ddf6756c9ed05edc843dbf5bc37685f5e","review_raw_sha256":"4db34703f7f0afb36b49e6db7ddd30497b52d93e011d4a89e41d4267629533b4","review_sha256":"15c23b6c3a4a6e86b2f8c9c8244aa4635a8cdca142422d49c515bfbb388aecc4"},{"probe":"]\\)][a .www.! ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]\\)][a .www.! ","en":"Title"},"rationale":"Raison ]\\)][a .www.!  fin.","reference_ids":[],"question":"Question ]\\)][a .www.!  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]\\)][a .www.! ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]\\)][a .www.! "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]\\)][a .www.! "}]}]},"changelog_raw_sha256":"24c2474d4a21dce95e18958d6a2dbd117f48346529a8f79229ac8afe1d6bd221","changelog_sha256":"2e1b047ff7f89a1d8a2f0ca7adbc7a72368059f3eb59541ba1946c83a2ada694","review_raw_sha256":"209fecc0321b56995497d28f95865fdcb851cfb4431c9c195bf7a781ddd6857f","review_sha256":"4685ba416bb35cb77d7a50002afdb82cf9ac1ae54f32a8156cd50c30d622b140"},{"probe":">>www.\\\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >>www.\\\\","en":"Title"},"rationale":"Raison >>www.\\\\ fin.","reference_ids":[],"question":"Question >>www.\\\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >>www.\\\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >>www.\\\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">>www.\\\\"}]}]},"changelog_raw_sha256":"dc2bbfae19c6ad908537dc711b9680833d26e3ba115475339467f5a74b03cf4f","changelog_sha256":"b0c39d29c2bd85de90d5d84f348309ba6036a38eb99b1d500fa4f372455b9505","review_raw_sha256":"bbb52802197c4b13805d1892f612300bd31267ddd0820855d86a664ab8af6233","review_sha256":"45809633ddc3a35f4a40dd94814ec3921883af4415f9348cd67153f6f4415874"},{"probe":"~a\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~a\"","en":"Title"},"rationale":"Raison ~a\" fin.","reference_ids":[],"question":"Question ~a\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~a\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~a\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~a\""}]}]},"changelog_raw_sha256":"5685a24dc44f99e64ae2d1becb5e07d9f400b2ca4ee4db3bdbeb92e16778b69a","changelog_sha256":"008b92a8b482db5b5208a42e5a7b3a808864831ae153912ec5c34b81b3c4da70","review_raw_sha256":"5724b676b2f6aad0a1803d3009078effe4a1b4fd99cf41ff3703b0631d13292c","review_sha256":"70b2e101676f3f116e56fe011a3991e0858aca55ea95ec11be0c39d46e4164d8"},{"probe":"&#.\n<(_![<`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#.\n<(_![<`","en":"Title"},"rationale":"Raison &#.\n<(_![<` fin.","reference_ids":[],"question":"Question &#.\n<(_![<` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#.\n<(_![<`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#.\n<(_![<`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#.\n<(_![<`"}]}]},"changelog_raw_sha256":"f3efae8f7030508f56eb09ead893c47b0bc7a7c5260cc06abc3b5823f3310993","changelog_sha256":"06b54617a8b1f90a68b8b2bc1528d793cdab21f9628864f4835b0a938fc2447d","review_raw_sha256":"a4eaccab7fbf7adf96faa3dbfbea626b0435be3b77e6f6902957a6a1578ff063","review_sha256":"4387179e6ce1fb72b763b35e08c6ddf967fc7664d94e366d861ee99d37f40bb8"},{"probe":". &]<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre . &]<","en":"Title"},"rationale":"Raison . &]< fin.","reference_ids":[],"question":"Question . &]< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation . &]<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label . &]<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":". &]<"}]}]},"changelog_raw_sha256":"768a1b836147eb5a46626ac87c4fe53fa020b5976e49081ebff5920ada0dc33f","changelog_sha256":"5284e371da78293e699816f8bdc5523a1a7ccb35e3996fd21fb28d962710c62c","review_raw_sha256":"69876feaeeb1c51b8a5ab8da77de229de14dbc9c951edfa68361fc8397fd6136","review_sha256":"ad9632d29aec8b870d6dde544d43861522adf4fb7fe5ec9c21b635db139e4240"},{"probe":" `.<b_/&#b)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `.<b_/&#b)","en":"Title"},"rationale":"Raison `.<b_/&#b) fin.","reference_ids":[],"question":"Question `.<b_/&#b) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `.<b_/&#b)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `.<b_/&#b)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" `.<b_/&#b)"}]}]},"changelog_raw_sha256":"657715e375daf6617c1ba089619a191d8114a72dfcfa8c156190751c07bb540e","changelog_sha256":"84fffc508a1c6c978daf6b032893116d601af169760804fd7fa65b0880a5d9e1","review_raw_sha256":"9d638ff5224bd7a7c96c1ea7b54ea645b2262614f8d6db6da09387741f6e0a9c","review_sha256":"f6c4aa992b92fff3d62a8c2e9d331620f6a6e8f99cbaa4472b5d9e732f696dc5"},{"probe":"**:(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **:(","en":"Title"},"rationale":"Raison **:( fin.","reference_ids":[],"question":"Question **:( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **:(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **:("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**:("}]}]},"changelog_raw_sha256":"5f71456dd6f1c23a919d963c407d29bf7433942cfe98faee88bb633e6bbfdcd1","changelog_sha256":"c01359f2cd08c72ac3f00441dc35e86f8cf625fe71efd3584ba6eb2d68beecbd","review_raw_sha256":"ccd14dc69ed09e75997cfebfa5333847deacebd3e54f16d37fc2c1531f9ede39","review_sha256":"5aa19b1712cff99c09ea21746e70dd7ea00d852ef262092d74b17a38bda7c2ff"},{"probe":"\\]]>a* ;[é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\]]>a* ;[é","en":"Title"},"rationale":"Raison \\]]>a* ;[é fin.","reference_ids":[],"question":"Question \\]]>a* ;[é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\]]>a* ;[é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\]]>a* ;[é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\]]>a* ;[é"}]}]},"changelog_raw_sha256":"b26c24ff4eba84628b82dd4384ba91dccff7e4f0a3d2d14f7728b7a36af71f0f","changelog_sha256":"7905607e655707e68eea2050a3cb790466b94b5f6e0f32a5cf30c2e9a7b1f225","review_raw_sha256":"371929ddcb147a9722938a7ab5dc9f1f9c9dee9fd8f5b4beab4c3f6ace3a270e","review_sha256":"3eb42dfb348b6990fca4ec5bf55d4e6274b3f817d64e0ac5515dcf9f1f74469d"},{"probe":"& *[[=[\"[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &> *[[=[\"[","en":"Title"},"rationale":"Raison &> *[[=[\"[ fin.","reference_ids":[],"question":"Question &> *[[=[\"[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &> *[[=[\"[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &> *[[=[\"["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&> *[[=[\"["}]}]},"changelog_raw_sha256":"36b55b52a6960a25ccda5d230bfff1344cbc1fb9ddf3303bcb95e7f02c8484ce","changelog_sha256":"3d67365f778436069860361d5062f9b1081426790387221572457bdb0a28c219","review_raw_sha256":"06a7e312b7e4f8b4c0bb9e858fe9e9997b6c62013b7befd11321cfe6f4f61006","review_sha256":"9f680508c226f179efaa055c18d9d940b24e9e794bb1f4a7cea7f33023d6bebd"},{"probe":"]] **https://**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]] **https://**","en":"Title"},"rationale":"Raison ]] **https://** fin.","reference_ids":[],"question":"Question ]] **https://** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]] **https://**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]] **https://**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]] **https://**"}]}]},"changelog_raw_sha256":"65f6e5c0c8d74ace315ebcb030829cb6ae8e8cb2c35cc642e512a5c1ccf3d14b","changelog_sha256":"b6f9a87ce5f8132b38087426d4776a95e04337285c7b44b632cdbb68bdeeb78e","review_raw_sha256":"1c464cdaa7974b5b3e052491c6258bb99aa77ee78d7835f4dbfd567ccb24ee64","review_sha256":"a5637aaa11e153f0d1945de7cb39f089aa90bf14ec43d0317eb7caf012f90543"},{"probe":"![`]]www.**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![`]]www.**","en":"Title"},"rationale":"Raison ![`]]www.** fin.","reference_ids":[],"question":"Question ![`]]www.** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![`]]www.**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![`]]www.**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![`]]www.**"}]}]},"changelog_raw_sha256":"994efb9655d578b02f0ce49b7f9d98080d86aa6b56cc2445aa6436f7729ade67","changelog_sha256":"df04ba9ff5038f9b37d04e2aeec9b254e903a0afeb1768a73697f1b7c9b4656a","review_raw_sha256":"e47dfbe0aa8c768764ba76ab4efbf56968d747342f14810a1c2fbf8f619a4f80","review_sha256":"628c4732600428d5c6a02e29579fd49cd07dc2fb23a86e93d19e51abe5971939"},{"probe":"<= ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <= ","en":"Title"},"rationale":"Raison <= fin.","reference_ids":[],"question":"Question <= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <= ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <= "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<= "}]}]},"changelog_raw_sha256":"04ce87b4633e2ff99e9f32818912c91fb53e688a83e7938bc1be8882b592408d","changelog_sha256":"7a7f7e10c431eed52d42d25c8848881bb69ed19b63ed3c9fa5b5bb4a85b1f391","review_raw_sha256":"e8826a47b19a7f2d6cf78e2d790d3e0d72d997339677fc84320de83d87a2f070","review_sha256":"256ebbddbd376539b56e72cd51f475bb26006cac33d8c8d4ce3c6265e9f54f7a"},{"probe":"&]_)\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &]_)\\","en":"Title"},"rationale":"Raison &]_)\\ fin.","reference_ids":[],"question":"Question &]_)\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &]_)\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &]_)\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&]_)\\"}]}]},"changelog_raw_sha256":"c4ac4548095c34e73d58b832750ae4ed9e20f174e7f0b9f24ca62715f00f2ebe","changelog_sha256":"33a9e29c466a7a50f623dfbbd568c1b86be597a5845c641c525b578f483740b2","review_raw_sha256":"088e0719d506a141c699134fa9c96ecf9682fa167258e8bd4ca49bc204944c2f","review_sha256":"1993b8788bed4f1728f943cc5f3338f467cbe89363e3b096e6b34bcbce2783fd"},{"probe":"*[[a\")","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *[[a\")","en":"Title"},"rationale":"Raison *[[a\") fin.","reference_ids":[],"question":"Question *[[a\") ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *[[a\")","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *[[a\")"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*[[a\")"}]}]},"changelog_raw_sha256":"7f20794fec96e494aa03fb75cdae7d035f34ede5b88aa6b12b5df1fdb8a75013","changelog_sha256":"863bc6284e7d144c84244916693eb6ea29662c3e6a459758931e8ccc977f4ee7","review_raw_sha256":"8b4e636beae54e46d3424e7cbb16313068964fd856ea8a141521399bf43bb590","review_sha256":"fb588c5d769bf5e3dc70ef2d249ebb64e3d63b32fec35deebb6b64c1ffcddfcd"},{"probe":"**https://\n \\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **https://\n \\","en":"Title"},"rationale":"Raison **https://\n \\ fin.","reference_ids":[],"question":"Question **https://\n \\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **https://\n \\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **https://\n \\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**https://\n \\"}]}]},"changelog_raw_sha256":"513a5dd4b6ef8daea15c3ab584fd6cfc0d6d6912b855922768e2388ad205fb04","changelog_sha256":"e694e555a5c0508d51784b53f041e555bddad12379badee14065a48caaa9c7ff","review_raw_sha256":"3060279a61def512b75d2f7bf198bdeb90dc52131c44492ea452518b45adc1ad","review_sha256":"7cdbd8a7146c8df169c2ba3c19e0b731c98f5fe76f5c455108d55f105c5c9fd9"},{"probe":" !&é*~#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !&é*~#","en":"Title"},"rationale":"Raison !&é*~# fin.","reference_ids":[],"question":"Question !&é*~# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !&é*~#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !&é*~#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" !&é*~#"}]}]},"changelog_raw_sha256":"6ec99dfbf1ca8d0984b17fed66bce3c03cd0b6120895ee44319047b4bd1def50","changelog_sha256":"f7fc598d16792f314ead0e636b00d9e39db0a814e69c75a3973de7230cf5c8b4","review_raw_sha256":"b9fabd9f8bd808a22f12dc48cde57b6e3592a8b19e9c7f54e4953ae15a9a663b","review_sha256":"d0c53abc8c8efea108396ecbfaaac4355aff99ba2e02263fde2f89d1e9738c82"},{"probe":"#&.**!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #&.**!","en":"Title"},"rationale":"Raison #&.**! fin.","reference_ids":[],"question":"Question #&.**! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #&.**!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #&.**!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#&.**!"}]}]},"changelog_raw_sha256":"724d28d32f17df9e1ac666992923678e591efbf6a0d4c2856131cd87d5825bc6","changelog_sha256":"4ff0159736883041d8f0b6dd4da4467c13fa6cec456296984a843830f2b5841c","review_raw_sha256":"40b7fa286e4beaaf36a39c651054cf47a38b005d73ba748a101fa7cca246a85a","review_sha256":"28e6d3f799860f127e5de85e4cc77d238b25eba94b41291a0d9a0103b24329ff"},{"probe":"/].","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /].","en":"Title"},"rationale":"Raison /]. fin.","reference_ids":[],"question":"Question /]. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /].","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /]."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/]."}]}]},"changelog_raw_sha256":"0265a0158110ee1dac59abb631d7d0b1586a1882454e66c37524b1f2a3971aab","changelog_sha256":"905fef088faec7e77c94cdb8ef5de790adaa1201046ee344919a6b9b4f27c7c9","review_raw_sha256":"050dcf74c144bfdde7f9e53951e84949574b6fd72dd8867c397c1db0f020bef8","review_sha256":"a063cafeb9142d4db1ba53ade255c1fba203e3d0f23ce46be926fe1b1019c5e5"},{"probe":"\n#(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n#(","en":"Title"},"rationale":"Raison \n#( fin.","reference_ids":[],"question":"Question \n#( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n#(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n#("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n#("}]}]},"changelog_raw_sha256":"dfa776f35fea9e4681dd01e67aa36b6038f366e99b117fe1756365f236766130","changelog_sha256":"a1aece31a50ef471d512d8df10ca8042be4a727a0adbef0c36f30550a12ffbd7","review_raw_sha256":"1999e3efca2e9f711a1639733385c7a3888f69868356dde53401fe70762fa5be","review_sha256":"060c4c80fe55a5d0d7e93da0b2f1742535711505848a3fe00e7ce6f32b1e24fe"},{"probe":"<!/ |`]&~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <!/ |`]&~","en":"Title"},"rationale":"Raison <!/ |`]&~ fin.","reference_ids":[],"question":"Question <!/ |`]&~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <!/ |`]&~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <!/ |`]&~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<!/ |`]&~"}]}]},"changelog_raw_sha256":"7f7b91750b3fb0ebfbacde942000d695e82cb64781c97e9ef52200f969a546bb","changelog_sha256":"3e759f9fd6a5b51112e198320a825e4296d6b8914cf4ac50f38d766bef97c569","review_raw_sha256":"5add7aec41d7d936bf844d655081da062eb45eb9d530a9416312d86a6c5628be","review_sha256":"565f5ccf73e45ba240a3d4260cd451cb6b0fbe44c88b5523e84a3869a46ae899"},{"probe":"[[&#]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[&#]","en":"Title"},"rationale":"Raison [[&#] fin.","reference_ids":[],"question":"Question [[&#] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[&#]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[&#]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[&#]"}]}]},"changelog_raw_sha256":"e8c4fc49aa1f1a41cdb8901cdf1d26f3f3f03e4f1f2eef9713213493110ab583","changelog_sha256":"0f66c3d405d1185e3c048adc7afbcdd82696372248a3064992055b3e5c99d048","review_raw_sha256":"7371424b6cda69b72c2cb984793f93e506586f7b10f31419b4487465e8004f64","review_sha256":"ad7b7a437fc70787e9d2d67ae385761a387b3dd19c60ebaa1cce795f843c3e80"},{"probe":"<]&\".[[).~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <]&\".[[).~","en":"Title"},"rationale":"Raison <]&\".[[).~ fin.","reference_ids":[],"question":"Question <]&\".[[).~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <]&\".[[).~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <]&\".[[).~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<]&\".[[).~"}]}]},"changelog_raw_sha256":"1dd90c55f3e14ace067951dd59e8c32ef0049ceb6a43f684dd34c03b38412a7f","changelog_sha256":"5958564beae6f18250b6ad2a32d24408545c3ca4e29f8da2db32637553ab817c","review_raw_sha256":"bb163562dffb58e1fe66bb487fc93ab76829c9c88754dfa088f85870da7bbeaa","review_sha256":"07c41943186d1cc8af59cdb76521bdf9f24d6ec4fe8ec7a765be3624173ee28c"},{"probe":"\"abb<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"abb<","en":"Title"},"rationale":"Raison \"abb< fin.","reference_ids":[],"question":"Question \"abb< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"abb<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"abb<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"abb<"}]}]},"changelog_raw_sha256":"5dfcb4d0b6ec9209b7e048e03414eaabe58983a09aba5df22b11aab94f1116ca","changelog_sha256":"b6484f7dad5733ae223d2e314d41002484f25eca979b3807b5c7afc843d0c6d9","review_raw_sha256":"255d41855bf680053e04e1e087ba08c83630cce5e323118f582088a320746232","review_sha256":"8ddd6a87a9234e6b62b67e81e09cb5958349aad3662481dbdb912d99d51d2880"},{"probe":"(é**&a!&a(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (é**&a!&a(","en":"Title"},"rationale":"Raison (é**&a!&a( fin.","reference_ids":[],"question":"Question (é**&a!&a( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (é**&a!&a(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (é**&a!&a("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(é**&a!&a("}]}]},"changelog_raw_sha256":"a5179c0e19f4f2b3d6944714368577a739e279533921ac911914034023d314ef","changelog_sha256":"ec70991b709e846d469cee60107089a0b62da94c0711deaea592b4493853f9d7","review_raw_sha256":"53f197305c33b3d8b9fae0f50ea8d212f9e4276c63d105d2d48a0c466952a458","review_sha256":"34340dadf09829cfd75615b71923d4add4a36fa818b86cd4b3528932c38abfdd"},{"probe":"b~]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b~]]","en":"Title"},"rationale":"Raison b~]] fin.","reference_ids":[],"question":"Question b~]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b~]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b~]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b~]]"}]}]},"changelog_raw_sha256":"8a3bc1d5b1ba6ed5938552a9bf8f9acb48815b780abca9e9bf139e81c3d96246","changelog_sha256":"1350e0faed115a7f02bf20731b5e601fa227ba6f6cdb5a2a45bf3467377dc3a1","review_raw_sha256":"6fd6cc4bbf0d94318b7d676bb219c09848f870dedcd687ea98e531141eca7a5e","review_sha256":"3390b73325165fe1323303c3b1fac30b0d2b4ccf63fb78e5a8db88b987f517de"},{"probe":"]];[[\"~&]/>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]];[[\"~&]/>","en":"Title"},"rationale":"Raison ]];[[\"~&]/> fin.","reference_ids":[],"question":"Question ]];[[\"~&]/> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]];[[\"~&]/>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]];[[\"~&]/>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]];[[\"~&]/>"}]}]},"changelog_raw_sha256":"815266b83f5df1bb72fb64c78dbca54307da5bf682a6f1bce222668706ba6259","changelog_sha256":"23979f185a8e830b03733ad54469fbd4b115b0b836a913eda611230128da4776","review_raw_sha256":"20103c6cd4a70bf14677beb489972af4b0e763d869212bf8c75b64be68370d75","review_sha256":"9545327991fc502d4f8d66db7770df4dec45caa040eacbce2ad9083f8579b4f5"},{"probe":"中<) ****![|>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中<) ****![|>","en":"Title"},"rationale":"Raison 中<) ****![|> fin.","reference_ids":[],"question":"Question 中<) ****![|> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中<) ****![|>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中<) ****![|>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中<) ****![|>"}]}]},"changelog_raw_sha256":"405189e67f5e5e2943ccb1800ed3c85803d6e8df83f00fa283ac868c6001d679","changelog_sha256":"ff8ed5a59ac8ea25250bc9cbd93c58b39ec9eec9e7c820f377191723f6fc8667","review_raw_sha256":"d45640856cfebdefb011e463ab79b3690bddd7fdb515a18c539a6f1e8757c2b4","review_sha256":"77213cd5e0c2083e760bb24fa3a0872f0b101790300e2d189a1fac8a75b1c115"},{"probe":"=<=.&>]]www.www..é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =<=.&>]]www.www..é","en":"Title"},"rationale":"Raison =<=.&>]]www.www..é fin.","reference_ids":[],"question":"Question =<=.&>]]www.www..é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =<=.&>]]www.www..é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =<=.&>]]www.www..é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=<=.&>]]www.www..é"}]}]},"changelog_raw_sha256":"9626e9065521ade907f49c020f377ad883c1facf68b652a66f2a32cf7f9e93c4","changelog_sha256":"75e7f2c7e86f7efa3527ab03a57b529684dd615fe57f910c73f2f178408b3822","review_raw_sha256":"b2ab37b98c0a42af826de3c971edc5f3cb8f29a115789a989edd8de4508f7f6c","review_sha256":"dc8b5033aea05531ab22521e9125efcbfdcc798e6b7ff7700cd40e7fe6823d9b"},{"probe":"/~&![`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /~&![`","en":"Title"},"rationale":"Raison /~&![` fin.","reference_ids":[],"question":"Question /~&![` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /~&![`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /~&![`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/~&![`"}]}]},"changelog_raw_sha256":"89b65ff719b67823d86b9f5bde56dd9966f9159229791e4a11d1b541d01a357c","changelog_sha256":"6f0b546431a25f2c5fd57f404c9a6633af36cd72b40623f3110fecff8bc83007","review_raw_sha256":"bc00a52c37df48fda4b5716d80e232bb929ea90412e98ca493b6b260c40f2a74","review_sha256":"811b81b4c3c8c5af5941750569d41ba7cbd0782e4ccd317ee89ac7ed9f44d77a"},{"probe":"**\"\\\"\"&>;)b[[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **\"\\\"\"&>;)b[[","en":"Title"},"rationale":"Raison **\"\\\"\"&>;)b[[ fin.","reference_ids":[],"question":"Question **\"\\\"\"&>;)b[[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **\"\\\"\"&>;)b[[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **\"\\\"\"&>;)b[["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**\"\\\"\"&>;)b[["}]}]},"changelog_raw_sha256":"8c784ee8598ed58ebea20e0cea7fed43385bfbfd5f532b72bfd936dd97678271","changelog_sha256":"3d52259bb6a65861b02725c1b779b93b3ddecd9168d95d0ca83c72e39aac8738","review_raw_sha256":"cdaa27cc791868ae56f6da00fdf602398bd0676aaf39d09d9b15e321b6262f6c","review_sha256":"74ca76ff055a1e5555894dd8c6ef6440c1785ebea4312b225bca2d4777afe064"},{"probe":"\n>b!; [[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n>b!; [[","en":"Title"},"rationale":"Raison \n>b!; [[ fin.","reference_ids":[],"question":"Question \n>b!; [[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n>b!; [[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n>b!; [["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n>b!; [["}]}]},"changelog_raw_sha256":"dea26eebdd3bf6cfc1a669dc90f91b19bad2b585101aa7ee9bff674793d84b47","changelog_sha256":"a793400a8a336da9893f0d5d217e0d6be75de96bc31312c76cfcec1cf529be97","review_raw_sha256":"ba3b740c36e241ee5d8e3d98852f2c61078519c4091fbae6e9db37a492d4ce99","review_sha256":"3b8dfc90ee6a4e5354dd58511380f0410940f7852c637a9662581afd054150be"},{"probe":"|.)中`/[.![a#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |.)中`/[.![a#","en":"Title"},"rationale":"Raison |.)中`/[.![a# fin.","reference_ids":[],"question":"Question |.)中`/[.![a# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |.)中`/[.![a#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |.)中`/[.![a#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|.)中`/[.![a#"}]}]},"changelog_raw_sha256":"14b0616e99cd4b8d90b21390684e516dc841b31464a9d711bbeb7c66001dc68e","changelog_sha256":"b37bec6b895a9895574e54541f1c8e657a594a5e33542a54f8e9eddcce027a1e","review_raw_sha256":"e7922c241cbf24a51326956c68c896f403e842df2b98cf974ba0da90ee4ce277","review_sha256":"aad6ceb91d537cfa798a8f2e3cf04a6e4da8a9041b32e46a59c36837bc9b967a"},{"probe":"中)\n]]=#(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中)\n]]=#(","en":"Title"},"rationale":"Raison 中)\n]]=#( fin.","reference_ids":[],"question":"Question 中)\n]]=#( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中)\n]]=#(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中)\n]]=#("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中)\n]]=#("}]}]},"changelog_raw_sha256":"f27066c93ce4867cd9813ae1e8339a5a823e687af7526c5d7db1e66737bef573","changelog_sha256":"0c9a60e344d9e92e1caa6a5d006fd227ba3f9eb252155a7bcd52f6eda41237c3","review_raw_sha256":"67630e7742746c1feaf0b8b40ba0031a516290266ebc1429f37b679e3221b306","review_sha256":"80a3779fdc085e02fa29aabd36fd44de75a86a138b66b2bdac909c74c34df2e8"},{"probe":"b_/;\\>);=]~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b_/;\\>);=]~","en":"Title"},"rationale":"Raison b_/;\\>);=]~ fin.","reference_ids":[],"question":"Question b_/;\\>);=]~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b_/;\\>);=]~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b_/;\\>);=]~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b_/;\\>);=]~"}]}]},"changelog_raw_sha256":"069a2901cabca72391f74f1f96fe0c7008315987d2a781c602890b5acbc0bedd","changelog_sha256":"985d3b84612e11dc3e1740f30dfd7fc967f8559edccaf644096f8d80ab4cf1c2","review_raw_sha256":"2b1af83fdacd633fc8eb2c07a6156742d4be82baec241850117435e7b3279e1c","review_sha256":"945bb9f3008c6a4488c331336b04484c5483a6c4cfe0d53d6ecfd06e0c236a9f"},{"probe":"_![(~)\".&#]&!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _![(~)\".&#]&!","en":"Title"},"rationale":"Raison _![(~)\".&#]&! fin.","reference_ids":[],"question":"Question _![(~)\".&#]&! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _![(~)\".&#]&!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _![(~)\".&#]&!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_![(~)\".&#]&!"}]}]},"changelog_raw_sha256":"912678eb8701c56267facb1fa97f3aef69071cc6aa0cea7da957493bad928316","changelog_sha256":"cee4ec3faa985ddbd26dca47ed3e179b072c3b088dedc2748fba314e19a91e8b","review_raw_sha256":"5aa14df730117f3a8aefff489896b531925a34344c776fee2ce36d74bc31c0f6","review_sha256":"5a571fe071ada30d2670c70501e8c5b0bdc51b68a9df5b34246344d5b2749319"},{"probe":"|é_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |é_","en":"Title"},"rationale":"Raison |é_ fin.","reference_ids":[],"question":"Question |é_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |é_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |é_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|é_"}]}]},"changelog_raw_sha256":"ddf2666c24491ba6982d74c6fa0587c0adb1ccbd9cbfbea1f8f5cc90b7f6070e","changelog_sha256":"76b663ae9ee0bc66494f9beb5d671cbf1e40cee8e5ce5195440c461c73261ca1","review_raw_sha256":"c9a4c128a8261b9ae9b07333bb0f234e44ef0622d7e78fc61cb0c3b0eb070643","review_sha256":"0380041f53cef961429731ab026e21c6aac68f0f894a23f181a8e44d11e33feb"},{"probe":"&!!;]]\n\n~]&#![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &!!;]]\n\n~]&#![","en":"Title"},"rationale":"Raison &!!;]]\n\n~]&#![ fin.","reference_ids":[],"question":"Question &!!;]]\n\n~]&#![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &!!;]]\n\n~]&#![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &!!;]]\n\n~]&#!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&!!;]]\n\n~]&#!["}]}]},"changelog_raw_sha256":"a962d33f28a3e75c2dd3241a401005d6917bdbb2cf21213d99f68f77c2cc5415","changelog_sha256":"27218ef9c955edaaaf484f2d9b0553302d097325fc1f5149f8c30e51ac047de4","review_raw_sha256":"6b609cd6c6d18270ba9234a9c0e80692ee6b0c8962fcb8ccbcdf0904664f5455","review_sha256":"47445eac0dc4d96a9ae673b53cf38da880f770730ce12acdd4b7031f8d7ff051"},{"probe":".中![* (]]/https://><","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .中![* (]]/https://><","en":"Title"},"rationale":"Raison .中![* (]]/https://>< fin.","reference_ids":[],"question":"Question .中![* (]]/https://>< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .中![* (]]/https://><","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .中![* (]]/https://><"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".中![* (]]/https://><"}]}]},"changelog_raw_sha256":"f4280bac92c598361a70ed8d4e287af08d31d12f509f821ff22e2f6c614e4233","changelog_sha256":"1e90ed901723ad03e26bc59d410617b951c4691a0c6cd00edc5e31d0dd352bde","review_raw_sha256":"3e6b0744c72eb8547e457571f6cde9527859c83149efcb0756535861f35b21a4","review_sha256":"c70de6c7225f8b211c8c0b1ee21fb89d2b87d8b80fd30d2e682ca8c251a6995c"},{"probe":"\n~<~>>.www.**[[>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n~<~>>.www.**[[>","en":"Title"},"rationale":"Raison \n~<~>>.www.**[[> fin.","reference_ids":[],"question":"Question \n~<~>>.www.**[[> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n~<~>>.www.**[[>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n~<~>>.www.**[[>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n~<~>>.www.**[[>"}]}]},"changelog_raw_sha256":"c1be2c75e69be25df7fb73968a63b4f641c55dfdad60f9da11704d2f73504a23","changelog_sha256":"d1062020f643b5badb9c1cc602a1a2d3742771430586fe25e6972233115a8e3c","review_raw_sha256":"afa4496abdb7c88e6c82371d424e5bcd8ee40f6dc9731ea7ab6b44352ba1cf46","review_sha256":"4399235eb4b27268d300e9954a4efe70bef7217b4f5136b450a52f15e98c801c"},{"probe":"é:&&# &_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é:&&# &_","en":"Title"},"rationale":"Raison é:&&# &_ fin.","reference_ids":[],"question":"Question é:&&# &_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é:&&# &_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é:&&# &_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é:&&# &_"}]}]},"changelog_raw_sha256":"91c4cfa75034bf52e67cba97982acb53a53793f517009463a90733d75fc02a6d","changelog_sha256":"31fb901fc8b682808365503058d2174d459181f3a6e746abea115b0d8ca43ff5","review_raw_sha256":"6288d30ab58ef2f4b3236d7683df6cc1a068e2b4e31d26dd16c8c619a93e5b44","review_sha256":"f4eb857cfb12f47e0bbb94b844960a14f6dc76f97c686c6a07065a65a51f5c53"},{"probe":"[a中 &","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [a中 &","en":"Title"},"rationale":"Raison [a中 & fin.","reference_ids":[],"question":"Question [a中 & ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [a中 &","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [a中 &"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[a中 &"}]}]},"changelog_raw_sha256":"76890a8d7ca8be18ed14bea64d2f294c7950d31da040a7ab74ebe6fc976ba8a1","changelog_sha256":"78cb41bb8cffa00c81431d54ad9d4029f46d70a944854f8c8fe5ad0863b794ac","review_raw_sha256":"4ee4f9a9e4c44191afe5d72f87617c27ca27b3a5b2f347c10d9465c6e44bc756","review_sha256":"030cb9ed0ca6faae654a6818518da2f515e3b2268758f952b4a0beb7a63acc3d"},{"probe":"*****&|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *****&|","en":"Title"},"rationale":"Raison *****&| fin.","reference_ids":[],"question":"Question *****&| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *****&|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *****&|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*****&|"}]}]},"changelog_raw_sha256":"a029a5e6cb2cc6301a41c6c560031e4d2a59303d78886af8aee67bc8854db7df","changelog_sha256":"aa6780f815fcc0939af3dc2428bd0d481f71a1ee07cc26616bbfa0ee934391fc","review_raw_sha256":"d266babd9feffdfb0d45f9202db143b9e43aa5cfd3e22d2459e8d5f82fa15605","review_sha256":"1eac730c5c2d95ab31fd42e4910f6459cc7b788f99e651218bf5cf4755b01e34"},{"probe":"#a!\n*_! a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #a!\n*_! a","en":"Title"},"rationale":"Raison #a!\n*_! a fin.","reference_ids":[],"question":"Question #a!\n*_! a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #a!\n*_! a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #a!\n*_! a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#a!\n*_! a"}]}]},"changelog_raw_sha256":"9f8d786d954afad3e4123dfdef55e65e8ae56b8249817715cb079d1881cd37f9","changelog_sha256":"21a6b6117e6d9fd6609adc3dd1f9add141fb7c862e9b81fc1453ef639ab5785c","review_raw_sha256":"b44fea35de1d11d33f0a0efbbaf02e4278d50d9fcb3537b5243fc081129df696","review_sha256":"69f8c682ab60d611b4990fbea6693281c31396539dff63aad534367a82e30249"},{"probe":"\"\"aé\"[ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"\"aé\"[ ","en":"Title"},"rationale":"Raison \"\"aé\"[  fin.","reference_ids":[],"question":"Question \"\"aé\"[  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"\"aé\"[ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"\"aé\"[ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"\"aé\"[ "}]}]},"changelog_raw_sha256":"15a28e9123f74c203fe068ec4355aa6620c7c961d6febbbd1077518af645bdfc","changelog_sha256":"bc80e954e290ccd6a1c5d5fdddc08842910b89ca9f3dad2b4d0f2347db6df472","review_raw_sha256":"5afc916fe3fae21d870037939b342c34e2aaf8423d7bd7fa747e391b4f635981","review_sha256":"438111cbce5aae049a55e4d190afba43378e76c29191abe4b20364d18c1cc7ae"},{"probe":"<& b![[中[]*;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <& b![[中[]*;","en":"Title"},"rationale":"Raison <& b![[中[]*; fin.","reference_ids":[],"question":"Question <& b![[中[]*; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <& b![[中[]*;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <& b![[中[]*;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<& b![[中[]*;"}]}]},"changelog_raw_sha256":"052712651f384bf71fd8e73a892ec73048b92d77759ed4ebed0df8e323fbe3c6","changelog_sha256":"5e36eb5aafdbc6f23fb8e385df5336cbdb527c91a1e47f24d0a9854912037c3f","review_raw_sha256":"6e2370ccbd0e9bc0ccb3251f97828cdd5f3c8358a6c3a260828a1b01b74d24a7","review_sha256":"d58bab5c71c4112bb1a690d8863719ac69b807252969a511dac4dac8880740e0"},{"probe":"&_|~ |éb|:]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &_|~ |éb|:]","en":"Title"},"rationale":"Raison &_|~ |éb|:] fin.","reference_ids":[],"question":"Question &_|~ |éb|:] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &_|~ |éb|:]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &_|~ |éb|:]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&_|~ |éb|:]"}]}]},"changelog_raw_sha256":"4fcc1564d721c356220b7be029e7115bebf453d652bf30701ace9ace459f1063","changelog_sha256":"63d882b1492a634825610af779bfa2b9c3dda196bdf5d2b131207225e053be57","review_raw_sha256":"c0e8b9a8d45c456546a5d2622a062b91c494519abda13ea843360cc68e2c6f32","review_sha256":"5cf3d5727e243c51a5a0ae3b3d49cf28750303d184aa980eb645e87a5e648f1b"},{"probe":">>/ )_#/&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >>/ )_#/&#","en":"Title"},"rationale":"Raison >>/ )_#/&# fin.","reference_ids":[],"question":"Question >>/ )_#/&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >>/ )_#/&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >>/ )_#/&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">>/ )_#/&#"}]}]},"changelog_raw_sha256":"dae92cc02eae7149ff1dbd5c0fafb2f12db816f78c6d50c2850cc3d71fc2eb37","changelog_sha256":"232b023d044729367b0c649517f08656eb0ceb576e35e432a915c05278bb5fdb","review_raw_sha256":"111a69dbb102ced29672ef403bae9fbe19c104b54d98930656ab3f78d92c6b7f","review_sha256":"3b48d51f30ef48544634d4e5f885fc88f7d20c7241329b732cdea0f35e3a8b93"},{"probe":"#https://|&中]&![`_<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #https://|&中]&![`_<","en":"Title"},"rationale":"Raison #https://|&中]&![`_< fin.","reference_ids":[],"question":"Question #https://|&中]&![`_< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #https://|&中]&![`_<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #https://|&中]&![`_<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#https://|&中]&![`_<"}]}]},"changelog_raw_sha256":"4ef34ccd031d444babdc06e0ec157b0c7b5602ba22bb049434a0599db7eacc62","changelog_sha256":"f8ac79e7824d837d96cd4eedf00337c478fdfd2bb5b64f71409b105db3c90093","review_raw_sha256":"b4e706cf3ea312f104513da66067029d7c07422448c1d55be1e275e17f0e0098","review_sha256":"dc039a3ab888f368a8b01ef8ce753b42ec124c1185ce294b3e8d2a9eb3ab9dba"},{"probe":"\\_]\"|![https:///![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\_]\"|![https:///![","en":"Title"},"rationale":"Raison \\_]\"|![https:///![ fin.","reference_ids":[],"question":"Question \\_]\"|![https:///![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\_]\"|![https:///![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\_]\"|![https:///!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\_]\"|![https:///!["}]}]},"changelog_raw_sha256":"8bd277729c73e0691f8ee0fd251e19343345b195dd926f45a7b473a1a5e1eea0","changelog_sha256":"b625addc735b2f89c7fbf00bd6f58a98b5a628203218cdbf663b55079782f604","review_raw_sha256":"a94e82e39b3fc34be9f8697f96023e71df7827aa0afec2be5a37b0dbf0227f63","review_sha256":"9230da192251a3a51876801b5516dc19f42b4b3c15edbdff8c703cd5a24ff103"},{"probe":">é<<>`[[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >é<<>`[[","en":"Title"},"rationale":"Raison >é<<>`[[ fin.","reference_ids":[],"question":"Question >é<<>`[[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >é<<>`[[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >é<<>`[["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">é<<>`[["}]}]},"changelog_raw_sha256":"cddac7dabc2ec739b4fcd8db56f154e7916eb5ec65ff588197a6c3e47430808c","changelog_sha256":"d6a6e880adf3fd589f8f0fd1e0dc88d951fc816e82f09297142714006dd1969e","review_raw_sha256":"67fbbabe91b192f76e599d89882ac07b8f1d4efa6178d5a1b9e9a10faba8a432","review_sha256":"8b27d0f4e90fe3743d5447b66ab5ba5470efa056988db2391a16f98b9850d438"},{"probe":"[[!<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[!<","en":"Title"},"rationale":"Raison [[!< fin.","reference_ids":[],"question":"Question [[!< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[!<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[!<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[!<"}]}]},"changelog_raw_sha256":"5c705649b98ed7f7922c370cf517f48fea3d1fcb2b2ba589ba9ae0ed6f552549","changelog_sha256":"c82bfe5e49ddba53390791f326945592bdbf9185177d6e7f56fa84c345bb656c","review_raw_sha256":"beb93d685cceebcf2225d63e7915d735b30e2b9fb1697d727c85ef6c0c64882a","review_sha256":"21ab32de097797092fcde324464a78140c2a2ae7fb65d20cf35d037b672a103b"},{"probe":"a![`~  &#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a![`~  &#","en":"Title"},"rationale":"Raison a![`~  &# fin.","reference_ids":[],"question":"Question a![`~  &# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a![`~  &#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a![`~  &#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a![`~  &#"}]}]},"changelog_raw_sha256":"8712f152bb9ff23c96a60217b590cb8da8c7a757df67bb6aefdedd8617fd27fe","changelog_sha256":"a520f9b9b9e809ba179516ca2a0820e52a58732d7132134016d7879d28429b2b","review_raw_sha256":"20bd4f355e7910d7e199c4f9af09d60637b6b20ed08ebb165be47b9a00e1cecc","review_sha256":"70cd51263e296c96ffdd73d6c7dbb72702fb761e992fd93856e76489627133d6"},{"probe":"*****\\& \n|https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *****\\& \n|https://","en":"Title"},"rationale":"Raison *****\\& \n|https:// fin.","reference_ids":[],"question":"Question *****\\& \n|https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *****\\& \n|https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *****\\& \n|https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*****\\& \n|https://"}]}]},"changelog_raw_sha256":"6403eb410d1b57e1187d25fbe23a2a59d7d959d63372516fa47f847afd505542","changelog_sha256":"444f99f7bd2fc42ff1c489463fcb69de4c7ace89e620d7481c88822314f0f519","review_raw_sha256":"2d4c62a9f6f9495f24a4ad1f5307fa930c772b9164d7d9752f56e0ab90ad9082","review_sha256":"096099f79f2f6638718dddb2de8ab5cc96d6746c79819ff26dab011f1fe2f7ee"},{"probe":"&&&#**; \\:中~>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &&&#**; \\:中~>","en":"Title"},"rationale":"Raison &&&#**; \\:中~> fin.","reference_ids":[],"question":"Question &&&#**; \\:中~> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &&&#**; \\:中~>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &&&#**; \\:中~>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&&&#**; \\:中~>"}]}]},"changelog_raw_sha256":"d5d5c9d55559651703e557343b6519527ef694c939186603f56821b7a69591b9","changelog_sha256":"e5bfcc0edcf658916ed77966bfe918bc5e4700c4774f1316b39c45c179f2ffe5","review_raw_sha256":"430556f1c7c93302a1af2bbf8378dea91ebc3fee55edf2cfd4434a26ab1a81c8","review_sha256":"0dbd22f18fbcf71c04f432850a906889986e626febc25856dbaf87eec2a0967a"},{"probe":"\\中_:]][[*b*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\中_:]][[*b*","en":"Title"},"rationale":"Raison \\中_:]][[*b* fin.","reference_ids":[],"question":"Question \\中_:]][[*b* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\中_:]][[*b*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\中_:]][[*b*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\中_:]][[*b*"}]}]},"changelog_raw_sha256":"7ea215342e203a6f8ac12e6498df8555651746d55c5de74aa0137d3f63745297","changelog_sha256":"4a05d10ae747413a098dbe98fc9cecb2a1a7dfacf42cf98cb8a73f807f7e4cf1","review_raw_sha256":"9fe43c42008ee266fdbf34d49047dea636df6376ddd783769fcbc07adbade2d0","review_sha256":"025e9624b7275d083891a278de766582bfef290e5c72e12825b2267e6c92ffb8"},{"probe":"=éhttps://<|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =éhttps://<|","en":"Title"},"rationale":"Raison =éhttps://<| fin.","reference_ids":[],"question":"Question =éhttps://<| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =éhttps://<|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =éhttps://<|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=éhttps://<|"}]}]},"changelog_raw_sha256":"f229c9923827d85455cba921c22fa5a601c0a606f1919df5152a87d749fad65b","changelog_sha256":"8a379e76041028808719230579293b2ceb1a646747b2943501dbbae23498d4b7","review_raw_sha256":"029ea3ad26dbd46dd35ff5b4cc6180ba176a2f8e51817a597cfc4b04726fac61","review_sha256":"75105cb2d81e30d610828ce1228ad2be0ac77a4c64fe414651a73c7b27053c88"},{"probe":"b&b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b&b","en":"Title"},"rationale":"Raison b&b fin.","reference_ids":[],"question":"Question b&b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b&b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b&b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b&b"}]}]},"changelog_raw_sha256":"2afdccc90585ad0296eb5edb6495d8777ed56c447c435b7a64992164d65fcb4f","changelog_sha256":"fa02de281e284b808031c36812d1837cca5186b539168c756e6bfa38e421cab8","review_raw_sha256":"debbfc18b0876c55d23a5c591f581c8bad34203bd6493c4f21889965d81c9e93","review_sha256":"a7415d9f19cc303206c09cc45a1f5bd6d04398b34f925e744124b9f465d0a7d4"},{"probe":"~.|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~.|","en":"Title"},"rationale":"Raison ~.| fin.","reference_ids":[],"question":"Question ~.| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~.|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~.|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~.|"}]}]},"changelog_raw_sha256":"645fc3911ed59ee643dbc984e39204ed0c48ffb0c655a5dcc813e65a716af473","changelog_sha256":"5c5cb477d18beda7ed0f2e3375c4da2d9099d65fb3ebb56e5d4771c111767690","review_raw_sha256":"400e1342fe3275bcb4ee7dde24a924a14d8af27a8f6563dd6baf00f1691f6a9e","review_sha256":"6c2f12bdb3d59f7929d40c1352db09435ff2883c8ff20578f8349caad64fe2b4"},{"probe":")a &`&>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )a &`&>","en":"Title"},"rationale":"Raison )a &`&> fin.","reference_ids":[],"question":"Question )a &`&> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )a &`&>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )a &`&>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")a &`&>"}]}]},"changelog_raw_sha256":"7d6ec0f4209c6890530e9fb162cb538eaa24b902636812791e297df71f60693a","changelog_sha256":"9747f085787582847c560722003ef7a0476970b9a9dfa0540808ca6acad4e75f","review_raw_sha256":"d998e52db29d8d7cd9a1e002d8160486800e25939c2869a3a5d2e9b2b613ac79","review_sha256":"5adaf059d021ad7abda0ba66b598ce317a1d24a97b233d2fa6c68453d45af84e"},{"probe":"|中![&=\\#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |中![&=\\#","en":"Title"},"rationale":"Raison |中![&=\\# fin.","reference_ids":[],"question":"Question |中![&=\\# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |中![&=\\#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |中![&=\\#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|中![&=\\#"}]}]},"changelog_raw_sha256":"2d794f2344206e8f474e4e0cd1f6e810c073a7ada5a53c75fde8e58e26f7d46a","changelog_sha256":"bfdfaa667c87f84f3442233dfd68bca2ae4cedb41954e66affd625de8a5b626b","review_raw_sha256":"facd77c541ef871a839a18e739f654649abbd1d764f3e79f176ad563c1ac36af","review_sha256":"3678ca0237c4757dc49b9071a30fbb98392f696e58b2c77faf29cb9297fef9ec"},{"probe":"!é:.**|****. )","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !é:.**|****. )","en":"Title"},"rationale":"Raison !é:.**|****. ) fin.","reference_ids":[],"question":"Question !é:.**|****. ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !é:.**|****. )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !é:.**|****. )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!é:.**|****. )"}]}]},"changelog_raw_sha256":"9ead128cec701f7386bce8e426b998d23719e309c8310aa85f823428a7e26202","changelog_sha256":"08431844c43cb6899aefbfec0552aef4e86b5bfedcd59cf3cd60e2b0e79567a0","review_raw_sha256":"ac8735b745361df61708d7a99d4de79d709035278fb1724fb0498f1612bd95d9","review_sha256":"53f683ec7995096136e9970c51cc6cef56a01e2e82a83ccea11e923123e5282b"},{"probe":"/ &","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre / &","en":"Title"},"rationale":"Raison / & fin.","reference_ids":[],"question":"Question / & ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation / &","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label / &"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/ &"}]}]},"changelog_raw_sha256":"db8244f23b014bd54e323cabe4e168684d6d48b53793175478a01ba766d49ca2","changelog_sha256":"65b6edfba40767d830be48d1ec2270b71b4e320ae36e199a1d675273b7f502bc","review_raw_sha256":"7943d5772eaf31ef5257353545bdd908cc681fa1c3fed56ca956d367381de1d6","review_sha256":"a89a5e5bdbab603d41ce7bf3df6baa3bbcd62845b4e5f01f99e82bbf78357d3e"},{"probe":"中&#<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中&#<","en":"Title"},"rationale":"Raison 中&#< fin.","reference_ids":[],"question":"Question 中&#< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中&#<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中&#<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中&#<"}]}]},"changelog_raw_sha256":"b46b62cfbbf6fc4f0a10e77392a3cda9eb03747e009b31451c92be380ec1d8f6","changelog_sha256":"92384e4ebe546ddec309ef595617a42aeaf6600d8f8a2e63f7600692158acb02","review_raw_sha256":"89ff3dbe2fff3c2b9bf7ec4003b655e37f579e860926fd3e07d83f4f52c2db32","review_sha256":"86706bf9c96fb078471ca05892685061951c4e9f8dd2520dbdf08532c75b5f2f"},{"probe":"& _)[[![\\b#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre & _)[[![\\b#","en":"Title"},"rationale":"Raison & _)[[![\\b# fin.","reference_ids":[],"question":"Question & _)[[![\\b# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation & _)[[![\\b#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label & _)[[![\\b#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"& _)[[![\\b#"}]}]},"changelog_raw_sha256":"2d00ad8bf3fc79ffd566de53f26388238c21271803512c5ca8bef5fbc0766468","changelog_sha256":"473fc68b75a67284a3f9e42cc2975940e5037ee4e5be776b7e9aefa4211fd7d6","review_raw_sha256":"a436a2cc7d53bb460c90fac3452e39b5154b23fd080eea178dc212d970a4a069","review_sha256":"e4f42961939eeb9fd56f47ba750c8d607f5abce09a7e8cbf44a6978dc3deddc7"},{"probe":"[![)中a<&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [![)中a<&#","en":"Title"},"rationale":"Raison [![)中a<&# fin.","reference_ids":[],"question":"Question [![)中a<&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [![)中a<&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [![)中a<&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[![)中a<&#"}]}]},"changelog_raw_sha256":"2d7b2542cbddc34fc31a14b0edd2592d8a7000cfbb8ceca3e5b78dc36b79ad46","changelog_sha256":"b920b5d0232cb39b2bb896bc39306f31d68556d1ceb226fc0e157b0d8f550da3","review_raw_sha256":"147127d4e3ca6d0220ec82839f31e6415ce1491deb88cf7a26b3e49ae157af92","review_sha256":"bd275ffb0eaddedd6c4d2c7750ef5182b1cb6b280e50752a599d1905545381b1"},{"probe":":b`` _<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :b`` _<","en":"Title"},"rationale":"Raison :b`` _< fin.","reference_ids":[],"question":"Question :b`` _< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :b`` _<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :b`` _<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":b`` _<"}]}]},"changelog_raw_sha256":"e4f8459f3bc1a42caf6891122604288cb5e8079c6f1f1e5168cd15fd9848f1fd","changelog_sha256":"6c218555dfc438bfc66064108a383587f952e69596f3b584bf3a364401abd900","review_raw_sha256":"72b328ef532dbd8d2992c5f1a31745eaa7c04aaf381055d7b9d9afee0abab889","review_sha256":"6e7179a75b13400b38f62b22c5661431c47b230efd884367c7b4c9960d43126c"},{"probe":"&!_;]b_=/!/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &!_;]b_=/!/","en":"Title"},"rationale":"Raison &!_;]b_=/!/ fin.","reference_ids":[],"question":"Question &!_;]b_=/!/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &!_;]b_=/!/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &!_;]b_=/!/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&!_;]b_=/!/"}]}]},"changelog_raw_sha256":"f166a344eee31d40bce29e736d3570a7994b005776d181cd5becd0cf796010dd","changelog_sha256":"3f6eb1000f5b127e8191fddc4b0f31217141f61ced51e0d27fe9badc87ea2e54","review_raw_sha256":"9ccadee8796d2a7e77ceff9f2829ea2977049d03abf9427b546de265951181b6","review_sha256":"b0fdf80c385fc25939b09f5d1dd101157ca23829402daddbea17f681c7ab06a4"},{"probe":"&>é**(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &>é**(","en":"Title"},"rationale":"Raison &>é**( fin.","reference_ids":[],"question":"Question &>é**( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &>é**(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &>é**("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&>é**("}]}]},"changelog_raw_sha256":"cc08060ebbc1c23de223c99d9dac644098d706ceb007226f7d0bb182f2703516","changelog_sha256":"3a2279adf6aed6bca47d4ceb0f536b592f8865766b11f740f49c545131e2f2bf","review_raw_sha256":"3a533254df525d5077040af2949de97f613368302e9e1a398c6be37c3df10450","review_sha256":"29086669131345e7001a97d3c5cef14dc97e6e83e39e040a1d267cc66ff03b2b"},{"probe":"https://   >~=\n\né**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://   >~=\n\né**","en":"Title"},"rationale":"Raison https://   >~=\n\né** fin.","reference_ids":[],"question":"Question https://   >~=\n\né** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://   >~=\n\né**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://   >~=\n\né**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://   >~=\n\né**"}]}]},"changelog_raw_sha256":"f232f9a2892bddaec545b3389946288bd3d16e67c5b9dbf7737aea084e273e91","changelog_sha256":"46b7f82292cc480195230dc97733e28b462935a9e5ec1b4df639c21b7db127f7","review_raw_sha256":"7c856b3c7c39d2f5c02f2ae487ea8ab91bf90214e602361c01d31714457f38cb","review_sha256":"c866cb62f48880903a8de1f97fd6c5d3d24ad634a5335ebbcd86f7ba34eaf9ac"},{"probe":"& <]]&#`!www.]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre & <]]&#`!www.]]","en":"Title"},"rationale":"Raison & <]]&#`!www.]] fin.","reference_ids":[],"question":"Question & <]]&#`!www.]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation & <]]&#`!www.]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label & <]]&#`!www.]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"& <]]&#`!www.]]"}]}]},"changelog_raw_sha256":"1a62601bec4c13e5f3150bd9d44bdc1b7a3ad1d232e28018ca20f221cb5aff0c","changelog_sha256":"4f038543bd70de3b56ab815619346a6c00e3e43dd90855d3c90384e0b275be23","review_raw_sha256":"543d1723e6e92d140db79481a3bfd9cc1181fe955fdb7518e7b252564cbcb065","review_sha256":"5ef7590ad15ad274aff5d69a9c96e98bfe33226af19d07f0b2ecf658895eb6ce"},{"probe":";>& !`:&\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;>& !`:&\\","en":"Title"},"rationale":"Raison ;>& !`:&\\ fin.","reference_ids":[],"question":"Question ;>& !`:&\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;>& !`:&\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;>& !`:&\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";>& !`:&\\"}]}]},"changelog_raw_sha256":"06c380337384389e12c1ae750d547e9bda48325ff7566042e80550a991ac0306","changelog_sha256":"91f4ed037f47953080d9a1b92ed656d7d2e5d294d310bdc2909a6607f2243716","review_raw_sha256":"2b959addd3a32b75510c9bacb4b8556d0c2162cfd4fbc885892fe4d364d58054","review_sha256":"680fa537c4e1621b0557885eed43a5d290d55ca6d9ee6b25306dfc456e8ef7c9"},{"probe":"~&*) &#&#\"!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~&*) &#&#\"!","en":"Title"},"rationale":"Raison ~&*) &#&#\"! fin.","reference_ids":[],"question":"Question ~&*) &#&#\"! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~&*) &#&#\"!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~&*) &#&#\"!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~&*) &#&#\"!"}]}]},"changelog_raw_sha256":"509bf6563fb61fe815f360837ae357b7e670772d62f42e596183ab9657d2ca1b","changelog_sha256":"858e8d899162d30340cc44c1ae124e6183f6fbe61a663705c4c03d646cf3325d","review_raw_sha256":"41defaf49b4e53859f3ef91fc1f47c4fb080b81438db55e502524db83e1a77b9","review_sha256":"f70f8be20a1413d986e96b524729b49f9c792b6f1047f5fd06cd28de2b8c21bf"},{"probe":"a)<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a)<","en":"Title"},"rationale":"Raison a)< fin.","reference_ids":[],"question":"Question a)< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a)<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a)<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a)<"}]}]},"changelog_raw_sha256":"7a48a88a3fb81651ed99ea9cf850630399e37d2fc98daff6eb8a9ddf9f6a3fa7","changelog_sha256":"a4998e7af6f794919a719d5d262beea296576404835867f494a995e3defa3760","review_raw_sha256":"b5de21bf06f1fa277d1a0a3697bb650c8038f9a404378cee9b9c1e486fa54d29","review_sha256":"a5b55ec228523d61732d12fa3c39e3ad45c8abe812b0527d5e31574451f35b62"},{"probe":"(|&#**:","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (|&#**:","en":"Title"},"rationale":"Raison (|&#**: fin.","reference_ids":[],"question":"Question (|&#**: ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (|&#**:","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (|&#**:"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(|&#**:"}]}]},"changelog_raw_sha256":"a6a561ae56b9dc780c76f9d7654843f696b04877b722bda0a4f679d8c1d1edb3","changelog_sha256":"4898e27f0d258bb7c758c1717599345d8019324c6cf7b0fff6998e71ac492361","review_raw_sha256":"84184e84825a5b2da518b54e55d3a71dd82b5d63158b3249ded6342a520a33e8","review_sha256":"4ba416877910f7de3903f8883fd253098b58d5d6dfb5e1d448ca8c5849fe6a0f"},{"probe":"(&#\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `é]&#(\">","en":"Title"},"rationale":"Raison `é]&#(\"> fin.","reference_ids":[],"question":"Question `é]&#(\"> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `é]&#(\">","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `é]&#(\">"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`é]&#(\">"}]}]},"changelog_raw_sha256":"f0420ce81908aae90d38a32fa20b4647fe374c2f93e5d133174fe179520cee60","changelog_sha256":"aa327d970931828f4c6fdd440d8ca8fd3a7d8911b5fd4f31e96c10144705d1ff","review_raw_sha256":"7a90e2463b979c70e65363b1389a777948d304ff3a11250bb44c54a2a1cc1d19","review_sha256":"6746a234825ac379eca3d11a44436aaa2e8706af385d8733d96c42e7227242b6"},{"probe":"&#\"a(中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#\"a(中","en":"Title"},"rationale":"Raison &#\"a(中 fin.","reference_ids":[],"question":"Question &#\"a(中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#\"a(中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#\"a(中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#\"a(中"}]}]},"changelog_raw_sha256":"e8866296eab852293d8fcd441142e0ec2e49a68b7fce73f1df27563a87b4a6f7","changelog_sha256":"d5ad82400c71ce542c39fbad91e328f4d9600af01aa8ddc7f97678053269ccdc","review_raw_sha256":"705543dddff63a8c8f7bed808334221df01f22a9db1197b57510163319260f88","review_sha256":"c7a0d05c408ad0b4c54d5c4e8d66a16480f2e478f6243edc095557a9bf1cca23"},{"probe":"~~.=[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~~.=[","en":"Title"},"rationale":"Raison ~~.=[ fin.","reference_ids":[],"question":"Question ~~.=[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~~.=[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~~.=["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~~.=["}]}]},"changelog_raw_sha256":"e70fa3d8e2e6bcc63c7204a3e8e96785f23734bc51c4edc5a36e03497e2f586f","changelog_sha256":"7306e9ad5dac8af4e9826862cf2ea844733e4a817a30eb35292838ade5a3f83a","review_raw_sha256":"ddd35520696373cc9fc39bbd3134cba8ca04a69c7b6dc7cc51ac0ea6c885e6e0","review_sha256":"55a179bb514aebda96fd35d11bc5c4e9244bc76d81c14c2aa9c4467ad9ed8d51"},{"probe":"[[/(:![![)>=é`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[/(:![![)>=é`","en":"Title"},"rationale":"Raison [[/(:![![)>=é` fin.","reference_ids":[],"question":"Question [[/(:![![)>=é` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[/(:![![)>=é`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[/(:![![)>=é`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[/(:![![)>=é`"}]}]},"changelog_raw_sha256":"02b78c582af322df5ce6be9d8f4e04032e2fb681dce4b499b7c78c2807a940a1","changelog_sha256":"0988face74cb58d25d6f9cdf2dc2d856c96172076f68d778fd9b7ad2960ccdef","review_raw_sha256":"38908c41233e8d94fef499390170e4a2c4e9c1edf1976b06ae6ee29f99ee050c","review_sha256":"5756ae7c1a097c9792313f0c451767cfd706c881591079fd6d0ecd95fe2c250d"},{"probe":"**https://<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **https://<","en":"Title"},"rationale":"Raison **https://< fin.","reference_ids":[],"question":"Question **https://< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **https://<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **https://<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**https://<"}]}]},"changelog_raw_sha256":"4e688dab9f64404350a81f305637e0465b36aedc346e1ad4b5a41f42c643c85c","changelog_sha256":"7518da24cc9585d1d88f458dffbf5c1c7fc04ff4db710074cd4d4c6d000a4503","review_raw_sha256":"1a66c355a0513626d10e461750209073b11e4139781e1f581ed52881ef75221f","review_sha256":"814b1a3e5c45a3b96d7ca3c2fbf69769cfbc91d2efc8963d046cce97711b17bb"},{"probe":"*[[|#www.é<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *[[|#www.é<","en":"Title"},"rationale":"Raison *[[|#www.é< fin.","reference_ids":[],"question":"Question *[[|#www.é< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *[[|#www.é<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *[[|#www.é<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*[[|#www.é<"}]}]},"changelog_raw_sha256":"e7bf774e2e045b964df85e87679baf48235b43c148a3bc520017f02ccf6cc64f","changelog_sha256":"1e6d8797775f196d0b18a2866411131396a90865f3a913b5f8fb692e9052ae45","review_raw_sha256":"6154c86fa02c4deb564c5a644bf65175b7ec2fb3842bcee7d211d3ee51c7d660","review_sha256":"06b7cc251aeed837e69e60a691fe308d8aa2b6a009239cef0078a96c841479bc"},{"probe":".![=;=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .![=;=","en":"Title"},"rationale":"Raison .![=;= fin.","reference_ids":[],"question":"Question .![=;= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .![=;=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .![=;="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".![=;="}]}]},"changelog_raw_sha256":"9f86b562cc9713d8344ddfcb69bac0d3b22fd3289350568df2c5e043ddd659f3","changelog_sha256":"44822b01ad8fdc32769578b3f2b00f98d07eac0b7e847014389cac697275e345","review_raw_sha256":"01f7996bed8cf353928e21b28cea3933a25fe0732dd6122975843fea54fe8a0a","review_sha256":"5a0afeb41d004d528b2a84bac71b58fe25c6a2cb2fd6c702d8b8f6723c09bd9d"},{"probe":"**]]_[..&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **]]_[..&","en":"Title"},"rationale":"Raison **]]_[..& fin.","reference_ids":[],"question":"Question **]]_[..& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **]]_[..&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **]]_[..&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**]]_[..&"}]}]},"changelog_raw_sha256":"55467cb46b55af72f6cc5574b4758c3a06132a7b9b21ca3136206382f121069a","changelog_sha256":"c50243769dd216aadaed2a84f6c3f8c8cba703e781f239c74cd55b2013705973","review_raw_sha256":"6025d325eed0a1e501b0f0f97f7321a00d20fc8c0b746bf8d5e13e53ca28e692","review_sha256":"a10e7c6963b978e0ee2e4089d8cee97a05894653ce353fea0828d6a0be0d6815"},{"probe":"a\"&中中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a\"&中中","en":"Title"},"rationale":"Raison a\"&中中 fin.","reference_ids":[],"question":"Question a\"&中中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a\"&中中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a\"&中中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a\"&中中"}]}]},"changelog_raw_sha256":"d9d7c6bbf4af1eebda764c88667844b72f753d3c2aea578b612ba615024cff00","changelog_sha256":"7349d9a93319f50ca2c60e501d558b2b3a45bae4b67e7d91a03d709e27c327f3","review_raw_sha256":"79dcef0f1d089cacf6e2d6c44510054fa991ed612c65d0dd0d4f0f3ee05de4b9","review_sha256":"68935fa367c8fb26190f8fde8a8c4515be20876489c3e102b3a3ed7fdd8c07ff"},{"probe":"![./https://].:~\"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![./https://].:~\"","en":"Title"},"rationale":"Raison ![./https://].:~\" fin.","reference_ids":[],"question":"Question ![./https://].:~\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![./https://].:~\"","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![./https://].:~\""},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![./https://].:~\""}]}]},"changelog_raw_sha256":"9f5c4e530c750e2c0e2296b1ff9dc6b9f9314c4ded13da3a9364c5a6311496c5","changelog_sha256":"6690529606aa263e493937689d8b3b5db7d77ab064f8c952b777d771308622e4","review_raw_sha256":"f7a09d5c1f2c72530c2bf57549e0aed828ea57812fe456c336dd723d7640aa54","review_sha256":"4b8682c0b2b19eaa5bff4191f60a534bdeb7cd6e2ce47962b51b6d8dfcb3360f"},{"probe":"&([[\\![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &([[\\![","en":"Title"},"rationale":"Raison &([[\\![ fin.","reference_ids":[],"question":"Question &([[\\![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &([[\\![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &([[\\!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&([[\\!["}]}]},"changelog_raw_sha256":"fb1c551cdaf650e92053dcf7bc31e86ff684192dfc1b739d412fd8119774a77a","changelog_sha256":"b19cbd437bcdcd06b338aec77a83390883f0d7ed8960bafff961ce4603923044","review_raw_sha256":"785b0344d22d435586495b4dfac10f906958a5c8ab43bdb96be5b0756296ee61","review_sha256":"06eb188b90c167cb9a8002afbc20454fcf90baf4ae54af4e5d3d32ef8eb791bc"},{"probe":"]`![[[awww.)]]/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]`![[[awww.)]]/","en":"Title"},"rationale":"Raison ]`![[[awww.)]]/ fin.","reference_ids":[],"question":"Question ]`![[[awww.)]]/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]`![[[awww.)]]/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]`![[[awww.)]]/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]`![[[awww.)]]/"}]}]},"changelog_raw_sha256":"e9cba7759d5bcd90238e3ddde905b10f6ed659dc46e48bf0271d6ed6f28c7c68","changelog_sha256":"9fc7633723a405a238cd621723c3f8bbaa1b9906da5931eb677e1cdc75fe8908","review_raw_sha256":"eb48cdde9ee3ab60c77d623c1e42c30d17982377ade9568af48958bce10e3d46","review_sha256":"caaf4385a74959e5326688914b63bef1b2a5c10a9d079df1a07b1ddce252c052"},{"probe":"=é\"*<中\n`b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =é\"*<中\n`b","en":"Title"},"rationale":"Raison =é\"*<中\n`b fin.","reference_ids":[],"question":"Question =é\"*<中\n`b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =é\"*<中\n`b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =é\"*<中\n`b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=é\"*<中\n`b"}]}]},"changelog_raw_sha256":"3b83112c363a13eb3d9e710948b80f7989be7243d9f027e4eb5a5e7e2cdb5107","changelog_sha256":"8aaa116651d3eb4e3e7a4313d65aee0c3fac2bb65eb081a8a8923ef029401bb0","review_raw_sha256":"c36b85005b5883c6eee9f5cdd914c4b60927c56c7581bb1911f7916d3250b87f","review_sha256":"25c91ce36337e723fe9fcc8a71dc92fbf97279d3e8ea798bbfa2942fefe4e93b"},{"probe":";. (!**!/https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;. (!**!/https://","en":"Title"},"rationale":"Raison ;. (!**!/https:// fin.","reference_ids":[],"question":"Question ;. (!**!/https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;. (!**!/https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;. (!**!/https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";. (!**!/https://"}]}]},"changelog_raw_sha256":"d18a55d0faff973a284710483b3c8c86f7dd0a81489e61e57c601c175eb39d0f","changelog_sha256":"a5974998f31123d70bd69c665d710cfdde2062c9b1095577191a116987abf79e","review_raw_sha256":"51f7b040522edd07513d12484223d91de07369030dfac76f46e88bc5876ac3f4","review_sha256":"c251c2443c4b45c900343a23a122b8284572b3d98c195efb78c5f5d00de95a91"},{"probe":"*_é\\\\b*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *_é\\\\b*","en":"Title"},"rationale":"Raison *_é\\\\b* fin.","reference_ids":[],"question":"Question *_é\\\\b* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *_é\\\\b*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *_é\\\\b*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*_é\\\\b*"}]}]},"changelog_raw_sha256":"32daa96a04e12c3014497417e55d5b524e098961bce5f221eed4061faf9fa629","changelog_sha256":"de159e9fe0ce53c863448d1cb79595888660910f63ce4b1315888bef46033615","review_raw_sha256":"4aafd055410eccbed9cda6fa31f979e096ddd60c21c0eb2166e7dfbbf347882b","review_sha256":"f957103ae4e90cdbb96acc2fc721a7f2e69a706c1261758162e5ea536c374082"},{"probe":"]`[[|**www..\";中`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]`[[|**www..\";中`","en":"Title"},"rationale":"Raison ]`[[|**www..\";中` fin.","reference_ids":[],"question":"Question ]`[[|**www..\";中` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]`[[|**www..\";中`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]`[[|**www..\";中`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]`[[|**www..\";中`"}]}]},"changelog_raw_sha256":"c50a3e97a76c581e701f919f6a68a9a3e0b70f88c78cb5a825fad5266ff14b35","changelog_sha256":"a50c7cf9a29baa7a2c4698e256c309e8fdaad07626b1512ab4823f410ca37abf","review_raw_sha256":"188f961c999f80fd35bc05aeae5947390bbdb4ec743718ff01625086e542370b","review_sha256":"160a0aab17a7f59295ab44302c5f460e817c5a5ea9ce94032767dc2bcba9e7a1"},{"probe":"[[中)._https://]]中/\" ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[中)._https://]]中/\" ","en":"Title"},"rationale":"Raison [[中)._https://]]中/\" fin.","reference_ids":[],"question":"Question [[中)._https://]]中/\" ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[中)._https://]]中/\" ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[中)._https://]]中/\" "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[中)._https://]]中/\" "}]}]},"changelog_raw_sha256":"3b7a0aba098291515d11cfeb7852fe22eeae5dae5b9c03c66c0b557fcc1f1311","changelog_sha256":"890d5014743f0d8afb9c37d4d24b7e82ccaf1d26e579528587e4cd695dc15b80","review_raw_sha256":"3819cc16b89620b609eea1758be5b7421080c1373614f5ad58aaf939fb2c6511","review_sha256":"0a33a6441709d42531e754156f856a75b56834e04b153477e773e5132294de3e"},{"probe":" *<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *<","en":"Title"},"rationale":"Raison *< fin.","reference_ids":[],"question":"Question *< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" *<"}]}]},"changelog_raw_sha256":"dc71cd1da4ecc947d586487700353d924f0e2eacaab0290f49985704c4981b29","changelog_sha256":"c1e0c2b3b1b8409ddf554f3320819f656fa86638f11743100304ecb7c75a9785","review_raw_sha256":"a65ad56388c9bd043b3b8d743319cd1305d9d8568ef91f6878981bc8be19634b","review_sha256":"db885c9bc999d360b61e2db6c8716680a858515ab82cb38d787405c1672f1af3"},{"probe":"b;&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b;&","en":"Title"},"rationale":"Raison b;& fin.","reference_ids":[],"question":"Question b;& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b;&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b;&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b;&"}]}]},"changelog_raw_sha256":"5ab1a8d68ac28a26b9dde0f3322106fe01f6571cf46291f76615f0091c71a6ef","changelog_sha256":"cca6af1a687eb7acbdaa81c39894edfddc9a95235f513149ed827d3ea1e8becb","review_raw_sha256":"8dcb0b979ac380c9878e19b136583dd11dff0c0e26b8183f74a5f98c8db0f1ed","review_sha256":"d5dca71c834fccbb792542bc94534341ab6d97b34adf1a90173667be47d8053a"},{"probe":"![\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![\\","en":"Title"},"rationale":"Raison ![\\ fin.","reference_ids":[],"question":"Question ![\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![\\"}]}]},"changelog_raw_sha256":"7bc0df1b119c83273efdf91930b5677d28cc0c57c9aebfbecb488f38bf79121b","changelog_sha256":"4ccb0ce788920a0008e4a01e5057baed91893557943237b6a69cb828a29aaebb","review_raw_sha256":"e2a2772f43e8800dcaf675a0d3f6e3cada0d7741badaeb2d79b4edd8b1725538","review_sha256":"d71dfb909a9ce54d814846ccf96027a43a94cf68a87a2ad4fc11e89dd3ec1978"},{"probe":".a_https://~)#<=.a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .a_https://~)#<=.a","en":"Title"},"rationale":"Raison .a_https://~)#<=.a fin.","reference_ids":[],"question":"Question .a_https://~)#<=.a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .a_https://~)#<=.a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .a_https://~)#<=.a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".a_https://~)#<=.a"}]}]},"changelog_raw_sha256":"cc795a1fce05b574a04cfb127f5041f05c5560d51e2fd6c649ef4486dc324cd5","changelog_sha256":"7045cac73b7e8311e3f86fff1745f6440004f36b1b8d7b9cb0e3bc70234c679a","review_raw_sha256":"ca89168732532266342fd1dca45e2c409192304ff2d935d2d75ced5f5902cbdc","review_sha256":"e8b3e8597c0545c81c105875ad223dcb547935145b329c634bf123e116349124"},{"probe":"]~]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]~]]","en":"Title"},"rationale":"Raison ]~]] fin.","reference_ids":[],"question":"Question ]~]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]~]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]~]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]~]]"}]}]},"changelog_raw_sha256":"468dfdfba150755f92bbde57495309eb11186c8448baa1e424541c0956288e76","changelog_sha256":"a97ca5d12755fe564d4538be9eb4c6ba0ceb2269455f9b64351e6802b4a9574f","review_raw_sha256":"f76df9f07e9d4320d5315aec63d8d150bfcc983c2f8578d7352be02c54811c66","review_sha256":"aa486bb69c9aed9d0dbf8ba16ce5f7ea025731b1aed9e22be61a5bd031f82ab7"},{"probe":"_*é!www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _*é!www.","en":"Title"},"rationale":"Raison _*é!www. fin.","reference_ids":[],"question":"Question _*é!www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _*é!www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _*é!www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_*é!www."}]}]},"changelog_raw_sha256":"9ad51c2707a08a5da7373a787c117744dbe970bd084651071cd24d76880935f7","changelog_sha256":"9be4faa3b8ec4670a683c9baedd52962c499feda3dc2ff6955bfb91f84baf22c","review_raw_sha256":"c927636999efcbe9c09541762afaf7ce9321303560e2df12adc1c3023464b044","review_sha256":"1b659375ac03694837b711223680bcbce5465adec79b3eb91fc155bb7642d65d"},{"probe":"éa< #é]])b)\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre éa< #é]])b)\n","en":"Title"},"rationale":"Raison éa< #é]])b)\n fin.","reference_ids":[],"question":"Question éa< #é]])b)\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation éa< #é]])b)\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label éa< #é]])b)\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"éa< #é]])b)\n"}]}]},"changelog_raw_sha256":"9e3efdb0a28b2d35d56b54c2624894f9aec080ce7ab5471bee471d8cd53e14cb","changelog_sha256":"ab6583ab076a7be54b664bb504a8a621300015aae01c8ac850f0e74192d49ced","review_raw_sha256":"b9244489b0e87447bc92f6de31c38ba288d7dc7bf4283da1e06d4681bacfc57c","review_sha256":"f68365961a79290f1a3f8375dd84911feb8bd95a433785acc5c3531321c15150"},{"probe":">![*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >![*","en":"Title"},"rationale":"Raison >![* fin.","reference_ids":[],"question":"Question >![* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >![*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >![*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">![*"}]}]},"changelog_raw_sha256":"53c40208edabbb6732d27c981f98d941df9a238beb551bc8cb36c696a260510e","changelog_sha256":"b3e376e311c6647a3cb9be54800dd5d59e23e361ce6afb3b7a9aa0d1d1b2eaff","review_raw_sha256":"77672506a4e7a7a4588ed1a0d00540072711b0d3a175f36c3ddddf38fdc51989","review_sha256":"2e6f4e641350cdbecb4bbd534355ce3801236b587e3a7365322dc700c2b0b0ec"},{"probe":"&#b(]~(![]]& \\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#b(]~(![]]& \\","en":"Title"},"rationale":"Raison &#b(]~(![]]& \\ fin.","reference_ids":[],"question":"Question &#b(]~(![]]& \\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#b(]~(![]]& \\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#b(]~(![]]& \\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#b(]~(![]]& \\"}]}]},"changelog_raw_sha256":"f727555f8a7dde051a8385e29e36adf68af0d91e937546b5fa9869ba5cdb9193","changelog_sha256":"69ef2863d95ff197707ba8e26c33f59c9f544c7facba077926053c8bb7ced13b","review_raw_sha256":"4f943046b734a4611c93d1570bebe24c748c2a51dfe3a826404f78a7562573a8","review_sha256":"d6d3e443c1a76198a121ef7d4bfdeb58042fb0ae586f4d1ea9c4d264e0f1422a"},{"probe":"a)< =https://b[ a]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a)< =https://b[ a]]","en":"Title"},"rationale":"Raison a)< =https://b[ a]] fin.","reference_ids":[],"question":"Question a)< =https://b[ a]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a)< =https://b[ a]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a)< =https://b[ a]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a)< =https://b[ a]]"}]}]},"changelog_raw_sha256":"9004d8703361b94f0d42c30f93259cc6f17166eb0b601da6018e3acc2b8d3ded","changelog_sha256":"51fdc72de8c66a8f61b1a1e6d7d06f16d9b3f0e57871a6de6ad8941dc50e5998","review_raw_sha256":"815c1bb0fc3ed89276707d24af68f9eab8e607b758d8d6166f21b2b57cee79cc","review_sha256":"c6b685d15322d8ff773dd18cf937558573452b572faced85f45ed163a9004d53"},{"probe":"><[https://#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ><[https://#","en":"Title"},"rationale":"Raison ><[https://# fin.","reference_ids":[],"question":"Question ><[https://# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ><[https://#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ><[https://#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"><[https://#"}]}]},"changelog_raw_sha256":"8e302f921d1d9542d478b9a4c3e3e32e15a6f3fcafe98a313d8483c7e2c0f9b3","changelog_sha256":"a4b4ab0ba1bc3ce65fbb7896764f2ebcf001c520b5399b1ae97f1a8b35d12d8b","review_raw_sha256":"faa16a428ef9a1a43bf6aa166610e610538531a1facc7a4ec65f8aea3d25f49a","review_sha256":"5434f85a8bbc9f7f62c532e9587c91aa2d89e6f7146d667bf08f7c2f47b5b8ed"},{"probe":"[[中:https://*www.)&<<]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[中:https://*www.)&<<]]","en":"Title"},"rationale":"Raison [[中:https://*www.)&<<]] fin.","reference_ids":[],"question":"Question [[中:https://*www.)&<<]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[中:https://*www.)&<<]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[中:https://*www.)&<<]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[中:https://*www.)&<<]]"}]}]},"changelog_raw_sha256":"5603ffd8a6e368ba963f07de94d90b97417a13837178d05b35cb0c86ba3d3c9c","changelog_sha256":"b210ff372a5d9255c828851f79cec369577e854711fff8a698a5726835dc6676","review_raw_sha256":"b5d8c772da8b3446fcae3c73a73637f063b4e1c93e7bc41974c913485bfc608c","review_sha256":"d70d38a2eb4d602ba74733c8e17afd1ae7ae82c81b8f656fc946f196ee6b64fd"},{"probe":"\"![&#>>_]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"![&#>>_]","en":"Title"},"rationale":"Raison \"![&#>>_] fin.","reference_ids":[],"question":"Question \"![&#>>_] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"![&#>>_]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"![&#>>_]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"![&#>>_]"}]}]},"changelog_raw_sha256":"9d3cc8d99e4899806132ed1daad5e51a88bff6154c8136bf8e1aeefb27ad382f","changelog_sha256":"78129f0c11fcd284495ab105fcd578772e25ef1f7dcb59e46f39f3ae437a1341","review_raw_sha256":"88457b4f56e512afb3ae3a290405194eeefabe4b0ba582a32941b12412009020","review_sha256":"1e2a4175571c926658d6452b6c3c4791603f8a67b99dd30a078fc59704902a95"},{"probe":" bb#]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  bb#]","en":"Title"},"rationale":"Raison  bb#] fin.","reference_ids":[],"question":"Question  bb#] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  bb#]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  bb#]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" bb#]"}]}]},"changelog_raw_sha256":"ea2156f1f93060f71c2817a13e6ab5cfe0401de61b0d7cd58751a1ea3b586bc7","changelog_sha256":"5aaebb1958febe50a1683fe9c49e7532a10ee4afaf346f4d4adb2f7e1dc01c8c","review_raw_sha256":"25e4634a4096056367727bfe823648bfdd68e5c935d5127c6d0cb400ad051275","review_sha256":"580154b5219bcb9c0d6405dfe86ad66cf083b955e9dc9861099d104a73e1c277"},{"probe":"_&#|/b[[\"\\]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _&#|/b[[\"\\]","en":"Title"},"rationale":"Raison _&#|/b[[\"\\] fin.","reference_ids":[],"question":"Question _&#|/b[[\"\\] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _&#|/b[[\"\\]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _&#|/b[[\"\\]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_&#|/b[[\"\\]"}]}]},"changelog_raw_sha256":"8e601383c39706ef81f2c013a7fc677b60b312381402fba7a638792f700fe1ce","changelog_sha256":"c7c07bdee04e263fda9333d39194a404080328fa85ba9990d960b8432f5351fc","review_raw_sha256":"3e34e49f3594390093a3302dbd951c561025851cc9cffceeb1a4e805dd6eae4e","review_sha256":"76f2ba09a129a3e4562a1d646a6d8636c55d509541cd3e890a5f74e6a63c01ad"},{"probe":"中=\"*~(~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中=\"*~(~","en":"Title"},"rationale":"Raison 中=\"*~(~ fin.","reference_ids":[],"question":"Question 中=\"*~(~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中=\"*~(~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中=\"*~(~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中=\"*~(~"}]}]},"changelog_raw_sha256":"003935ed279f977584ed55ee4b3088fe56cd0432ab54c05dd97c0380af3865b4","changelog_sha256":"984b46ebd4df008c1f8f99a8e87bad0b787483e08ba427dfb3a7c0ef287f143c","review_raw_sha256":"7cadfd843ab9b235b6ff7d4b2abb045d44e1293686af105deed2cc6cbd51daa9","review_sha256":"79d4646b48e561979f5f244e6c34306d74952370ad04b516136cc0e0dfbd1782"},{"probe":"[[=)/]\"`]]<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[=)/]\"`]]<","en":"Title"},"rationale":"Raison [[=)/]\"`]]< fin.","reference_ids":[],"question":"Question [[=)/]\"`]]< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[=)/]\"`]]<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[=)/]\"`]]<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[=)/]\"`]]<"}]}]},"changelog_raw_sha256":"988863148a35b84c72359f0d6a237f43792fce3c9d7ae18ed60f0fdf8b4314e4","changelog_sha256":"b07b867d868c84a21d26e750b5f7dd868d72d95fe962416200fa73276214bf07","review_raw_sha256":"de4dac5fc978abf1fb501bed865726762e687acff86672ba2ae3239b7f2a4087","review_sha256":"0e79ea2bb756d132e2ae9e565efa006bfffbfd5dda196680658318e160fb2b09"},{"probe":"b![[&#a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b![[&#a","en":"Title"},"rationale":"Raison b![[&#a fin.","reference_ids":[],"question":"Question b![[&#a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b![[&#a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b![[&#a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b![[&#a"}]}]},"changelog_raw_sha256":"405a97c8f3e378f7d0e05ba38ae994683c36d9405a86552cb2668b44b8b23f2d","changelog_sha256":"0520493f5ed96bca60c86da98480689692c922642b19f81f6a063de3f08758b6","review_raw_sha256":"db27cfca84275d7cb5bce8dbd702b9003d89d4e43cb3c7e26da89707183710e1","review_sha256":"8a28b6a1ad42bf232bfd9049223d2b2e7a47f92ec7000d6c9a51fa999ed320b2"},{"probe":"https://_\"b~]中*[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https://_\"b~]中*[","en":"Title"},"rationale":"Raison https://_\"b~]中*[ fin.","reference_ids":[],"question":"Question https://_\"b~]中*[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https://_\"b~]中*[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https://_\"b~]中*["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https://_\"b~]中*["}]}]},"changelog_raw_sha256":"6785b89bb2ff67f3273dcad3d9647988047d6261f67d08bd15dcc9ba526b14b2","changelog_sha256":"9af9725b67231445b07d6c1a118a26d6b8b3ad52848f3e6a183a945a9a447a6c","review_raw_sha256":"e35b2fe0774ee51172a9a5217ddc96d2ee5dd64fd079a2d787ad55ec355da14b","review_sha256":"0c1b1350710d720218b9fed46361af9b2249c99cf39afb4803fc912f8ff2b557"},{"probe":":[[_éa=[[&~._","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :[[_éa=[[&~._","en":"Title"},"rationale":"Raison :[[_éa=[[&~._ fin.","reference_ids":[],"question":"Question :[[_éa=[[&~._ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :[[_éa=[[&~._","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :[[_éa=[[&~._"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":[[_éa=[[&~._"}]}]},"changelog_raw_sha256":"ff05bf40e569120200dad86acfe589f1c7cb5509a2276fa01cbb70aef152ee81","changelog_sha256":"39ea7a693e808f020b2b6aae491d15a16f829396e44a5b0998b6f1c34885ecaf","review_raw_sha256":"b3fdc4af8b9057e88bb9071df4e0ae5bf64b40ee7214186bf836bc18e84d5f48","review_sha256":"30ed16b621457fd6105335d478248e0506f4753252097da06edb329750fb24b6"},{"probe":"[[]]#|#~**!(]]&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[]]#|#~**!(]]&","en":"Title"},"rationale":"Raison [[]]#|#~**!(]]& fin.","reference_ids":[],"question":"Question [[]]#|#~**!(]]& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[]]#|#~**!(]]&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[]]#|#~**!(]]&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[]]#|#~**!(]]&"}]}]},"changelog_raw_sha256":"4dcf7ec3dafa7017a3144ad1a16f25574504f7b725f91f42f9116bcf4505ef4e","changelog_sha256":"9dc6ac14c0dc960bac6a00928f03aca88d795950308ad312c58568822f4a531c","review_raw_sha256":"10fa9e814f947d09c4d5f203d63ff2e8c15ae75957c9ceceae2e4f149f9c8c44","review_sha256":"08bf7e6c5a3b8c1ef97273ded6ad7fc76a7a5c10bd17421d815ffbb3f6afb0cf"},{"probe":"&#<www.**b]www.>*\"!","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#<www.**b]www.>*\"!","en":"Title"},"rationale":"Raison &#<www.**b]www.>*\"! fin.","reference_ids":[],"question":"Question &#<www.**b]www.>*\"! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#<www.**b]www.>*\"!","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#<www.**b]www.>*\"!"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#<www.**b]www.>*\"!"}]}]},"changelog_raw_sha256":"29a5dc737ae6c11394680e3dd9e2fa5cf37979602dc3043dbf10a17282ffd9b3","changelog_sha256":"a64c8a3b56c98fe53d5119e935702a1b03dc3f42605a9fed940e3975a69ffb4d","review_raw_sha256":"d7a4abb1ea8264dcc629d8581786bea881685697736189b94a691a0bb245e382","review_sha256":"85fd18cfadde10b4434820db1c1f5d03679a1e9016049b031fcc974c94d0db0d"},{"probe":"\")<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \")<","en":"Title"},"rationale":"Raison \")< fin.","reference_ids":[],"question":"Question \")< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \")<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \")<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\")<"}]}]},"changelog_raw_sha256":"b0236f93bafbb44df8e395a62988fd7d825ebd533af8e6cf51bb679f73d45718","changelog_sha256":"a69819a69a9517dbdafb12cb2a23de186ccbc640b5da1f975d83f958e7851b29","review_raw_sha256":"720a7fd5beedf25ebee92e3b12fb73e790befff6b15f7f87e1d08b9f5ac0c97f","review_sha256":"3fd4bd0e880869366047fdbf2e2f880b3854f22307f4bde80d3d0a164b972855"},{"probe":"bé.é=[&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre bé.é=[&#","en":"Title"},"rationale":"Raison bé.é=[&# fin.","reference_ids":[],"question":"Question bé.é=[&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation bé.é=[&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label bé.é=[&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"bé.é=[&#"}]}]},"changelog_raw_sha256":"442b19dcce3e25e68e335cbe48e6e8bc9db413153b2dcb050d024bcca855401f","changelog_sha256":"5829565ba3ad197ba6238ee61d8daf76283d636ea493f5012a2d588bd07a8a19","review_raw_sha256":"41d8e1e74a3d23116de1e9cc9790dd4e7f88efffd087d7b258752ff49439e5fe","review_sha256":"6f5817133aa36ee9bcf41194526fea157ddb51b72b95e4cb563d5189f2667aba"},{"probe":"\")b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \")b","en":"Title"},"rationale":"Raison \")b fin.","reference_ids":[],"question":"Question \")b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \")b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \")b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\")b"}]}]},"changelog_raw_sha256":"87a9e466cd2fd91486fc114945f91047a81a991c689126cf9ee27c47062a903c","changelog_sha256":"b14eabf05bddbeb807d2197ab6784ceed8324f57cb2da6f435c501e4688c72a8","review_raw_sha256":"d5fbb6d26b279cf3ce9886a3dd7a36318fc8b08feba9cfde32185842bb5cb362","review_sha256":"4b609a3c91586ccd51c8bbf4baf0b20a28dd876b1f28c5de2d9dbb3682a51dac"},{"probe":">[./![https://\\ =","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >[./![https://\\ =","en":"Title"},"rationale":"Raison >[./![https://\\ = fin.","reference_ids":[],"question":"Question >[./![https://\\ = ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >[./![https://\\ =","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >[./![https://\\ ="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">[./![https://\\ ="}]}]},"changelog_raw_sha256":"bf2e0ab0b141575c2652b62039c90e3c3025af05e4cdee018866628a57d9cf7e","changelog_sha256":"63188f486747b89caaaa03b70bdbb46b033ddf779f6a2d7a86cacda9fe262201","review_raw_sha256":"c3af5b9d11f5ec3e91cb2641825399c15965526386659280cc2b031e1980fb43","review_sha256":"470457261d8569c5680b402623c118382ad52440e06b986a8334f51c03b441aa"},{"probe":"\"https://)[>]]!\\;&&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *>>]]!\\;&&","en":"Title"},"rationale":"Raison *>>]]!\\;&& fin.","reference_ids":[],"question":"Question *>>]]!\\;&& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *>>]]!\\;&&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *>>]]!\\;&&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*>>]]!\\;&&"}]}]},"changelog_raw_sha256":"474193b4d9ec365eccc97386700dc6e1f2f17261a62823f481e0604bdfa10881","changelog_sha256":"255b14fc4c0d37d5bb666da2624800f96d2da08da095491fd9af536344cc31bd","review_raw_sha256":"c7e7e60f7580d7a2f0037905e4e7db963e5a05b90ae3615c7ee918cb21641ce9","review_sha256":"6db6162127e05c45c587244b340488dd63e9e3649ae3a0f034484342664cb73d"},{"probe":"`>&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `>&","en":"Title"},"rationale":"Raison `>& fin.","reference_ids":[],"question":"Question `>& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `>&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `>&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`>&"}]}]},"changelog_raw_sha256":"1baff59ea4190989b5334770276e29c67c52996d02c01ed43505073923b5844e","changelog_sha256":"cd514e39e344029f4b914a5a6aed1260a20ebcdb5ef3f8996f5e54f27cb4bd9f","review_raw_sha256":"7fa50437ff609630b6eecaf32316eb9def8f27965a93f4c921c4a85430caf010","review_sha256":"c850475076c7b6dc5c228f9cfd36fa1b1ebea60450feedee097df780d678e98d"},{"probe":"/(www.</::_ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /(www.</::_ ","en":"Title"},"rationale":"Raison /(www.</::_  fin.","reference_ids":[],"question":"Question /(www.</::_  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /(www.</::_ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /(www.</::_ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/(www.</::_ "}]}]},"changelog_raw_sha256":"b15e0e2352cf51b46a859aed5a23d72bd9176c0211a14db983dd3b5155895500","changelog_sha256":"dfc4278c8afe0ade577f73fcdd227a319a391e828df0377177271fef4ca6f016","review_raw_sha256":"b6a724fedde7db5b95a563cc0cc0ceab5c27bddd7980c71d86f8b8a56e7fe61e","review_sha256":"4efad9352c2ebcfe69e4164cc50225ddb5965029ffd3c070e02656595867204a"},{"probe":" #\\\\)[[~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #\\\\)[[~","en":"Title"},"rationale":"Raison #\\\\)[[~ fin.","reference_ids":[],"question":"Question #\\\\)[[~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #\\\\)[[~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #\\\\)[[~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" #\\\\)[[~"}]}]},"changelog_raw_sha256":"6f200127d34a4bd0a01e5b82102e593422a3460e9430f09121b4e56d67c0a37e","changelog_sha256":"56d2c179672a4939e8b7b3916d341d265ad6df6a3aaa1b615cafe82569a83b51","review_raw_sha256":"43eb62cc6c3b9d6e11850c966b9ed51d7c6411de7f692e3e11d5ac6b92090ca6","review_sha256":"2a09d58b95ce6552f52543010ec95fef35897ffb5b53f21114a6653ed3e8e0fa"},{"probe":"/&>\";","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /&>\";","en":"Title"},"rationale":"Raison /&>\"; fin.","reference_ids":[],"question":"Question /&>\"; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /&>\";","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /&>\";"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/&>\";"}]}]},"changelog_raw_sha256":"2cd09b79a616e9bef8e378956693a43db6416e7778be18613a59e9eccc482c9e","changelog_sha256":"18845ace926a55a62df049fa958b6c2490f2d23c5eb3b0ab55f4db04e760179a","review_raw_sha256":"d213c3b5bf59853d096ef289b07ec923d5f10ce96c1c50135f4535661211e1c6","review_sha256":"3810ae0b5b5427ce7e0a2453dc745596da45323ae0df64f2c15db25f8740506c"},{"probe":";![.\"[é&_www.<*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;![.\"[é&_www.<*","en":"Title"},"rationale":"Raison ;![.\"[é&_www.<* fin.","reference_ids":[],"question":"Question ;![.\"[é&_www.<* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;![.\"[é&_www.<*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;![.\"[é&_www.<*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";![.\"[é&_www.<*"}]}]},"changelog_raw_sha256":"455f96bba3d21d0870d308314e15d53e19e1491500ec97e58d7aee2646b26137","changelog_sha256":"c0a95e8e1d7703bf655c583d34b911c0edfb724de574a382cee6f81e46495063","review_raw_sha256":"ee510e673defb121a6760e4c421d5733fd9fbfe5b8b979293fd8e038f06455c6","review_sha256":"c79547934f6a43e13baa526e944cc3769b31cee4ca4368e5e88e7a67cc39951d"},{"probe":")= https:///中 ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )= https:///中 ","en":"Title"},"rationale":"Raison )= https:///中  fin.","reference_ids":[],"question":"Question )= https:///中  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )= https:///中 ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )= https:///中 "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")= https:///中 "}]}]},"changelog_raw_sha256":"42787a1734c86e8c68c5805962025be0cb959f90806f1d3876a88e065bb019b0","changelog_sha256":"850e5779a309615e31851fedb3cde29f2cd5b02b473775009aff4f5ed85f9f42","review_raw_sha256":"92234fbb199f38d0d34d0ebbc5b6f75c07a18e29432b9b99e2c29536f4325dcb","review_sha256":"c1bd4619a29d82ad51f934f9bb72ec9247f5fff3d3e2e10066a3b5df3ce094a7"},{"probe":"b ]]\\_![|中[[&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b ]]\\_![|中[[&#","en":"Title"},"rationale":"Raison b ]]\\_![|中[[&# fin.","reference_ids":[],"question":"Question b ]]\\_![|中[[&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b ]]\\_![|中[[&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b ]]\\_![|中[[&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b ]]\\_![|中[[&#"}]}]},"changelog_raw_sha256":"1716e0a1ea432da2cb6fed132cf02a179a4e254a315932a0fcae40e75971bda0","changelog_sha256":"f5a1d2e9753f5f13f4aa145ec7d943b14fcd98d255d0f25e57d8bf0433700733","review_raw_sha256":"9dac1a4f5b37145e5675ca37b9cbbb7c4f7e7bc358e7248d15348ab64aa539e2","review_sha256":"40688fcbe500f575c4cd0d25c9eb4f5a6dcbe53301722d5e56afa9342e403d71"},{"probe":">=&#","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >=&#","en":"Title"},"rationale":"Raison >=&# fin.","reference_ids":[],"question":"Question >=&# ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >=&#","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >=&#"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">=&#"}]}]},"changelog_raw_sha256":"9237853db5c1004f09ab70bb0fa20faad048c6982303843272e31f4a9de50078","changelog_sha256":"00298b92e464650f2a596e668c7a14095b9a3a2989e50899d4ab038108a4752a","review_raw_sha256":"f1db2b99585d8b47cee501fb287559a56327feab1b6c0cf49b654f25d850d668","review_sha256":"a17a46eba7e8abd6e02354dc6c08e98b140388ed81e00fbf6cc546a70647d3bc"},{"probe":"www.a)中;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre www.a)中;","en":"Title"},"rationale":"Raison www.a)中; fin.","reference_ids":[],"question":"Question www.a)中; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation www.a)中;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label www.a)中;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"www.a)中;"}]}]},"changelog_raw_sha256":"7b69ceb6207c253752462fe8258fcaaf237139691e9b2a25cc5478b556b3d915","changelog_sha256":"cc2f3ca880c016c63035633228fc2f79c814ddba21b620d258e803cec0d97328","review_raw_sha256":"add3346a2f6f97e8e5155b710676da2f6eb93982a59bdcb8dc3bc324fe295f80","review_sha256":"bcd952133a7796c1502c4eb900a3d1f6e25119e1e33dc923a280a92f2fd8c03b"},{"probe":" |_\n\\![&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  |_\n\\![&","en":"Title"},"rationale":"Raison  |_\n\\![& fin.","reference_ids":[],"question":"Question  |_\n\\![& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  |_\n\\![&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  |_\n\\![&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" |_\n\\![&"}]}]},"changelog_raw_sha256":"06729e7ba80d9ee0e1c65cc5d938f4339a29d085870f180cb856fc33a34f47c4","changelog_sha256":"ae5bc68167b021e8d5f781a2606b8f545f81da3e633feeda2f9480d895a389a5","review_raw_sha256":"6e3c49c3c2ee01a0d2b2c247ff6a03b4237a025d9c2a9dd03395a61ef994747e","review_sha256":"9ba27ae4364ff569feb6d4bc1b4426ff043f44b77796c694c5cd14ec098d4658"},{"probe":">;[[****","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >;[[****","en":"Title"},"rationale":"Raison >;[[**** fin.","reference_ids":[],"question":"Question >;[[**** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >;[[****","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >;[[****"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">;[[****"}]}]},"changelog_raw_sha256":"87dfe91699df521ff930af39a35b50c0151ab8c48d245061a2b417c46bead57d","changelog_sha256":"387f2245ff441409e5746821057db45c66ad507a1f013e876d001e91efdb28c5","review_raw_sha256":"9181bc281b40d3c0baa2d1e5e53ff2f19b8c53bb8c9751c6779acf441d31d8d0","review_sha256":"edcf9a5e5568501420268be958cc828f347807e758335b48e73e1835728d9b67"},{"probe":"&([","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &([","en":"Title"},"rationale":"Raison &([ fin.","reference_ids":[],"question":"Question &([ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &([","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &(["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&(["}]}]},"changelog_raw_sha256":"e2cdcc9f19fdddf035e105e9bbbfa4b52e91ca618644554ed13ec314e410d6a4","changelog_sha256":"1b0ddaaa24af28c5d7d3ae08a22daa98806b1c2254c945a7fcf0f8ec9d0b2996","review_raw_sha256":"d707f1c93e476e986c5353dc51e680e199dfba994b64c8dc72f6996565e67929","review_sha256":"0b7906c662965363c44f6dbef9bc05d3d29f2a61995129632f260b28bd4a60fc"},{"probe":"!(<中(~\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !(<中(~\\","en":"Title"},"rationale":"Raison !(<中(~\\ fin.","reference_ids":[],"question":"Question !(<中(~\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !(<中(~\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !(<中(~\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!(<中(~\\"}]}]},"changelog_raw_sha256":"a55cdfc87b0b8c2b574af24227e54afa0bc8479d02c18b829ca5190089467934","changelog_sha256":"42af7133695f0196549f1aabd7abeb578eda5c9f2ef084a491525ae7e9519e98","review_raw_sha256":"fee188a4d22f6ea7228dd77b52b3abc7c477d45d78af24ffa163757b5059c7a9","review_sha256":"8f536a277a4abf48b76c4f99e696a35044e69dfe409b2ebe3a3812601504b0f4"},{"probe":"&|.]_:)www. ![(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &|.]_:)www. ![(","en":"Title"},"rationale":"Raison &|.]_:)www. ![( fin.","reference_ids":[],"question":"Question &|.]_:)www. ![( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &|.]_:)www. ![(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &|.]_:)www. ![("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&|.]_:)www. ![("}]}]},"changelog_raw_sha256":"25c66778547be5e2970877398e16b0c351a005add1cdec5676fc3a936e035a28","changelog_sha256":"ff67a6968a7ea277f6910143ec65501c2a336f526158b232bd45dc2d6db45f7c","review_raw_sha256":"756371a44d0e6ac9ab7e5d3e103e73abf4d19fe979846757b601110ffb549274","review_sha256":"8d1b8d74a6956afe7187b1f91952d9e16275c27dfb45affc98fe7a6954cc4473"},{"probe":"]]: )`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]: )`","en":"Title"},"rationale":"Raison ]]: )` fin.","reference_ids":[],"question":"Question ]]: )` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]: )`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]: )`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]: )`"}]}]},"changelog_raw_sha256":"e1f5e44d9453022873b4161fd7e3e5c89d545b268032f954c8709e64ac10955d","changelog_sha256":"83502917479770906f0ed8fb94cd82bc66dc309ff0b3d67c3005334204cbd8e2","review_raw_sha256":"ac21a1391c8006360f2ef39a0e12c2a4ccc674f00177fc930d96427efe44842c","review_sha256":"f1d074ad0ad43e09927aca444705066bbc7889a5bae87b3371c96dd2244cc6ba"},{"probe":"[[**#**\">] )","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre 中&#>**#**\">] )","en":"Title"},"rationale":"Raison 中&#>**#**\">] ) fin.","reference_ids":[],"question":"Question 中&#>**#**\">] ) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation 中&#>**#**\">] )","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label 中&#>**#**\">] )"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"中&#>**#**\">] )"}]}]},"changelog_raw_sha256":"3c1c05e64b69315177f5c2d35d54921950707b2f13107ae901efef54a52691df","changelog_sha256":"a2266df6560ca20c6338f4ce3a4ae596c8d1a82bd97ce7a5c2377d54951f23f0","review_raw_sha256":"005cc2ad3fc23be42bbcfa82a2c7a85b1d3c19296e6487744f9eb9ab8dea02c2","review_sha256":"fd87c69b484f7b4624424919a8fe53bf0c8f28acf5d4bb7d8a9881b30d82d6a4"},{"probe":"&b&.![*=/&![_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &b&.![*=/&![_","en":"Title"},"rationale":"Raison &b&.![*=/&![_ fin.","reference_ids":[],"question":"Question &b&.![*=/&![_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &b&.![*=/&![_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &b&.![*=/&![_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&b&.![*=/&![_"}]}]},"changelog_raw_sha256":"9b3e66d59ad2449f50ff3ba0c78a77c58aecdc040df6ecd2d01b6d5c249548da","changelog_sha256":"a1e2e7f7768073ebc22410c533b2f7178307c4099674e3ea7d186642d8c8cd0a","review_raw_sha256":"b4e50a97788f91bd3cafe23769767628ad11e5ad84daad9846a5bfadf73d03da","review_sha256":"40f160a92d3e01c37ffc73ec5139102d4508541a68d619043549aa407622fea5"},{"probe":" #![&#![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #![&#![","en":"Title"},"rationale":"Raison #![&#![ fin.","reference_ids":[],"question":"Question #![&#![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #![&#![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #![&#!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" #![&#!["}]}]},"changelog_raw_sha256":"bbb51069fd32a9deb8505adb04881dfc196bc96105404d6b075112bb8b11739c","changelog_sha256":"4c2249e146696287ccafb167a2d7c9d86cf2f6e94e232562864ba9a8569b89a9","review_raw_sha256":"23e62d57dab1ee5de649d227a3b4c0b084287acea27d25014faaa8b1071a26f1","review_sha256":"2e17f7610ffa3c998c0ac335a8094d8da645c37018b79c5d469fcce39abf7927"},{"probe":"|[<[[|(.=![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |[<[[|(.=![","en":"Title"},"rationale":"Raison |[<[[|(.=![ fin.","reference_ids":[],"question":"Question |[<[[|(.=![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |[<[[|(.=![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |[<[[|(.=!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|[<[[|(.=!["}]}]},"changelog_raw_sha256":"a2ec7a01fb3a1147acd35b2b78c65831e6536e8af9e4cbcb834b714f0522b89e","changelog_sha256":"dfd329a6431f7e2aa94af6e1a31063e45516641b08b5dbec03811821bc470234","review_raw_sha256":"fee272178b57be22f11549bb9b8f232081b2d198d3cb1fb12af56c7beb08c319","review_sha256":"eb51a91fd258d2607c708bc9ec0ef073087bbc62793a06dac307a714bcacc8c5"},{"probe":"|>b&b_[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |>b&b_[","en":"Title"},"rationale":"Raison |>b&b_[ fin.","reference_ids":[],"question":"Question |>b&b_[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |>b&b_[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |>b&b_["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|>b&b_["}]}]},"changelog_raw_sha256":"6fdca93024c62e56781dfcb9e50ef76282e6f5e4295a4912f6354129f27b5d25","changelog_sha256":"7ed88bbb28bfbd3804a4fc33b09f048419dcc188fe0f3e9e30fd996599fbfe81","review_raw_sha256":"b19e257a5d3dc89b0d724dfafcd4521f610e69ec8f6e32efb58fe7149432708c","review_sha256":"5471af6bafc5a609f5310fa0717dd3b00cec5883229f88ae0e8059af1f32a3b8"},{"probe":"| (&#中:** ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre | (&#中:** ","en":"Title"},"rationale":"Raison | (&#中:** fin.","reference_ids":[],"question":"Question | (&#中:** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation | (&#中:** ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label | (&#中:** "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"| (&#中:** "}]}]},"changelog_raw_sha256":"df2747d96a7028d1058cb6bd2aa9755c53674e1bf9fb45ac9a501f1c75d0b948","changelog_sha256":"9b1d1a79dc2b8a72c000317ea7cf15511400aab570c75303a6d3ecc85b7099c3","review_raw_sha256":"d779a776df3818cee6cba20bda476cb6c4d0340145c6d6b9721e3da8ee44e59e","review_sha256":"0ad3528f42cf83d07ba070e9e36a11b5ad461da272d2a5229e06a1662f5d2d2d"},{"probe":"<:https://中www./**) ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <:https://中www./**) ","en":"Title"},"rationale":"Raison <:https://中www./**) fin.","reference_ids":[],"question":"Question <:https://中www./**) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <:https://中www./**) ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <:https://中www./**) "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<:https://中www./**) "}]}]},"changelog_raw_sha256":"d879a9baf05078e28f72d78b0df8bf0b63c838b6d04dbb96f4fd5fc44ee53ca2","changelog_sha256":"a418519e219f272ccdd277d2e54dc3653e0a98e0df7abd11e44b8e8985e84a9e","review_raw_sha256":"40825510fb6b5ef8484567663fd00313c77b0fa27383d67d7c8b08faf7ca264b","review_sha256":"2b7abe711e7c99a6cb2f390149be3bfa270b908cb08eb73ff25893d1c4a367e7"},{"probe":"<~`>é ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <~`>é ","en":"Title"},"rationale":"Raison <~`>é  fin.","reference_ids":[],"question":"Question <~`>é  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <~`>é ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <~`>é "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<~`>é "}]}]},"changelog_raw_sha256":"d98851a3878bac84447b18c673ac6148d6e37a4df7581406842f2f208ee50b22","changelog_sha256":"498de2c0855e982f4a275a6cad6f9434e4a8b3a39cc280c7288efe3f430ebd71","review_raw_sha256":"ca20c6f44c24d183a24054959b07e1c75457cba0526c158d42ea8a4882bb7b59","review_sha256":"dab051bd11ee2fa3c00155cb5a33303f727732544ec433d925c8baad79f22747"},{"probe":"&a)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &a)","en":"Title"},"rationale":"Raison &a) fin.","reference_ids":[],"question":"Question &a) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &a)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &a)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&a)"}]}]},"changelog_raw_sha256":"ce6b6ec4098f06fa12bc8b28becc9ab1058f7d578f931ebe9d1fad0066a24f64","changelog_sha256":"af14e0a3f3ec399277f6d23fb3bb485ad3dda0cfe3e1c8bd503cde309c7626f0","review_raw_sha256":"518de79a36ceb4ae96aa939c76b234a049bef2a5f4fdad3af6c6f2613673b45b","review_sha256":"e663d114e758b2a6a4686ccdb4d833242a1317c4731bd6a428f76c27256c7cd5"},{"probe":" \n[a.(&#]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n[a.(&#]","en":"Title"},"rationale":"Raison \n[a.(&#] fin.","reference_ids":[],"question":"Question \n[a.(&#] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n[a.(&#]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n[a.(&#]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" \n[a.(&#]"}]}]},"changelog_raw_sha256":"0f2054ab259d981fe36e3c0abd0b75aeceeac568728c83becce01bfa2bc545fa","changelog_sha256":"8196375869632717df15b183658eaade810eb7a217a1697f1974f62f01fd3156","review_raw_sha256":"0d96870317980d5a076a5d5c7571b8f6ba55add27c8200a4d15c70e0fae75feb","review_sha256":"46d4511711a8e3cebb8acfeb6b08de7312357866d5caddde5b6d0bb4903cc99a"},{"probe":"!#a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !#a","en":"Title"},"rationale":"Raison !#a fin.","reference_ids":[],"question":"Question !#a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !#a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !#a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!#a"}]}]},"changelog_raw_sha256":"1177b9044d5d41bc425c9f1b2ed55c7bafa01c3922647ec25dbb0fc428632cb0","changelog_sha256":"4b2d25c789eb8dd7a833dc5d4efea5c8ca1e69fb8f40e575253431ecf90a7a14","review_raw_sha256":"c196b96e2d43b5d43eea3e7a8735c7e719e9c392011eaa48a8c6894e5563a2b6","review_sha256":"8c6193fbd03a37d28d6abc83f0360d7505eb78b0534f468f4e7dabd8952551f7"},{"probe":"<(]]é*~b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <(]]é*~b","en":"Title"},"rationale":"Raison <(]]é*~b fin.","reference_ids":[],"question":"Question <(]]é*~b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <(]]é*~b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <(]]é*~b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<(]]é*~b"}]}]},"changelog_raw_sha256":"72706f6bcf0138757242ba7acf27a19a058cebe0473214865d565a035b0e36bb","changelog_sha256":"913860b484b5192f1073c7022e123f22e5c734808e4e08f55194bca86975b737","review_raw_sha256":"dc305f5f9814daf209c111cf9ec56794bf83eb348d82f0c9921c8c7b0af1b5b9","review_sha256":"5b1956c2728341065ed9969e22e6eecadf08ad9dc5eb2063dd8f9a4a0d33f488"},{"probe":"![https://**https://&#[[&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![https://**https://&#[[&","en":"Title"},"rationale":"Raison ![https://**https://&#[[& fin.","reference_ids":[],"question":"Question ![https://**https://&#[[& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![https://**https://&#[[&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![https://**https://&#[[&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![https://**https://&#[[&"}]}]},"changelog_raw_sha256":"26f6af4248980d60274848756694c40dfc26a01bc0a472b646fec47b60a46037","changelog_sha256":"0e7ef62aea4c400266896aa0b5b58be19571cc3804d878a4b661245a0b445afe","review_raw_sha256":"bf363f3a14cf78b4089eb63748aa3a9ff35f769cb74f4726132e1fae038ee015","review_sha256":"b96240bd71875a19aa59715c95f54614915253d1d88e02fa1a99c13e7fa08971"},{"probe":"_<.`é:\"(]&![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _<.`é:\"(]&![","en":"Title"},"rationale":"Raison _<.`é:\"(]&![ fin.","reference_ids":[],"question":"Question _<.`é:\"(]&![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _<.`é:\"(]&![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _<.`é:\"(]&!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_<.`é:\"(]&!["}]}]},"changelog_raw_sha256":"6c779158d903a34142fcf98baa6cb8fe7ba01eb2f349ca3a783bebd451818aa6","changelog_sha256":"627e20baf8e0e61a5f7b2d1106768965a65302b139bfe5424fd275053c0d4838","review_raw_sha256":"44911e37aaa8dd4929db95a8b0a08d7a73ae5301231b47c2afa32379975d1ff8","review_sha256":"6894d4fccba2b6dcf032f30a58cd4a4bd07f3c079cd5a0efeef39d23eca30f23"},{"probe":")([>b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )([>b","en":"Title"},"rationale":"Raison )([>b fin.","reference_ids":[],"question":"Question )([>b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )([>b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )([>b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")([>b"}]}]},"changelog_raw_sha256":"b2b80f9f31959302a03c2c83699ece9ddf11538355be5294f0acfe5616e35bf2","changelog_sha256":"a26423b51405e74208015fe8ff09dff267c69fd2be6caa17910f29e49f293344","review_raw_sha256":"97ef60456c9c21de7f8e66b72f6df51dddb75cc3fdc724af3449a023c6d47fba","review_sha256":"8bc08f1a77074e0cd27d507d170590b856000ed06fa0d95d9f5a1137638c2f68"},{"probe":"/![;\"[[www.=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /![;\"[[www.=","en":"Title"},"rationale":"Raison /![;\"[[www.= fin.","reference_ids":[],"question":"Question /![;\"[[www.= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /![;\"[[www.=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /![;\"[[www.="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/![;\"[[www.="}]}]},"changelog_raw_sha256":"ae76d4a54e370b6942483978d1efe0ab5ded4085fa002602b9d381092f3e31f9","changelog_sha256":"f479f3ff984863444829a9cc05e562d602f933890d31164217ab0ff0a976aa75","review_raw_sha256":"ff2004e60a19b1139dd40ac44536d3a0b6a0004804171da7d3046dcec194346a","review_sha256":"d61e2632a775ed35e7b855d6c063e78bbdf6149677d35cbc024dc96e262639cf"},{"probe":"&#]]&(*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#]]&(*","en":"Title"},"rationale":"Raison &#]]&(* fin.","reference_ids":[],"question":"Question &#]]&(* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#]]&(*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#]]&(*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#]]&(*"}]}]},"changelog_raw_sha256":"3c088914191891c5322817cda78390da8884d9d255fe5d12baf886957fa15c9b","changelog_sha256":"7b9c4afeef2f4228db012e30215c8e40237b4b2bbc81790bec1ec3132a8a7b47","review_raw_sha256":"410b20bc199b79176597bcb05f3fe435f4c1352ab99b192c24c53425fb204fc2","review_sha256":"c2f60651135104003fd0c11dabd5223ebd2bb9b647bb45479a46ae51279a6531"},{"probe":"<.<<[[ a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <.<<[[ a","en":"Title"},"rationale":"Raison <.<<[[ a fin.","reference_ids":[],"question":"Question <.<<[[ a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <.<<[[ a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <.<<[[ a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<.<<[[ a"}]}]},"changelog_raw_sha256":"e7abbefc2007a66629393ea8d9c6d56e763243a41d8f231e4f06af96e3318bef","changelog_sha256":"aad692a57b0bac6a54d3d21c05f8e445c9e96c7f3dc7b1fa6c59dbac06705a4b","review_raw_sha256":"82c0a4cf3374785ca84bbd09d9fc980613ce8db848c17196fcbe9389eea8d7f4","review_sha256":"1cc25db60ae54ca4b34e66c22eff612beaa379c1c3238092a657455ad0832aa7"},{"probe":"*中\n]]|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *中\n]]|","en":"Title"},"rationale":"Raison *中\n]]| fin.","reference_ids":[],"question":"Question *中\n]]| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *中\n]]|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *中\n]]|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*中\n]]|"}]}]},"changelog_raw_sha256":"e8f53accfe159ead98d34cf733cc96930ef7c418d877b6e4a12d4e3e9426e16f","changelog_sha256":"fe71eb5eb055aa36664929487013ff255642907615d16777926c41f1bd910a86","review_raw_sha256":"59fc1f1734e477aabe1ce77ffe0aab74b77e19930c898de2fe643a59fa396f06","review_sha256":"85a555b9305f3050278aa6db71109ceeb9a5205a6f3968ab018f57c102760420"},{"probe":"*)< *https://|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *)< *https://|","en":"Title"},"rationale":"Raison *)< *https://| fin.","reference_ids":[],"question":"Question *)< *https://| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *)< *https://|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *)< *https://|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*)< *https://|"}]}]},"changelog_raw_sha256":"106ff66b9a296e2ca59d6b0efd490ffd50c8c3a88b113f267516876a35ca411a","changelog_sha256":"5a1f3502f11dccf25593e82fbfebb655b9f5060ef33925f33eb74c73cc8330d7","review_raw_sha256":"7ef1d5652d676af2fcf4282804afd2099e5087958b7f60dd316952219e60bfab","review_sha256":"acb6675d34d6da20b37c744b810f426368f8355ef4fea1b4228011475fe7cc81"},{"probe":"`. ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `. ","en":"Title"},"rationale":"Raison `.  fin.","reference_ids":[],"question":"Question `.  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `. ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `. "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`. "}]}]},"changelog_raw_sha256":"c579f7574a9f895caf33386f98f164005acae115aaae694e1deaa2d94b59e8da","changelog_sha256":"879032f7300ce3c58c03a72b5870ff1784353aab6f7a7a57d011b39084ee4e1b","review_raw_sha256":"db263ee03e1a98e7847fd5a98afb49693880fe35f434926e4e332f29140b1d5d","review_sha256":"74d9b352839ca030d4967c13e88e0eb0b019e38d551087067307360648ca1afa"},{"probe":"b![ # ]] >https://#<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b![ # ]] >https://#<","en":"Title"},"rationale":"Raison b![ # ]] >https://#< fin.","reference_ids":[],"question":"Question b![ # ]] >https://#< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b![ # ]] >https://#<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b![ # ]] >https://#<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b![ # ]] >https://#<"}]}]},"changelog_raw_sha256":"1e26383f6a08a5c88ffe6e16fcdacb1119cead8be5b4200898335c94cb02b7be","changelog_sha256":"e27f859153fd38af4291804db9a2c809f52e36144ab31dad08481779af792a00","review_raw_sha256":"c73d6e88826333141a9c5f812602a958da726ad2175833aef091bfe10563740c","review_sha256":"a1560f64327022983324f2df17d56604f6c4af2501b844b99364a4745c09bbbb"},{"probe":"._<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ._<","en":"Title"},"rationale":"Raison ._< fin.","reference_ids":[],"question":"Question ._< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ._<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ._<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"._<"}]}]},"changelog_raw_sha256":"c14337c5a9ce3faf2053e0c15f7e116242f7d07bef3d7bfaafde26ff2089529e","changelog_sha256":"c66ca9fec247a25efa64701d4c8e432e625e391fb234ef0bbf74c5f6b0ff41b5","review_raw_sha256":"1a6bc2acb39d9a5b2ef8f5119696825d242c54e29b9e3e065d7b59b9574d9b18","review_sha256":"f220c1980e4a9961b253fa3d198593d8e2d4a61555ad0a2605dd70c0f53d9b80"},{"probe":"/&# ! \"]]_&=*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /&# ! \"]]_&=*","en":"Title"},"rationale":"Raison /&# ! \"]]_&=* fin.","reference_ids":[],"question":"Question /&# ! \"]]_&=* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /&# ! \"]]_&=*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /&# ! \"]]_&=*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/&# ! \"]]_&=*"}]}]},"changelog_raw_sha256":"836c47fef84561b73b92084e759be327adfa2be985dc208236b40b329e58a54c","changelog_sha256":"1a901264a6a388886f80be9c1e295a0a81b0a5fec7f41ae1c7844c4007d92157","review_raw_sha256":"d4cfe88f41095a3a05c69bbd2c9239a1cb4700427d0d0627530c4f880db22c53","review_sha256":"d9cff4572b20335b230d30d48c27d60f8d3b2fc9e1b5b4de5448f13340b54806"},{"probe":"[[;>:**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[;>:**","en":"Title"},"rationale":"Raison [[;>:** fin.","reference_ids":[],"question":"Question [[;>:** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[;>:**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[;>:**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[;>:**"}]}]},"changelog_raw_sha256":"0c35b7156916c0d1904836414162734227cf00a6edbf933d17d38eb0c7a340d1","changelog_sha256":"f2fd7969f5c4285b092471b955c540301f72028a9e28955692b181f0b02160d2","review_raw_sha256":"3b0fed3960bd79a9fb6b1a051b393910cfec8698c6360de1ccfb700931ae3cd0","review_sha256":"2f7d15d93a7aa5b1b72e00065a2161691836b5770d82ff60252b77b1750088d7"},{"probe":"#中é`=[[&]]\\>;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #中é`=[[&]]\\>;","en":"Title"},"rationale":"Raison #中é`=[[&]]\\>; fin.","reference_ids":[],"question":"Question #中é`=[[&]]\\>; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #中é`=[[&]]\\>;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #中é`=[[&]]\\>;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#中é`=[[&]]\\>;"}]}]},"changelog_raw_sha256":"0ad94e34ddb12a2c999a763742951e1359a7e1e06e2f3a682caf0b9fba8e14b8","changelog_sha256":"e3608cc0310bd1bfa99b9ce2e99256cc4eed06059b460c1eb1172a6ccf67224e","review_raw_sha256":"248432ca8077ba1d57e363e4284125d7e7e58ea9d4c80081760e83e69dc29004","review_sha256":"9717fc60146f9d9dbfd7fcb5b334ba6af4a11237339adc1e57f3ed129bb45c81"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~ahttps://www.&#(]]\n!`>","en":"Title"},"rationale":"Raison ~ahttps://www.&#(]]\n!`> fin.","reference_ids":[],"question":"Question ~ahttps://www.&#(]]\n!`> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~ahttps://www.&#(]]\n!`>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~ahttps://www.&#(]]\n!`>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~ahttps://www.&#(]]\n!`>"}]}]},"changelog_raw_sha256":"d82dc877ff6f85742ed000f6eab9946a30976093abf2a74dbf513ce7d4c1d9a0","changelog_sha256":"42b4d7fa99bb5ac97496e528303c19bfc526c4f05eda3a5a9c554ae8736f5e30","review_raw_sha256":"ab7467de498ce3a5d5456be28e4d2e33ea746b4b5a8ddb65e59ae0b0428351da","review_sha256":"85688c919c85f95e7043d48e88b9e10cbecbdde6b400e108e984ded880a2ab7a"},{"probe":" .b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .b","en":"Title"},"rationale":"Raison .b fin.","reference_ids":[],"question":"Question .b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" .b"}]}]},"changelog_raw_sha256":"2192553abd9167c353e1417fd0e35af00ca5f64efe9fb0abe2f946f68a4fe079","changelog_sha256":"d005025dbd7040181d1c37f5e3170356cabb5ea9f818ac2b63019351e65445ee","review_raw_sha256":"c55ab98baad6b31cd3e36aa97bd7be832b03d28b06fc9387ffb54c3e056559a0","review_sha256":"32e4da2673b9d5f7245675e98dec0f848122bd3e8bd82031abf87bc99a4f05fe"},{"probe":">(`\\<\néa(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >(`\\<\néa(","en":"Title"},"rationale":"Raison >(`\\<\néa( fin.","reference_ids":[],"question":"Question >(`\\<\néa( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >(`\\<\néa(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >(`\\<\néa("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">(`\\<\néa("}]}]},"changelog_raw_sha256":"7dfa3cdb9fcb5cd1f071f9f29faf3f097fc84315829e473bbdd9fb83ddc6575a","changelog_sha256":"3d446cb3a0fcd31d89a1fcc6ee811e37b77295afdea5c6ed534014d94835d7ee","review_raw_sha256":"d475d8a0953f0aa15875d302dd599101e2ea6e089ad8b5b67703e40523cd0f2f","review_sha256":"646ebd592750fcdbc451d9b114f3a77c7e838aa8ae410af47c614b0882e0ddff"},{"probe":"#:]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #:]","en":"Title"},"rationale":"Raison #:] fin.","reference_ids":[],"question":"Question #:] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #:]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #:]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#:]"}]}]},"changelog_raw_sha256":"a87602f36edeff8053d06066814e84bb049b3a790edf39d5f234416a5666264f","changelog_sha256":"7f08f4e97f38c69c038e3927333a87c87dbd3129235380132dc8b128b7f918a7","review_raw_sha256":"a24277b650c293f9531e983fd1673ba2f7126d81a1f19e1f853a990cec880ce6","review_sha256":"476903004f667ffa16f1f0c5693079d635cd36e4a721d17c32f5c54b679e8a67"},{"probe":"  :","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre   :","en":"Title"},"rationale":"Raison   : fin.","reference_ids":[],"question":"Question   : ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation   :","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label   :"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"  :"}]}]},"changelog_raw_sha256":"e2b008c7459d50492c958ccba4995af993e49dd544ddb02db7348d4764fc4a25","changelog_sha256":"5b41b41e3d877964ecdd419c5f376001f8e604affb11bd6b814dfa0dc65aa892","review_raw_sha256":"01cbdbc10e77121ae703bdfbcde155fc648dc98f49e7b09a50d2addc8cb34ac5","review_sha256":"3dc682328b83cf4420ec2d083e058bb329eb696337779987bd1a1910261ab3a1"},{"probe":"!_b/~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !_b/~","en":"Title"},"rationale":"Raison !_b/~ fin.","reference_ids":[],"question":"Question !_b/~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !_b/~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !_b/~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!_b/~"}]}]},"changelog_raw_sha256":"9cf3500e4414d916226c9161f9a73357cd3ca18a618ac64ef2ac32888c47e7fb","changelog_sha256":"becf6065500fb1ed5fc6c270d1199d4ecafb28e5325293d7568e3dde5e6c2716","review_raw_sha256":"ea7829d7b788427ba04708fd18b568e510a6d231f5153dc218fcfb78685d77bd","review_sha256":"15075fe91491b2297cde20d51cdcf21d5e40de366b57dcc83b25fb509378223d"},{"probe":"[[[[`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =\\ ;|*a>[[[[`","en":"Title"},"rationale":"Raison =\\ ;|*a>[[[[` fin.","reference_ids":[],"question":"Question =\\ ;|*a>[[[[` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =\\ ;|*a>[[[[`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =\\ ;|*a>[[[[`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=\\ ;|*a>[[[[`"}]}]},"changelog_raw_sha256":"fcddf0cc7f9b8c8ecc78cc90c09fe9e6d3dc891128760f0954d6ce008c579632","changelog_sha256":"39f9461a17f3e64d5e6257e39bfb902308a00181c2b1b037140e970a896eaf1f","review_raw_sha256":"d58ed060eb41b93ae7b91b205ae5d17e45357aefa19d718939b834ad8f498903","review_sha256":"e6d33d146635ab76becf1fc7889c9984e55fdde9fc3c1ea0c6eb64164c41edcf"},{"probe":"]****","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]****","en":"Title"},"rationale":"Raison ]**** fin.","reference_ids":[],"question":"Question ]**** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]****","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]****"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]****"}]}]},"changelog_raw_sha256":"f8822135fe8da7d2413ea0041d4295e2229c8f4b96c825d0a516683d989fd644","changelog_sha256":"95791e777d42b0b10a4d8fcd89e398b21a5f5257aa13a4640522db28b9c1fa36","review_raw_sha256":"1e2e388a50d85fe0060b6e445e20530b07f7e36dabbbb314fb279224ec17e816","review_sha256":"abeaf09034276061073cf850ada54fcb26ab4f91ee8cbf7dc65163d92c90249e"},{"probe":"aa._]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre aa._]]","en":"Title"},"rationale":"Raison aa._]] fin.","reference_ids":[],"question":"Question aa._]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation aa._]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label aa._]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"aa._]]"}]}]},"changelog_raw_sha256":"f61d05c4ba1d951ba882455cb2769c76eaf8f47a5ad9e941e3ce42bf57c5b7e1","changelog_sha256":"50433d0dc7918d08838b4ac51f58871fe0544a0bc0ea40ee98970f10de167d48","review_raw_sha256":"c2f91cbdfa72ec4fe437aefdffba500a89d7844ab02f38f2d957a89b9b1ab8f8","review_sha256":"fe2d4703cc72b027e7ed546f0759ec5532041c0f4843690d299998ffe299cb74"},{"probe":"&]www.中&\n<**https:// `","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &]www.中&\n<**https:// `","en":"Title"},"rationale":"Raison &]www.中&\n<**https:// ` fin.","reference_ids":[],"question":"Question &]www.中&\n<**https:// ` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &]www.中&\n<**https:// `","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &]www.中&\n<**https:// `"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&]www.中&\n<**https:// `"}]}]},"changelog_raw_sha256":"e8cd0f57606cd1f861df9f7c401181366461e513b75fa6c3b975fcf3cf061cb1","changelog_sha256":"86816a90cc71e394f03ee7f33f604dc7a493047b6f4250d02530e9489c6531d1","review_raw_sha256":"57fa70c9d9d6cd8ef3289051faa36a8cfada985624c8ac57df50fe20cb052d11","review_sha256":"4b556d76f602a8c222454560f102e9b67f41c76e46dab8e773543fd197e0df05"},{"probe":"&#\"\n`_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#\"\n`_","en":"Title"},"rationale":"Raison &#\"\n`_ fin.","reference_ids":[],"question":"Question &#\"\n`_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#\"\n`_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#\"\n`_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#\"\n`_"}]}]},"changelog_raw_sha256":"2967ace841c4456ffaa3788049f4c16bccd33eb4c12147cbca4111fc6b6c8ca0","changelog_sha256":"a76d230eef74ba4394039dfef633155a5626dfb5d6142bd8b22568ce1b748882","review_raw_sha256":"b9756d54d8eae0300b95c95d270fd2ae93c2f6377a4be0a7f48f3cd1f6d77c77","review_sha256":"cb25b989827ea05292a2088a0067e6b3f862fd61ee622457eb4215891c4e1728"},{"probe":":>) b~b![\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :>) b~b![\\","en":"Title"},"rationale":"Raison :>) b~b![\\ fin.","reference_ids":[],"question":"Question :>) b~b![\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :>) b~b![\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :>) b~b![\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":>) b~b![\\"}]}]},"changelog_raw_sha256":"09201963a6a16c4b107c9ea0c57868a970d36dcf0265561dc17404b392f6c2f6","changelog_sha256":"dbfc58b066b69ef46f7c5eb29e22b31ac6233bc757d73e4654d631fafa085012","review_raw_sha256":"eff317fe05202c89749a509733445f20b55bdffaa2d1cb812133da8797440eab","review_sha256":"1ac04585726a2d9235c53694ee1a9be723d1d7fde502aa95ff41af5b5f66f8f6"},{"probe":";*|<\").**:![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;*|<\").**:![","en":"Title"},"rationale":"Raison ;*|<\").**:![ fin.","reference_ids":[],"question":"Question ;*|<\").**:![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;*|<\").**:![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;*|<\").**:!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";*|<\").**:!["}]}]},"changelog_raw_sha256":"a101bd664b04ae7cb8ed0a15c3075542af143cca67b4d82935acae1214a26095","changelog_sha256":"262e1d895cb750a257847fbc4952bc9f849bf0e68d0b2383bbd51eef0729b0a5","review_raw_sha256":"c8fe780b4d141263a8656302a430e6cee56dd38141d9f11e0b38dbf28b1dd287","review_sha256":"fc1dbce8b464e3631c5c2b43363e319a0be99a3e056cbe95ed0149a5d2c22b5a"},{"probe":"www.<b(]()éa`<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre www.<b(]()éa`<","en":"Title"},"rationale":"Raison www.<b(]()éa`< fin.","reference_ids":[],"question":"Question www.<b(]()éa`< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation www.<b(]()éa`<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label www.<b(]()éa`<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"www.<b(]()éa`<"}]}]},"changelog_raw_sha256":"5348aa60aeb7d9aeb34b5d55cd090d983c4696b376b7a635dd636b1f5b32518d","changelog_sha256":"645e1c499b1f65af99f11ba31eb6950477d77a22b4a995bab40804d779b1388d","review_raw_sha256":"e7416d482ab80074d7f6f73cb703dd44e8e7ef0d0297cbb31ca3af0a8ff0e5dd","review_sha256":"3cd5bb830987a451ba4d1ccaa93c473f6e43ef0d60b9e3d7bc82e3deedb8d2e4"},{"probe":"`=www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `=www.","en":"Title"},"rationale":"Raison `=www. fin.","reference_ids":[],"question":"Question `=www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `=www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `=www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`=www."}]}]},"changelog_raw_sha256":"529b2a239aa1596be56711bc8ceeca5879016f1abda72051d90d055708fae7c6","changelog_sha256":"12de64594d3a26ae26cc8cb1acef311672b00e142325ae1a4614f9d54072e2c4","review_raw_sha256":"9adfdfdae30648cfdc2b58505450c50e8a6fd4355b1a6089a91f6ee7eb3bf972","review_sha256":"82fa5d2dd67d67a947a9067e056531704cf816083c3ac0fa4bf6ab33eabdaa96"},{"probe":")[_&#_.]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre )[_&#_.]","en":"Title"},"rationale":"Raison )[_&#_.] fin.","reference_ids":[],"question":"Question )[_&#_.] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation )[_&#_.]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label )[_&#_.]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":")[_&#_.]"}]}]},"changelog_raw_sha256":"091f90626796dae2ecf3dec15a393f0cc21e8be537874bd024493ab4029d05ed","changelog_sha256":"1ce68366e6880a995c71f0ffa7d133c844637ecaee05bc47020a232d94796187","review_raw_sha256":"969029f82f8a7cd53e29a0c8e4233550b3296102dcb9106994c7382612ef448f","review_sha256":"32a6ba4e953fa6b097aee86ca1a8a7ba19f893052187eded3727fdd191eb9ccd"},{"probe":"**;=\"~/\"中`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **;=\"~/\"中`","en":"Title"},"rationale":"Raison **;=\"~/\"中` fin.","reference_ids":[],"question":"Question **;=\"~/\"中` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **;=\"~/\"中`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **;=\"~/\"中`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**;=\"~/\"中`"}]}]},"changelog_raw_sha256":"592586ffdaedde7ed3b1d54ba4a75ffdd651a285c74bfec30e4a9c6885a9a55e","changelog_sha256":"52c5c2606109629d0efa6b5a5a6850f60460f10057f2bf6ec29ad83e69ac1fb5","review_raw_sha256":"a26777da39535da26e022a6cdc7de143391e6025b423a2152b3745044da8e046","review_sha256":"7e4d2d54d350cc29d7251579e765ff534cc7c0f179e6edf5a867188eb860edb2"},{"probe":"*(é\\:[:\\<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *(é\\:[:\\<","en":"Title"},"rationale":"Raison *(é\\:[:\\< fin.","reference_ids":[],"question":"Question *(é\\:[:\\< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *(é\\:[:\\<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *(é\\:[:\\<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*(é\\:[:\\<"}]}]},"changelog_raw_sha256":"5de287edbe0db8965cd3eaf81f1d722b5c162ec81870bb32e673fbce15922c7f","changelog_sha256":"747ed6cd7a8f8ef4752b53840fa6de1283334c2f48c877865eb1f2463c85f96f","review_raw_sha256":"d53aebe7d3d7b3283e5d8edb4f0c4b7ef0ff768fc996d11170f4c5cd8238e78b","review_sha256":"b3ed47970a57d725b8f3a21c46dfb14e266f9a4d5799639970f2e3599b3cab83"},{"probe":"))\\**![éhttps://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ))\\**![éhttps://","en":"Title"},"rationale":"Raison ))\\**![éhttps:// fin.","reference_ids":[],"question":"Question ))\\**![éhttps:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ))\\**![éhttps://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ))\\**![éhttps://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"))\\**![éhttps://"}]}]},"changelog_raw_sha256":"e5543906bde14b98a944d52f4b939ca54d53a2d5c9f886cd88a9f87c2c15ea39","changelog_sha256":"cb2e2237dc14d5e2edbeeff5717814329bb4c11bc3a473e1d344094b1de7e52e","review_raw_sha256":"97a24d18c0b46208b23e5a7277aa3fb06d47a6efa903efbd6e9d63c67931aa39","review_sha256":"6de37131d37a498611bcbee40b8bb84d9706566f15a6bd827d30d321f156e90f"},{"probe":"/`&#\n]]![&#中/.中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre /`&#\n]]![&#中/.中","en":"Title"},"rationale":"Raison /`&#\n]]![&#中/.中 fin.","reference_ids":[],"question":"Question /`&#\n]]![&#中/.中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation /`&#\n]]![&#中/.中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label /`&#\n]]![&#中/.中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"/`&#\n]]![&#中/.中"}]}]},"changelog_raw_sha256":"9a1be1be6b628b5731f13fc14c56e7620362ec5eae49fd03c2e67d4b1ce47c3c","changelog_sha256":"94c26fb471609b327cc4368a98b0613b9d2f2125cbd036a5ee5a1e7f25985267","review_raw_sha256":"f0b8cc919f95b3f7321044bb31eab5c9f2b54df3b42eb99a8c09cf93dd59defa","review_sha256":"32d1f241ffe289d016e829e918af75598589cedb131187bff13ec8b06c783818"},{"probe":"&![<\"[[]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &![<\"[[]","en":"Title"},"rationale":"Raison &![<\"[[] fin.","reference_ids":[],"question":"Question &![<\"[[] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &![<\"[[]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &![<\"[[]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&![<\"[[]"}]}]},"changelog_raw_sha256":"f730af5c6f9b067f8f1be1f2683ae4ff4b4b8757201ac24793cd9361f8f80e2a","changelog_sha256":"f44473ac64ff1160516956de9d2423bfb951bd88b513b87e1d7c4c3e8f5b264f","review_raw_sha256":"0b13fecf76a21e47500961f13d6c81a5daf795bf6c3b318d8d6156cbfdec3bb5","review_sha256":"a0ce00d82c62d9152a2ba94186392483cdac4693d80aee240baac45aaf0200d2"},{"probe":".`:中[[[[(","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre .`:中[[[[(","en":"Title"},"rationale":"Raison .`:中[[[[( fin.","reference_ids":[],"question":"Question .`:中[[[[( ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation .`:中[[[[(","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label .`:中[[[[("},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":".`:中[[[[("}]}]},"changelog_raw_sha256":"e2f108bb43c718248282a9e8b9169255a565a41c3d778caf71e36cb28b30e6ef","changelog_sha256":"f76d0cba083e124af78d43da5da994c34fbf91f36086812095b746b3ed4dc6bc","review_raw_sha256":"f45c4532a33eb4158dbf07a90ea616f708cd30818c155c11cffe2d68340aa31d","review_sha256":"5f388445a8b6df1beaa3fc6f6425c3f55d7b12d54001b204f8cfd7f7429652e0"},{"probe":"**]=\\b ]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **]=\\b ]","en":"Title"},"rationale":"Raison **]=\\b ] fin.","reference_ids":[],"question":"Question **]=\\b ] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **]=\\b ]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **]=\\b ]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**]=\\b ]"}]}]},"changelog_raw_sha256":"82afc402a440906fe94da470a0d1004761b5d7b56418e81e11033586c0ee1a74","changelog_sha256":"3009ef4424faa0f621c9a7839f66a1a3b96dee075fa0762835b3dd623bed6d8e","review_raw_sha256":"f81afb26c7a973c8fbf947a588996d4ed2b94b9ef9fb5d12702180b63b6e9c4f","review_sha256":"c40a541d86f03f854695fa59983839115ce9911933d7c27d90205bd040bd59ab"},{"probe":"b [[**a**_\\;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre b [[**a**_\\;","en":"Title"},"rationale":"Raison b [[**a**_\\; fin.","reference_ids":[],"question":"Question b [[**a**_\\; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation b [[**a**_\\;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label b [[**a**_\\;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"b [[**a**_\\;"}]}]},"changelog_raw_sha256":"a6cca144b5229da7d0f07e38028c801aac537a5fffbdfb5a5f26af46c61e2931","changelog_sha256":"327f0d40b3a668d6c73a31a29168e5cd358fb5e9c7918a362f828f58f852d433","review_raw_sha256":"cacd785cefdaade250a4222d02a87f9a80156bce27b2cfca038ac713bb782806","review_sha256":"c071b93deb4b3d29554a69e188ba74ee0b3164c11d55f8d44b98f8b035656300"},{"probe":"]][>>= <é*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]][>>= <é*","en":"Title"},"rationale":"Raison ]][>>= <é* fin.","reference_ids":[],"question":"Question ]][>>= <é* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]][>>= <é*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]][>>= <é*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]][>>= <é*"}]}]},"changelog_raw_sha256":"6956ae394a4aa949e1926081b632037296af180df21afdfc14be4500bd1a6160","changelog_sha256":"128a1b43bc3adfb33b2eb3fa6e67e92c301cb26e0a82325b6cde0446e9b4db35","review_raw_sha256":"737b19805a9b0d4be9b97d273080c397aa5a4408a325ba80c1965e2881e5bdc2","review_sha256":"36af891c7aab3433a1b8c3e3f15461bdf4e950f00805b0415a43182760e83ffb"},{"probe":"![中#=[\"]]https://=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![中#=[\"]]https://=","en":"Title"},"rationale":"Raison ![中#=[\"]]https://= fin.","reference_ids":[],"question":"Question ![中#=[\"]]https://= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![中#=[\"]]https://=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![中#=[\"]]https://="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![中#=[\"]]https://="}]}]},"changelog_raw_sha256":"7a7084a4a4c147978075d80d9a4ea3a5d3967ac6cbba579de8bd055902c7bf74","changelog_sha256":"f694bbc2b7e3eb85bac86fcec9017d50424db66bc85453bf974c45113fbfdd2b","review_raw_sha256":"0591f9639269adc022d8c16c0d5c63cfc4386e14200d7fc4774e828fcf69537c","review_sha256":"e2dd7a08038ee45eadc9fd7947b498bd75bf07972855349abafe05d43bb076a9"},{"probe":"!_=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !_=","en":"Title"},"rationale":"Raison !_= fin.","reference_ids":[],"question":"Question !_= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !_=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !_="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!_="}]}]},"changelog_raw_sha256":"b7bd69127b13bdcf20b80ea89cb9aef4314dea734b1a98ea6ecda58436790c97","changelog_sha256":"23c80eb8f76f580ba9fabb42d2bb6d4c40e6cdc8724bd0d638855780f1680605","review_raw_sha256":"9f530b3fad5b2a88e7758b1893318a0172994d942237f0839d7e787b6e9e870a","review_sha256":"a529334995e327eaa979536ffbc959a321ed02ed3a3b428d08354bc2c6325fdf"},{"probe":"éwww.a]中;~*a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre éwww.a]中;~*a","en":"Title"},"rationale":"Raison éwww.a]中;~*a fin.","reference_ids":[],"question":"Question éwww.a]中;~*a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation éwww.a]中;~*a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label éwww.a]中;~*a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"éwww.a]中;~*a"}]}]},"changelog_raw_sha256":"0b234500fed3ddd21898a1f2ebed6f96b941a434cd452fc20aa02881f0e611fa","changelog_sha256":"0ad3479eebbb26869400b3ac1e12af21ee039b71835df902df44896d2319a6a3","review_raw_sha256":"8c90e5ff6d8d4491f031cffdf8407401c18b842ef2052cecb8eb43fbe46d95db","review_sha256":"8330ee4a37c43ba7e464b7a843d143eef0fea9957500d585eab649db29a527c1"},{"probe":"\"\\;;|~|=/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"\\;;|~|=/","en":"Title"},"rationale":"Raison \"\\;;|~|=/ fin.","reference_ids":[],"question":"Question \"\\;;|~|=/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"\\;;|~|=/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"\\;;|~|=/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"\\;;|~|=/"}]}]},"changelog_raw_sha256":"2c3f500a6323400cca43fc563ec364fe7ebd18f8a9eb23623a9cd0731ba27d0a","changelog_sha256":"bff96ff341081d82bdd164c65fba12e3d4bf0d984bd31e4055ffc3c50f1335be","review_raw_sha256":"428cd354e6e939729edef3a0d682267299f43e4b7786c1f44f3d23554d0c0d0d","review_sha256":"9236b459eb57b177b1cdee7d1e89122c5b006c2fceecae0843cdaeefbcf9f1d6"},{"probe":";<www.\\<&#/","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;<www.\\<&#/","en":"Title"},"rationale":"Raison ;<www.\\<&#/ fin.","reference_ids":[],"question":"Question ;<www.\\<&#/ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;<www.\\<&#/","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;<www.\\<&#/"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";<www.\\<&#/"}]}]},"changelog_raw_sha256":"26c471b5868091027d22aaee396fcb8c5c53fcfabb9b75ea18eee13fd11d68bf","changelog_sha256":"2adc9f36da5f0c0785ad78361bb891be006ba1cebcd5cdd1683d91c726bef829","review_raw_sha256":"1cdf8fd6bd8c0a15b2a0db3e9f5679367918cdd4e4d523548fbd281c75cea3b5","review_sha256":"41d82a021aa1b134762d49ddd1b528e242b39065fbdd1c75f3d56a8762d9f2f1"},{"probe":"!**.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !**.","en":"Title"},"rationale":"Raison !**. fin.","reference_ids":[],"question":"Question !**. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !**.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !**."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!**."}]}]},"changelog_raw_sha256":"7422f2c7218edac7d8553b911a83e1e81693712b9aa4360d72e939c278ade850","changelog_sha256":"52753a52bb6c52dff708733a451c924d922e7273a725952012a8b8a4c8e71cc6","review_raw_sha256":"0568b5b14ad4b977b95cd1ac9c22faafaa032758241bf126d2abe98dea280faf","review_sha256":"3bd86e7299f08622ef00f0761a9f0f5086ca4a675ce0990822b4624dc9169c1b"},{"probe":"![&/=https://]]b&中=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =:[# ;&>=","en":"Title"},"rationale":"Raison =:[# ;&>= fin.","reference_ids":[],"question":"Question =:[# ;&>= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =:[# ;&>=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =:[# ;&>="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=:[# ;&>="}]}]},"changelog_raw_sha256":"8b3749d7eb9eaa2d04a0323c1ededf4bc5627e15111010bcdb59f898d71b84ab","changelog_sha256":"c8982825bf4246454810c7d02483fd00136cb56d6b03352420ae06f6f05c5719","review_raw_sha256":"d5d065f170c3ff32d4c3668e6787b529d59e57dde1b8214b50e3b7987ee5ea24","review_sha256":"ddae487097b820cd4353f37d8294d4129d164c180eb5fb603f9d36017ed0af62"},{"probe":"&#<https://]==&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &#<https://]==&","en":"Title"},"rationale":"Raison &#<https://]==& fin.","reference_ids":[],"question":"Question &#<https://]==& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &#<https://]==&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &#<https://]==&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&#<https://]==&"}]}]},"changelog_raw_sha256":"3d2e5ca80d0f2a26920e668d8fa5451ecb7bc8dd90feed3a1f73d4590dc43590","changelog_sha256":"c2d9cc2066d22c6544768992522d2b4d9731b975358fad82dcea0c20afa75b19","review_raw_sha256":"703c761ecd2677ab9b749b03dc609b01cd2752f7d3cd1a3b284f963cef761eba","review_sha256":"935674c48f03e9052bc106a6ba2450a764e861a9a516d69daa93a8a7fc90fd6f"},{"probe":"&&]~>>https://","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &&]~>>https://","en":"Title"},"rationale":"Raison &&]~>>https:// fin.","reference_ids":[],"question":"Question &&]~>>https:// ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &&]~>>https://","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &&]~>>https://"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&&]~>>https://"}]}]},"changelog_raw_sha256":"2fe9612200d91ada9dfb7b7bddb437caf4cccaea948a7f249372bd812458106c","changelog_sha256":"dd846e28214f02694db557931d712f2c81487ee51cd574b7c016c72692270812","review_raw_sha256":"7ee20278d5d2605a0f00d12d5ca868b4bb6362a341b82951636102a0cb2c901f","review_sha256":"d839e3e11c5493a0975fb4043f23d8e770d5996d197a252f0ceeeacba895f950"},{"probe":"https:// ._é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre https:// ._é","en":"Title"},"rationale":"Raison https:// ._é fin.","reference_ids":[],"question":"Question https:// ._é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation https:// ._é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label https:// ._é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"https:// ._é"}]}]},"changelog_raw_sha256":"0ba3ef9504e6267d6e31cbbc34792d8ce9f9b64f0cebb98edd18c97effc2b954","changelog_sha256":"b080c9b43d2511c5f3f01d443f659f2b64d43bac56ccb3937f8352cd2925b82b","review_raw_sha256":"4c43bbea6ad536bb4e89416292d747caa6e7102ef0bb755be95fd90395d379be","review_sha256":"691d478eec3dc2226cb960b1f0769bcf622972396d329c98b6a1e9b016da83db"},{"probe":"(=:!: !","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre (=:!: !","en":"Title"},"rationale":"Raison (=:!: ! fin.","reference_ids":[],"question":"Question (=:!: ! ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation (=:!: !","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label (=:!: !"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"(=:!: !"}]}]},"changelog_raw_sha256":"961b8e62fcfc02cf5a123609a386042f82a72339c739ec2b45b4a6b27d7e9d05","changelog_sha256":"aa2d74fef6ded53826d7dcfecad57cfcfb301f2a53a1e820e4fb0b02dc82a7a8","review_raw_sha256":"96d579d76a0802eefbda73480b3f41dc6b71a6e127c704697553bced69c927d9","review_sha256":"1fb62b7502a11935000e46ba006fdf57c4d679de7ce09c90879633553af82ee4"},{"probe":"&ab[[|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &ab[[|","en":"Title"},"rationale":"Raison &ab[[| fin.","reference_ids":[],"question":"Question &ab[[| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &ab[[|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &ab[[|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&ab[[|"}]}]},"changelog_raw_sha256":"e845973805dba5017aee19f5aa631a35d8bcd949a22a9dea38d1c1670ed8ec47","changelog_sha256":"65a0a67121e2a8dd3f03fc7453ce6ae7728d0bcc584f1bf48ff81d2992953b93","review_raw_sha256":"14aff5b3b6a7859db7e38691af3d0f5c2e837a193cc0431ed4fe7c1b606f04ca","review_sha256":"6d2289061ab8fd45a63e5e4e5588e61f4feaf562d703cd6d033f857cc11d7f61"},{"probe":"\n=\\","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n=\\","en":"Title"},"rationale":"Raison \n=\\ fin.","reference_ids":[],"question":"Question \n=\\ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n=\\","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n=\\"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n=\\"}]}]},"changelog_raw_sha256":"e86710b226829145322fc14ae391991a5b6f344b177fde2f51101431a2d4e76f","changelog_sha256":"d871fe16e158aaa1c50c5fa5139368186c653d8f03e8914c65c9c64794ea7efe","review_raw_sha256":"27ec93f223a0b7423951dadb785a53922e754b405d71a261d6591477996e2427","review_sha256":"8ceafb7d9a494a122299ebeeaea825ff7a3b2d0a55a2f1c64b2692b8cba946f9"},{"probe":"=[] ![\"<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =[] ![\"<","en":"Title"},"rationale":"Raison =[] ![\"< fin.","reference_ids":[],"question":"Question =[] ![\"< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =[] ![\"<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =[] ![\"<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=[] ![\"<"}]}]},"changelog_raw_sha256":"8ebb077d85d4776f4fd3f66f809f54726d729ee55741ed6182c86553804af15a","changelog_sha256":"216b27a221f3b5555911031e3e070730fb0a38537de059eb8cbb8e682cbfaa87","review_raw_sha256":"bfe492240afcfa81e5e50f574c16c936f67fcae1cac3df3e87f7524f9917091f","review_sha256":"a20391f39ffd5362d26df4590064ccbdcd95f2df12c8bcca2ecc3e40f5df1acd"},{"probe":"\\_ /\n`&#:www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\_ /\n`&#:www.","en":"Title"},"rationale":"Raison \\_ /\n`&#:www. fin.","reference_ids":[],"question":"Question \\_ /\n`&#:www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\_ /\n`&#:www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\_ /\n`&#:www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\_ /\n`&#:www."}]}]},"changelog_raw_sha256":"e470fee700398e72c288a23377b8342e45299f2c9868848d39b10a48566ba636","changelog_sha256":"e3d9622aa221c30c609326bfea83a6bb2cd161dd59c6b57c95651c6c8d4c9074","review_raw_sha256":"36e748b74b3a9b757e5a6043413f7509fdd0bbaf2b47338fd080025f08ba9fd5","review_sha256":"4e1bae4b2eae618af927eb772c614a3e4752ae2d2855af5f03afb7da85d5ddd0"},{"probe":"**]&#:é\"(_ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **]&#:é\"(_ ","en":"Title"},"rationale":"Raison **]&#:é\"(_  fin.","reference_ids":[],"question":"Question **]&#:é\"(_  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **]&#:é\"(_ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **]&#:é\"(_ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**]&#:é\"(_ "}]}]},"changelog_raw_sha256":"99dd24174856f2178ebea244edb46bdfb6393343c0cefc891f69a238169f6409","changelog_sha256":"7d03a7166be235003360f8277eeee92bac520ccc07c3aa96fc051cdfb99211c4","review_raw_sha256":"abf2c48cd533e149adfa97c142192b0baba7efdc6e97f814c2bddc41d9ccfaa4","review_sha256":"41262d8ea38b1d1a1bce2772e6837a3a93510286d639a3d280a34ecca65af114"},{"probe":"**/<<<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre **/<<<","en":"Title"},"rationale":"Raison **/<<< fin.","reference_ids":[],"question":"Question **/<<< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation **/<<<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label **/<<<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"**/<<<"}]}]},"changelog_raw_sha256":"cbd5eae8f55f8c4946e3482d5ab9425bca4b85553619896e53d4e9c1d7f3a4d0","changelog_sha256":"d786a7f4823572864388fca8da414db7c8288dc0235a0443716b573a8873458b","review_raw_sha256":"0a59bcf1c01733ff16b70d59590166c95433d8a31d1608b33ddb0c6671fb8b42","review_sha256":"0d44d8b3175b14cecdcbf2b6d0a5f72a1c660f98eaee474da6848caf28250ed6"},{"probe":"\n![\n/ ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n![\n/ ","en":"Title"},"rationale":"Raison \n![\n/  fin.","reference_ids":[],"question":"Question \n![\n/  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n![\n/ ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n![\n/ "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n![\n/ "}]}]},"changelog_raw_sha256":"79701508d0d6e8825efc5d74bd75702f6e73da9c30b60f6787cf2d68cb188777","changelog_sha256":"76de6c41777a28d1958931138c574b5b2238743e985e20d11156953e3862cbb1","review_raw_sha256":"d6ac7d8e877f1a333dd8c82f92d5545dce6259fe1a54f791b2f7a03d2aa29289","review_sha256":"e2241db5be7215bcbfaabefcbd3b3579361af1e2c60f556e31e172ba2808b8ee"},{"probe":";(: **`\"éé","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;(: **`\"éé","en":"Title"},"rationale":"Raison ;(: **`\"éé fin.","reference_ids":[],"question":"Question ;(: **`\"éé ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;(: **`\"éé","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;(: **`\"éé"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";(: **`\"éé"}]}]},"changelog_raw_sha256":"71ac0d675d3af4dfae0c4fd8d57a0002544f1cc5d3f417fb7bff10917ae93d3b","changelog_sha256":"9371a81b983618e605a0cf7e37a004e51810033a01a9d42b00936cd297ad8dfb","review_raw_sha256":"bea9921a78b070f8b6a9a4d4b35ed00784cc69c70dc765f157a69afb4f6f3457","review_sha256":"3278d1957160d1540a5671907018af378c8c213f8efc836e860a85ddcb0b337c"},{"probe":"&中![","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &中![","en":"Title"},"rationale":"Raison &中![ fin.","reference_ids":[],"question":"Question &中![ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &中![","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &中!["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&中!["}]}]},"changelog_raw_sha256":"fd9491d7018b6b14a25400aca2da27e57f4233d1e6eed230335bf93b89fc6995","changelog_sha256":"f08c27a2b4918843a6434cb4493141ad46279341e7b83602b34a5fd479faffb3","review_raw_sha256":"d2c616164669bf396baf180c3491f676127cb507b63307a992dcd0f9ac3cb67f","review_sha256":"08c7d0616c0e09ee1e678f6ae0d0b50b2c61dafa3416467fddb090b3b1705dc7"},{"probe":"|&_\n#https://\n*![<_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre |&_\n#https://\n*![<_","en":"Title"},"rationale":"Raison |&_\n#https://\n*![<_ fin.","reference_ids":[],"question":"Question |&_\n#https://\n*![<_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation |&_\n#https://\n*![<_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label |&_\n#https://\n*![<_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"|&_\n#https://\n*![<_"}]}]},"changelog_raw_sha256":"75dc06e4be75779bff4364a5a283d0f51cb1b5a2c0443bc2de913f495a67b15a","changelog_sha256":"2c411d57f10b197601b8b57a0f77bc79eb94011c53613f3faaae0b561133a635","review_raw_sha256":"f1a5689aa93d81a26fa969cc0d2fd397dfad48d6376cd36a179288df7cd5d68c","review_sha256":"5808cdaac18ef59ed7d20879083aa433baf7e7762f1db92e13d4d959ff9e524f"},{"probe":"&**&#.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &**&#.","en":"Title"},"rationale":"Raison &**&#. fin.","reference_ids":[],"question":"Question &**&#. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &**&#.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &**&#."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&**&#."}]}]},"changelog_raw_sha256":"d93841989ffb2b3f1fe1e85205c76f44c0ca808a770144ca320d3c14193587c0","changelog_sha256":"77461a97bbc7a7d1c0a73b2bf1e6af97c1ad60ee6efdf7877af3bc207dc41bb7","review_raw_sha256":"e34c71332b86248e028e31267acd6912e2ad35a73d9cf81776290ed21b0f2cf5","review_sha256":"bdb3de854bf4bf00820d6ae03abe9a37320e79faad495fbee67f3c13627dfe53"},{"probe":"a[[<中~)é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a[[<中~)é","en":"Title"},"rationale":"Raison a[[<中~)é fin.","reference_ids":[],"question":"Question a[[<中~)é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a[[<中~)é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a[[<中~)é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a[[<中~)é"}]}]},"changelog_raw_sha256":"f0904d799a2049ae70b6367b62fb7573cb627a634318d1e995353cc2c7dd27a9","changelog_sha256":"fdb2d159518a2f6419acaa18f2eb09fbd8092acd1df8b06c6d2be21ae9c5aca1","review_raw_sha256":"f03503828b6262beb61f3fe51986e0c5a59a05baa9f3fadb1ebe51134774c2ea","review_sha256":"ad1712159c4fd292699200e220932406b1c18a47c2310864ad0e0d56149f68e6"},{"probe":" :]];]*\\!<","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :]];]*\\!<","en":"Title"},"rationale":"Raison :]];]*\\!< fin.","reference_ids":[],"question":"Question :]];]*\\!< ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :]];]*\\!<","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :]];]*\\!<"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" :]];]*\\!<"}]}]},"changelog_raw_sha256":"653caad41d9b1b2592b87bced0984239293224645f890067834a5870213d7640","changelog_sha256":"43616fec3728699a203dbedae61705c432b04b23c4f5f89d19f8af74aadb725b","review_raw_sha256":"d7b99ee8d29c7f2921a85b250fa0bd3d9dd0001c0071a74240eee7111538f780","review_sha256":"289a509636afc9673869607cc31dac8f98e8d9f3ae7671c7d8377587f76c5608"},{"probe":"=`*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =`*","en":"Title"},"rationale":"Raison =`* fin.","reference_ids":[],"question":"Question =`* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =`*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =`*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=`*"}]}]},"changelog_raw_sha256":"4b37e6cb6a5fde0da17e8ca90baaf6259fea6abeeba62e7e996e7efb8cc512e8","changelog_sha256":"216d33b5414ee8ee129018f0a1f1f0f95ae01de69e9fc29711c3ec69fe05236d","review_raw_sha256":"92dd8324a2880b048dcbf0d030918c6847a5f831944597b59dd0358281169cc3","review_sha256":"4964d13955ddd1a4f49362ecd052ea901930a8aaf69cb079203f74af61de1223"},{"probe":"~www.www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ~www.www.","en":"Title"},"rationale":"Raison ~www.www. fin.","reference_ids":[],"question":"Question ~www.www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ~www.www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ~www.www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"~www.www."}]}]},"changelog_raw_sha256":"89a805cb6b13491e6526cffd90dd7b02ce39e341e0dda706ea01077b9ebd3745","changelog_sha256":"501e7acaa09483fbf241c4448813132b9649e20a2aec75750f266182ed914eaf","review_raw_sha256":"be8ac1dc1696e930811d648db1fa0014be35a85645a5d371aea0b4f0fa4218ba","review_sha256":"174a4c7ad7359a4ad0d73ab82f05d63c1815c52061a82a168113bf9fe84f0de3"},{"probe":"a&#>!**]&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a&#>!**]&","en":"Title"},"rationale":"Raison a&#>!**]& fin.","reference_ids":[],"question":"Question a&#>!**]& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a&#>!**]&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a&#>!**]&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a&#>!**]&"}]}]},"changelog_raw_sha256":"673689a81435576a55445f3125280a75f68f04ba72708d875e7a5a9712a5f530","changelog_sha256":"534e06028bbdf539c07c3d5cf89e43fda543d430e50eb316db4cb7028921f921","review_raw_sha256":"984f2c1278f6ac42fb145b56c2553a76fd330cf42db7ffed5bb31fbdf102358f","review_sha256":"c1bf4ecb8cc5c46640080c205dbba1ea3da07b68ca2afc379aa49dc39bcd5026"},{"probe":"_ é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _ é","en":"Title"},"rationale":"Raison _ é fin.","reference_ids":[],"question":"Question _ é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _ é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _ é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_ é"}]}]},"changelog_raw_sha256":"10064067d1eee7a53c3637e9b3fd83024dccf72ac1afabe36d50931f59ce4c15","changelog_sha256":"bccc7953e4f48cd667e34fb8d0a4b59cda7e22fdaa5124291e8ba210286b1caa","review_raw_sha256":"1e0e17f8244153581d0717a507e56af5306e6a03536f2850da4e6979547003f0","review_sha256":"9f8cfbc0a446f25e0e5084b62ae03b080538a928012808decac657d7501cf509"},{"probe":"= )~ &&é","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre = )~ &&é","en":"Title"},"rationale":"Raison = )~ &&é fin.","reference_ids":[],"question":"Question = )~ &&é ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation = )~ &&é","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label = )~ &&é"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"= )~ &&é"}]}]},"changelog_raw_sha256":"bf3dab1ae4e11527abb2d201d331dc22c862973c299da16461e7a9d378dbcd4d","changelog_sha256":"8ba5b2507f8400f078316fdebddc3b4aaa82114841414d4abc72c928aaf4f757","review_raw_sha256":"00e06b3bed3e6862f12f2575e7c96a66ef3689afdc18dbce57c31e9fcf59523a","review_sha256":"3493083e7f932cc62983851886a0c5ed1d7cacf1256974f5df6c9e33701ecbe3"},{"probe":"![a;","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![a;","en":"Title"},"rationale":"Raison ![a; fin.","reference_ids":[],"question":"Question ![a; ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![a;","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![a;"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![a;"}]}]},"changelog_raw_sha256":"143fd5d98103892e21a632bbf8af181fc4b422f9822aae7707af5491ba702a94","changelog_sha256":"beed6c1cae5a96123c08fd5ffb6c08ea3ec20b895b6dd93a17e76f4f7f6f2f82","review_raw_sha256":"50357cb4afecab9288b701ed0a205b52f6c6a3f43c1ad51b9cafa8d2b8c24f30","review_sha256":"d507ef83e1176e1be96b4dd7fd947a927cc3ab79925c1fcea717a3940a4ca663"},{"probe":"[[;[b[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[;[b[","en":"Title"},"rationale":"Raison [[;[b[ fin.","reference_ids":[],"question":"Question [[;[b[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[;[b[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[;[b["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[;[b["}]}]},"changelog_raw_sha256":"e93419b872f5f0030cb94dceb37b082a66825d6016a82dc757f755fd05e9fb11","changelog_sha256":"1a4ba34deff39c54284ca938aba06dc76781f0986ee11cfb05fb14e37150663f","review_raw_sha256":"b45ab9e626b7f8ccb74019c12617452d06c53d88d97d4b13dabc65ac0ff13e9b","review_sha256":"a9bbf4dfd014f40f2979b92339598a9009a9631e9c2836f4a32d70bf44915ddf"},{"probe":"]]<www.\nb (_\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]<www.\nb (_\n","en":"Title"},"rationale":"Raison ]]<www.\nb (_\n fin.","reference_ids":[],"question":"Question ]]<www.\nb (_\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]<www.\nb (_\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]<www.\nb (_\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]<www.\nb (_\n"}]}]},"changelog_raw_sha256":"75ec42e3fba4edf1c5034706613177d8172458112c55197bdf456a9a5a051c0c","changelog_sha256":"b3be84e45b29724b91b756cecc282f89c50b9da9bd7a51aab755cf17b7963611","review_raw_sha256":"f50c0c799329f40a66cda0e146544f7443254023a68c5d389a8b37fb676e308e","review_sha256":"ed4a8145a2d072f79bccf0d54c50ed797f3bb8ece608aed50d3e17bd479ef3d1"},{"probe":">https://> ~\n<=)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre >https://> ~\n<=)","en":"Title"},"rationale":"Raison >https://> ~\n<=) fin.","reference_ids":[],"question":"Question >https://> ~\n<=) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation >https://> ~\n<=)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label >https://> ~\n<=)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":">https://> ~\n<=)"}]}]},"changelog_raw_sha256":"ebc56b3bda61d090f47caaba38adbff28c9eaa3c6738365ebe27ea34bd2581d6","changelog_sha256":"8fb0a68dde197db7cc15a2e5cfd74fca9bb8069aa94f76801d91f8d1a81b6f4f","review_raw_sha256":"1f2799e7b7dc880f1c54f4debde64b28cc317e8bc8c9f2c1b27a68ef209559f9","review_sha256":"936185979d1502fc88419b10680fde7c7061564bff787d8a66b0694e6d6d8a3d"},{"probe":" [[b<]]é>./*=","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  [[b<]]é>./*=","en":"Title"},"rationale":"Raison  [[b<]]é>./*= fin.","reference_ids":[],"question":"Question  [[b<]]é>./*= ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  [[b<]]é>./*=","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  [[b<]]é>./*="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" [[b<]]é>./*="}]}]},"changelog_raw_sha256":"9a70daa86796e59aa15aa747bf3707fc087c3924c81e73604da7b850d8cd7d30","changelog_sha256":"7f5e4e789c87ce57f59afd817e518b93b8cb7556e01ce696acd7d41a595d5455","review_raw_sha256":"cd183000a6b07c95536cff957e297bff02a9c269d13bb0c9a2b87bebb4624509","review_sha256":"d6928d79e448b572a4296fdb1c3527193c54739a845fedd9f7bb3a5d8f7070de"},{"probe":"&]~&#&[[)_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &]~&#&[[)_","en":"Title"},"rationale":"Raison &]~&#&[[)_ fin.","reference_ids":[],"question":"Question &]~&#&[[)_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &]~&#&[[)_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &]~&#&[[)_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&]~&#&[[)_"}]}]},"changelog_raw_sha256":"ad0869dd233d0ae94dde186863865464a5706837a38df4138836ec5e43082b06","changelog_sha256":"a16ce40b43fbeb1e2ba9f9f875b95fafaaf77896924a583c3c7c3373fae29875","review_raw_sha256":"3bdad46ecae9ec1024ffe67edddf9df3e5a3d6e45a895ed720bfc7ec4fd57803","review_sha256":"e4097b801b5a44ad0a3233ce2db571c5a3d14e6bcb5dac45a894ad76bff51966"},{"probe":"a&_**www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a&_**www.","en":"Title"},"rationale":"Raison a&_**www. fin.","reference_ids":[],"question":"Question a&_**www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation a&_**www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a&_**www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a&_**www."}]}]},"changelog_raw_sha256":"b2dd982cd08e2e179676c10471130bf81b3c1f3e303bff1a302aa5804ca550b7","changelog_sha256":"b6f2189ca50371f5570bcce15235bc42236ed3661a02bee2ac1447163206595c","review_raw_sha256":"af3fb09451a4ab8aade8a7d753d107ce35ad55cd73a6f3f15a84b2a73a763615","review_sha256":"9e1d513418c6de6f75fde1dff150e78555b6f6c37db50b5f8ad993b64f573e7b"},{"probe":"\n\"*/\n*中(&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n\"*/\n*中(&","en":"Title"},"rationale":"Raison \n\"*/\n*中(& fin.","reference_ids":[],"question":"Question \n\"*/\n*中(& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n\"*/\n*中(&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n\"*/\n*中(&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n\"*/\n*中(&"}]}]},"changelog_raw_sha256":"0f6fd990e4442d2ebd18957672acf70ef836c23c7bc907418f83581701cc73bc","changelog_sha256":"9fd4ffdb4ec9dafb3966382471a7717430d8105ca9dd5d2b64b9329a4beae3ae","review_raw_sha256":"bbb39f16950f38260b14ce94c8da04dd51a7ac86585eb43912f9ef1ae1d87cdf","review_sha256":"fd6665603b270144c7cfb516cabd499895f8a1a5ff2605091b9506bb34c8e17a"},{"probe":"\n[&#[;:& a<`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \n[&#[;:& a<`","en":"Title"},"rationale":"Raison \n[&#[;:& a<` fin.","reference_ids":[],"question":"Question \n[&#[;:& a<` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n[&#[;:& a<`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \n[&#[;:& a<`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\n[&#[;:& a<`"}]}]},"changelog_raw_sha256":"2a97d3cb602fec8dfddfb5bdfe436055fea66daf3698123d3119d0014d5139b8","changelog_sha256":"e3f82120b71eeb698e8a5e6b955bdfd3a137b74104ef9e03fb25328aca6b110c","review_raw_sha256":"a1c3c8098a94ccca10b3514aa91871d3a796faeb1984eb557b31153af27a3058","review_sha256":"271eee754eca7f1418e489db5d67f28b1d6555091818997d7bcda674286598aa"},{"probe":"]\n (_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]\n (_","en":"Title"},"rationale":"Raison ]\n (_ fin.","reference_ids":[],"question":"Question ]\n (_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]\n (_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]\n (_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]\n (_"}]}]},"changelog_raw_sha256":"bc374c7be422de7d78f1c99db75f6170ee1256a17f211a40953e109ab3e286e4","changelog_sha256":"dcff8708cf5d631c47d661f17fbc85ba67f151276e8602bf06c239b1a5478f73","review_raw_sha256":"bfbd2ee790ce534392925fdcd872bccbd8bdcc12524eca53312d0aed3388f9bc","review_sha256":"bda61d47c22595ee53dca0dc914e2afcf076b3b90fa664f99b0a6f39994da2fe"},{"probe":"www.https:// \n)**a)www.[[`","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre www.https:// \n)**a)www.[[`","en":"Title"},"rationale":"Raison www.https:// \n)**a)www.[[` fin.","reference_ids":[],"question":"Question www.https:// \n)**a)www.[[` ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation www.https:// \n)**a)www.[[`","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label www.https:// \n)**a)www.[[`"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"www.https:// \n)**a)www.[[`"}]}]},"changelog_raw_sha256":"45441e63a0003a3cc90dffe1c5cb18889005534b90701f8d56f71b728e2ad790","changelog_sha256":"3026eaaaac4f7b99eb72eab5a832f3bd57db54009e8f98a4070fb0d845d2002e","review_raw_sha256":"f9dfd7e854fae730adaaa318c5b7543af73c199c8cf871ff5cc69f15e8ab4467","review_sha256":"69c301c045c0b98faee2b76e0f5f1d082cb33178c805c39db7df36a159f0bd31"},{"probe":" [b[*<&","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre  [b[*<&","en":"Title"},"rationale":"Raison  [b[*<& fin.","reference_ids":[],"question":"Question  [b[*<& ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation  [b[*<&","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label  [b[*<&"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":" [b[*<&"}]}]},"changelog_raw_sha256":"ac19f55a693a837bdcd8bd7844254ebd031ac3d984ca07bfe28028561d5f9aa2","changelog_sha256":"ca705155d802d23b535d77198ed11f4caa490aae67c01be34a2f3c3f5cdcf94e","review_raw_sha256":"0ab13508517e4cfd611fd29f2fddc786af92a08f6f351f44aa239b7dd7fe5a93","review_sha256":"fbd475eef2fdf858c841b370cd8ecf2a0128a7822473c0e512c9e0d102887a7c"},{"probe":"<!_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <!_","en":"Title"},"rationale":"Raison <!_ fin.","reference_ids":[],"question":"Question <!_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <!_","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <!_"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<!_"}]}]},"changelog_raw_sha256":"2ed4b66cc08ccf5a78086f5d2a984190217d2646d31f304dfa55264a1f2d263a","changelog_sha256":"f3ee283791eeccb518456f1f3856310b0fdf94da9ea49f4d637845b91d17f72c","review_raw_sha256":"c962dd2298b69959180dafa7aa3283464b832cf7beefe26dd41f19f7da1df890","review_sha256":"b5eac50fe487d3cc0df06224c0662e856c71616c9905889f30cf05745390e012"},{"probe":"#\"a `[  &","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #\"a `[  &","en":"Title"},"rationale":"Raison #\"a `[  & fin.","reference_ids":[],"question":"Question #\"a `[  & ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #\"a `[  &","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #\"a `[  &"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#\"a `[  &"}]}]},"changelog_raw_sha256":"6acf9563bd9fca83965410c778ae887bf0d12f1d9d83475fe5fdf71e59a38654","changelog_sha256":"24046cb9e7bfe9caa71f1baa90db6432ad0f7d438a238f6f018462d18b81affa","review_raw_sha256":"d0a4f0c6c5c4c6306578da2990215e45e9991f7c3faccda8991c3c73bfc62269","review_sha256":"0ecbff9666d507ac092f3294efeca2f96b79435fa6308ad39f00a5ca22c49cd4"},{"probe":"&b<>_ **é*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &b<>_ **é*","en":"Title"},"rationale":"Raison &b<>_ **é* fin.","reference_ids":[],"question":"Question &b<>_ **é* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &b<>_ **é*","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &b<>_ **é*"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&b<>_ **é*"}]}]},"changelog_raw_sha256":"f3165c75dbed29b137c1f624cdefac096b8b5ecc24b8420912d9615af0fe8708","changelog_sha256":"c53ae0c5730f6262cd9d6d41128779032581112c2c7b8e9a4cfd40d4f69c9ac7","review_raw_sha256":"0379527960e0ac2f764c71044840945c6e0af49acb5dd44e759409ee6a788b62","review_sha256":"3d4d12a4515f0c2d33e9e089f8f3f43df97cbd0c3a0c12aedaaa3c3ad4abe5c5"},{"probe":"![b;![&b]]>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ![b;![&b]]>","en":"Title"},"rationale":"Raison ![b;![&b]]> fin.","reference_ids":[],"question":"Question ![b;![&b]]> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ![b;![&b]]>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ![b;![&b]]>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"![b;![&b]]>"}]}]},"changelog_raw_sha256":"3525748c98d39013ea01e1c37881f04a7fa66da75a0f6da15f313ab778012c1d","changelog_sha256":"f54761e65da7554791676fee528e804c9f122988224a8f6010c4d4bf8ad2b7ad","review_raw_sha256":"41fdbc8f6aae8b79974ab7ea78881a1e9d4a36b296996ad3beb3b522138b36d4","review_sha256":"ef3588f2bc4cabf40e99de45f0aa30ffda1115fbde9af5ebad3a706512b371c9"},{"probe":":https://b","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :https://b","en":"Title"},"rationale":"Raison :https://b fin.","reference_ids":[],"question":"Question :https://b ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :https://b","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :https://b"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":https://b"}]}]},"changelog_raw_sha256":"00205e1fd94ae72546fb76c78f2a3baea05793aabefc8d842494ba2be6bb6613","changelog_sha256":"faa7451c44b12181667d3acdde3d034ab3b6fad298445854b85f5491d0ad7957","review_raw_sha256":"ea1810221947e4c612074779df0b58e28aff646d724ddb9a717604ae9378db08","review_sha256":"c14ef7eee9995c965575b50cd7989fca31086dbf6b5d53cfd062dec38606235b"},{"probe":"=\"<:(\\<:[!www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre =\"<:(\\<:[!www.","en":"Title"},"rationale":"Raison =\"<:(\\<:[!www. fin.","reference_ids":[],"question":"Question =\"<:(\\<:[!www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation =\"<:(\\<:[!www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label =\"<:(\\<:[!www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"=\"<:(\\<:[!www."}]}]},"changelog_raw_sha256":"5472cf0f772196c7b28e9926744e59d1ff6f061ccbce93e80d6eda04adec34b1","changelog_sha256":"5383571007a1fff2e5c473f620eb2b340d93b1bc94d78043b99190e0f2f5c2de","review_raw_sha256":"c554d3442aa0a6eca553833e61031de4f6081cd9e36fbaecf1e984f875bf6e8d","review_sha256":"f6603f94ed312926cf8ca88088ed86af1f1e993bfc6b9f2640baa20423222c76"},{"probe":"&** [[#https://~.]] a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &** [[#https://~.]] a","en":"Title"},"rationale":"Raison &** [[#https://~.]] a fin.","reference_ids":[],"question":"Question &** [[#https://~.]] a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &** [[#https://~.]] a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &** [[#https://~.]] a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&** [[#https://~.]] a"}]}]},"changelog_raw_sha256":"2e1c329b6a0a13858976785db64e1f4ff0831d516b297dd70c85d293b8e471b2","changelog_sha256":"8df295a6e8b7edb4e16fb37939e938a1cf7207a37dce7f961a6c7f196aac1312","review_raw_sha256":"67df8dc6002543edffdb166f3ce12b3b921e138a451e9a0e1ddb3ff9ff0ae9e8","review_sha256":"06c86230757db174f393e87b9670dd42490b5bfd9a2bc9efee8df7143d08ea10"},{"probe":"!<_&#.]]|","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre !<_&#.]]|","en":"Title"},"rationale":"Raison !<_&#.]]| fin.","reference_ids":[],"question":"Question !<_&#.]]| ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation !<_&#.]]|","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label !<_&#.]]|"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"!<_&#.]]|"}]}]},"changelog_raw_sha256":"c6f2de57c73d71258d916ac922afa71cb297188c6f0c0c339f356c7ea14f3e03","changelog_sha256":"a0ee980f80fbdc1a3f65cff1a4b82f4946a385fb0d505fb46199292303c44cd2","review_raw_sha256":"4aba1fe96f4f3cc7dd117df6f66f929fa44afc9eaa68786dcde5b8a42eca8ba2","review_sha256":"d812298a0b29fb9f876a98dba1bbee0276445bab3809d70a921ed53a7a0219b0"},{"probe":";_:![;www.>a)www.)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;_:![;www.>a)www.)","en":"Title"},"rationale":"Raison ;_:![;www.>a)www.) fin.","reference_ids":[],"question":"Question ;_:![;www.>a)www.) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;_:![;www.>a)www.)","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;_:![;www.>a)www.)"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";_:![;www.>a)www.)"}]}]},"changelog_raw_sha256":"863f50c807247d2ef6aaa467727a2403426ef03623ab75d42dd7debe66266648","changelog_sha256":"f8e653d655147828153d641299aeb7f7adcac8e3abe1472e0fd4cf08927204c4","review_raw_sha256":"06c3dba7de209dbb39a7e885823d93f7483bff3eeff0a49c8862a30bdc970820","review_sha256":"c7a0147d37fdf9da14490892f06e2c3b32af98f0575ff7b269e58101f3f5c023"},{"probe":"#_\n","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre #_\n","en":"Title"},"rationale":"Raison #_\n fin.","reference_ids":[],"question":"Question #_\n ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation #_\n","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label #_\n"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"#_\n"}]}]},"changelog_raw_sha256":"cb0ea443319fd258de03037d976cd4f777e81e860ae084e63a2d1418ca8140e1","changelog_sha256":"cbe487e79309a435f64f22c62354c496dc8df2db2dbc157ff0a670babc59b707","review_raw_sha256":"e7cf4527e1d690a52163fefc6797e5c0aedaa7e35fc1282f6cd78ce5ee0e6571","review_sha256":"209fedc065fcc2ee9308d91f863baa719afbd40c06e5aeb19b2125aa7f97bdd4"},{"probe":"[é=**]]] ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [é=**]]] ","en":"Title"},"rationale":"Raison [é=**]]]  fin.","reference_ids":[],"question":"Question [é=**]]]  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [é=**]]] ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [é=**]]] "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[é=**]]] "}]}]},"changelog_raw_sha256":"ceffdd15c756361a1c7944784558dbff5a83381c0eeb0270255c995818f62229","changelog_sha256":"cf2e77db766f98182a25ea5d082a0d5600f3b8e0cd006ce6d9e79c98da518125","review_raw_sha256":"c28ba92de94de261b78a8a889ec70dead6e42dc27e1373fbb271446a427644e1","review_sha256":"a871f873eaa4962d30ad49a24d608988e6f163184e05c1691b1ddcb24bdca23f"},{"probe":"&;|[~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &;|[~","en":"Title"},"rationale":"Raison &;|[~ fin.","reference_ids":[],"question":"Question &;|[~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &;|[~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &;|[~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&;|[~"}]}]},"changelog_raw_sha256":"09e71ca7c32c174789309ecd21e889e7a5d95294591feaf1e4c82e9487474d7e","changelog_sha256":"9f411d23b5800c7e71faf19cdc1aa8ce9631ae3b7207d327061839de43f3e3e9","review_raw_sha256":"5eccf57bd85476d50cd0697913e58e655a89c4f87730489bf7c22eb47bdb6c0a","review_sha256":"0b0f8e813a3d0d6e03a1766ef4b6752cb271ccc88a83ba8e36ec51f672c613e2"},{"probe":"<a[[https://&#&#[[|<é**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre <a[[https://&#&#[[|<é**","en":"Title"},"rationale":"Raison <a[[https://&#&#[[|<é** fin.","reference_ids":[],"question":"Question <a[[https://&#&#[[|<é** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation <a[[https://&#&#[[|<é**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label <a[[https://&#&#[[|<é**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"<a[[https://&#&#[[|<é**"}]}]},"changelog_raw_sha256":"7798e68a63d82b1e89bff50ff9816c72f9f1357aa83b378e5b0f69e721c689ae","changelog_sha256":"8743c591a41f1ad4f475747cf2589d7e46d1313d831f8e7e5517dc28ec892ff3","review_raw_sha256":"37731a3213978c4941f1d6efd2d78e6c1df487ef0451f260d2de3c72c955b099","review_sha256":"96c12f9b2ea9303829b6ff8bc94cb610048fac6c76709d390602074c0117b07a"},{"probe":"]]&#\n&#www.[**&# ","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]&#\n&#www.[**&# ","en":"Title"},"rationale":"Raison ]]&#\n&#www.[**&#  fin.","reference_ids":[],"question":"Question ]]&#\n&#www.[**&#  ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]&#\n&#www.[**&# ","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]&#\n&#www.[**&# "},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]&#\n&#www.[**&# "}]}]},"changelog_raw_sha256":"d2f62b29237f67e419e2260f2ba442fa806b77e6aa05e0490e46d9ce4b08d6d2","changelog_sha256":"7ad0618888926df651d6fc66ed8f1f520c390a6fc4a19077c336f715a1a36c60","review_raw_sha256":"bc243c41ee7b6661178de379ba20fc5b46099d9a2083005bcdc1bd9d1d3da033","review_sha256":"7d46d1ad9240c30d1ca4e9ef5b8285833293992996227b7cfb226f817633edc7"},{"probe":"é>#/\"www.*&#[ =","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre é>#/\"www.*&#[ =","en":"Title"},"rationale":"Raison é>#/\"www.*&#[ = fin.","reference_ids":[],"question":"Question é>#/\"www.*&#[ = ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation é>#/\"www.*&#[ =","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label é>#/\"www.*&#[ ="},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"é>#/\"www.*&#[ ="}]}]},"changelog_raw_sha256":"a5dab87aecd7259d4aae9a0f0c7b094b73a0e16438888266b2a918fe6c82337f","changelog_sha256":"89acbe3b4a2f001b1c3cf7d923fc043c9f18c714ee62a36ae66ad6944a03aaa7","review_raw_sha256":"2cf6c1ee633024de8dd082803db530c92b4483bd701d55ff8bdf715667eeb465","review_sha256":"03f2db6c6b8f12970bfda714af0505879f1e60fa5c810b2c68a29cd9251176af"},{"probe":"\\<\\中[[![;[]]&www.","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\<\\中[[![;[]]&www.","en":"Title"},"rationale":"Raison \\<\\中[[![;[]]&www. fin.","reference_ids":[],"question":"Question \\<\\中[[![;[]]&www. ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\<\\中[[![;[]]&www.","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\<\\中[[![;[]]&www."},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\<\\中[[![;[]]&www."}]}]},"changelog_raw_sha256":"1b7b58301e950f08a1d7ef6364c1f08be83643699afe26d7d4f29b8b3ee900bc","changelog_sha256":"15547db9140a07455ed8a36c3da21ebdecc771fee559585638e4dca79e5e5306","review_raw_sha256":"7638dfb66f0db52d2204caef31640be2fd99c63a6c8dfc9dfbc7464293edc7b8","review_sha256":"da6f295f42dce368f251b0a2b80d6d5f5336e48eb5bbebdc1a5a4dc6406e1ba5"},{"probe":"\">!#[[[[`~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \">!#[[[[`~","en":"Title"},"rationale":"Raison \">!#[[[[`~ fin.","reference_ids":[],"question":"Question \">!#[[[[`~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \">!#[[[[`~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \">!#[[[[`~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\">!#[[[[`~"}]}]},"changelog_raw_sha256":"c6110b65516a292673bb8d2a84bf4d1d5378556e021e65b85ead3113c84b236c","changelog_sha256":"da187f6a7d4a0dcdc6f095e571b58bdcd81d317f581a3a6082cee0bcfcc6b65e","review_raw_sha256":"2f222201e830d5e142b67bb89116997a4952291dba159d63cf30665f347c08c3","review_sha256":"d47826ed604114dc963583a41a9e748149d89c041301f266d51b49d7a09c7607"},{"probe":"\\https:// ]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \\https:// ]]","en":"Title"},"rationale":"Raison \\https:// ]] fin.","reference_ids":[],"question":"Question \\https:// ]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \\https:// ]]","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \\https:// ]]"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\\https:// ]]"}]}]},"changelog_raw_sha256":"6c8d97fb266b0056e7fbe1e9ddb71769049f04e9d2a52ac817275bb631db6ffb","changelog_sha256":"f00b0804e8769456e5a6bdfd25578393ee4b2eff52b7845649bdc64d7e8bb363","review_raw_sha256":"2f69cca7c336747c1690c7312d41bcf958fe877a35f26ae1bc093975a23aae67","review_sha256":"e5165899ab5e23188a5e9bb835e256d0af9531f4a51b572c39ff2335e6b23cc3"},{"probe":":(/é[[","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre :(/é[[","en":"Title"},"rationale":"Raison :(/é[[ fin.","reference_ids":[],"question":"Question :(/é[[ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation :(/é[[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label :(/é[["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":":(/é[["}]}]},"changelog_raw_sha256":"ecefc5b50ab911f9900b6af5c6cd44a81c477aaa9e0a402a2e2c2396bc249d0a","changelog_sha256":"8090b94fa043e796a350291874d9d0647be835ec54179e36c668bf8094dc1872","review_raw_sha256":"84040ee30e7610a150b3cff2e490fccae97f0533052e9b1a3346f328f77c6543","review_sha256":"4d7a11b71346f68032795084720ae689002c0504581b4cd992e201c427f90039"},{"probe":"`* /;\";a中","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre `* /;\";a中","en":"Title"},"rationale":"Raison `* /;\";a中 fin.","reference_ids":[],"question":"Question `* /;\";a中 ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation `* /;\";a中","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label `* /;\";a中"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"`* /;\";a中"}]}]},"changelog_raw_sha256":"0b2301713a9469943e898f82dcd5616f34781fad1c59bff3f410b7b213537aca","changelog_sha256":"a8b9afd956046205a2c7423ce3abcf41d91f466700af4f20bd3fea57b4128316","review_raw_sha256":"b924130edc98860d0e79e8b91ad8ad7631f39ea5ce6eb98262bb109568a67b5a","review_sha256":"e438d0ff9a8a6b13a6c37c00cda6152dc03278f634c128ec8eb2696b27745200"},{"probe":"&[[_&#aé ]b]]**","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre &[[_&#aé ]b]]**","en":"Title"},"rationale":"Raison &[[_&#aé ]b]]** fin.","reference_ids":[],"question":"Question &[[_&#aé ]b]]** ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation &[[_&#aé ]b]]**","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label &[[_&#aé ]b]]**"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"&[[_&#aé ]b]]**"}]}]},"changelog_raw_sha256":"4fb8c5768f5ea27c37f6e923ca75db77660025de637d7ac9eebc279a1ac35e19","changelog_sha256":"28652e239658221f3a102ecaaef0d93701a11c17dba15abea602bce7b7d405b3","review_raw_sha256":"b0e2f6b2695c5f5191df85982cd08876a08d10cadf608684c293354bbcdefabe","review_sha256":"d1952b4d870b684288186df650de7a95e3750d4a570b4bea933ec2f476e5e456"},{"probe":"\"*a","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre \"*a","en":"Title"},"rationale":"Raison \"*a fin.","reference_ids":[],"question":"Question \"*a ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \"*a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label \"*a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"\"*a"}]}]},"changelog_raw_sha256":"90b99ad45c2cf12ac9aa2dfe665757b6a6231e85077afcfea22d6a87a1fe411f","changelog_sha256":"6e5d125313994f59d4aaa9e5024ca5c5161c03e726b3f0208c41136e88d53711","review_raw_sha256":"b0df25825a5ecf7353dc31db2cceea7787f50816bd807977eb77ad1dca748f1f","review_sha256":"b6905550c67d5644f8ed45b7e1bab11f0df167b46a26667e7ce64146d8cbaea7"},{"probe":"_&<*>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _&<*>","en":"Title"},"rationale":"Raison _&<*> fin.","reference_ids":[],"question":"Question _&<*> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _&<*>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _&<*>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_&<*>"}]}]},"changelog_raw_sha256":"3c1f742497819bc376608b5442161f212191f15701f15781f7b956b19f5e9d4d","changelog_sha256":"8f6bb11f8866276e0b283c0d3ba8d53eab8a1b3395f1471e0c93f2b633cd79f9","review_raw_sha256":"4407ef3bfee68cefe9c284c2b1e9a2dd1138348d1d78a8fa5510902a9f4d0d7a","review_sha256":"3c715e6880168a4ddec0c5c9d91e1db82583fba1755e0f6fc16e54ea3402c8a5"},{"probe":"]]<(]]www.;~","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ]]<(]]www.;~","en":"Title"},"rationale":"Raison ]]<(]]www.;~ fin.","reference_ids":[],"question":"Question ]]<(]]www.;~ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ]]<(]]www.;~","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ]]<(]]www.;~"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"]]<(]]www.;~"}]}]},"changelog_raw_sha256":"7ff52fc8117b2921a8ac063b7fc01113aeb27ebff14e2f2898176d35f3b8dc79","changelog_sha256":"b6111b99421e983a4c6892dcbe52b4b0d189d27c28186d683cc7b9ded2e87fb2","review_raw_sha256":"6a6493c24e8f13eb7d262500099ef2d714ea7f8cc449f7eb8786b751ad392c68","review_sha256":"525b5c5921f49ddd115f5efc02c5fed28fa4a46a9658008ab022245c0a9837bf"},{"probe":";#![<_*>","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ;#![<_*>","en":"Title"},"rationale":"Raison ;#![<_*> fin.","reference_ids":[],"question":"Question ;#![<_*> ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation ;#![<_*>","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label ;#![<_*>"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":";#![<_*>"}]}]},"changelog_raw_sha256":"38d0e7147b0dd6f44d2052d2833499ca14673f14b9303f4d3a7ac724ab33fead","changelog_sha256":"def22a1ead6c94a24fffadbe72a7c769b51b52ab422f69f6326bf4c15535a9bf","review_raw_sha256":"9741b081c0fe1b27dbc9626e110e626b28d125e4fee7cca82b87ec822598730c","review_sha256":"31dbf9865fc692574774e2aac39239222b3a42c3fbfbbb4260a924d705260407"},{"probe":"to_do","reference_id":"probe_ref_","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre to_do","en":"Title"},"rationale":"Raison to_do fin.","reference_ids":[],"question":"Question to_do ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref_","type":"web","citation":"Citation to_do","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref_"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label to_do"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"to_do"}]}]},"changelog_raw_sha256":"63f641628755ce1757ee1ae660c25b3ff316deb8538b602ceaceddddcdb84341","changelog_sha256":"cd6f3f90171747336b4876337078087a648dbb748d96d7dbee091d87c939c8df","review_raw_sha256":"fdf438d96970b5411a026dc34fd45cfeb53c3967d21687369c7519f029236cb4","review_sha256":"279f07d9ff8e39aac02c622af9f0ccfc297be5f182810fafaef46235f01c288e"},{"probe":"a_b c","reference_id":"probe_ref_","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre a_b c","en":"Title"},"rationale":"Raison a_b c fin.","reference_ids":[],"question":"Question a_b c ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref_","type":"web","citation":"Citation a_b c","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref_"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label a_b c"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"a_b c"}]}]},"changelog_raw_sha256":"19cf7502680c787f3a8280ba4fb286bc57f877743c88242e0768a1f2b9c20c4d","changelog_sha256":"f59109e0634939be3000d6a8420d98b6b888f3f983d758ef3d27c34cf72c4c6d","review_raw_sha256":"38684814ff1a76699e3d9f7a9b034e2cc63b7433bf7ce5bbfb4cce8009b477f4","review_sha256":"426c0e3bb7ef23897992e1be46fe0dd77467637ad9493253c8c6d7dd61d415d8"},{"probe":"x","reference_id":"probe_ref_","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre x","en":"Title"},"rationale":"Raison x fin.","reference_ids":[],"question":"Question x ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref_","type":"web","citation":"Citation x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref_"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"x"}]}]},"changelog_raw_sha256":"83374f23ee41bf9457e4c7367afb83b5e2b4bc64df507a028b02af844f54c931","changelog_sha256":"14aab90edcbb1606ba4bfb06a702e467f582183f809ab70d522c3c0e8a98747a","review_raw_sha256":"ad699ac31591244468644dca861233d50b7f1bef94a11a4236a99438e1e3c346","review_sha256":"1b785b57688e7c59e6b40dd86b94ac84ddc1be3b85a0557b39f06c6040354445"},{"probe":"[[|]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[","en":"Title"},"rationale":"Raison [[ fin.","reference_ids":[],"question":"Question ]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [["},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[["}]}]},"changelog_raw_sha256":"af443446331e9fc2db47fab8e2d7b830fbef4eda1ea54b113f10c70507144a51","changelog_sha256":"a8169a414fa82d19351e2b13f5eef017b5c3a00b982e3ff5903bb6ddea3ab6e6","review_raw_sha256":"571d885ee282194d76208c77ee897a5def0fc2d714e4256de5e978f4e057f696","review_sha256":"44181b7c828ac829c7d74b2be7908baa0ff6a30ab3b201d58a1b2f00491ecafb"},{"probe":"[[ a|b ]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[ a","en":"Title"},"rationale":"Raison [[ a fin.","reference_ids":[],"question":"Question b ]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[ a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[ a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[ a"}]}]},"changelog_raw_sha256":"76c58b69b56f14a15db168bd805b547a0f90d860300bdd8da8e349520b28f760","changelog_sha256":"24e55eb68dd73ff3912306de0bd837d790efbd3381adfc82c7b66e7216d78958","review_raw_sha256":"2d2a7b467b9e5f2c806fe5da6dff4f8fe3184609a0584128f7fac8034dc92298","review_sha256":"aeeb9f8ea4f1d75660c961ae4ad7d91485a5c9479f515a2f33f8e5f69b2220e4"},{"probe":"[[a|b]]","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [[a","en":"Title"},"rationale":"Raison [[a fin.","reference_ids":[],"question":"Question b]] ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [[a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [[a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[[a"}]}]},"changelog_raw_sha256":"c4f49d6c05b0a31fc76fffe666250bcaafaba571f4890c75e49d6d4f091dc57c","changelog_sha256":"3d14633ed131971456fb7dd9fdee69abaef350c0c13c5c654b36381625e1358e","review_raw_sha256":"114e3953c870f0670ed4546ec656b719e436d2d09a9c27f6b49c73179c0620d7","review_sha256":"accf49e839672d367fc5bb65bdeddb3459671d49eb17cdd8276064bf7854c9f1"},{"probe":"{%|%}","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre {%","en":"Title"},"rationale":"Raison {% fin.","reference_ids":[],"question":"Question %} ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation {%","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label {%"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"{%"}]}]},"changelog_raw_sha256":"fe032bbe8c8515be2c9eecd40ada64e426f1c593ca29005a8405ce2efe402ba9","changelog_sha256":"22ea9a99bd9d2951a84985a295a010985e9dfe91c864bc4d5ecd834286d98f1c","review_raw_sha256":"6a4feef2e39732952e8fbe61c864bcd1407a503c4bfb3b2246e2e0bb17db5eeb","review_sha256":"12b918d96380f375078779e4f393fc91b12fc224356d6617c3ae1c36a28ffd75"},{"probe":"[x|](y)","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre [x","en":"Title"},"rationale":"Raison [x fin.","reference_ids":[],"question":"Question ](y) ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation [x","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label [x"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"[x"}]}]},"changelog_raw_sha256":"5ba4ca5331f0f6716701e785066ad3282a75b9ee4e05699e3ee01b002421ab9b","changelog_sha256":"c94f702338864d761e09e4aa997a6510f9f0839be3e1bd4da9b8ff7ecbcb0e5d","review_raw_sha256":"f6f6fdd0e6555d9336532af7ec6c5a8038bdc962b0259d325c8e517415fe4125","review_sha256":"f99ed4e611fa499c93c4fe52fa2c78fdfcc32bb151a4d23b8021ee072c98a95f"},{"probe":"*a|b*","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre *a","en":"Title"},"rationale":"Raison *a fin.","reference_ids":[],"question":"Question b* ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation *a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label *a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"*a"}]}]},"changelog_raw_sha256":"8e82daf7fe3cfcf240efb349aaeaba206f33ab5bd900cfc76d2fc72fa5302586","changelog_sha256":"0a688ff722ba0aa47de425f5ac2b27081c10d5b406a836b6711f2d71cdb51948","review_raw_sha256":"011c72970292f58634e8aed9454e4e97a44c435a1f5846098bddb10f34bb22f9","review_sha256":"0120566b91744cab088ec63d6965fd4f6c6b57c6867c4d8cfe16df62b5fd72e2"},{"probe":"_a|b_","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre _a","en":"Title"},"rationale":"Raison _a fin.","reference_ids":[],"question":"Question b_ ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation _a","url":null,"doi":null}},{"op":"cite","target":"finding:hip/hip-dysfunctions/mobility","reference_ids":["probe_ref"]},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Label _a"},{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"name.fr","value":"_a"}]}]},"changelog_raw_sha256":"d43737d93cad38727ce514e7027ae87de9f457b93691c1c3152bf8aecae37e3d","changelog_sha256":"c18f51e5f4937a2595a11af67eb37e567b5eb8a8c5d02e2ee6bcc2febfbc7032","review_raw_sha256":"70acd0868a6ac568a24ba64669589d93c521fc62f9ff86ae17e337086cb3ed58","review_sha256":"3ce8069e8c53045ff25a3f9c050705572126b22c1f532ed3f57292b0b524f157"},{"probe":"","reference_id":"probe_ref","changes_file":{"changes":[{"id":"CHG-001","level":"C","kind":"correction","title":{"fr":"Titre ?","ops":[{"op":"add","target":"document","field":"references","value":{"id":"probe_ref","type":"web","citation":"Citation \n\n \n \n\n","anomalies":[{"code":"a.one","level":"a_valider","subject":"s","message":"m"},{"code":"a.two","level":"informatif","subject":"s","message":"m"},{"code":"a.three","level":"a_valider","subject":"s","message":"m"}],"legacy_id_map":{"views":{"head":"head"},"annotations":{"legacy-hip":"hip","legacy-neck":"neck"},"categories":{},"finding_nodes":{},"assets":{}},"cases":[{"name":"every-section","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"correction","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["atlas"],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name","value":{"fr":"Mobilité | pipe","en":"Mobility\nline"}},{"op":"set","target":"finding:neck/neck-dysfunctions/stiffness","field":"requires_vet_referral","value":true},{"op":"set","target":"annotation:hip","field":"geometry","value":{"type":"circle","cx":30,"cy":20.5,"r":4}},{"op":"set","target":"annotation:neck","field":"geometry","value":{"type":"polygon","points":[[10,10],[20,10],[15,25]]}}]},{"id":"CHG-002","level":"B","kind":"translation","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"priority":"high","ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility/flexion","field":"description","value":{"fr":"mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot ","en":"mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot é"}},{"op":"cite","target":"zone:hip","reference_ids":["paper"],"scope":"subtree"}]},{"id":"CHG-010","level":"C","kind":"enrichment","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":["paper"],"question":"Faut-il la garder ?","priority":"low","ops":[{"op":"add","target":"finding:hip/hip-dysfunctions/mobility","value":{"id":"rotation","name":{"fr":"Rotation « axiale »","en":"Axial rotation"}}}]},{"id":"CHG-0011","level":"C","kind":"restructure","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"question":"Retrait confirmé ?","priority":"high","ops":[{"op":"remove","target":"finding:hip/anamnesis/trauma"}]},{"id":"CHG-003","level":"A","kind":"removal","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"remove","target":"finding:hip/hip-dysfunctions/mobility/extension"}]}]},"changelog_raw":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| --- | --- | --- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 9 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 2 |\n| Nœuds, revue (inherited) | 10 | 3 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 6 |\n| Descriptions | 0 | 1 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 5 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| --- | --- |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 8 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 2 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-001` Essai | `finding:hip/hip-dysfunctions/mobility.name` | mobility fr / mobility en | Mobilité \\| pipe / Mobility line | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral` | null | true | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `annotation:hip.geometry` | {\"type\":\"circle\",\"cx\":1,\"cy\":2,\"r\":3} | {\"type\":\"circle\",\"cx\":30,\"cy\":20.5,\"r\":4} | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `annotation:neck.geometry` | null | {\"type\":\"polygon\",\"points\":[[10,10],[20,10],[15,25]]} | Correction | Essai | `atlas` | non |\n| `CHG-003` Essai | `finding:hip/hip-dysfunctions/mobility/extension` | {\"id\":\"extension\",\"name\":{\"fr\":\"extension fr\",\"en\":\"extension en\"},\"reference_ids\":[\"paper\"],\"review_status\":\"to_confir… | null | Suppression | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.description` | null | mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot… | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/extension.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/pain.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis/trauma.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/extension.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/pain.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis/trauma.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n\n## Niveau C : points incertains (question au professionnel)\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-010` Essai | `finding:hip/hip-dysfunctions/mobility/rotation` | null | {\"id\":\"rotation\",\"name\":{\"fr\":\"Rotation « axiale »\",\"en\":\"Axial rotation\"}} | Ajout | Essai | `paper` | oui |\n| `CHG-010` Essai | `finding:hip/hip-dysfunctions/mobility/rotation.review_status` | inherited | to_confirm | Ajout | Essai | `paper` | oui |\n| `CHG-0011` Essai | `finding:hip/anamnesis/trauma` | {\"id\":\"trauma\",\"name\":{\"fr\":\"trauma fr\",\"en\":\"trauma en\"},\"reference_ids\":[\"paper\"],\"review_status\":\"to_confirm\"} | null | Réorganisation | Essai | - | oui |\n","changelog":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| ----------------------------------------- | ----- | ----- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 9 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 2 |\n| Nœuds, revue (inherited) | 10 | 3 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 6 |\n| Descriptions | 0 | 1 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 5 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| ---------------------------------------------------------- | ------ |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 8 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 2 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- | ----------- | ------------- | ---------- | -------------------- |\n| `CHG-001` Essai | `finding:hip/hip-dysfunctions/mobility.name` | mobility fr / mobility en | Mobilité \\| pipe / Mobility line | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral` | null | true | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `annotation:hip.geometry` | {\"type\":\"circle\",\"cx\":1,\"cy\":2,\"r\":3} | {\"type\":\"circle\",\"cx\":30,\"cy\":20.5,\"r\":4} | Correction | Essai | `atlas` | non |\n| `CHG-001` Essai | `annotation:neck.geometry` | null | {\"type\":\"polygon\",\"points\":[[10,10],[20,10],[15,25]]} | Correction | Essai | `atlas` | non |\n| `CHG-003` Essai | `finding:hip/hip-dysfunctions/mobility/extension` | {\"id\":\"extension\",\"name\":{\"fr\":\"extension fr\",\"en\":\"extension en\"},\"reference_ids\":[\"paper\"],\"review_status\":\"to_confir… | null | Suppression | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --------------- | --------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------ | ---------- | ------------- | ---------- | -------------------- |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.description` | null | mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot mot… | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/extension.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/pain.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis/trauma.reference_ids` | [] | [\"paper\"] | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/flexion.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/mobility/extension.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/hip-dysfunctions/pain.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n| `CHG-002` Essai | `finding:hip/anamnesis/trauma.review_status` | inherited | to_confirm | Traduction | Essai | - | oui |\n\n## Niveau C : points incertains (question au professionnel)\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| ---------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------- | ------------- | ---------- | -------------------- |\n| `CHG-010` Essai | `finding:hip/hip-dysfunctions/mobility/rotation` | null | {\"id\":\"rotation\",\"name\":{\"fr\":\"Rotation « axiale »\",\"en\":\"Axial rotation\"}} | Ajout | Essai | `paper` | oui |\n| `CHG-010` Essai | `finding:hip/hip-dysfunctions/mobility/rotation.review_status` | inherited | to_confirm | Ajout | Essai | `paper` | oui |\n| `CHG-0011` Essai | `finding:hip/anamnesis/trauma` | {\"id\":\"trauma\",\"name\":{\"fr\":\"trauma fr\",\"en\":\"trauma en\"},\"reference_ids\":[\"paper\"],\"review_status\":\"to_confirm\"} | null | Réorganisation | Essai | - | oui |\n","review_raw":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| --- | --- |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\n- `CHG-001` Essai (niveau A, Correction, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name`, `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral`, `annotation:hip.geometry`, `annotation:neck.geometry`. Références : `atlas`.\n- `CHG-003` Essai (niveau A, Suppression, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility/extension`. Références : aucune.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Correction, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name`, `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral`, `annotation:hip.geometry`, `annotation:neck.geometry`. Références : `atlas`.\n- `CHG-003` Essai (niveau A, Suppression, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility/extension`. Références : aucune.\n\n## 4. Ajouts\n\n- `CHG-010` Essai (niveau C, Ajout, confirmation requise : oui). Essai Objets : `finding:hip/hip-dysfunctions/mobility/rotation`, `finding:hip/hip-dysfunctions/mobility/rotation.review_status`. Références : `paper`. Question : Faut-il la garder ?\n\n## 5. Réorganisations du catalogue\n\n- `CHG-0011` Essai (niveau C, Réorganisation, confirmation requise : oui). Essai Objets : `finding:hip/anamnesis/trauma`. Références : aucune. Question : Retrait confirmé ?\n\n## 6. Éléments incertains\n\n- `CHG-010` Essai (niveau C, Ajout, confirmation requise : oui). Essai Objets : `finding:hip/hip-dysfunctions/mobility/rotation`, `finding:hip/hip-dysfunctions/mobility/rotation.review_status`. Références : `paper`. Question : Faut-il la garder ?\n- `CHG-0011` Essai (niveau C, Réorganisation, confirmation requise : oui). Essai Objets : `finding:hip/anamnesis/trauma`. Références : aucune. Question : Retrait confirmé ?\n\n## 7. Traductions\n\n1 changement(s) de traduction, 15 objet(s) traduit(s).\n\n- `finding:hip/hip-dysfunctions/mobility/flexion.description`\n- `finding:hip/hip-dysfunctions.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/flexion.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/extension.reference_ids`\n- `finding:hip/hip-dysfunctions/pain.reference_ids`\n- `finding:hip/anamnesis.reference_ids`\n- `finding:hip/anamnesis/trauma.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/flexion.review_status`\n- `finding:hip/hip-dysfunctions.review_status`\n- `finding:hip/hip-dysfunctions/mobility.review_status`\n- `finding:hip/hip-dysfunctions/mobility/extension.review_status`\n- `finding:hip/hip-dysfunctions/pain.review_status`\n- `finding:hip/anamnesis.review_status`\n- `finding:hip/anamnesis/trauma.review_status`\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\n- `finding:neck/neck-dysfunctions/stiffness` : null → true (`CHG-001`)\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| --- | --- |\n| `neck` | 2 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 5 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\n1. `CHG-0011` (priorité haute) : Retrait confirmé ? Références : aucune.\n2. `CHG-010` (priorité basse) : Faut-il la garder ? Références : `paper`.\n","review":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| ----------------------------------------- | ------ |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\n- `CHG-001` Essai (niveau A, Correction, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name`, `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral`, `annotation:hip.geometry`, `annotation:neck.geometry`. Références : `atlas`.\n- `CHG-003` Essai (niveau A, Suppression, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility/extension`. Références : aucune.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Correction, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name`, `finding:neck/neck-dysfunctions/stiffness.requires_vet_referral`, `annotation:hip.geometry`, `annotation:neck.geometry`. Références : `atlas`.\n- `CHG-003` Essai (niveau A, Suppression, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility/extension`. Références : aucune.\n\n## 4. Ajouts\n\n- `CHG-010` Essai (niveau C, Ajout, confirmation requise : oui). Essai Objets : `finding:hip/hip-dysfunctions/mobility/rotation`, `finding:hip/hip-dysfunctions/mobility/rotation.review_status`. Références : `paper`. Question : Faut-il la garder ?\n\n## 5. Réorganisations du catalogue\n\n- `CHG-0011` Essai (niveau C, Réorganisation, confirmation requise : oui). Essai Objets : `finding:hip/anamnesis/trauma`. Références : aucune. Question : Retrait confirmé ?\n\n## 6. Éléments incertains\n\n- `CHG-010` Essai (niveau C, Ajout, confirmation requise : oui). Essai Objets : `finding:hip/hip-dysfunctions/mobility/rotation`, `finding:hip/hip-dysfunctions/mobility/rotation.review_status`. Références : `paper`. Question : Faut-il la garder ?\n- `CHG-0011` Essai (niveau C, Réorganisation, confirmation requise : oui). Essai Objets : `finding:hip/anamnesis/trauma`. Références : aucune. Question : Retrait confirmé ?\n\n## 7. Traductions\n\n1 changement(s) de traduction, 15 objet(s) traduit(s).\n\n- `finding:hip/hip-dysfunctions/mobility/flexion.description`\n- `finding:hip/hip-dysfunctions.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/flexion.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/extension.reference_ids`\n- `finding:hip/hip-dysfunctions/pain.reference_ids`\n- `finding:hip/anamnesis.reference_ids`\n- `finding:hip/anamnesis/trauma.reference_ids`\n- `finding:hip/hip-dysfunctions/mobility/flexion.review_status`\n- `finding:hip/hip-dysfunctions.review_status`\n- `finding:hip/hip-dysfunctions/mobility.review_status`\n- `finding:hip/hip-dysfunctions/mobility/extension.review_status`\n- `finding:hip/hip-dysfunctions/pain.review_status`\n- `finding:hip/anamnesis.review_status`\n- `finding:hip/anamnesis/trauma.review_status`\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\n- `finding:neck/neck-dysfunctions/stiffness` : null → true (`CHG-001`)\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| ------ | -------------------- |\n| `neck` | 2 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 5 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\n1. `CHG-0011` (priorité haute) : Retrait confirmé ? Références : aucune.\n2. `CHG-010` (priorité basse) : Faut-il la garder ? Références : `paper`.\n","drawings":{"annotations-main":"\n\n \n \nhip (moved)hiphip (removed)neck (added)neckbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","annotations-head":"\n\n \n \nbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","app-main":"\n\n \n \nHanche / HipHanche / HipCou / Neck","app-head":"\n\n \n \n"}},{"name":"detail-view-and-path","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"add","target":"document","field":"annotations","value":{"id":"skull","kind":"point","view_id":"head","category_id":"bones","laterality":"unpaired","geometry":{"type":"path","d":"M1 1 L5 5"},"name":{"fr":"Crâne","en":"Skull"},"finding_zone_id":"neck","vertebral_region_code":null}},{"op":"set","target":"view:head","field":"view_box","value":{"min_x":2.5,"min_y":1,"width":40,"height":30}}]}]},"changelog_raw":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| --- | --- | --- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 4 |\n| Annotations (point) | 1 | 2 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 4 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| --- | --- |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-001` Essai | `annotation:skull` | null | {\"id\":\"skull\",\"kind\":\"point\",\"view_id\":\"head\",\"category_id\":\"bones\",\"laterality\":\"unpaired\",\"geometry\":{\"type\":\"path\",\"… | Technique | Essai | - | non |\n| `CHG-001` Essai | `view:head.view_box` | {\"min_x\":0,\"min_y\":0,\"width\":10,\"height\":10} | {\"min_x\":2.5,\"min_y\":1,\"width\":40,\"height\":30} | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","changelog":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| ----------------------------------------- | ----- | ----- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 4 |\n| Annotations (point) | 1 | 2 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 4 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| ---------------------------------------------------------- | ------ |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --------------- | -------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | ------------- | ---------- | -------------------- |\n| `CHG-001` Essai | `annotation:skull` | null | {\"id\":\"skull\",\"kind\":\"point\",\"view_id\":\"head\",\"category_id\":\"bones\",\"laterality\":\"unpaired\",\"geometry\":{\"type\":\"path\",\"… | Technique | Essai | - | non |\n| `CHG-001` Essai | `view:head.view_box` | {\"min_x\":0,\"min_y\":0,\"width\":10,\"height\":10} | {\"min_x\":2.5,\"min_y\":1,\"width\":40,\"height\":30} | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","review_raw":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| --- | --- |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `annotation:skull`, `view:head.view_box`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| --- | --- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","review":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| ----------------------------------------- | ------ |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `annotation:skull`, `view:head.view_box`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| ------ | -------------------- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","drawings":{"annotations-main":"\n\n \n \nhip (unchanged)hipbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","annotations-head":"\n\n \n \nskull (added)bleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","app-main":"\n\n \n \nHanche / HipHanche / Hip","app-head":"\n\n \n \nCrâne / Skull"}},{"name":"nothing-but-a-level-a","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"document","field":"name.en","value":"Small"}]}]},"changelog_raw":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| --- | --- | --- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| --- | --- |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-001` Essai | `document.name.en` | Mini | Small | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","changelog":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| ----------------------------------------- | ----- | ----- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| ---------------------------------------------------------- | ------ |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --------------- | ------------------ | ----- | ----- | --------- | ------------- | ---------- | -------------------- |\n| `CHG-001` Essai | `document.name.en` | Mini | Small | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","review_raw":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| --- | --- |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `document.name.en`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| --- | --- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","review":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| ----------------------------------------- | ------ |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `document.name.en`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| ------ | -------------------- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","drawings":{"annotations-main":"\n\n \n \nhip (unchanged)hipbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","annotations-head":"\n\n \n \nbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","app-main":"\n\n \n \nHanche / HipHanche / Hip","app-head":"\n\n \n \n"}},{"name":"declared-emoji-in-a-cell","changes_file":{"changes":[{"id":"CHG-001","level":"A","kind":"technical","title":{"fr":"Essai","en":"Test"},"rationale":"Essai","reference_ids":[],"ops":[{"op":"set","target":"finding:hip/hip-dysfunctions/mobility","field":"name.en","value":"Mobility 🐴"}]}]},"changelog_raw":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| --- | --- | --- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| --- | --- |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| `CHG-001` Essai | `finding:hip/hip-dysfunctions/mobility.name.en` | mobility en | Mobility 🐴 | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","changelog":"# Journal des changements : révision de travail\n\nGénéré par `pnpm import:equine` : import historique (`legacy-import/`) puis changements rédigés (`curation/changes.json`). Ne pas modifier à la main : relancer la commande.\n\nNiveaux : A = erreur démontrée, B = amélioration étayée, C = point incertain. Les niveaux B et C demandent une confirmation professionnelle.\n\n## Comparaison quantitative\n\n| Indicateur | Avant | Après |\n| ----------------------------------------- | ----- | ----- |\n| Vues | 2 | 2 |\n| Dessins SVG distincts | 1 | 1 |\n| Annotations | 3 | 3 |\n| Annotations (point) | 1 | 1 |\n| Annotations (zone) | 1 | 1 |\n| Annotations (detail_trigger) | 1 | 1 |\n| Annotations, revue (inherited) | 3 | 3 |\n| Annotations, revue (reviewed) | 0 | 0 |\n| Annotations, revue (to_confirm) | 0 | 0 |\n| Catégories d'annotation | 2 | 2 |\n| Zones de constats | 2 | 2 |\n| Catégories de constats | 3 | 3 |\n| Nœuds (catégories incluses) | 10 | 10 |\n| Feuilles | 6 | 6 |\n| Renvois vétérinaires | 1 | 1 |\n| Nœuds, revue (inherited) | 10 | 10 |\n| Nœuds, revue (reviewed) | 0 | 0 |\n| Nœuds, revue (to_confirm) | 0 | 0 |\n| Descriptions | 0 | 0 |\n| Descriptions en français seulement | 0 | 0 |\n| Références bibliographiques | 0 | 2 |\n| Nœuds cités | 0 | 0 |\n| Régions vertébrales avec plage documentée | 0 | 0 |\n\n## Migration des bilans v2\n\n| Nœuds | Nombre |\n| ---------------------------------------------------------- | ------ |\n| Nœuds du catalogue historique | 10 |\n| Chemin identique | 10 |\n| Chemin renommé ou déplacé (suivi des renommages) | 0 |\n| Relogé sous une autre catégorie (correspondance unique) | 0 |\n| Retiré : le bilan garde le constat avec ses libellés figés | 0 |\n\n## Niveau A : erreurs démontrées\n\n| Changement | Objet | Avant | Après | Nature | Justification | Références | Confirmation requise |\n| --------------- | ----------------------------------------------- | ----------- | ----------- | --------- | ------------- | ---------- | -------------------- |\n| `CHG-001` Essai | `finding:hip/hip-dysfunctions/mobility.name.en` | mobility en | Mobility 🐴 | Technique | Essai | - | non |\n\n## Niveau B : améliorations étayées (confirmation requise)\n\nAucun changement de ce niveau.\n\n## Niveau C : points incertains (question au professionnel)\n\nAucun changement de ce niveau.\n","review_raw":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| --- | --- |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name.en`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| --- | --- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","review":"# Rapport de revue : révision de travail\n\nGénéré par `pnpm import:equine` à partir des changements rédigés (`curation/changes.json`). Ne pas modifier à la main. Rien n’est publié : la révision reste un brouillon jusqu’à la décision du professionnel.\n\n## 1. Qualité des données initiales\n\nL'import historique signale 3 anomalies, dont 2 à valider (détail dans `legacy-import/IMPORT-REPORT.md`).\n\n| Indicateur (import historique) | Valeur |\n| ----------------------------------------- | ------ |\n| Vues | 2 |\n| Dessins SVG distincts | 1 |\n| Annotations | 3 |\n| Annotations (point) | 1 |\n| Annotations (zone) | 1 |\n| Annotations (detail_trigger) | 1 |\n| Annotations, revue (inherited) | 3 |\n| Annotations, revue (reviewed) | 0 |\n| Annotations, revue (to_confirm) | 0 |\n| Catégories d'annotation | 2 |\n| Zones de constats | 2 |\n| Catégories de constats | 3 |\n| Nœuds (catégories incluses) | 10 |\n| Feuilles | 6 |\n| Renvois vétérinaires | 1 |\n| Nœuds, revue (inherited) | 10 |\n| Nœuds, revue (reviewed) | 0 |\n| Nœuds, revue (to_confirm) | 0 |\n| Descriptions | 0 |\n| Descriptions en français seulement | 0 |\n| Références bibliographiques | 0 |\n| Nœuds cités | 0 |\n| Régions vertébrales avec plage documentée | 0 |\n\n## 2. Principales erreurs anatomiques et ostéopathiques\n\nAucun élément dans cette révision.\n\n## 3. Corrections effectuées\n\n- `CHG-001` Essai (niveau A, Technique, confirmation requise : non). Essai Objets : `finding:hip/hip-dysfunctions/mobility.name.en`. Références : aucune.\n\n## 4. Ajouts\n\nAucun élément dans cette révision.\n\n## 5. Réorganisations du catalogue\n\nAucun élément dans cette révision.\n\n## 6. Éléments incertains\n\nAucun élément dans cette révision.\n\n## 7. Traductions\n\n0 changement(s) de traduction, 0 objet(s) traduit(s).\n\n## 8. Points de vigilance clinique\n\nRenvois vétérinaires modifiés :\n\nAucun renvoi vétérinaire modifié dans cette révision.\n\nRenvois vétérinaires de la fiche, par zone :\n\n| Zone | Renvois vétérinaires |\n| ------ | -------------------- |\n| `neck` | 1 |\n\n## 9. Bibliographie\n\n1. `atlas` Atlas of anatomy, cité par 0 nœud(s).\n2. `paper` A paper (DOI : 10.1/x), cité par 0 nœud(s).\n\n## 10. Décisions réservées au professionnel\n\nAucune question ouverte.\n","drawings":{"annotations-main":"\n\n \n \nhip (unchanged)hipbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","annotations-head":"\n\n \n \nbleu : inchangévert : déplacé ou ajouté (pointillé rouge = position précédente)rouge pointillé : retiré","app-main":"\n\n \n \nHanche / HipHanche / Hip","app-head":"\n\n \n \n"}}]} diff --git a/crates/core/tests/pdf_compare.rs b/crates/core/tests/pdf_compare.rs index c864071e..d3fc0e11 100644 --- a/crates/core/tests/pdf_compare.rs +++ b/crates/core/tests/pdf_compare.rs @@ -27,24 +27,58 @@ use serde_json::{Value, json}; const SEED: &str = "supabase/seed/anatomical-sheets/equine/draft"; /// The seed sheet as the binary loads it: document and map, no drawing. +/// The sheet O10 was frozen against (before R5.6): the seed's document with the pre-switch +/// `sheet-ref.json` and migration map (`tests/fixtures/r5-6/pre-switch`). O10 replays in that +/// context; the switched seed has its own test under the declared rule below. fn draft_sheet() -> &'static LoadedSheet { static SHEET: OnceLock = OnceLock::new(); - SHEET.get_or_init(|| { - let seed = repo_root().join(SEED); - let read = |name: &str| -> Value { - serde_json::from_str(&std::fs::read_to_string(seed.join(name)).unwrap()).unwrap() - }; - let payload = json!({ - "status": "draft", - "ref": read("sheet-ref.json"), - "document": read("document.json"), - "migrationMap": read("report-migration-map.json"), - "assets": {}, - "assetHashes": {}, - }); - let data: BundledSheetData = serde_json::from_value(payload).unwrap(); - LoadedSheet::from_bundle(data).unwrap() - }) + SHEET + .get_or_init(|| sheet_with(&repo_root().join("crates/core/tests/fixtures/r5-6/pre-switch"))) +} + +/// The committed (switched) seed, as the `report-compare` binary reads it. +fn switched_sheet() -> &'static LoadedSheet { + static SHEET: OnceLock = OnceLock::new(); + SHEET.get_or_init(|| sheet_with(&repo_root().join(SEED))) +} + +fn sheet_with(refs: &std::path::Path) -> LoadedSheet { + let seed = repo_root().join(SEED); + let read = |dir: &std::path::Path, name: &str| -> Value { + serde_json::from_str(&std::fs::read_to_string(dir.join(name)).unwrap()).unwrap() + }; + let payload = json!({ + "status": "draft", + "ref": read(refs, "sheet-ref.json"), + "document": read(&seed, "document.json"), + "migrationMap": read(refs, "report-migration-map.json"), + "assets": {}, + "assetHashes": {}, + }); + let data: BundledSheetData = serde_json::from_value(payload).unwrap(); + LoadedSheet::from_bundle(data).unwrap() +} + +/// The declared difference of the R5.6 switch for `report-compare` (`R5.6-fingerprint-v1`), per +/// file block: a report read as is keeps its historical stamp and is the bundled sheet through +/// the trusted alias, both raw values printed; a v2 report migrated on the switched map carries +/// the canonical value and keeps the plain line. Only that one line changes; a report on +/// another document still prints `!!`, so no content difference can hide behind the rule. +fn r5_6_rule(text: &str) -> String { + let plain = "(draft, matches the bundled sheet)"; + let alias = "(draft, matches the bundled sheet through the trusted alias: report sha 27c7383c445c…, sheet sha 12d788727c1e…)"; + let mut out = String::new(); + for (index, block) in text.split("== ").enumerate() { + if index > 0 { + out.push_str("== "); + } + if block.contains("(migrated)") { + out.push_str(block); + } else { + out.push_str(&block.replace(plain, alias)); + } + } + out } /// The repository as the TypeScript CLI saw it: arguments typed from the root. @@ -131,6 +165,10 @@ fn replay(row: &Row) -> Run { run(draft_sheet(), &row.args, &RepoFiles) } +fn replay_switched(row: &Row) -> Run { + run(switched_sheet(), &row.args, &RepoFiles) +} + fn assert_exact(row: &Row) { let got = replay(row); let args = row.args.join(" "); @@ -436,9 +474,14 @@ fn binary_prints_what_the_pure_run_prints_from_init_cwd() { let shapes = ["cli", "folder"]; let mut spawned = 0; for row in rows.iter().filter(|r| shapes.contains(&r.group.as_str())) { + // The binary reads the committed (switched) seed: the oracle under the declared rule. let got = spawn(&row.args); let args = row.args.join(" "); - assert_eq!(got.stdout, row.stdout, "binary stdout of `{args}`"); + assert_eq!( + got.stdout, + r5_6_rule(&row.stdout), + "binary stdout of `{args}`" + ); assert_eq!(got.stderr, row.stderr, "binary stderr of `{args}`"); assert_eq!(got.exit_code, row.exit_code, "binary exit code of `{args}`"); spawned += 1; @@ -449,10 +492,28 @@ fn binary_prints_what_the_pure_run_prints_from_init_cwd() { .iter() .find(|r| r.args.first().map(String::as_str) == Some("a.pdf")) .unwrap(); - assert_eq!(spawn(&scenario.args), replay(scenario)); + assert_eq!(spawn(&scenario.args), replay_switched(scenario)); let full = rows .iter() .find(|r| r.args.first().map(String::as_str) == Some("--full") && r.args.len() == 2) .unwrap(); - assert_eq!(spawn(&full.args), replay(full)); + assert_eq!(spawn(&full.args), replay_switched(full)); +} + +/// After R5.6, on the switched seed: every exact O10 row prints the oracle under the declared +/// rule (the one sheet line), stderr and exit codes unchanged. +#[test] +fn o10_on_the_switched_seed_differs_only_by_the_declared_alias_line() { + let mut aliased = 0; + for row in rows().iter().filter(|r| r.declared.is_none()) { + let got = replay_switched(row); + let args = row.args.join(" "); + let expected = r5_6_rule(&row.stdout); + aliased += usize::from(expected != row.stdout); + assert_eq!(got.stdout, expected, "stdout of `{args}`"); + assert_eq!(got.stderr, row.stderr, "stderr of `{args}`"); + assert_eq!(got.exit_code, row.exit_code, "exit code of `{args}`"); + } + assert_eq!(aliased, 77, "rows through the alias"); + assert!(switched_sheet().is_fingerprint_verified() && !draft_sheet().is_fingerprint_verified()); } diff --git a/crates/core/tests/pdf_import.rs b/crates/core/tests/pdf_import.rs index 97f13eca..05fcdf3a 100644 --- a/crates/core/tests/pdf_import.rs +++ b/crates/core/tests/pdf_import.rs @@ -32,22 +32,34 @@ const SEED: &str = "supabase/seed/anatomical-sheets/equine/draft"; /// The bundled draft sheet exactly as `apps/app/vite/sheet-bundle.ts` embeds it. fn draft_sheet() -> LoadedSheet { + sheet_with(&repo_root().join(SEED)) +} + +/// The sheet the R4 oracles were frozen against (before R5.6): the same document and drawing, +/// with the pre-switch `sheet-ref.json` and migration map (`tests/fixtures/r5-6/pre-switch`, +/// proven to be the TypeScript's files by `curation_draft`). +fn historical_sheet() -> LoadedSheet { + sheet_with(&repo_root().join("crates/core/tests/fixtures/r5-6/pre-switch")) +} + +/// The seed's document and drawings, with `sheet-ref.json` and the migration map from `refs`. +fn sheet_with(refs: &std::path::Path) -> LoadedSheet { let seed = repo_root().join(SEED); - let read = |name: &str| std::fs::read_to_string(seed.join(name)).unwrap(); - let manifest: Value = serde_json::from_str(&read("assets.json")).unwrap(); + let read = |dir: &std::path::Path, name: &str| std::fs::read_to_string(dir.join(name)).unwrap(); + let manifest: Value = serde_json::from_str(&read(&seed, "assets.json")).unwrap(); let mut assets = serde_json::Map::new(); let mut hashes = serde_json::Map::new(); for asset in manifest.as_array().unwrap() { let id = asset["svg_asset_id"].as_str().unwrap().to_owned(); let file = format!("assets/{}", asset["file"].as_str().unwrap()); - assets.insert(id.clone(), Value::String(read(&file))); + assets.insert(id.clone(), Value::String(read(&seed, &file))); hashes.insert(id, asset["sha256"].clone()); } let payload = json!({ "status": "draft", - "ref": parse_json(&read("sheet-ref.json")).unwrap(), - "document": parse_json(&read("document.json")).unwrap(), - "migrationMap": parse_json(&read("report-migration-map.json")).unwrap(), + "ref": parse_json(&read(refs, "sheet-ref.json")).unwrap(), + "document": parse_json(&read(&seed, "document.json")).unwrap(), + "migrationMap": parse_json(&read(refs, "report-migration-map.json")).unwrap(), "assets": assets, "assetHashes": hashes, }); @@ -126,7 +138,9 @@ fn archive_row(text: &str, sheet: &LoadedSheet) -> Value { #[test] fn o7_locate_and_read_match_the_typescript() { let oracle = r4_oracle("read.json"); - let sheet = draft_sheet(); + // In its original context: the oracle froze the reports a v2 migration stamps with the + // pre-switch map (R5.6 leaves it untouched; the post-switch stamp has its own test below). + let sheet = historical_sheet(); let (mut inputs, mut located, mut archives, mut mismatches) = (0, 0, 0, Vec::new()); for row in oracle["inputs"].as_array().unwrap() { if row["kind"] != "pdf" { @@ -179,6 +193,46 @@ fn o7_locate_and_read_match_the_typescript() { println!("O7: {inputs} inputs, {located} locate rows, {archives} archive rows"); } +/// After R5.6 a v2 migration stamps the canonical value; everything else is what O7 froze. +#[test] +fn o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves() { + let (now, then) = (draft_sheet(), historical_sheet()); + for file in ["scan.report-v2-full.pdf", "scan.report-v2-minimal.pdf"] { + let bytes = r4_input("read", file); + let text = read_attached_document(&bytes, ProbeLimits::UNBOUNDED) + .unwrap() + .text + .into_owned(); + let data = parse_json(&text).unwrap(); + let after = read_archive_document(&data, &now.migration_map).unwrap(); + let before = read_archive_document(&data, &then.migration_map).unwrap(); + assert_eq!( + after.report.sheet.document_sha256, now.reference.document_sha256, + "{file}" + ); + assert_eq!( + before.report.sheet.document_sha256, then.reference.document_sha256, + "{file}" + ); + let mut aligned = after.report.clone(); + aligned.sheet.document_sha256 = before.report.sheet.document_sha256.clone(); + assert_eq!(aligned, before.report, "{file}"); + assert_eq!( + ( + after.migrated, + after.unresolved_zones, + after.unresolved_findings + ), + ( + before.migrated, + before.unresolved_zones, + before.unresolved_findings + ), + "{file}" + ); + } +} + fn compare( mismatches: &mut Vec, file: &str, diff --git a/crates/core/tests/r5_6_switch.rs b/crates/core/tests/r5_6_switch.rs new file mode 100644 index 00000000..e2f9aa97 --- /dev/null +++ b/crates/core/tests/r5_6_switch.rs @@ -0,0 +1,432 @@ +//! The R5.6 switch on the switched seed (owner 2026-10-24 « corrections préalables à la +//! bascule » §1, M1 option 1): an old PDF stamped with the registered historical value opens +//! with no rebase; re-exported, its snapshot keeps the report's stamp, so the current reader, +//! the pre-switch bundle (rollback) and the frozen N-1 reader (vitest +//! `packages/core-wasm/tests/r5-6.n-1.test.ts`) all keep the snapshot; archived labels, views, +//! annotations and branding survive; forged or unknown values and a real content change keep +//! their behaviour; the sheet load refuses a contradicting reference. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod archive_support; +mod common; + +use archive_support::{draft_sheet, from, json_file, loaded}; +use faunosteo_core::domain::archive::build_sheet_snapshot; +use faunosteo_core::domain::session::import_archive; +use faunosteo_core::domain::sheet::fingerprint::{TRUSTED_ALIASES, document_fingerprint}; +use faunosteo_core::domain::sheet::{BundledSheetData, LoadError, LoadedSheet}; +use faunosteo_core::pdf::read::probe::{ProbeLimits, read_attached_document}; +use faunosteo_core::pdf::write::export::export_pdf; +use faunosteo_core::pdf::write::input::{ExportInput, Rasters}; +use serde_json::{Value, json}; + +const OLD_PDF: &str = "apps/app/tests/fixtures/pdf/r3/demo.fr.nologos.pdf"; +const DRAFT: &str = "supabase/seed/anatomical-sheets/equine/draft"; +const PRE_SWITCH: &str = "crates/core/tests/fixtures/r5-6/pre-switch"; + +fn alias() -> &'static str { + TRUSTED_ALIASES[0].alias +} + +fn canonical() -> &'static str { + TRUSTED_ALIASES[0].canonical +} + +fn attachment(pdf: &[u8]) -> Value { + let text = read_attached_document(pdf, ProbeLimits::UNBOUNDED) + .unwrap() + .text + .into_owned(); + serde_json::from_str(&text).unwrap() +} + +fn old_envelope() -> Value { + attachment(&std::fs::read(common::repo_path(OLD_PDF)).unwrap()) +} + +/// The bundle with its reference and migration map replaced (the document and drawings stay). +fn sheet_with_ref(reference: Value, map: Value) -> Result { + let base = draft_sheet(); + let assets: serde_json::Map = base + .assets + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let hashes: serde_json::Map = base + .asset_hashes + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let data: BundledSheetData = serde_json::from_value(json!({ + "status": "draft", + "ref": reference, + "document": json_file(&format!("{DRAFT}/document.json")), + "migrationMap": map, + "assets": assets, + "assetHashes": hashes, + })) + .map_err(|e| format!("shape: {e}"))?; + LoadedSheet::from_bundle(data).map_err(|e: LoadError| format!("{e:?}")) +} + +/// The pre-switch bundle: what a rollback build ships. +fn rollback_sheet() -> LoadedSheet { + sheet_with_ref( + json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), + json_file(&format!("{PRE_SWITCH}/report-migration-map.json")), + ) + .unwrap() +} + +fn reexport(sheet: &LoadedSheet, envelope: &Value) -> Vec { + let report = import_archive(sheet, &envelope.to_string()) + .unwrap() + .rebase + .report; + let input = ExportInput { + sheet_snapshot: serde_json::to_value(build_sheet_snapshot(sheet, &report)).unwrap(), + report, + branding: envelope["branding"].clone(), + labels: envelope["labels"].clone(), + locale: from(envelope["locale"].clone()), + exported_at: "2026-10-24T12:00:00.000Z".into(), + }; + export_pdf(input, &Rasters::default()).unwrap().pdf +} + +#[test] +fn the_switched_seed_is_v1_and_the_old_pdf_carries_the_alias() { + let sheet = draft_sheet(); + assert_eq!(sheet.reference.document_sha256, canonical()); + assert_eq!(document_fingerprint(&sheet.document).unwrap(), canonical()); + let envelope = old_envelope(); + assert_eq!(envelope["report"]["sheet"]["documentSha256"], alias()); + assert_eq!(envelope["sheetSnapshot"]["ref"]["documentSha256"], alias()); +} + +#[test] +fn an_old_pdf_opens_with_no_rebase_and_keeps_its_archive_and_stamp() { + let import = import_archive(&draft_sheet(), &old_envelope().to_string()).unwrap(); + assert!(!import.rebase.rebased); + assert_eq!(import.rebase.report.sheet.document_sha256, alias()); + assert!(import.read.archive.is_some() && import.read.snapshot_rejected.is_none()); +} + +#[test] +fn a_reexport_writes_one_stamp_that_every_reader_keeps() { + let envelope = old_envelope(); + let pdf = reexport(&draft_sheet(), &envelope); + let written = attachment(&pdf); + assert_eq!(written["report"]["sheet"]["documentSha256"], alias()); + assert_eq!(written["sheetSnapshot"]["ref"]["documentSha256"], alias()); + // The current reader, then the pre-switch bundle (rollback): snapshot kept, no rebase. + for sheet in [draft_sheet(), rollback_sheet()] { + let import = import_archive(&sheet, &written.to_string()).unwrap(); + assert!( + import.read.archive.is_some(), + "{:?}", + import.read.snapshot_rejected + ); + assert!(!import.rebase.rebased); + } + // Kept for the rollback check with the pre-switch build's own `report-compare`. + let out = std::path::PathBuf::from(common::repo_path("target/tmp/r5-6")); + std::fs::create_dir_all(&out).unwrap(); + std::fs::write(out.join("reexport.demo.fr.nologos.pdf"), &pdf).unwrap(); +} + +#[test] +fn a_reexport_preserves_the_archived_labels_views_annotations_and_branding() { + let envelope = old_envelope(); + let written = attachment(&reexport(&draft_sheet(), &envelope)); + for key in ["labels", "branding", "locale", "report"] { + assert_eq!(written[key], envelope[key], "{key}"); + } + let (before, after) = (&envelope["sheetSnapshot"], &written["sheetSnapshot"]); + assert_eq!( + after["document"], before["document"], + "views, annotations, findings, labels" + ); + assert_eq!(after["assets"], before["assets"]); + assert_eq!(after["ref"], before["ref"]); +} + +#[test] +fn a_new_report_still_carries_the_canonical_value() { + let sheet = draft_sheet(); + let mut envelope = old_envelope(); + envelope["report"]["sheet"]["documentSha256"] = json!(canonical()); + envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); + let pdf = reexport(&sheet, &envelope); + let written = attachment(&pdf); + assert_eq!(written["report"]["sheet"]["documentSha256"], canonical()); + assert_eq!( + written["sheetSnapshot"]["ref"]["documentSha256"], + canonical() + ); + // Kept for the rollback check of a NEW report with the pre-switch build (RUST.md §11.22). + let out = std::path::PathBuf::from(common::repo_path("target/tmp/r5-6")); + std::fs::create_dir_all(&out).unwrap(); + std::fs::write(out.join("new-report.v1.demo.fr.nologos.pdf"), &pdf).unwrap(); +} + +#[test] +fn an_unknown_or_forged_stamp_rebases_and_a_mixed_envelope_loses_its_snapshot() { + let sheet = draft_sheet(); + let mut envelope = old_envelope(); + envelope["report"]["sheet"]["documentSha256"] = json!("c".repeat(64)); + envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!("c".repeat(64)); + assert!( + import_archive(&sheet, &envelope.to_string()) + .unwrap() + .rebase + .rebased + ); + // A case-changed canonical value is no 64-lowercase-hex stamp: the v3 contract refuses it. + let mut upper = old_envelope(); + upper["report"]["sheet"]["documentSha256"] = json!(canonical().to_uppercase()); + assert!(import_archive(&sheet, &upper.to_string()).is_err()); + // An archive pairing the alias with the canonical value is not loosened into a match. + let mut mixed = old_envelope(); + mixed["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); + let import = import_archive(&sheet, &mixed.to_string()).unwrap(); + assert!(import.read.archive.is_none() && import.read.snapshot_rejected.is_some()); +} + +#[test] +fn a_real_content_change_still_rebases() { + let mut document = json_file(&format!("{DRAFT}/document.json")); + document["name"]["fr"] = json!("Fiche équine modifiée"); + let typed = from(document.clone()); + let changed = document_fingerprint(&typed).unwrap(); + assert_ne!(changed, canonical()); + let mut reference = json_file(&format!("{DRAFT}/sheet-ref.json")); + reference["document_sha256"] = json!(changed); + reference["fingerprint"]["aliases"] = json!([]); + let base = draft_sheet(); + let assets: serde_json::Map = base + .assets + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let hashes: serde_json::Map = base + .asset_hashes + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let sheet = loaded( + reference, + document, + json_file(&format!("{DRAFT}/report-migration-map.json")), + Value::Object(assets), + Value::Object(hashes), + ); + let import = import_archive(&sheet, &old_envelope().to_string()).unwrap(); + assert!(import.rebase.rebased); +} + +#[test] +fn the_sheet_load_refuses_a_reference_that_contradicts_the_registry_or_the_content() { + let map = json_file(&format!("{DRAFT}/report-migration-map.json")); + let good = json_file(&format!("{DRAFT}/sheet-ref.json")); + assert!(sheet_with_ref(good.clone(), map.clone()).is_ok()); + let mut cases = Vec::new(); + let mut forged = good.clone(); + forged["fingerprint"]["aliases"] = json!(["d".repeat(64)]); + cases.push(forged); + let mut convention = good.clone(); + convention["fingerprint"]["convention"] = json!("sha256-rfc8785-validated-v2"); + cases.push(convention); + let mut content = good.clone(); + content["document_sha256"] = json!("e".repeat(64)); + content["fingerprint"]["aliases"] = json!([]); + cases.push(content); + let mut unknown_key = good.clone(); + unknown_key["fingerprint"]["trusted"] = json!(true); + cases.push(unknown_key); + for reference in cases { + assert!( + sheet_with_ref(reference.clone(), map.clone()).is_err(), + "{reference}" + ); + } + // A historical v0 reference (no block) still loads, unverified, with no alias privilege, + // even when it carries the canonical value: an old stamp then rebases. + let rollback = sheet_with_ref( + json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), + map.clone(), + ); + assert!(!rollback.unwrap().is_fingerprint_verified()); + let mut v0_with_v1_value = good.clone(); + v0_with_v1_value + .as_object_mut() + .unwrap() + .remove("fingerprint"); + let unverified = sheet_with_ref(v0_with_v1_value, map).unwrap(); + assert!(!unverified.is_fingerprint_verified()); + let import = import_archive(&unverified, &old_envelope().to_string()).unwrap(); + assert!(import.rebase.rebased); + assert!(draft_sheet().is_fingerprint_verified()); +} + +// --------------------------------------------------------------------------- +// M1 correction (owner 2026-10-25): the direct APIs, not only the application's paths. + +fn old_report() -> faunosteo_core::domain::report::Report { + from(old_envelope()["report"].clone()) +} + +/// The direct export: a snapshot built by the core for `sheet`, then `export_pdf`. +fn export_on( + sheet: &LoadedSheet, + report: &faunosteo_core::domain::report::Report, +) -> Result, String> { + let envelope = old_envelope(); + let input = ExportInput { + sheet_snapshot: serde_json::to_value(build_sheet_snapshot(sheet, report)).unwrap(), + report: report.clone(), + branding: envelope["branding"].clone(), + labels: envelope["labels"].clone(), + locale: from(envelope["locale"].clone()), + exported_at: "2026-10-25T12:00:00.000Z".into(), + }; + export_pdf(input, &Rasters::default()) + .map(|r| r.pdf) + .map_err(|e| format!("{e:?}")) +} + +#[test] +fn the_direct_export_on_an_unverified_v0_sheet_with_the_canonical_value_is_refused() { + let map = json_file(&format!("{DRAFT}/report-migration-map.json")); + let mut v0 = json_file(&format!("{DRAFT}/sheet-ref.json")); + v0.as_object_mut().unwrap().remove("fingerprint"); + let sheet = sheet_with_ref(v0, map).unwrap(); + assert!(!sheet.is_fingerprint_verified()); + let snapshot = build_sheet_snapshot(&sheet, &old_report()); + assert_eq!(snapshot.reference.document_sha256, canonical()); + let refused = export_on(&sheet, &old_report()).unwrap_err(); + assert!(refused.contains("SheetMismatch"), "{refused}"); +} + +#[test] +fn a_mutated_document_or_reference_never_keeps_the_alias() { + let mut document = draft_sheet(); + document.document.name.fr = "Fiche modifiée après chargement".into(); + assert!(!document.recognises_historical_stamp(&document.reference.sheet_id.clone(), alias())); + assert!(export_on(&document, &old_report()).is_err()); + let mut reference = draft_sheet(); + reference.reference.document_sha256 = "f".repeat(64); + assert!(!reference.recognises_historical_stamp(&reference.reference.sheet_id.clone(), alias())); + assert!(export_on(&reference, &old_report()).is_err()); + // Untouched, the same sheet grants it, and the direct export writes one stamp. + let sheet = draft_sheet(); + assert!(sheet.recognises_historical_stamp(&sheet.reference.sheet_id, alias())); + let written = attachment(&export_on(&sheet, &old_report()).unwrap()); + assert_eq!(written["sheetSnapshot"]["ref"]["documentSha256"], alias()); +} + +#[test] +fn the_historical_value_on_another_sheet_id_is_not_recognised() { + let sheet = draft_sheet(); + assert!(!sheet.recognises_historical_stamp("00000000-0000-0000-0000-000000000000", alias())); + let mut report = old_report(); + report.sheet.sheet_id = "00000000-0000-0000-0000-000000000000".into(); + assert_eq!( + build_sheet_snapshot(&sheet, &report) + .reference + .document_sha256, + canonical() + ); + assert!(export_on(&sheet, &report).is_err()); + let import_other = { + let mut envelope = old_envelope(); + envelope["report"]["sheet"]["sheetId"] = json!("00000000-0000-0000-0000-000000000000"); + import_archive(&sheet, &envelope.to_string()).unwrap() + }; + assert!(import_other.rebase.rebased); +} + +#[test] +fn a_v1_block_whose_value_contradicts_the_content_is_refused_at_load() { + let mut document = json_file(&format!("{DRAFT}/document.json")); + document["name"]["fr"] = json!("Contenu modifié, tampon conservé"); + let base = draft_sheet(); + let assets: serde_json::Map = base + .assets + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let data: Result = serde_json::from_value(json!({ + "status": "draft", + "ref": json_file(&format!("{DRAFT}/sheet-ref.json")), + "document": document, + "migrationMap": json_file(&format!("{DRAFT}/report-migration-map.json")), + "assets": assets, + "assetHashes": {}, + })); + let refused = LoadedSheet::from_bundle(data.unwrap()).unwrap_err(); + assert!( + format!("{refused:?}").contains("ContentMismatch"), + "{refused:?}" + ); +} + +#[test] +fn an_explicit_null_block_is_refused_and_an_absent_one_is_v0() { + let map = json_file(&format!("{DRAFT}/report-migration-map.json")); + let mut null_block = json_file(&format!("{DRAFT}/sheet-ref.json")); + null_block["fingerprint"] = Value::Null; + let refused = sheet_with_ref(null_block, map.clone()).unwrap_err(); + assert!(refused.starts_with("shape:"), "{refused}"); + let mut malformed = json_file(&format!("{DRAFT}/sheet-ref.json")); + malformed["fingerprint"] = json!("sha256-rfc8785-validated-v1"); + assert!(sheet_with_ref(malformed, map.clone()).is_err()); + let absent = sheet_with_ref(json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), map).unwrap(); + assert!(!absent.is_fingerprint_verified()); +} + +#[test] +fn a_v1_sheet_carrying_only_draft_warnings_loads() { + use faunosteo_core::domain::sheet::validate::{SheetIssueSeverity, validate_sheet_document}; + let mut document = json_file(&format!("{DRAFT}/document.json")); + document["annotations"][0]["finding_zone_id"] = Value::Null; + let typed = from(document.clone()); + let issues = validate_sheet_document(&typed); + assert!(!issues.is_empty()); + assert!( + issues + .iter() + .all(|i| i.severity == SheetIssueSeverity::Warning), + "{issues:?}" + ); + let value = document_fingerprint(&typed).unwrap(); + let mut reference = json_file(&format!("{DRAFT}/sheet-ref.json")); + reference["document_sha256"] = json!(value); + reference["fingerprint"]["aliases"] = json!([]); + let base = draft_sheet(); + let assets: serde_json::Map = base + .assets + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let hashes: serde_json::Map = base + .asset_hashes + .iter() + .map(|(k, v)| (k.clone(), json!(v))) + .collect(); + let sheet = loaded( + reference, + document, + json_file(&format!("{DRAFT}/report-migration-map.json")), + Value::Object(assets), + Value::Object(hashes), + ); + assert!(sheet.is_fingerprint_verified()); + // Another content: an old report on it is no alias, it rebases. + assert!( + import_archive(&sheet, &old_envelope().to_string()) + .unwrap() + .rebase + .rebased + ); +} diff --git a/crates/core/tests/report_contract.rs b/crates/core/tests/report_contract.rs index fda0a281..263f3fa2 100644 --- a/crates/core/tests/report_contract.rs +++ b/crates/core/tests/report_contract.rs @@ -39,3 +39,37 @@ fn the_frozen_envelopes_parse_and_print_as_their_attachment() { assert_eq!(to_js_pretty(&envelope).unwrap(), text, "{name}"); } } + +/// `r2-oracles.test.ts` on `migration-map.draft.json` (R5.7): what Zod read from the map the +/// TypeScript wrote (the pre-switch copy) is what the core reads, entry by entry, nulls +/// included; the committed map since R5.6 differs only by the sheet fingerprint. +#[test] +fn the_draft_migration_map_reads_as_zod_read_it_entry_by_entry() { + let (_, oracle) = common::oracle_file("migration-map.draft.json"); + let frozen: ReportMigrationMap = serde_json::from_value(oracle["output"].clone()).unwrap(); + let pre_switch = + common::repo_file("crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json"); + let read: ReportMigrationMap = + serde_json::from_value(parse_json(&pre_switch).unwrap()).unwrap(); + assert_eq!(read, frozen); + assert_eq!( + ( + read.annotations.len(), + read.finding_paths.len(), + read.views.len() + ), + (27, 792, 1) + ); + let nulls = read.finding_paths.values().filter(|p| p.is_none()).count(); + assert_eq!(nulls, 34); + let committed = + common::repo_file("supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json"); + let mut committed: ReportMigrationMap = + serde_json::from_value(parse_json(&committed).unwrap()).unwrap(); + assert_eq!( + committed.sheet.document_sha256, + "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2" + ); + committed.sheet.document_sha256 = frozen.sheet.document_sha256.clone(); + assert_eq!(committed, frozen); +} diff --git a/crates/core/tests/report_rules.rs b/crates/core/tests/report_rules.rs index 6ef2f1f0..11149d95 100644 --- a/crates/core/tests/report_rules.rs +++ b/crates/core/tests/report_rules.rs @@ -139,7 +139,7 @@ fn test_map() -> ReportMigrationMap { } fn fixture(name: &str) -> Value { - json_file(&format!("packages/domain/tests/fixtures/{name}")) + json_file(&format!("crates/core/tests/fixtures/{name}")) } fn migrated( diff --git a/crates/core/tests/sheet_fingerprint.rs b/crates/core/tests/sheet_fingerprint.rs new file mode 100644 index 00000000..1630d268 --- /dev/null +++ b/crates/core/tests/sheet_fingerprint.rs @@ -0,0 +1,286 @@ +//! R5.6 preparation (owner 2026-10-24 « arbitrage D-R5.6 »): the convention +//! `sha256-rfc8785-validated-v1` and the trusted alias registry, PREPARED, NOT ACTIVE. The RFC +//! 8785 vectors, the V8 number oracle, the independent Node differential, the draft's frozen +//! value, the registry's contract and a census of the historical archives (JSON fixtures and +//! every fixture PDF's attachment) under the comparison the five consumers will use. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +mod archive_support; +mod common; + +use faunosteo_core::domain::js::parse_json; +use faunosteo_core::domain::sheet::fingerprint::{ + AliasRefusal, FINGERPRINT_CONVENTION, FingerprintError, TRUSTED_ALIASES, canonical_json, + check_declared, sheet_fingerprint, +}; +use faunosteo_core::pdf::read::probe::{ProbeLimits, read_attached_document}; +use serde_json::Value; +use sha2::{Digest, Sha256}; + +const SHEET: &str = "503dc301-a8b1-50d4-9e44-0919b2fc2916"; +const ALIAS: &str = "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660"; +const CANONICAL: &str = "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2"; + +fn oracle(name: &str) -> Value { + serde_json::from_str(&common::repo_file(&format!( + "crates/core/tests/oracles/r5/{name}" + ))) + .unwrap() +} + +fn sha256(text: &str) -> String { + Sha256::digest(text.as_bytes()) + .iter() + .map(|b| format!("{b:02x}")) + .collect() +} + +#[test] +fn the_rfc_8785_vectors_are_reproduced() { + let vectors = oracle("fingerprints.json")["rfc8785_vectors"].clone(); + for vector in vectors.as_array().unwrap() { + let input = parse_json(vector["input"].as_str().unwrap()).unwrap(); + assert_eq!( + canonical_json(&input).unwrap(), + vector["canonical"].as_str().unwrap() + ); + } +} + +#[test] +fn numbers_print_as_v8_on_the_whole_oracle() { + let rows = oracle("numbers.json")["rows"].clone(); + let rows = rows.as_array().unwrap(); + assert_eq!(rows.len(), 44_322); + for row in rows { + let bits = u64::from_str_radix(row[0].as_str().unwrap(), 16).unwrap(); + let value = Value::from(f64::from_bits(bits)); + assert_eq!( + canonical_json(&value).unwrap(), + row[1].as_str().unwrap(), + "{bits:016x}" + ); + } +} + +#[test] +fn the_independent_node_reference_agrees_case_by_case() { + let frozen = oracle("fingerprint-differential.json"); + for case in frozen["cases"].as_array().unwrap() { + let input = parse_json(case["input"].as_str().unwrap()).unwrap(); + let canonical = canonical_json(&input).unwrap(); + assert_eq!(canonical, case["canonical"].as_str().unwrap()); + assert_eq!(sha256(&canonical), case["sha256"].as_str().unwrap()); + } +} + +#[test] +fn unicode_is_kept_and_ordered_by_utf16_units() { + // U+FB33 sorts after U+1F600 by code point, before it by UTF-16 units (0xFB33 > 0xD83D). + let value = parse_json(r#"{"דּ":1,"😀":2,"é":3,"é":4}"#).unwrap(); + assert_eq!( + canonical_json(&value).unwrap(), + "{\"e\u{301}\":4,\"\u{e9}\":3,\"\u{1F600}\":2,\"\u{FB33}\":1}" + ); +} + +#[test] +fn the_draft_gives_the_frozen_validated_value() { + let text = common::repo_file("supabase/seed/anatomical-sheets/equine/draft/document.json"); + assert_eq!(sha256(&text), ALIAS); + assert_eq!(sheet_fingerprint(&text).unwrap(), CANONICAL); + let artifacts = oracle("fingerprints.json")["artifacts"].clone(); + let draft = artifacts + .as_array() + .unwrap() + .iter() + .find(|a| a["file"].as_str().unwrap().ends_with("draft/document.json")) + .unwrap() + .clone(); + assert_eq!(draft["b_rfc8785_validated"], CANONICAL); + assert_eq!(draft["today_file_bytes"], ALIAS); +} + +#[test] +fn an_invalid_or_malformed_document_has_no_fingerprint() { + let text = common::repo_file("supabase/seed/anatomical-sheets/equine/draft/document.json"); + let mut value: Value = serde_json::from_str(&text).unwrap(); + let first = value["annotations"][0]["id"].clone(); + value["annotations"][1]["id"] = first; + let duplicated = serde_json::to_string(&value).unwrap(); + assert!(matches!(sheet_fingerprint(&duplicated), Err(FingerprintError::Invalid(n)) if n > 0)); + assert!(matches!( + sheet_fingerprint("[1]"), + Err(FingerprintError::Shape(_)) + )); + assert!(matches!( + sheet_fingerprint("{"), + Err(FingerprintError::Parse(_)) + )); +} + +#[test] +fn the_registry_holds_one_pair_bound_to_the_equine_sheet() { + // The comparison itself is crate-private (its unit test sits in `fingerprint.rs`); the + // consumers reach it only through `LoadedSheet::recognises_historical_stamp`. + assert_eq!(TRUSTED_ALIASES.len(), 1); + assert_eq!(FINGERPRINT_CONVENTION, "sha256-rfc8785-validated-v1"); + let pair = &TRUSTED_ALIASES[0]; + assert_eq!( + (pair.sheet_id, pair.alias, pair.canonical), + (SHEET, ALIAS, CANONICAL) + ); + let sheet = archive_support::draft_sheet(); + assert!(sheet.recognises_historical_stamp(SHEET, ALIAS)); + assert!(!sheet.recognises_historical_stamp(SHEET, CANONICAL)); + assert!(!sheet.recognises_historical_stamp(SHEET, &"a".repeat(64))); + assert!(!sheet.recognises_historical_stamp("00000000-0000-0000-0000-000000000000", ALIAS)); +} + +#[test] +fn declared_metadata_never_creates_an_equivalence() { + let aliases = vec![ALIAS.to_owned()]; + assert_eq!( + check_declared(SHEET, CANONICAL, FINGERPRINT_CONVENTION, &aliases), + Ok(()) + ); + assert_eq!( + check_declared(SHEET, CANONICAL, FINGERPRINT_CONVENTION, &[]), + Ok(()) + ); + let forged = vec!["b".repeat(64)]; + assert_eq!( + check_declared(SHEET, CANONICAL, FINGERPRINT_CONVENTION, &forged), + Err(AliasRefusal::Untrusted("b".repeat(64))) + ); + let foreign = "00000000-0000-0000-0000-000000000000"; + assert!(check_declared(foreign, CANONICAL, FINGERPRINT_CONVENTION, &aliases).is_err()); + assert!(check_declared(SHEET, &"c".repeat(64), FINGERPRINT_CONVENTION, &aliases).is_err()); + assert!( + check_declared( + SHEET, + ALIAS, + FINGERPRINT_CONVENTION, + &[CANONICAL.to_owned()] + ) + .is_err() + ); + assert_eq!( + check_declared(SHEET, CANONICAL, "sha256-prettier-file-bytes-v0", &aliases), + Err(AliasRefusal::UnknownConvention( + "sha256-prettier-file-bytes-v0".into() + )) + ); +} + +/// Every `sheet` reference of a report found in `value` (bare report or envelope). +fn stamps(value: &Value, found: &mut Vec<(String, String)>) { + match value { + Value::Object(map) => { + if let (Some(id), Some(sha)) = ( + map.get("sheetId").and_then(Value::as_str), + map.get("documentSha256").and_then(Value::as_str), + ) { + found.push((id.to_owned(), sha.to_owned())); + } + map.values().for_each(|item| stamps(item, found)); + } + Value::Array(items) => items.iter().for_each(|item| stamps(item, found)), + _ => {} + } +} + +fn files(dir: &std::path::Path, out: &mut Vec) { + for entry in std::fs::read_dir(dir).unwrap() { + let path = entry.unwrap().path(); + if path.is_dir() { + files(&path, out); + } else { + out.push(path); + } + } +} + +#[test] +fn historical_archives_open_as_the_same_document_only_through_the_registered_pair() { + let mut paths = Vec::new(); + files( + std::path::Path::new(&common::repo_path("apps/app/tests/fixtures")), + &mut paths, + ); + let mut found = Vec::new(); + let mut pdfs = 0; + for path in &paths { + let bytes = std::fs::read(path).unwrap(); + let text = match path.extension().and_then(|e| e.to_str()) { + Some("json") => String::from_utf8(bytes).ok(), + Some("pdf") => read_attached_document(&bytes, ProbeLimits::UNBOUNDED) + .ok() + .map(|located| { + pdfs += 1; + located.text.into_owned() + }), + _ => None, + }; + if let Some(value) = text.and_then(|t: String| serde_json::from_str::(&t).ok()) { + stamps(&value, &mut found); + } + } + assert_eq!(pdfs, 147, "attachments read"); + let loaded = archive_support::draft_sheet(); + assert_eq!(loaded.reference.document_sha256, CANONICAL); + let mut same = 0; + for (sheet, sha) in &found { + // What the rebase decides: equal values, or the proven historical stamp of this sheet. + let recognised = *sha == loaded.reference.document_sha256 + || (*sheet == loaded.reference.sheet_id + && loaded.recognises_historical_stamp(sheet, sha)); + let expected = sheet == SHEET && sha == ALIAS; + assert_eq!(recognised, expected, "{sheet} {sha}"); + same += usize::from(expected); + } + // Every authentic stamp of the equine draft is the alias; the synthetic ones stay different. + println!( + "census: {pdfs} PDF attachments, {} stamps, {same} alias", + found.len() + ); + assert_eq!((found.len(), same), (124, 123), "stamps, aliases"); +} + +#[test] +fn v1_never_carries_the_historical_value_or_a_malformed_one() { + assert_eq!( + check_declared(SHEET, ALIAS, FINGERPRINT_CONVENTION, &[]), + Err(AliasRefusal::NotCanonical(ALIAS.into())) + ); + for bad in ["", "12d7", &"g".repeat(64), &CANONICAL.to_uppercase()] { + assert!( + check_declared(SHEET, bad, FINGERPRINT_CONVENTION, &[]).is_err(), + "{bad}" + ); + } +} + +fn nested(depth: usize) -> Value { + let mut value = Value::from(1); + for _ in 0..depth { + value = Value::Array(vec![value]); + } + value +} + +#[test] +fn nesting_is_bounded_with_a_controlled_error() { + use faunosteo_core::domain::sheet::fingerprint::{CanonicalError, MAX_CANONICAL_DEPTH}; + assert_eq!(MAX_CANONICAL_DEPTH, 128); + assert!(canonical_json(&nested(MAX_CANONICAL_DEPTH)).is_ok()); + assert_eq!( + canonical_json(&nested(MAX_CANONICAL_DEPTH + 1)), + Err(CanonicalError::TooDeep) + ); + let mut object = Value::from(1); + for _ in 0..=MAX_CANONICAL_DEPTH { + object = serde_json::json!({ "k": object }); + } + assert_eq!(canonical_json(&object), Err(CanonicalError::TooDeep)); +} diff --git a/crates/core/tests/upload_tool.rs b/crates/core/tests/upload_tool.rs new file mode 100644 index 00000000..75c9393e --- /dev/null +++ b/crates/core/tests/upload_tool.rs @@ -0,0 +1,374 @@ +//! The `upload-sheet-assets` binary against an in-process stub of the local Supabase API +//! (R5.5): the plan of a run, what is written and what never is, resume after a partial +//! failure, refusals by category, network errors, and the key never printed. The stub listens +//! on loopback with a made-up key; the real local stack is exercised by +//! `scripts/sheet-assets-e2e.sh`, run by the owner. +#![allow(clippy::disallowed_methods, clippy::unwrap_used, clippy::expect_used)] + +use std::collections::HashMap; +use std::io::{BufRead, BufReader, Read, Write}; +use std::net::{TcpListener, TcpStream}; +use std::process::{Command, Output}; +use std::sync::{Arc, Mutex}; + +const KEY: &str = "stub-service-key-0123456789"; +const DRAFT: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../supabase/seed/anatomical-sheets/equine/draft" +); +const SHA: &str = "0ea5202fa3b95bac167b87c12ee969ab0272e085b60c2d34dbca6202c5f08541"; + +#[derive(Default)] +struct State { + objects: HashMap>, + /// `None`: no row. `Some((sha256, confirmed))`. + row: Option<(String, bool)>, + bucket_status: u16, + fail_confirm: bool, + /// Answer every request with bytes that are not HTTP. + garbage: bool, + log: Vec, +} + +type Shared = Arc>; + +fn horse() -> Vec { + std::fs::read(format!("{DRAFT}/assets/horse.svg")).unwrap() +} + +fn read_request(stream: &mut TcpStream) -> (String, String, Vec) { + let mut reader = BufReader::new(stream.try_clone().unwrap()); + let mut line = String::new(); + reader.read_line(&mut line).unwrap(); + let mut parts = line.split_whitespace(); + let (method, path) = ( + parts.next().unwrap().to_owned(), + parts.next().unwrap().to_owned(), + ); + let mut length = 0; + loop { + let mut header = String::new(); + reader.read_line(&mut header).unwrap(); + if header.trim().is_empty() { + break; + } + if let Some(value) = header.to_ascii_lowercase().strip_prefix("content-length:") { + length = value.trim().parse().unwrap(); + } + } + let mut body = vec![0; length]; + reader.read_exact(&mut body).unwrap(); + (method, path, body) +} + +fn respond(stream: &mut TcpStream, status: u16, body: &[u8]) { + let head = format!( + "HTTP/1.1 {status} X\r\nContent-Length: {}\r\nConnection: close\r\nContent-Type: application/json\r\n\r\n", + body.len() + ); + stream.write_all(head.as_bytes()).unwrap(); + stream.write_all(body).unwrap(); +} + +fn route(state: &mut State, method: &str, path: &str, body: Vec) -> (u16, Vec) { + state.log.push(format!("{method} {path}")); + let object = path.strip_prefix("/storage/v1/object/anatomical-sheet-assets/"); + match (method, object) { + ("GET", None) if path == "/storage/v1/bucket/anatomical-sheet-assets" => ( + state.bucket_status, + br#"{"name":"anatomical-sheet-assets","public":false}"#.to_vec(), + ), + ("GET", Some(key)) => match state.objects.get(key) { + Some(bytes) => (200, bytes.clone()), + None => (400, br#"{"statusCode":"404","error":"not_found"}"#.to_vec()), + }, + ("POST", Some(key)) if state.objects.contains_key(key) => { + (400, br#"{"statusCode":"409","error":"Duplicate"}"#.to_vec()) + } + ("POST", Some(key)) => { + state.objects.insert(key.to_owned(), body); + (200, b"{}".to_vec()) + } + ("GET", None) if path.starts_with("/rest/v1/anatomical_sheet_assets") => { + let rows = match &state.row { + None => "[]".to_owned(), + Some((sha, confirmed)) => { + let at = if *confirmed { + "\"2026-10-23T00:00:00Z\"" + } else { + "null" + }; + format!("[{{\"sha256\":\"{sha}\",\"uploaded_at\":{at}}}]") + } + }; + (200, rows.into_bytes()) + } + ("POST", None) if path.ends_with("/rpc/confirm_sheet_asset_upload") => { + if state.fail_confirm { + return (500, b"{}".to_vec()); + } + if let Some((_, confirmed)) = state.row.as_mut() { + *confirmed = true; + } + (200, b"\"id\"".to_vec()) + } + _ => (404, b"{}".to_vec()), + } +} + +fn serve(state: Shared) -> u16 { + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let port = listener.local_addr().unwrap().port(); + std::thread::spawn(move || { + for stream in listener.incoming() { + let mut stream = stream.unwrap(); + let (method, path, body) = read_request(&mut stream); + let mut held = state.lock().unwrap(); + if held.garbage { + held.log.push(format!("{method} {path}")); + stream.write_all(b"NOT-HTTP garbage\r\n\r\n").unwrap(); + continue; + } + let (status, reply) = route(&mut held, &method, &path, body); + drop(held); + respond(&mut stream, status, &reply); + } + }); + port +} + +/// A stub with the seed applied: the row exists, pending, the bucket answers 200. +fn stub() -> (Shared, String) { + let state: Shared = Arc::new(Mutex::new(State { + row: Some((SHA.to_owned(), false)), + bucket_status: 200, + ..State::default() + })); + let port = serve(Arc::clone(&state)); + (state, format!("http://127.0.0.1:{port}")) +} + +fn run(url: &str, args: &[&str]) -> Output { + Command::new(env!("CARGO_BIN_EXE_upload-sheet-assets")) + .args(args) + .env_clear() + .env("SUPABASE_URL", url) + .env("SUPABASE_SERVICE_ROLE_KEY", KEY) + .output() + .unwrap() +} + +fn text(output: &Output) -> String { + format!( + "{}{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ) +} + +fn writes(state: &Shared) -> usize { + let log = &state.lock().unwrap().log; + log.iter().filter(|line| line.starts_with("POST")).count() +} + +#[test] +fn check_reads_and_writes_nothing() { + let (state, url) = stub(); + let output = run(&url, &["--check", DRAFT]); + let said = text(&output); + assert!(output.status.success(), "{said}"); + assert!(said.contains("would upload, confirm"), "{said}"); + assert_eq!(writes(&state), 0); + assert!(!said.contains(KEY)); +} + +#[test] +fn a_run_uploads_verifies_then_confirms_and_a_rerun_does_nothing() { + let (state, url) = stub(); + let first = run(&url, &[DRAFT]); + assert!(first.status.success(), "{}", text(&first)); + { + let held = state.lock().unwrap(); + assert_eq!(held.objects.get(&format!("{SHA}.svg")), Some(&horse())); + assert_eq!(held.row, Some((SHA.to_owned(), true))); + } + let before = writes(&state); + let again = run(&url, &[DRAFT]); + let said = text(&again); + assert!(again.status.success(), "{said}"); + assert!(said.contains("nothing to do"), "{said}"); + assert_eq!(writes(&state), before); +} + +#[test] +fn different_bytes_under_the_key_are_never_overwritten() { + let (state, url) = stub(); + state + .lock() + .unwrap() + .objects + .insert(format!("{SHA}.svg"), b"other".to_vec()); + let output = run(&url, &[DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{said}"); + assert!( + said.contains("State") && said.contains("other bytes"), + "{said}" + ); + assert_eq!(writes(&state), 0); + assert_eq!( + state.lock().unwrap().objects[&format!("{SHA}.svg")], + b"other" + ); +} + +#[test] +fn a_missing_or_foreign_row_stops_the_run_before_any_write() { + for row in [None, Some(("f".repeat(64), false))] { + let (state, url) = stub(); + state.lock().unwrap().row = row; + let output = run(&url, &[DRAFT]); + assert_eq!(output.status.code(), Some(1), "{}", text(&output)); + assert_eq!(writes(&state), 0); + } +} + +#[test] +fn a_refused_key_is_an_access_refusal_and_never_printed() { + for status in [401, 403] { + let (state, url) = stub(); + state.lock().unwrap().bucket_status = status; + let output = run(&url, &[DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{said}"); + assert!(said.contains("Access") && !said.contains(KEY), "{said}"); + assert_eq!(writes(&state), 0); + } +} + +#[test] +fn a_failure_after_the_upload_resumes_with_the_confirmation_only() { + let (state, url) = stub(); + state.lock().unwrap().fail_confirm = true; + let broken = run(&url, &[DRAFT]); + assert_eq!(broken.status.code(), Some(3), "{}", text(&broken)); + assert!( + state + .lock() + .unwrap() + .objects + .contains_key(&format!("{SHA}.svg")) + ); + assert_eq!(state.lock().unwrap().row, Some((SHA.to_owned(), false))); + { + let mut held = state.lock().unwrap(); + held.fail_confirm = false; + held.log.clear(); + } + let resumed = run(&url, &[DRAFT]); + assert!(resumed.status.success(), "{}", text(&resumed)); + let log = state.lock().unwrap().log.clone(); + assert!( + log.iter() + .all(|l| !l.contains("/storage/v1/object") || l.starts_with("GET")) + ); + assert_eq!(state.lock().unwrap().row, Some((SHA.to_owned(), true))); +} + +#[test] +fn an_unreachable_destination_is_a_network_error_after_bounded_retries() { + let free = TcpListener::bind("127.0.0.1:0") + .unwrap() + .local_addr() + .unwrap() + .port(); + let output = run(&format!("http://127.0.0.1:{free}"), &[DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(3), "{said}"); + assert!(said.contains("Network") && !said.contains(KEY), "{said}"); +} + +#[test] +fn destinations_that_are_not_a_local_stack_are_refused_before_any_request() { + for url in [ + "https://127.0.0.1:54321", + "http://127.0.0.1", + "http://10.1.2.3:54321", + "http://example.test:54321", + "http://user:pw@127.0.0.1:54321", + "http://127.0.0.1:54321/rest/v1", + "", + ] { + let output = run(url, &[DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{url}: {said}"); + assert!(said.contains("Destination"), "{url}: {said}"); + assert!(!said.contains("pw"), "{url}: {said}"); + } +} + +#[test] +fn a_folder_outside_the_seed_is_refused() { + let (state, url) = stub(); + let outside = concat!(env!("CARGO_MANIFEST_DIR"), "/src"); + let output = run(&url, &["--check", outside]); + assert_eq!(output.status.code(), Some(1), "{}", text(&output)); + assert!(state.lock().unwrap().log.is_empty()); +} + +#[test] +fn a_usage_error_names_the_usage() { + let (_, url) = stub(); + let output = run(&url, &["--check"]); + assert_eq!(output.status.code(), Some(1)); + assert!(text(&output).contains("usage")); +} + +#[test] +fn an_oversized_object_is_a_final_state_refusal_not_retried() { + let (state, url) = stub(); + let huge = vec![b'x'; 16 * 1024 * 1024 + 2]; + state + .lock() + .unwrap() + .objects + .insert(format!("{SHA}.svg"), huge); + let output = run(&url, &[DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{said}"); + assert!(said.contains("State"), "{said}"); + let log = state.lock().unwrap().log.clone(); + assert_eq!( + log.iter() + .filter(|l| l.contains("/storage/v1/object/")) + .count(), + 1 + ); + assert_eq!(writes(&state), 0); +} + +#[test] +fn a_dev_address_that_is_not_this_machine_is_ignored() { + let output = Command::new(env!("CARGO_BIN_EXE_upload-sheet-assets")) + .args(["--check", DRAFT]) + .env_clear() + .env("SUPABASE_URL", "http://10.255.255.254:54321") + .env("FAUNOSTEO_DEV_HOST", "10.255.255.254") + .env("SUPABASE_SERVICE_ROLE_KEY", KEY) + .output() + .unwrap(); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{said}"); + assert!(said.contains("Destination"), "{said}"); +} + +#[test] +fn a_malformed_answer_is_final_and_not_retried() { + let (state, url) = stub(); + state.lock().unwrap().garbage = true; + let output = run(&url, &["--check", DRAFT]); + let said = text(&output); + assert_eq!(output.status.code(), Some(1), "{said}"); + assert!(said.contains("not retried"), "{said}"); + assert_eq!(state.lock().unwrap().log.len(), 1); +} diff --git a/docs/ANNOTATION-RENDERING.md b/docs/ANNOTATION-RENDERING.md index ea791925..924b6446 100644 --- a/docs/ANNOTATION-RENDERING.md +++ b/docs/ANNOTATION-RENDERING.md @@ -11,9 +11,9 @@ application draws the markers itself from the canonical document annotations of one view into a `` appended last to the view's ``, above the drawing. Since R3 the editor canvas gets the whole view (sanitised drawing + layer) from the Rust core -(`crates/core/src/anatomy`); the PDF engine and the curation pipeline still -use the TypeScript renderer (`packages/anatomy/src/render`) until R4 and R5, -with the same output. +(`crates/core/src/anatomy`); so do the PDF writer (R4) and the curation +pipeline's review drawings (R5). The TypeScript renderer +(`packages/anatomy/src/render`) it replaced was deleted at R5.7. ## Elements emitted per annotation diff --git a/docs/PDF-FORMAT.md b/docs/PDF-FORMAT.md index ad395395..46ec1414 100644 --- a/docs/PDF-FORMAT.md +++ b/docs/PDF-FORMAT.md @@ -27,7 +27,7 @@ branding have changed since the export. Design record: `safeText`: control characters are stripped and any glyph WinAnsi cannot encode becomes `?` (en and em dashes, accented letters, `•`, `·` are fine; `⚠` is not, hence the `(!)` vet-referral marker). -- Drawings: the sheet SVG asset is parsed with xmldom, sanitised (allowlist +- Drawings: the sheet SVG asset is read by the core's one SVG reader (`anatomy::svg`, since R3/R4; xmldom left at R5.7), sanitised (allowlist below), framed on the view box, the marker layer is generated from the document and the observation's zones are filled `#b85a3f` at 0.85 opacity with a blur halo on the main view; every other marker is dropped. The SVG diff --git a/docs/development/ANATOMICAL_SHEET_MODEL.md b/docs/development/ANATOMICAL_SHEET_MODEL.md index a45c0db9..00930217 100644 --- a/docs/development/ANATOMICAL_SHEET_MODEL.md +++ b/docs/development/ANATOMICAL_SHEET_MODEL.md @@ -15,7 +15,7 @@ Out of scope here: the legacy importer and the official equine draft | Layer | Where | Role | | ------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| Canonical document | `packages/domain/src/anatomical-sheet/` (Zod) | The sheet content: views, annotations, finding tree, vertebral regions, translations. Self-describing (`schema_version`). | +| Canonical document | `crates/core/src/domain/sheet/` (Rust; Zod until R5.7) | The sheet content: views, annotations, finding tree, vertebral regions, translations. Self-describing (`schema_version`). | | Relational identity | `supabase/migrations/20261008110000_anatomical_sheets.sql` | Who owns the sheet, visibility, versions and their status, provenance of copies, assets, audit. | The database stores the document as JSONB in @@ -276,7 +276,7 @@ with the community step (§17.4). | Criterion | Where it is proven | | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | -| A sheet with several views and annotations explicitly linked to findings | `packages/domain/tests/fixtures/horse-slice.ts` (2 views, trigger, spine region, bilateral joint, 3 finding kinds); schema + integrity tests | +| A sheet with several views and annotations explicitly linked to findings | `crates/core/tests/fixtures/horse-slice.json` (from `horse-slice.ts`, deleted at R5.7; 2 views, trigger, spine region, bilateral joint, 3 finding kinds); schema + integrity tests | | Ids stable under translation | test: renaming every label leaves ids, references and `validateSheetDocument` output unchanged | | Published versions immutable | pgTAP: UPDATE of content / status / number on a published row → `42501` for the table owner; zero rows touched through the API role | | New version leaves old ones intact | pgTAP: v2 draft then publish; v1 row byte-identical, `current_version_id` moves | @@ -303,8 +303,9 @@ the decision lands; only the naming one is implemented in this document. ## 6. Official equine sheet: import (Step 4b) and curation (Step 4c) -`packages/anatomy` holds a deterministic pipeline (`pnpm import:equine`) -that reads the historical files kept under +A deterministic pipeline (since R5.6 the Rust one, `pnpm import:equine --check | --out `, +`crates/core` feature `curation`; the TypeScript original `packages/anatomy` was deleted at +R5.7, replayable from a historical revision, `docs/development/RUST.md` §11.23) reads the historical files kept under `supabase/seed/anatomical-sheets/equine/legacy-sources/` (`Horse.svg`, `Horse_head.svg`, `pathologies.json`, `vertebrae.ts`, never edited), then the authored curation files, and writes under @@ -314,9 +315,9 @@ authored curation files, and writes under | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `legacy-import/` | generated baseline | canonical `document.json`, `legacy-id-map.json` (every legacy `data-anno-id`, category slug and view key → new id), `assets.json` + byte-identical SVG copies, `IMPORT-REPORT.md` (French, for the osteopath: volumes, mappings, anomalies). No SQL. | | `curation/` | authored, committed | `references.json` (the references registry) and `changes.json` (the changeset) | -| `draft/` | generated working revision | curated `document.json`, `assets.json` + `assets/horse.svg`, `sheet-ref.json` (sheet id, null version id, sha256 of the document), `report-migration-map.json` (legacy ids and finding paths → the draft, for Report v2 imports), `CHANGELOG.md`, `REVIEW-REPORT.md`, `review/annotations-.svg` (before/after drawing per view), `review/app-.svg` (the application's own rendering), `equine_draft.sql` | +| `draft/` | generated working revision | curated `document.json`, `assets.json` + `assets/horse.svg`, `sheet-ref.json` (sheet id, null version id, the `sha256-rfc8785-validated-v1` fingerprint of the document and its `fingerprint` block, RUST.md §11.22), `report-migration-map.json` (legacy ids and finding paths → the draft, for Report v2 imports), `CHANGELOG.md`, `REVIEW-REPORT.md`, `review/annotations-.svg` (before/after drawing per view), `review/app-.svg` (the application's own rendering), `equine_draft.sql` | -Changeset (`packages/anatomy/src/curation/schema.ts`): each change has an +Changeset (`crates/core/src/curation/draft/schema.rs`): each change has an id `CHG-nnn`, a level (A demonstrated error, B supported improvement, C uncertain: a `question` is then required), a kind (correction, terminology, translation, restructure, enrichment, reference, geometry, @@ -395,7 +396,7 @@ applier's rename, move and removal records over every node of the legacy baseline (792 nodes: 571 identical, 180 renamed or moved, 7 re-homed under another category when the match is unique, 34 removed = `null`), maps the 27 legacy `data-anno-id` to annotation ids with the legacy names, and the `head` -detail key to the view. `migrateReportV2ToV3` (packages/domain) reads it; a +detail key to the view. `migrate_report_v2_to_v3` (`crates/core/src/domain/report/read.rs`) reads it; a report keeps what the map cannot place, flagged `unresolved`. Annotation colour (Step 5, additive, schema_version stays 2): `annotations[].color` diff --git a/docs/development/ENVIRONMENTS.md b/docs/development/ENVIRONMENTS.md index 14cb52ad..b40be575 100644 --- a/docs/development/ENVIRONMENTS.md +++ b/docs/development/ENVIRONMENTS.md @@ -149,6 +149,31 @@ service-worker features) and OAuth providers that refuse `http://` redirect URIs. When one of those lands, the answer is a private HTTPS origin (local CA or a private name with a certificate), never the production domain. +### 3.6 The API port 54321 and the stack's keys (checked 2026-10-24) + +Measured on the host, no secret printed: `supabase/config.toml` sets no `jwt_secret` and no +signing keys, so the stack signs with the Supabase CLI's **public default** JWT secret and its +`service_role` key is the public demo key (`iss: supabase-demo`). Port 54321 is open to the LAN by +design (table above): any device of the private network that knows those public values can call +the API as `service_role`, past every RLS policy, on DEV data. Nothing of production is involved. +This is an owner decision (no automatic change): give the stack its own secret (a `jwt_secret` / +signing keys read with `env()` from a git-ignored file, then `pnpm db:reset` and new keys in +`.env.worker`), or narrow the 54321 allow rule to the test devices' addresses. + +What the UFW listing alone does not prove for 54321, and how to check it (owner, by hand): + +```bash +ss -ltnp 'sport = :54321' # who listens, on which address (0.0.0.0 / [::] expected) +sudo ufw status verbose # default incoming policy + any rule naming 54321 +docker info -f '{{.SecurityOptions}}' # "rootless" expected: published ports are host sockets, UFW applies +sudo iptables -S DOCKER-USER 2>/dev/null # rootful Docker only: DNAT bypasses UFW, rules belong here +nc -zv -w 3 54321 # from ANOTHER device: succeeds today (open by design) +nc -zv -w 3 54322 # from another device: must fail (54323, 54324 too) +``` + +A DENY on 54322 to 54324 is effective only if the daemon is rootless (§3.1) and the probe from +another device fails; this machine cannot test its own LAN firewall (§3.3). + ## 4. Procedure from another device (owner validation) On the Ubuntu machine: `pnpm db:start`, `pnpm dev:gateway`, the worker diff --git a/docs/development/RUST.md b/docs/development/RUST.md index 04d830a8..db4cee89 100644 --- a/docs/development/RUST.md +++ b/docs/development/RUST.md @@ -2089,7 +2089,7 @@ R5 prerequisites (the pipeline port): `packages/anatomy` (curation pipeline, importer, `render/`, the review drawings) and `packages/domain` are the last TypeScript business packages; their oracles (the seed golden, the 612-leaf semantics, the determinism and count suites, the R3 layer oracle) are in -place; `documentSha256` will change once (D-R5) and every older archive will +place; `documentSha256` will change once (D-R5 rev 2; revised by the R5.1 study, §11.4 to §11.6) and every older archive will rebase on import; `@xmldom/xmldom`, `tsx` and `prettier` on generated files leave with them. @@ -2561,3 +2561,1274 @@ branch, all in 0dc1ba2 (R4.8, authorised), none after. Merge: `gitflow finish` on `feature/rust-r4-pdf-core` (no-ff into develop, branch deleted local and remote), recorded in `.claude/memory/journal.md`. Release 0.2.0, faunosteo.com and R5 untouched. + +## 11. R5: the anatomical pipeline in Rust (2026-10-22: R5.1 freeze and study, R5.1b, R5.2 importer, R5.3 draft) + +Plan: `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md`. Branch +`feature/rust-r5-pipeline-core`, cut from develop 9c0117a (R4 merged). The +owner's brief of 2026-10-22 authorises R5.1 only: characterise and freeze +the TypeScript pipeline, study the fingerprint decision D-R5, stop before +any Rust pipeline code and before any change to `documentSha256`. + +### 11.1 Inventory of the TypeScript pipeline + +`.claude/audits/R5_PIPELINE_INVENTORY.md`. `packages/anatomy`: 43 source +files, 4,897 lines (legacy importer 1,842, curation 2,329, frozen renderer +553, CLI 119), 131 test cases in 16 files, runtime libraries Prettier +3.8.3, @xmldom/xmldom 0.9.12 and Zod 3.25.76 (the first two declared as +devDependencies). It emits 18 generated files: 7 JSON and 3 Markdown +through Prettier, 5 SVGs through xmldom's serialiser (the cleaned +`horse.svg` and 4 review drawings), 1 raw SQL template, 2 byte copies of +the legacy SVGs. The authored changeset holds 45 changes (14 A, 22 B, 9 C), +687 ops (587 set, 45 cite, 33 rename, 18 add, 4 remove, 0 move) and 48 +references. `packages/domain` is imported by `packages/anatomy` only (5 +runtime symbols, each with its R2 counterpart); the crate tests read +`packages/domain/tests/fixtures/report-v2.*.json`, and +`r4.census.test.ts` pins xmldom under `packages/anatomy`: both move at +the deletion slice. The upload tool (`upload-sheet-assets.ts`, 99 lines) +depends on the `assets.json` contract only: bucket +`anatomical-sheet-assets`, key `.svg`, `upsert: false`, bytes +re-hashed against the manifest, RPC `confirm_sheet_asset_upload`. + +JavaScript facts a Rust port must reproduce or declare: key insertion +order of the working document (`review_status` appended last, not the +schema order a typed struct emits), `JSON.stringify(v, null, 2)` then +Prettier (measured effect on today's data: short scalar arrays collapsed +when they fit in 80 columns, a trailing LF; Markdown: table padding only, +134, 863 and 52 lines in the three reports), xmldom's serialiser +(declaration kept, `/>` without space, attributes in document order, +namespace declared once), `deterministicUuid` (first 16 bytes of sha256 of +the name, version nibble 5, variant 10xx), `slugify` (NFD, combining marks +U+0300 to U+036F stripped, `toLowerCase`, `[^a-z0-9]+` → `-`, 64 chars; +never fires on today's data), UTF-16 `<` sorting, `Math.round` toward +∞ +on −x.5, `Number('')` = 0, Unicode `\s`, `split(':', 2)`, fatal +`TextDecoder` for the SVGs. No clock, no randomness, no localeCompare. + +### 11.2 Oracles frozen (`crates/core/tests/oracles/r5/`) + +Generator `packages/anatomy/tests/r5.pipeline-oracles.test.ts` +(`MAKE_R5_ORACLES=1` writes; otherwise the pipeline must still match its +freeze; 6 cases, among them a two-run determinism check of every artifact +and the ledger check against the committed folders). Never regenerated +without the owner. + +| Oracle | Content | Size | +|---|---|---| +| `pipeline.json` | the ImportResult without the document (sheetId, viewBoxes, stats, source digests, assets, 27 anomalies, issues, region inferences, zone stats, annotation rows), the DraftResult without the documents (46 change summaries, 825 records with before and after, stats before and after, issues, migration stats 792 = 571 + 180 + 7 + 34), the ledger of the 16 text artifacts (folder, file, bytes, sha256; the 2 legacy SVG copies are pinned by the golden test; for the 3 Markdown files the sha256 before Prettier and `prettier_changed: true`) | 1.3 MB | +| `ids.json` | `deterministicUuid` over the 3 pipeline names and 3 edges; `slugify` over 17 edge labels and every `name.fr` / `name.en` of both documents (801 rows) | 87 KB | +| `fingerprints.json` | per JSON artifact: today's file-bytes sha256, A (`JSON.stringify(v, null, 2)` with and without LF, compact), B (RFC 8785); for the two documents also the validated form (defaults filled) under A and B; the ES6 text of the 65 non-integer numbers; the two RFC 8785 vectors | 13 KB | + +The committed generated folders stay the byte oracle (`seed.golden.test.ts` +pins them to a fresh run); the migration semantics stay pinned by +`report-migration-map.json`, the 612-leaf suite and the R2 oracle +`migration-map.draft.json`; the review drawings by their xmldom bytes and +the R3 layer and highlight oracles. `pnpm import:equine` was not run (it +rewrites the folders; the golden proves the same bytes). + +### 11.3 Tests and results + +`pnpm --filter @faunosteo/anatomy test:run`: 137 cases in 17 files (131 of +the frozen pipeline plus the 6 of the generator), green; +`@faunosteo/domain` 262, green; lint and typecheck of the anatomy +package green; `git status` shows no change under `supabase/seed`, the +goldens, the R2 to R4 oracles or the R4 digests. + +### 11.4 Historical results: no gap, one defect found in the core + +Every generated file reproduces byte for byte from a fresh run. One +fingerprint has ever been produced, `27c7383c…2660`, unchanged since +0a17e39 (2026-10-10), carried by 99 of the 216 committed PDFs, 8 JSON +fixtures and 6 Rust oracle files (`.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md`). + +F1, found by the study (`crates/core/src/json.rs`, `js_number`): the +shortest digits come from `format!("{:e}")`, which rounds an exact +decimal tie upward, where ECMAScript, Python and `zmij` (serde_json's +formatter, already locked) round to even. `840.1692504882812` (legacy +annotation `cx`, from Horse.svg, a float32-exact value) prints +`…813`. Measured: 1 of the 8 long decimals of the legacy SVGs, 7,401 of +100,000 float32-exact values in 0..2000, 769 of 100,000 random doubles; +`zmij` differs on none. Over the 134 JSON fixtures of the repository, +Node and Rust `JSON.stringify(v, null, 2)` differ on 2 files, both the +legacy baseline, both on that value. Invisible today: the curated draft +holds no tie value, and the R2 contract test `sheet_contract.rs` re-prints +its expected text through `to_js_pretty`, so it cannot see a +number-printing difference. Reached by the canvas layer (R3), the PDF +writer, the archive attachment and `report-compare`. Not fixed in R5.1: +it changes core bytes for tie values (D-R11), so the fix (digits from +`zmij`, the tie values as unit tests, `zod_oracle` compared against the +recorded JS text) waits for the owner's go and precedes any Rust importer. + +The §10.10 sentence "`documentSha256` will change once (D-R5) and every +older archive will rebase on import" describes D-R5 rev 2; the owner's +Annex C amendment (BDR-045) supersedes it, and §11.5 studies both. + +### 11.5 D-R5: the fingerprint, facts and comparison + +Today: `documentSha256 = sha256(Prettier(JSON.stringify(document, null, +2)))`, the exact bytes of `draft/document.json` in its input form +(defaults omitted), copied into `sheet-ref.json` and the migration map, +compared and never recomputed by the rebase (fingerprint only), the +envelope invariant and the export (sheetId and fingerprint). The database +stores the document as `jsonb` and no fingerprint. + +Matrix on the real data (`node scripts/r5-fingerprints.mjs`; cross-checked +by a throwaway Rust experiment on the core crate: `to_js_pretty`, +`to_js_compact` and a 40-line RFC 8785 canonicaliser over `js_number`, +RFC vectors passed, idempotent): + +| Artifact | Today | A `to_js_pretty` + LF | B RFC 8785, input form | B, validated form | +|---|---|---|---|---| +| draft/document.json | 27c7383c…2660 | 90f668a3…aa1d | a56e4a24…88a1 | 12d78872…74e2 | +| legacy-import/document.json | 91e459f4…14c2 | 8c94a464…adc2 | d8b5f2cf…81eb | 1217637e…c024 | +| draft/report-migration-map.json | 4139c51d…fce9 | 4139c51d…fce9 | f082b66f…2ca6 | | + +Rust reproduces every draft digest byte for byte; the legacy digests +differ through F1 only. The three columns of one row are three encodings +of one value (parse and deep-compare); a content change moves every +column. Keys: all ASCII in every artifact (UTF-16, code-point and byte +order coincide; the Rust canonicaliser sorts by `encode_utf16()` and +passes the RFC vector with U+0080, ö, €, 😀 and U+FB33). Numbers: 29 and +36 non-integer tokens, none negative, no exponent, no `-0`, none beyond +2^53, all already in ECMAScript `Number::toString` form (what JCS +mandates). Unicode: 788 non-ASCII strings, all NFC, no control, no escape, +no astral, no lone surrogate (I-JSON satisfied; a lone surrogate is +refused by the core, L1). Cost: A costs nothing (`to_js_pretty` exists); +B costs about 40 lines in `json.rs`, no crate (`serde_jcs` not needed; +`sha2` would become a normal dependency of the core or stay in the tool). +Determinism: B is a pure function of the parsed value and Node 24 and Rust +1.99 agree on every draft artifact; A depends on the writer's layout +rules. Database: a PostgreSQL 17 `jsonb` round trip +(`packages/supabase/scripts/r5-jsonb-fingerprint.mjs`, PGlite) keeps B for +both documents and breaks today's value and A (keys reordered, numeric +scale kept): B is the only candidate a service could recompute from +`anatomical_sheet_versions.content`. + +| | A: bytes the Rust pipeline emits | B: RFC 8785 of the validated document | C: Rust reproduces Prettier's bytes | +|---|---|---|---| +| value at the switch | changes once | changes once | unchanged | +| alias mechanism needed to avoid a visible migration | yes | yes | no | +| survives a reformat, a writer change, a jsonb round trip | no | yes | no | +| code | 0 lines | ~40 Rust + 15 Node, no crate | a Prettier-json subset printer, bound to a formatter's layout | +| source | D-R5 rev 2 | Annex C, BDR-045 | rejected rev 1 (Node form) | + +Recommendation to the owner: B over the validated form, the alias +mechanism of §11.6, the convention named in `sheet-ref.json`, F1 fixed +first. C is possible on this data (the only Prettier effect is the +short-array collapse) but keeps the identity chained to a formatter. + +### 11.6 Compatibility mechanism for the old fingerprints (proposal) + +The sheet side carries the convention and the aliases; the report +contract does not change. `sheet-ref.json`, the bundle payload `ref` and, +at Step 13, the stored sheet version carry `document_sha256` (the current +convention's value) plus a `fingerprint` block: `algorithm` +(`rfc8785-sha256`) and `aliases`, the fingerprints of the same content +under earlier conventions, computed once at the switch from the frozen +`fingerprints.json` (`27c7383c…2660` for the current draft). The rebase, +the envelope invariant and the export treat a fingerprint equal to the +current value or to an alias as the same document (one membership test in +`report/rebase.rs`, `archive/read.rs`, `session.rs`, +`pdf/write/input.rs`: gated files, the owner's go per file). A new report +is stamped with the current value; an archive stamped `27c7…` opens with +no message and no rebase; an archive on an older content revision rebases +as today; no archive, fixture or oracle is rewritten. Report v3 keeps +`sheet.documentSha256` (64 hex): the N-1 reader and every fixture stay +valid. + +### 11.7 Residual risks of R5.1 + +F1 unfixed (declared, bounded: no tie value in the draft); the Rust +canonicaliser exists as an experiment only (not in the crate); +`validated_equals_input: false` in `fingerprints.json` records that the +input and validated forms differ by the filled defaults, so the decided +convention must name its form; `supabase/seed/**` is not in +`.prettierignore` (a root `pnpm format` would reformat Rust-written +files at the switch); the horse.svg asset bytes are xmldom's (re-cleaning +with the R3 reader would change the asset sha, id, document, SQL and the +Storage object); the slugify and region tables depend on ICU 78.3 (never +exercised by today's data). + +### 11.8 Recommended slicing (nothing started) + +R5.1b F1 fix (owner's go). R5.2 legacy importer (`crates/core` +curation/legacy, `import-equine` bin): document.json, legacy-id-map.json, +assets.json byte-exact, IMPORT-REPORT by table padding or parsed tables. +R5.3 changeset applier, migration map, stats, seed SQL: the draft JSON +files and the SQL under the decided fingerprint, the 825 records equal, +the 612-leaf suite ported. R5.4 review overlays and app drawings on the R3 +layer and compose (parsed-tree comparison), CHANGELOG and REVIEW-REPORT. +R5.5 `upload-sheet-assets` bin, operator runbook. R5.6 the D-R5 switch +(convention, aliases, the membership test in the gated readers, seed +regenerated once by the Rust tool, `.prettierignore`, CHANGELOG). R5.7 +consumer census, fixtures moved, `packages/anatomy` and `packages/domain` +deleted, xmldom and Prettier out of the anatomy lockfile, docs and ledger. +R5.6 needs the D-R5 decision; R5.2 needs R5.1b. + +### 11.9 R5.1b: F1 fixed (2026-10-22) + +The owner's decisions of 2026-10-22 (« Validation R5.1, décision D-R5 et lancement du +portage Rust »): D-R5 = option B, convention `sha256-rfc8785-validated-v1` (applied at R5.6 +only), aliases of the historical fingerprints established from trusted frozen documents +only, F1 fixed first, byte-exact reproduction of the TypeScript artifacts by default, the +historical SVG bytes kept, `.prettierignore` on the Rust-written paths, `ureq` preferred +for the upload tool at R5.5. + +`js_number` (`crates/core/src/json.rs`) now takes its shortest digits from `zmij` 1.0.23, +the formatter serde_json 1.0.154 already used (a dependency edge, no new crate): among the +shortest candidates it picks the closest and, on an exact decimal tie, the even one, which is +ECMAScript's rule. The decimal layout (ECMAScript `Number::toString` steps 6 to 10) is +unchanged. + +Independent reference: `crates/core/tests/oracles/r5/numbers.json`, 44,322 rows written by +V8 (`scripts/r5-number-oracle.mjs`, `String(value)`), each value given by its IEEE bits: +edge values (zero, subnormals, extremes, the 1e21 and 1e-7 thresholds, powers of ten and two, +integers around 2^53), the tie values of the study, 12,000 float32-exact values (where ties +occur), 10,000 random doubles, each negated. `tests/json_numbers.rs` compares every row and +characterises 840.1692504882812. Before the fix: 1,552 mismatches; after: none. The R2 +helper `zod_oracle` now first checks the oracle's own bytes against the core's compact +printing, so a number the core prints differently from V8 fails there instead of on both +sides of the comparison: on the old printer it fails the legacy baseline oracle. + +Consumers audited (`grep js_number crates/core/src`): the R3 canvas layer and sanitiser +(`anatomy/layer.rs`, `svg/number.rs`, `svg/sanitize.rs`), the R2 editor and sheet rules +(`domain/editor/zone.rs`, `domain/js.rs`, `domain/sheet/validate.rs`), the R4 writer +(`pdf/write/{content,views,layout/observation}.rs`) and `report-compare` +(`pdf/compare`). Result on the historical corpora: `pnpm rust:check` (every cargo suite, +the R4 serialiser digests included), `pnpm wasm:build` and `pnpm check` (app 434, core-wasm +58, domain 262) green with no oracle, golden or digest changed: no historical output +carries a tie value, so no contract moved and the porting went on as the brief allows. +Effect on user data: an archive whose report holds a tie value now re-prints it as the +JavaScript application wrote it (`…812`), where the R2 to R4 core would have printed +`…813`; the value itself was never altered (the two texts parse to the same double). + +### 11.10 R5.2: the legacy importer in Rust (2026-10-22) + +`crates/core/src/curation` behind the feature `curation` (never enabled by the wasm module +or the worker; `scripts/rust-check.sh` runs clippy and the suites with it), 3,187 lines: + +| Module | Ports | +|---|---| +| `text.rs` | Prettier's `getStringWidth` (the East Asian wide table transcribed row for row from `prettier@3.8.3`), the NFD fold of `slugify` and the region roots (`icu_normalizer`, already locked through `url`), UTF-16 ordering, `Object.keys` order (array indices first), `Math.round` | +| `ids.rs` | `sha256Hex`, `deterministicUuid`, the asset and sheet ids | +| `prettier_json.rs` | `formatJson`: Prettier's JSON layout over `JSON.stringify(v, null, 2)` (expanded objects, collapsed short arrays, filled number arrays, Prettier's exponent form `1e21`) | +| `markdown.rs` | `cell`, `table`, `code` and Prettier's table alignment (the only change it makes to the reports) | +| `legacy/*` | `svg`, `vertebrae`, `regions`, `categories`, `catalog`, `catalog_checks`, `annotations`, `authored_labels`, `importer`, `report` (IMPORT-REPORT), `render_artifacts` | +| `bin/import_equine.rs` | `import-equine --check` (compare with the committed `legacy-import/`, write nothing) and `--out ` (write into an absent or empty folder; nothing is ever deleted) | + +Parity, every expectation written by the TypeScript tools: + +- the four text files of `legacy-import/` byte for byte and the two SVG copies + (`tests/curation_legacy.rs`); `import-equine --check`: 6 files, 0 differences; `--out` + then `diff -r` against the committed folder: identical; +- every intermediate value of the frozen run (`oracles/r5/pipeline.json`, section + `legacy`: stats, anomalies in order, rows, inferences, zone stats, digests, view boxes); + the raw report's sha256 equals the ledger's pre-Prettier digest; two runs byte-equal; +- 10 synthetic cases run through the TypeScript importer (`oracles/r5/legacy-synthetic.json`, + generator `packages/anatomy/tests/r5.legacy-synthetic-oracles.test.ts`): a generic sheet + (integer-like zone keys, non-stable node ids slugified, missing FR and EN names, unknown + laterality and special, a `rect`, odd polygon points, `0x10` and `1e1` coordinates, the + tie value, `-0`, a duplicate formula key, a hyphen range) and a minimal one with a BOM, + both byte for byte with every result part; 8 refusals (schema, zones missing, catalog + with a BOM, region missing, no formula, inline sources, key ≠ id, a truthy non-boolean + referral) refused alike; +- the generic format probes (`oracles/r5/{prettier-json,markdown-tables,js-semantics}.json`, + generator `packages/anatomy/tests/r5.format-oracles.test.ts`): 968 JSON layouts across + depths, key widths and the 80-column boundary, 10 tables, 22 extra slug edges (İ, Kelvin, + final sigma, ß, ligatures, fullwidth, Hangul, the 64-character cut), 7 uuid names, 39 + `Number()` texts, 12 point lists, 18 `Math.round` values (bits kept, −0 included), 8 + spaces, 3 key orders; the 7 generated JSON files of the seed (draft included) print byte + for byte. + +Differences declared (the port refuses where JavaScript accepted; none is reachable by the +committed sources, since the equine folder is reproduced byte for byte): + +| Input | TypeScript | Rust | +|---|---|---| +| a text holding an emoji, in a table cell or a JSON string | Prettier measures it with its RGI emoji table | refused (`UnsupportedWidth`): the table is not reproduced (the only emoji of the sources, in `Horse.svg`, never reaches a generated text) | +| a malformed SVG, a DTD, a text over the core's SVG caps | xmldom parsed leniently | refused (the core's prescan, then roxmltree) | +| a catalog node whose `id` is not a string, a `children`, `categories` or `sources` that is not an array | coerced or crashed | refused with the node named | +| a category or label named like an `Object.prototype` member (`constructor`, `toString`) | the prototype answered the lookup | a plain table lookup | + +Kept as the TypeScript: invalid UTF-8 in the catalog and vertebrae texts becomes U+FFFD +(`Buffer.toString`), a BOM there is kept (and `JSON.parse` refuses it); invalid UTF-8 in an +SVG is refused and one BOM removed (`TextDecoder` fatal); a missing coordinate reads 0 +(`Number(null)`); NaN and the infinities become `null` in the document and `NaN` / +`Infinity` in the report rows. + +Tests: `cargo test -p faunosteo-core --features curation` (formatting 6, importer 5, plus +the crate's suites); the TypeScript keeps its 131 frozen cases and gains the 4 generators of +R5.2 (anatomy 141). `packages/anatomy`, `packages/domain` and `pnpm import:equine` stay: +the TypeScript still writes both folders until the switch. + +### 11.11 Checkpoint R5.2 + +Residual risks: the emoji refusal (a label with an emoji would stop the pipeline, visibly); +Prettier's markdown changes other than table alignment are not reproduced (none occurs in +the three reports; a future content with emphasis or escapes could differ, and the R5.4 +byte comparison of CHANGELOG and REVIEW-REPORT will show it); the NFD and lowercase tables +follow `icu_normalizer` 2.3 and Rust 1.99 (Unicode 16 or 17) where Node uses ICU 78.3: +equal on every frozen label and edge, a character added by a later Unicode version could +differ; the binary has no pnpm script yet (a public name, the owner's call). + +Conditions for R5.3: the owner's validation of this checkpoint; the draft side reads the +same inputs (`curation/changes.json`, `references.json`) and its oracles are frozen +(`pipeline.json` draft section: 46 changes, 825 records, migration stats; the draft folder +byte for byte except `sheet-ref.json`'s fingerprint, which stays `27c7383c…2660` until +R5.6); the cleaned `horse.svg` is kept as frozen bytes (owner decision), so R5.3 reads it +instead of re-cleaning the legacy drawing; the review drawings (xmldom bytes) wait for R5.4. + +### 11.12 R5.3: the curated draft in Rust (2026-10-22) + +Owner go « Validation R5.1b / R5.2 et autorisation R5.3 » (2026-10-22): `pnpm r5:import-equine` +names the Rust binary and forwards its arguments, `pnpm import:equine` keeps writing the seed +until the switch; no fingerprint change; the cleaned `horse.svg` is read as frozen bytes, never +re-cleaned; the review drawings and the two Markdown reports are R5.4. Contract +`.claude/tasks/contracts/2026-10-22-rust-r5-draft.md`. + +`crates/core/src/curation/draft` (2,908 lines at the R5.3 close, feature `curation`): + +| Module | Ports | +|---|---| +| `schema.rs` | `ChangesetSchema`, `ReferencesFileSchema`: strict objects, optional keys `.optional()` (absent accepted, `null` refused), the `CHG-\d{3,}` id, `priority` defaulted to `medium`, the level C question, duplicate change and reference ids refused; the `op` discriminator read first, then the variant parsed strictly; re-emitted in the Zod shape order (`question` before `priority`, options absent) | +| `targets.rs` | the target grammar, resolution on the plain JSON document (a located item is a path of keys and indices, resolved again at each use where the TypeScript held object references), `zoneFindings`, `allFindings`, `findingScope`, `childList` (a lean leaf gets `children: []` appended on demand) | +| `fields.rs` | the settable table per item kind, dot paths, `readField` / `writeField` (missing intermediate objects created) | +| `records.rs` | `ChangeRecord`, the touch marks (`"\0touched"`: a transient key holding the first-touch order, removed at the end of each change and never written to a record), `isDeepStrictEqual` on JSON values (`Object.is` on numbers), `String(value)` | +| `ops.rs`, `rename.rs` | the six ops with their checks and messages, the rename cascade (one record per rewrite; a reference rename rewrites the citations) | +| `apply.rs` | `applyChangeset`: references replaced first, every op refused with the change id and op index, the review rule (touched findings and annotations of a B or C change set `to_confirm` in first-touch order, items already `to_confirm` or gone skipped), then the R2 strict parse (`AnatomicalSheetDocument`) and `validate_sheet_document` (errors refuse, warnings returned) | +| `migration_map.rs` | `buildReportMigrationMap`: the 792 legacy paths replayed through the rename, remove and move records, zone renames, annotation and view renames, the final-paths check, unique re-homing, the five stats; `Object.keys` order through `js_object` | +| `stats.rs` | `documentStats`: 17 fields in the TypeScript order, the fixed-key counters extended by unlisted values | +| `seed.rs` | `renderDraftSeedSql`: header, sheet insert, asset inserts, `insert_sheet_draft`, converging update, the dollar-tag refusal, `trimEnd` | +| `pipeline.rs` | `buildEquineDraft` (CHG-000 from the frozen asset's sha256, byte size and uuid, the head view box parsed from the legacy SVG; the reserved id refused), `renderDraftArtifacts` for the R5.3 files (`document.json`, `assets.json`, `sheet-ref.json` with `document_sha256` = sha256 of the `document.json` bytes, `report-migration-map.json`, `equine_draft.sql`), `parseViewBox` | +| `bin/import_equine.rs` | both folders; `--check` compares the produced files with the committed seed and lists the six R5.4 files of the draft as pending (`shortcut:` comment, removed at R5.4); `--out ` writes `/legacy-import` and `/draft` into a destination that is absent or an empty folder; it refuses an empty path, a path holding `..`, a missing parent folder, a destination inside the seed folder, a symbolic link (a trailing `/` or `/.` included), a path that is not a folder and a folder holding any entry; the parent's symbolic links are resolved and the canonical destination is printed before the first write; every folder under it is created with `create_dir` and every file with `create_new`, so an entry that appears after the claim (file, folder or symbolic link) is refused, never followed or truncated; a relative path is typed from `INIT_CWD` when absolute, else the current folder (the repository root when `scripts/import-equine.sh` is run directly, since it moves there; `pnpm r5:import-equine` is the reference); a non-UTF-8 argument is a usage error; nothing is ever deleted | + +Parity, every expectation written by the TypeScript (`tests/curation_draft.rs`, 16 tests): + +- the five R5.3 text files of the committed `draft/` byte for byte, the frozen `horse.svg` + described by its sha256, size and asset id; `pnpm r5:import-equine --check`: 12 files, 0 + differences; `--out` then `diff -r`: `legacy-import/` identical, `draft/` identical but + for the six R5.4 files; +- `sheet-ref.json`'s `document_sha256` equals the sha256 of the produced `document.json` + and the historical `27c7383c…2660` (by construction: same bytes, same rule); +- the draft section of `oracles/r5/pipeline.json`: sheetId, the 46 change summaries (CHG-000 + included), the asset, `statsBefore` and `statsAfter`, the empty issue list, the migration + stats (792 nodes: 571 identical, 180 remapped, 7 re-homed, 34 removed) and the 825 records + one by one under the JavaScript compact print; two runs byte-equal; +- the 612 legacy leaves through the core's `read_report_document` on the produced map: 442 + identical, 141 moved, 29 removed, every resolved leaf a leaf of the produced document, the + 29 flagged paths exactly those the map sends to null, the FR snapshots kept; +- 82 synthetic changesets on the mini sheet (`oracles/r5/curation-synthetic.json`, + generator `packages/anatomy/tests/r5.curation-synthetic-oracles.test.ts`): 14 accepted + cases (every op kind, numeric and anchored positions, subtree scopes with skipped equal + values, the review rule on levels A, B and C, the five rename cascades and a reference + rename, re-homing, two chained changes, the two migration-map debt cases below, the three + `JSON.parse` cases of the aligned paragraph) byte for + byte on the formatted document, the records, the stats, the migration map and the seed + SQL; 63 refusals (23 schema, among them `schema-set-without-value`, which the TypeScript + refused at the gate and the port at parse, the declared family below; `null` on `scope`, + `position` and `field` and the shape + family below included, 40 applier, integrity and shape gates included) refused alike, with + the same reason: the same message for an op or change refusal (change id and op index + included), the same stage for a schema or gate refusal; 7 references files refused alike; + five declared synthetic cases below (four refusals, one acceptance), each held by its own + test (14 compared + 63 refused alike + 5 declared = 82). + +Differences declared (none reachable by the committed files, since the folders are +reproduced byte for byte): + +| Input | TypeScript | Rust | +|---|---|---| +| a `set` op without `value` | `z.unknown()` accepted the missing key; the op wrote `undefined` and `JSON.stringify` dropped the field (synthetic case `declared-set-without-value-drops-key`: `description: {}`) | refused at parse (`missing field value`) | +| a `position` written as `1.0` or `-0` | accepted (`Number.isInteger`) | accepted alike (parsed as a JavaScript number, then integral and non-negative) | +| a lone surrogate escape (`"\ud800"`) in any string of the two files | `JSON.parse` kept it | refused (the core's L1 rule: no lone surrogate is ever read) | +| nesting deeper than 128 levels (an `add` of a 70-level finding chain) | accepted | refused at parse (serde_json's depth limit, kept as a resource bound) | +| a number beyond the double range (`1e400`) in a value a later op overwrites or removes | `JSON.parse` read Infinity, the value was discarded, the change accepted (a surviving value is refused by both at the gate) | refused at parse (serde_json's range check) | +| a `set` field path ending in an inherited `Object.prototype` member (`name.constructor`, `name.toString`, `name.valueOf`…) | `readField` returned the inherited function and the record's `structuredClone` threw (`… could not be cloned`): change refused at the op | the member is an ordinary missing key: written, `before` recorded as null. Kept alone, the shape gate refuses it (every object of the sheet contract is strict). Replaced by a later op of the run (a `set name` on the same item), or removed with its item, the change is accepted: the document is byte for byte the one the later op alone gives, one extra record traces the overwritten write. Nothing is bypassed: the settable table checks the first segment on both sides (`constructor` as a field: `unknown field`), no value is read through a prototype, the integrity gate runs on the final document (test `an_inherited_member_name_is_a_plain_key_and_bypasses_nothing`, four member names; `__proto__` has its own row). Accepted by the owner 2026-10-23 | +| a `set` field path holding a `__proto__` segment (`name.__proto__`, `name.__proto__.x`) | no key was ever written: at the end of the path the setter ignored a primitive or set the holder's prototype (change accepted, records with `before: {}`); in the middle, `Object.prototype` itself was polluted and every later object failed the strict gate (change refused) | refused at the op (`reserved key "__proto__"`), with or without a later overwrite: no faithful reading exists (fifth final round; declared case `declared-proto-segment-overwritten`, test `a_proto_segment_is_refused_at_the_op`) | +| an authored key starting with NUL (`"\u0000touched"`) in a value, or a field path segment starting with NUL (`name.\u0000touched`) | refused at the strict document gate when the key reaches the document, accepted when a later op overwrites or removes it | refused (`reserved key`): at parse for a value, at the op for a field path; the prefix is reserved for the applier's transient touch marks, which the cleanup strips at every depth, so a written key would be lost while a record claims it (found by the final gates, test `a_reserved_or_unbounded_field_path_is_refused_without_writing`) | +| a null, a string, a number or a boolean among the `children` or `categories` of an added item | a TypeError where a walk met it (`descendants`, the review marking: refused), silently skipped by a rename's citation walk (accepted when a later op removed the item), refused by the gate when it stayed | refused at the add (`… entry that is not an object`), whatever follows (three cases frozen from the TypeScript, one declared: `declared-children-string-renamed-then-removed`) | +| a `children` or `categories` of an added item that is present but not a list (an object, a string, `null`) | replaced by `[]` when a later op added under the item (`childrenOf`): the author's value lost without a word; accepted as well when a later op removed the item | refused at the add (`… that is not a list`); `children_path` never replaces a present value (declared case `declared-children-object-then-added-to`) | +| a `set` whose path goes through a non-object (a string, a number, a boolean, an array, `null`: `name.fr.x`): `writeField` replaces it by an object | `before` recorded as undefined (null), the replaced string in no record; refused by the gate unless a later op overwrites the field | the same (kept, recorded here) | +| a document of more than 200,000 values after an op (the equine document holds 6,374) | accepted when valid | refused at the op: a resource bound checked with the depth (test `the_document_cannot_hold_more_values_than_the_bound`) | +| a field path of more than 8 segments (the deepest settable path has 2) | accepted, the gate refused the stray keys | refused at the op: a resource bound (20,000 segments overflowed the stack before it) | +| a document nested more than 64 levels after an op (the equine document has 10), by repeated `add` or `move`, or a deep value | accepted when valid | refused at the op: a resource bound checked after every op with an iterative walk (test `the_document_cannot_be_nested_past_the_bound_by_repeated_adds`) | + +Technical debt, kept during R5 (owner decision 2026-10-23, reproduced as is, never corrected +silently): `applyRecord` of the migration map reads `record.op` whatever `record.target` is. +A cascade record of a view, zone, category or region rename whose target is an annotation +of the legacy id map is replayed as a rename of that annotation; a reference rename's +cascade on a cited finding is replayed as a rename of the finding's path. Measured on the +mini sheet (TypeScript values, frozen; test +`the_migration_map_replays_cascade_records_by_their_op_as_the_typescript_does`): renaming +`view:main` sends `legacy-hip` and `legacy-neck` to `principal` and the legacy `head` view +to `principal`; renaming a cited reference sends `hip/hip-dysfunctions/mobility` away, and +re-homing brings it back, counted as 3 re-homed instead of 3 identical; combined with a +finding rename (`renames-cascade`), `hip/hip-dysfunctions/mobility` maps to null where +`hip-joint/hip-dysfunctions/motion` is the right target. The committed changeset renames +findings only (33) and no reference, so the equine map is untouched. A future changeset +renaming a view, zone, region, category or a cited reference must not be published before +the fix (a declared behaviour change on both sides, after R5). + +Aligned on `JSON.parse`, not a difference: an authored value keeps JavaScript's key order (array +index keys such as `"1"` first, ascending, then the others in insertion order) and an integer +beyond 2^53 is read as the double JavaScript holds (`9007199254740993` → `9007199254740992`), +at parse (`text::js_normalize`) and when a field path writes a key (`text::js_insert`), so a +record never holds a value its own document lacks (found by the fourth final verifier; cases +`js-index-key-in-value-overwritten`, `js-index-segment-overwritten`, test +`an_integer_beyond_2_53_is_read_as_the_double_json_parse_gives`). + +Aligned on Zod, not a difference: serde's derives read a struct from a positional array +(`"title": ["Titre", "Title"]`, a whole change or reference as an array) and a unit enum +variant from a one-key map (`"level": {"A": null}`, `scope`, `review_status`, `laterality`, +the reference `type`); Zod refused both. Each authored file and the curated document are +compared, by shape, with their typed reading serialised back (`draft/shape.rs`): an object +stays an object, an array an array of the same length, a scalar a scalar of its kind (found by +the final verifier's 55,000-changeset differential; 10 changesets and 2 references files frozen +from the TypeScript). The R2 contracts carry the same derives (open item below). + +Kept as the TypeScript: invalid UTF-8 in the two curation files becomes U+FFFD +(`readFile(path, 'utf8')`, as R5.2 kept for the catalog); a repeated key in either file keeps its first position and its last +value (`JSON.parse`, through the core's `parse_json`; tested on a change and a reference); +ids compared as strings (`entry[key] === id`), a non-object entry +never matches; `String(x)` of a missing id is `"undefined"`; the error messages of the ops +(`unknown target "…" (no "…")`, `position N out of range`, …) are the TypeScript ones with +the change id and op index prefixed. + +Tests: `cargo test -p faunosteo-core --features curation` (draft 16, importer 5, formatting +6, plus the crate's suites); anatomy 142 (the generator added); `pnpm rust:check` green. + +Gates: security auditor PASS (semgrep 0 findings, 6 LOW; fixed: the head view box read with +`get`, the destination claimed then canonicalised, `INIT_CWD` taken only when absolute; kept: +seed SQL built by string formatting as the TypeScript, from pipeline values only, and the +suite's clippy allow line), `.claude/audits/2026-10-22-rust-r5-draft-security.md`. Fresh +verifier, three passes (`.claude/audits/2026-10-22-rust-r5-draft-verify.md`): pass 1 found +four unreachable divergences, two aligned (`String(id)` for finding targets, the exact +JavaScript `trimEnd` set), one kept as both sides refuse (a position beyond 2^64, a different number printed; the +second, an added item with a `null` child, proved wrong by the third final round and +replaced by the non-object child row of the table); pass 2 found +one reachable divergence, `null` accepted on the optional `scope`, `position` and `field` +where Zod refused it, now refused alike (three synthetic cases added), and aligned the +re-homing candidates on a set (a path met twice counts once); outcome-identical details +kept: `annotation_names` reads a non-string name as empty, an unlisted counter key keeps +insertion order, the `parseViewBox` error quotes its text. Pass 3 found a repeated key +refused by serde's derive (now read as `JSON.parse` does), an authored NUL-prefixed key +silently dropped by the mark cleanup (now refused at parse), a symbolic link typed with a +trailing `/` followed by `--out` (the path is rebuilt from its components before the check), +and three refusals by design now declared above (lone surrogate, depth, `__proto__`). Pass 4 +met C1 to C12 and found the documentation incomplete: the curation files are now read lossily +as the TypeScript read them (a Latin-1 byte had been refused), two contrived splits are +declared above (`1e400` in a discarded value, an inherited member in a field path), and the +NUL-key row and the counts are corrected. Final round on 8654905 (owner 2026-10-23): verifier +ECARTS(2) and security PASS with 2 MEDIUM, one shared root: a NUL-prefixed field path segment +was written then stripped with the marks, its value lost while a record claimed it (fixed: +refused at the op); 20,000 field segments overflowed the stack (fixed: 8 segments, 64 levels +checked after every op); `--out` writes were not exclusive after the claim (fixed: +`create_dir` and `create_new`); `..`, a missing parent and a destination inside the seed are +refused, the destination printed before writing, a non-UTF-8 argument refused; the binary's +refusals are tested against the built binary (`out_refuses_every_unsafe_destination_and_writes_nothing`). +Second final round on 314cf04: verifier ECARTS(3) (the serde shape family above, in the +authored files and the gate, plus a missing-list message) and security PASS (MEDIUM memory, +LOW: quadratic depth walk, `--check` and reads following symbolic links, residual +check-then-use window, `write_exclusive` accepting any component, lossy normalisation, a test +aimed at the real seed). Fixed: the shape comparison; `document has no list` for a missing +list; every read a regular file under 16 MiB whose canonical path lies in the seed folder (a +link inside the seed is followed only if it stays there); `--check` lists a link without +walking into it; `write_exclusive` takes plain names only and re-checks the claimed folder; +the seed refusal tested on the pure check (`inside`), no test targets the real seed. Kept and +declared: the measured residual risks above. Third final round on 42bbc48: verifier ECARTS(2) +(C1, C2, C4 to C12 met; 82,000 random changesets, 13,758 accepted identical; one family: a +non-object child of an added item, three splits, and the §11.12 sentence on the `null` child +wrong) and security PASS with LOWs only (reads following folder links out of the seed, the +shape comparison not enforcing array length, a folder appearing after the claim accepted, the +seed guard tested only as a bare function, `before: null` over a replaced string). Fixed: +non-object children refused at the add; reads confined to the seed by canonical path; array +length compared; only folders this run created are used; `claim_destination` takes the seed +and is tested on a fixture (`the_claim_refuses_a_destination_inside_the_seed_and_creates_nothing`). +Declared: the replaced-string `before`, the memory factor. Fourth final round on 6c0fe88: +verifier ECARTS(2) (C1, C2, C4 to C12 met, 0 accept/refuse split in 25,000 random changesets; +records differing from the TypeScript on array index keys and on integers beyond 2^53; the +declared-case count wrong) and security PASS with one MEDIUM (a present non-list `children` +silently replaced by `[]`) and LOWs (`--check` listing through a generated folder that is a +link, a mount alias of the seed, the walk cost understated, the claim test fixture in the +shared temporary folder). Fixed: `js_normalize` and `js_insert`; non-list `children` and +`categories` refused at the add and never replaced; `--check` confined to the seed's folders; +the identity guard; a 200,000-value bound; the fixture under `target/`. Fifth final round on +3ece1a6: verifier ECARTS(2) (C1, C2, C4 to C12 met; 120,000 random changesets, 40,494 accepted +identical, every other split a declared family but one: a `__proto__` segment, with the +inherited-member row wrong for it; the test count stale) and security PASS with LOWs (the +identity guard covering the seed folder only, quadratic id comparisons). Fixed: `__proto__` +segments refused at the op; the identity guard over every folder of the seed; hash sets. + +### 11.13 Checkpoint R5.3 + +Open item for the owner (outside R5.3, gated readers): the serde leniency above is in the R2 +derives of `domain/sheet/schema.rs` and very likely of the report and archive contracts, so +the readers of imported PDFs (`archive/read.rs`, `report/read.rs`, `pdf/import.rs`) would +accept an object written as an array or an enum written as a map where the frozen Zod reader +refused it. Not probed on those readers, not changed: a fix there needs the owner's per-file go. + +Residual risks, measured by the final security gates and kept: the document is bounded (64 +levels, 200,000 values, checked after every op; the equine document has 10 and 6,374), but +the records are not: a hostile changeset of subtree sets with a large value still costs +memory in proportion to ops × items × value size (211 KB asked for more than 2 GB before the +value bound; the port clones the op into every record where the TypeScript shared it, about +twice its memory); the bound walk runs after every op (at most 200,000 values each, a few +milliseconds; a 16 MiB changeset of tiny ops could take minutes); `--out` assumes a single-user machine +(a concurrent process able to write the destination's parent could still swap a component +between a check and its use, never overwriting: every file is `create_new`); invalid UTF-8 +and repeated keys are read as the TypeScript read them. Residual risks of the slice: the +`--check` allowance for the six R5.4 files hides nothing about the +produced files but means the draft folder is not yet compared whole (R5.4 removes it); the +seed guard of `--out` compares canonical paths, then the file identity (device, inode) of +every ancestor of the destination with that of the seed folder and of every folder under it, +so a second mount path of the seed or of any of its folders on the same device is refused +too (a share mounted twice on distinct devices is not told apart; every write is still +`create_new`); id comparisons use hash sets (cite, declared references, duplicate ids); `--check` refuses a generated +folder that is not itself a folder of the seed (a link there is never listed through); the +touch marks are a reserved prefix (a NUL character starts it), refused in any authored value +at parse and in any field path segment at the op, and removed after each change, so no mark +reaches a record or the document; the migration-map replay quirk above +is reproduced, not fixed; the emoji, Markdown and Unicode-table risks of §11.11 stand. + +Conditions for R5.4: the owner's validation of this checkpoint; the review drawings +compared as parsed trees against the xmldom files (declaration, prefixes and whitespace +declared), on the R3 layer and compose; `CHANGELOG.md` and `REVIEW-REPORT.md` byte for byte +through `markdown.rs` (the pre-Prettier digests of the ledger as the intermediate check); +the pending list of `--check` removed so the draft folder is compared whole. + +### 11.14 R5.4: the review files in Rust and the whole-draft check (2026-10-23) + +Owner go « Validation R5.3 et autorisation conditionnelle R5.4 » (2026-10-23), conditional on a +fresh verification of the final R5.3 state: met on c6e0d85 (CONFORME 13/13, security PASS with +LOWs only, §11.12). Contract `.claude/tasks/contracts/2026-10-23-rust-r5-review.md`. + +`crates/core/src/curation/draft` gains 1,698 lines (4,606 in all), plus `curation/report_guard.rs` (258): + +| Module | Ports | +|---|---| +| `labels.rs` | the French labels of kinds, levels and priorities (`labels.ts`) | +| `stats.rs` `stat_rows` | `statRows`: labelled rows, fixed order, counters in their key order | +| `changelog.rs` | `compactValue` (labels as `fr / en`, other values as `JSON.stringify`, cut to 120 UTF-16 units with `…`, a cut inside a surrogate pair giving U+FFFD as the file write did), `recordSubject`, the comparison, migration and per-level tables, the intro | +| `review_report.rs` | the ten sections of `review-report.ts`: initial quality, errors, corrections, additions, restructures, uncertain items, translations, clinical vigilance (changed vet flags, flags per zone), bibliography (URL and DOI, citation counts), professional decisions (priority then id by UTF-16 units, stable) | +| `drawing.rs` | the frozen `horse.svg` read by the core's one SVG reader (refused if anything is removed), its prolog (the XML declaration and its line break) kept verbatim in front of every drawing | +| `overlay.rs` | `renderReviewOverlay`: the view's frame, the markers (unchanged, moved, added, removed, the previous position of a moved one), shapes, titles, labels, the legend, the font size from the frame width; numbers printed as `String(number)` | +| `app_review.rs` | `renderAppReviewDrawing` on the R3 layer (`render_layer`, `view_box_of`) the editor canvas uses | +| `svg_compare.rs` | how a produced drawing is compared with the committed xmldom file: bytes, else parsed trees after the one declared rule | +| `pipeline.rs` | `render_draft_artifacts` complete, in the TypeScript order: document, assets, sheet-ref, migration map, the overlays and the application's drawings per view, CHANGELOG, REVIEW-REPORT, seed SQL | +| `bin/import_equine.rs` | `--check` compares the 6 + 12 files with explicit criteria (byte identity; the application's drawings may fall back on parsed trees under the declared rule, printed as `declared:`); a file missing, not produced or different fails; the pending list and its `shortcut:` are gone; `--out` writes the 18 files | + +Parity, every expectation written by the TypeScript (`tests/curation_review.rs`, 12 tests): + +- `CHANGELOG.md` (1,114,533 bytes) and `REVIEW-REPORT.md` of the committed draft byte for byte; + their raw texts equal the ledger's pre-Prettier digests, the aligned texts its digests; +- `review/annotations-main.svg`, `review/annotations-head.svg` and `review/app-head.svg` byte for + byte with the xmldom files; +- `review/app-main.svg`: the one declared difference, measured to the byte (test + `app_main_differs_only_by_the_r3_trigger_names`): the head trigger, which has no name of its + own, carries `data-anno-name-en="Head (left lateral view)"` and the title `Tête (vue latérale + gauche) / Head (left lateral view)`, where the TypeScript renderer wrote the French name + twice; this is the R3 owner decision of 2026-10-15, the name the editor canvas already shows + (a tooltip and a data attribute: no shape, colour, position or frame changes); +- four synthetic cases written by the TypeScript on the mini sheet and a small drawing + (`oracles/r5/review-synthetic.json`, generator + `packages/anatomy/tests/r5.review-synthetic-oracles.test.ts`): pipes and line breaks in + cells, a value over 120 units, accents and guillemets, a vet flag change, a translation, a + level C question at priority high and at low, a restructure, a removal, cited references + (their URLs null; the URL and the medium priority are covered by the equine report: 35 URL + lines, 5 medium-priority questions), a + moved, an added and a polygon marker, a path marker on a detail view framed by its view box, + a sheet with nothing but a level A change: raw and aligned Markdown byte for byte, the + overlays byte for byte, the application's drawings byte for byte or under the declared rule; + an emoji in a cell gives the same raw text and a declared refusal: the report guard refuses it + first (`UnsupportedMarkdown`, a character outside the allowlist), before the aligner's + `UnsupportedWidth` (R5.2) is reached; +- two runs byte-equal; an undeclared difference (a colour, a coordinate) refused with and + without the rule. + +`pnpm r5:import-equine --check`: `legacy-import: 6 files, 0 differences`; `draft: declared: +review/app-main.svg (byte-identical once the R3 trigger-name rule is applied)`; `draft: 12 +files, 0 differences`. `--out` then `diff -r`: legacy identical; draft identical but `app-main.svg`. + +R5.3 carry-over (final gate LOWs, not applied to the verified state): an existing destination +folder is itself identity-checked against the seed's folders; a failed seed walk reads `the seed +folder cannot be read` instead of `inside the seed folder`; the cite check against the item's +existing citations is hashed; the stale test comment fixed; the §11.12 nits (the inherited row +covers a later removal; the 200,000-value row; the line count at the close; the +set-without-value case counted among the schema refusals). + +Markdown beyond the table alignment (found by the R5.4 gates: three verifier differentials and +three security probes, each round finding a Prettier rewrite the previous rules missed). Prettier +also rewrites Markdown in authored text (escapes, emphasis, whitespace, links); the port +reproduces only the table alignment. After a denylist that leaked round after round, the guard of +the draft's two reports (`curation/report_guard.rs`, `format_report`; the R5.2 import report keeps +`format_markdown`, verified at R5.2, which gained at R5.4 the cell-count refusal and the table +bound below, both shared with the import report) is an allowlist: outside code spans, letters and digits, +single spaces (none at a line end), the punctuation `.,;:!?'"«»()[]{}/-–—…%°≠=+#<>’‘“”±→×≤≥|`, an +`&` before a space or as a URL's query separator (`&name=` in a bare URL, the name starting with +an ASCII lowercase letter and not with one of HTML's 106 legacy references, which Prettier decodes without a `;`), an underscore +between two ASCII letters or digits and not glued to a URL (`http://`, `https://`, `www.`), a +backslash before `"` or `|` (a JSON quote, the cell escape), `**word**` with one run of letters +between spaces or line edges (the import report's form), and no inline construct (an inline link, +image or reference `](`, `][`; an image reference `![`; a `[[` before a space with a `]]` after +it, or a `]]` after a space with a `[[` before it; `<` before an ASCII letter, `/`, `!` or `?`: an HTML +tag or an autolink; a character reference `&name;`, `&#n;`; a liquid bracket `{%` or `%}`); no plain underscore followed later on +its line by one that can close an emphasis (inside a later code span, before anything but an ASCII +letter or digit: Prettier's parser paired `to_do … \`ref_\`` across the span); an authored text +holds no backtick (titles, rationales, questions, citations, URLs, DOIs, values), so code spans are +written by the generator from ids, targets, field names and file paths; a code span admits only +that alphabet, `[A-Za-z0-9_:/. -]`, never empty, no outer space (the template's +`pnpm import:equine` holds the one inner space), and a field segment an op names is limited to +`[A-Za-z0-9_-]` (refused at the op otherwise: a `]` there closed an author's `[` across the span); +a table row with another cell count than its header is refused; a list-item field (title, +rationale, question, citation, URL, DOI, vet-flag value) shares its line with the change's other +fields and code spans, so it refuses a control character and any wiki-link or liquid bracket +(`[[`, `]]`, `{%`, `%}`) whole, wherever its partner sits on the line (a table cell is parsed on +its own and keeps the per-cell rule). Everything else is +refused with `UnsupportedMarkdown`: a character outside the set is refused by default; the forms +built from admitted characters are ruled one by one, so a form no rule names and no probe covers +could still pass. + +The guarantee is empirical, not a proof of Prettier's behaviour: the TypeScript sweep +(`oracles/r5/markdown-sweep.json`, generator `packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts`, +digests of the raw and formatted reports) holds 798 probes: 48 characters in six positions, +whitespace patterns, Markdown constructs, the families each gate round found (strong pairs, URLs, +non-terminated references, image references, nested padded wiki links, authored code spans and +underscores paired across them, with the cited reference named `probe_ref` and, for three probes, +`probe_ref_`; eight construct pairs opened in the title, the rationale and the other fields and +closed in the question: `[[`/`]]`, padded and unpadded, `{%`/`%}`, `[x`/`](y)`, `*`, `_`, ``), +and 400 strings from a +seeded generator over an alphabet that includes `&#`, `&`, `<`, `![`, `[[` and `]]`, each placed in a title, a rationale, a question, a citation, a label after a +word and a label alone (a cell start). Result (test `every_probe_is_formatted_as_the_typescript_or_refused`): +268 probes byte for byte with the TypeScript, 530 refused, 0 silent difference; a probe made only +of what the equine reports use, outside the constructs, is never refused (a polygon's +`[[10,10],…]`, the DOI's `<0697:toih>` and the URLs' inner underscores pass). The equine reports +pass the guard unchanged. + +| Input | TypeScript | Rust | +|---|---|---| +| authored text outside the allowlist: Markdown Prettier rewrites (`*x*`, `_x`, `x_**a**`, `**a****b**`, `Voir_https://…`, `a b`, a non-ASCII space, a tab, a line break in a list item, `` `` ``, `a\|b`, `[a]()`, `[[ a ]]`, `*`…), the constructs refused whole (links, HTML tags, autolinks, character references) and any character outside the admitted set (pictographs, symbols, combining marks without the Alphabetic property; an alphabetic mark such as U+0345 is a letter and Prettier aligns it alike) | written, then rewritten by Prettier (escapes, `_emphasis_`, collapsed spaces, indented continuation lines, normalised links; a row with an extra cell), or kept | refused (`UnsupportedMarkdown`), even where Prettier would have kept the text | +| a pictograph in a table cell (an emoji, and ©, ®, ™, ✓, ★, ⚠ and the other characters `text::is_emoji_candidate` lists) | measured with Prettier's tables | refused, loudly: in the draft's two reports by the guard first (`UnsupportedMarkdown`, outside the allowlist), the aligner's `UnsupportedWidth` (R5.2) applying there only to the alphanumeric candidates (Ⓜ, 🅰) and in IMPORT-REPORT; the set is wider than the emoji | +| aligned report tables past 32 Mi display columns in all (rows × padded row width, the CHANGELOG's three level tables summed; the equine CHANGELOG's widest table is about 0.5 MB): one long authored cell pads every row of its level, so an 80 KB rationale over 14,000 records asked for 1 GB (security gate R5.4 round 6) | Prettier aligned it (the same amplification) | refused (`Guard`): the CHANGELOG's tables are projected from their cells (bytes bound the display width) before the raw table is joined (test `a_changelog_whose_alignment_would_explode_is_refused_before_it_is_built`, through the pipeline), every other table in the aligner before any padded row is built (test `an_aligned_table_past_the_bound_is_refused_before_it_is_built`), import report included | +| records weighing more than 16 Mi units in all (`records::record_weight`, about the bytes in memory: 64 per JSON value and per string, plus one per byte of text, for the values, the change and the op, which each record clones; the equine records weigh 1,966,163; an add or a move also clones its position anchor): a rename or a remove records the whole item and one op, or the B/C marking, records once per item it reaches, so 400 renames of a 5,000-child item asked for 4.3 GB (round 7), a level B add of 10,000 children with a 128 KiB rationale 1.37 GB inside one marking, a 64 KiB value set over a subtree 2.0 GB (round 8), 200,000 one-character reference ids cloned into each record 948 MB at one unit per byte (round 9) | recorded (the same copies) | refused at the record that passes the bound, charged before the change and the op are cloned into it (`records::charge`, tests `the_records_cannot_outgrow_their_bound`, `the_records_bound_holds_inside_one_op_and_the_marking`); the raw report rows, built from the records, are bounded with them; the 200,000-value document bound now holds the baseline (test from a padded baseline) | +| review drawings past 64 MiB in all, projected as an upper bound before any is rendered (`pipeline::review_drawings_bytes`: per view, the cleaned drawing twice with 4,096 bytes each for the drawing's fixed parts (layer group, overlay group and legend), plus for each annotation of the view in the overlay's two documents and in the application's drawing 1,024 bytes and 24 times its JSON text and the longest view name, four copies escaped up to six times longer; the equine draft projects 1,406,812 bytes for 564,239 written): 2,000 views asked for 547 MB (security gate R5.4 round 8), unnamed triggers repeating a long opened view's names 131 MB from a 485 KB changeset (round 10) | written | refused before rendering (`pipeline::MAX_REVIEW_DRAWINGS_BYTES`, tests `review_drawings_past_their_bound_are_refused_before_rendering`, `unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering`; the projection bounds what is written, a draft without annotations included: test `the_drawings_projection_bounds_what_is_written`) | +| an id an `add` writes (the item's, and those nested in its `children` or `categories`) or a `rename` id that is not a stable id (a region code for a region), or a field segment outside `[A-Za-z0-9_-]` (a control character, NUL included, a backtick, a `]`, a space, a non-ASCII letter) | accepted when a later op removed or renamed the item: the raw id stayed in the records and reached the reports' code spans (a line break there forged a section, security gate R5.4 round 2) | refused at the op, the check the final document applies anyway (test `ids_and_field_segments_that_could_forge_report_structure_are_refused`) | +| a label, id or path holding a code point XML 1.0 refuses, or a carriage return, in a review drawing | written (a non-well-formed file; a raw CR read back as a line feed) | refused: the drawing is not written | + +The drawing comparison hides nothing (security gate, MEDIUM): the rule fallback of `--check` +requires the committed file to rebuild byte for byte from its tree (so no comment, processing +instruction, encoding or entity form can escape the comparison), the rule to change that tree, +and the rebuilt text after the rule to equal the produced one byte for byte; `declared:` is +printed only then (test `the_rule_fallback_refuses_what_the_tree_does_not_carry`: a stylesheet +processing instruction, comments, a trailing comment and another declared encoding refused). +The committed drawing is read by the core's reader before any other parse, so its depth cap +holds (a 100,000-level file is refused, never a stack overflow). The overlay prints a coordinate +that overflowed as `Infinity`, as `String(number)` did. The renderers are indexed (citation +counts in one walk, previous markers and kept ids hashed, subjects grouped per change). + +Tests: `cargo test -p faunosteo-core --features curation` (review 12, Markdown 2, draft 18, +importer 5, binary 3, formatting 7, plus the crate's suites); anatomy 144 (two generators added). + +### 11.15 Checkpoint R5.4 + +Graphic differences for the owner's validation: none in shapes, colours, positions or frames; +one text difference in `app-main.svg` (the trigger's English name and tooltip), already decided +at R3 and identical to the editor canvas. + +Residual risks: the reports admit an allowlist of characters and forms and refuse the rest, +including text Prettier would have kept (links, HTML, character references, symbols, combining +marks, non-ASCII spaces, most uses of `*` and `_`): a future changeset using them stops the +pipeline, visibly, until the allowlist is widened from new TypeScript probes or the port grows a +Markdown printer; the allowlist is proven by probes, not by a model of Prettier: each gate round +of R5.4 found a family the previous rules missed (Markdown syntax, constructs, strong pairs and +URLs, then non-terminated references, image references and nested padded wiki links, then +authored code spans and underscores paired across code spans, then wiki links opened in one field +and closed in another and field segments closing an author's bracket from a code span), each now +ruled and frozen in the sweep, so a combination of admitted characters no probe covers could still +differ; the comparison of the application's drawings accepts +exactly the trigger-name rule, byte for byte; the frozen +`horse.svg` is read, never regenerated, so a future change of the drawing needs its own +decision; the record that passes the bound has been built before it is refused (one item copy +and one clone of the op's value, at most twice the 16 MiB read cap), and a subtree set writes its +value into each item before recording it, so the document holds at most as many copies as the +records bound admits; the comparison of `--check` looks up each trigger's view linearly (views × +triggers, the views bounded through the drawings bound); parsing `changes.json` (R5.3 code) holds +about 65 times the file in memory (about 1 GB at the 16 MiB read cap, security gate R5.4 round 9), +before any bound of the applier applies, and `references.json` goes through the same parser (the +same order, not measured); two scans are quadratic but out of reach or bounded (security gate +R5.4 round 12): `report_guard::underscore_pairs_later` on a line of many code spans and plain +underscores (53.7 s on a synthetic 900 KB line; the generator writes at most two plain parts +that can carry an authored `_` per line, so it stays linear), and `pipeline::review_drawings_bytes` +walking views × annotations before its bound applies (about 2 s at the 200,000-value document +bound); and the allowlist admits the invisible Hangul fillers (U+3164, U+115F, U+1160, +U+FFA0, letters Prettier keeps, no structure); the residual risks of §11.13 stand. + +Conditions for R5.5: the owner's validation of this checkpoint; the upload tool (`ureq`, the +service key from the environment, bucket `anatomical-sheet-assets`, key `.svg`, +`upsert: false`, bytes verified against `assets.json`, RPC `confirm_sheet_asset_upload`) run +against the local stack only, with its runbook. + +### 11.16 R5.5: the sheet-asset upload tool, the R5.4 closing adjustments (2026-10-23) + +Contract `.claude/tasks/contracts/2026-10-23-rust-r5-upload.md`. Owner brief « Validation R5.4 et +autorisation conditionnelle R5.5 ». + +**Tool.** `upload-sheet-assets` (`crates/core`, feature `upload` = `curation` + `ureq`, the version +the worker already uses; `pnpm assets:upload [--check] `). The rules are the core's +(`curation::upload`: manifest, destination, bytes through the one SVG reader, plan from the observed +state, closed error kinds); the binary owns the file system, the environment and the network, split +in `main.rs` (flow, files) and `storage.rs` (HTTP). It replaces `packages/supabase/scripts/ +upload-sheet-assets.ts`, kept as `assets:upload:legacy` until the R5.7 census. Behaviour and runbook: +SUPABASE.md §3.1. Differences from the TypeScript tool, all refusals added: no default destination +(a local address with an explicit port is required); an existing object is hashed, not trusted by its +name; a missing or foreign asset row stops the run instead of failing after the upload; the whole run +is planned before the first write; the file must pass the SVG reader with nothing removed; sizes and +entry counts are capped; nothing is overwritten, deleted or made public, ever (`x-upsert: false`, no +DELETE, no bucket call but the read). + +**Destination rule.** `http`, explicit port, no credentials, path, query or fragment; host `localhost`, +a loopback address, or the private IPv4 address equal to `FAUNOSTEO_DEV_HOST`. A name other than +`localhost` is never accepted (it cannot be proven local without resolving it). The handshake then +checks the private bucket and the key before any object is read or written. The DEV address counts only if a socket can be bound to it (an address of this machine). A +local port held by something else would receive the key: accepted on a single-user machine, the same stance as the +worker's `SUPABASE_URL`. + +**Tests.** `curation_upload` (7: manifest family, bytes, 15 destination refusals + DEV host rule, +plan), `upload_tool` (12, the binary against a loopback stub with a made-up key: `--check` writes +nothing, run then rerun, different bytes never overwritten, missing and foreign row stop before any +write, 401/403, resume after a failed confirmation, unreachable port, refused destinations, folder +outside the seed, usage, an oversized object refused once as `State`, a DEV address that is not this +machine), `curation_caps` (4). **Not run by the assistant**: the session against the +real local stack (`pnpm e2e:sheet-assets`: upload, rerun, anon key, wrong key, refused destinations, +unreachable port); the assistant's own run of the tool with the service key was refused by the +permission layer (CLAUDE.md: no transfer tool run by Claude) and was not retried by another route. +The owner runs it. + +**Read caps (owner §3).** `changes.json` and `references.json` are refused above 4 MiB, by name, in +the core (`MAX_CURATION_FILE_BYTES`, checked before the parse) and in the binary (bounded read, the +bytes read are counted as well as the size seen). Measured: 221.5 KB and 17.3 KB committed (about 19 and 240 +times under the cap); `--check` peaks at 18.5 MB resident; a synthetic changeset of 765 changes +(3.98 MB, ids renumbered) parses at +39 MB over a 7 MB baseline, about 10 times the text. The 65 times +of the R5.4 round-9 security gate (§11.15) is a worst-case shape of many tiny values; at the 4 MiB cap +that is about 260 MB where the 16 MiB read cap allowed about 1 GB. Other budgets (document depth and +values, records, drawings, the 16 MiB read cap for every other source) unchanged. 4 MiB leaves a +wide margin; a future multi-species changeset is a business-contract question and is not decided +here. + +**Owner decisions applied.** Quadratic scans (§5): kept, debt recorded in §11.15, no rewrite without +a measured problem. URLs in titles, questions and justifications (§4): kept verbatim in the data and +in the Markdown reports, no active HTML produced; an interface shows them as untrusted text. Divergent +refusals (§6): invalid field segments, ids outside the stable-id grammar, inputs over the budgets, each +a controlled `PipelineError::Source` or `Guard`, none dropping authored data; the grammar is the +sheet contract's `^[a-z0-9][a-z0-9_-]{0,63}$`, species-neutral (`curation_caps` checks ids of other +species). Markdown stays an allowlist: an unreproduced form is a loud refusal, never a different file. +FLOOR (§2): the clarification is in the R5.4 contract, with `scripts/floor-clarification-check.sh`. + +**Serde tolerance of the R2 contracts (owner §7), characterisation only; nothing changed.** +Structures: every serde-derived contract of `domain/{sheet,report,archive}`, read by the gated +readers (`report/read.rs`: `Report::deserialize` for v3, `ReportV2::deserialize` for v2; +`archive/read.rs`; the PDF import path). Two tolerances: a struct is read from a positional array, +and a unit enum variant from a one-key map. Probed on Report v3 (test +`characterisation_serde_tolerance`, which pins today's verdict): + +| Input (minimal change of `report-v3.demo.json`) | Rust now | Historical Zod contract | +|---|---|---| +| `"sheet": [sheetId, null, documentSha256]` | accepted | refused | +| `"practitioner": [name, cabinet, contact, siret]` | accepted | refused | +| `observations[0].severity` = `{"mild": null}` | accepted | refused | +| a zone written as an array (probe, not pinned by the test) | accepted when the types of the positions fit the fields, whatever they mean; refused in the probe because a label landed on `laterality` | refused | +| `"extra": 1` (unknown field) | accepted | accepted (non-strict objects) | + +Consequence of accepting: a hand-built or foreign attachment imports; the report is re-serialised in +the canonical object form, so nothing stored is non-canonical, but a positional array read in the +wrong order assigns values to the wrong fields without an error when the types agree (an integrity +risk for crafted files, not a memory or code-execution one). Consequence of refusing: only files the +application never produced are turned away. Risk for R2, R3 and R4 archives: none either way, every +archive the product wrote is in object form (the frozen envelopes round-trip, `report_contract`, and the +N-1 suites), so a strict reading rejects no golden and no fixture. Proposal: the guard already used for +the authored files (`draft/shape.rs`: compare the input with its typed reading serialised back) at the +three reader entries, per-file go of the owner, decided before R5.6 since the membership test touches +the same readers there; until then the gated readers are unchanged. + +Open points carried: debt list of §11.12 and §11.13 stands (migration map cascade replay, `clippy.toml` +I/O list); the upload tool is not run against the real stack by the assistant. + +Gate round 1 (2c44506 + a481af5): `pnpm check:all` green 21:21:38; security PASS (1 MEDIUM, 9 LOW, +`.claude/audits/2026-10-23-rust-r5-upload-security.md`); fresh verifier ECARTS(4) +(`.claude/audits/2026-10-23-rust-r5-upload-verify.md`): an object over the size cap was classified +`Network` and retried (now a final `State`, test), "retried three times" meant three attempts (now four, +one try and three retries), the runbook's exit codes (fixed), the FLOOR script could not print OK while +the declared `evals.md:205` line stands (it is now listed as declared, still not requalified). Security +fixes taken: keys off every argv in `sheet-assets-e2e.sh` (M1); the tool is compiled without the key in +the environment, then run (L1); the DEV address must be one of this machine's (L2); a malformed request +is final, not retried (L3); CLAUDE.md names the three files allowed `std::fs` (L7). Kept and declared: +the cleartext key on plain http to a local port (L2), the file-read race mitigated by the hash (L5), the +pre-existing `confirm_sheet_asset_upload` that does not re-check the hash (L6, SQL outside R5.5), the +waived fixture lines (L8), the serde tolerance (L9, owner decision). Outside the diff, reported by the +audit and not verified: `supabase/config.toml` sets no JWT secret, so the local stack likely uses the +CLI's public default keys while port 54321 is open to the LAN. + +Gate round 2 (fad85c0): `pnpm check:all` green 21:47:11; targeted fresh verifier: C1 to C13 MET, C14 +open only on these two gates, now run; security PASS, 5 LOW kept and declared +(`.claude/audits/2026-10-23-rust-r5-upload-security-2.md`): `Protocol` errors (also a key with +non-ASCII bytes) are retried and end `Network`; the DEV-address bind accepts the subnet broadcast (the +kernel then refuses the connection, the key is never sent, the run ends `Network`); the launchers run +`target/release/…` and ignore `CARGO_TARGET_DIR`; the FLOOR declared line is pinned by line number; the +non-local DEV-address test assumes 10.255.255.254 is not local (false on WSL2). + +### 11.17 Checkpoint R5.5 + +Done: the upload tool in Rust with its runbook, the R5.4 closing adjustments (4 MiB curation cap, FLOOR +clarification, serde characterisation). Not done by the assistant: the run against the real local stack +(`pnpm e2e:sheet-assets`, by hand). Open for the owner: the STUB line `evals.md:205` (FLOOR, declared), +the serde tolerance decision before R5.6, the local stack's likely default keys with 54321 on the LAN. + +Prerequisites of R5.6: the owner's go; the convention `sha256-rfc8785-validated-v1` (D-R5 B, BDR-068) +with its RFC 8785 vectors and the independent differential; the aliases of the historical fingerprints +taken from trusted frozen documents only (the census `.claude/audits/R5_DOCUMENT_SHA256_CENSUS.md`: +the one stored historical fingerprint is `27c7383c…2660`; its other digests, `91e459f4…14c2` of +`legacy-import/document.json` and `eaf891f4…5d54` of the draft's `jsonb::text`, are stored nowhere and +are not aliases), never from an archive or a bundle; the per-file go +for the membership test in the gated readers (`report/rebase.rs`, `archive/read.rs`, `pdf/import.rs`), +together with the serde decision above; the seed regenerated once by the Rust tool and the assets +re-uploaded only if their bytes change (they do not: `horse.svg` is frozen); `.prettierignore` on the +Rust-written paths; the migration-map cascade debt (§11.12) fixed before any changeset renames a view, +zone, region, category or cited reference. + +### 11.18 R5.5 closed; targeted corrections before R5.6 (2026-10-24) + +Owner brief « Clôture R5.5, corrections ciblées et préparation R5.6 ». Contract +`.claude/tasks/contracts/2026-10-24-rust-r5-5-closing.md`. + +**Real local stack: PASS, run by the owner by hand** (`pnpm e2e:sheet-assets`, 11 checks, verdict +`e2e:sheet-assets OK`). This result is the owner's, distinct from the assistant's simulated-server suite +(`upload_tool`); the assistant did not rerun it. R5.5 is closed. FLOOR clarification and the 4 MiB cap +accepted; `evals.md:205` stays declared, not requalified. + +**Two LOW corrections.** `Protocol` errors (a malformed HTTP answer, a key a header refuses) are final, no +longer retried (test `a_malformed_answer_is_final_and_not_retried`: one request, exit 1). The DEV address must +be an own unicast address: bound, then connected to itself (no packet) with that address kept as the local end; +a subnet broadcast binds but refuses the connect (binary test over the host's `inet` and `brd` addresses). The +other LOW reserves of §11.16 stay tracked. + +**Serde hardening of three v3 shapes (owner go).** `report::read::check_v3_shape` refuses on the raw value, +before the typed read, `sheet` or `practitioner` not an object and an observation `severity` not a string +(`ReadFailure::Invalid` with the field named at `read_report_document`; a `serde_json::Error` at +`parse_envelope`, whose caller drops the copy as before). The report, each observation and the envelope +must be objects themselves, or a positional parent would carry those fields past the check (found by the +closing gates, test `a_positional_parent_does_not_carry_a_refused_shape_past_the_check`). Called at the two entries that read a v3 report from outside: +`read_report_document` (v3 branch: PDF import, bare archives, draft restore) and `parse_envelope` (the session's +archive copy). Nothing else narrowed: an unknown field and an absent `severity` are read as before; `null` +severity was and stays refused (optional, never nullable). Test `characterisation_serde_tolerance` turned +around (6 cases, the envelope entry and positional parents included). Every R2-R4 suite, the PDF import suites, the envelope goldens and +the N-1 reader pass unchanged; no authentic archive was rejected. Not covered by the go, left as is: the same +derives on Report v2 and on the other contracts. + +**`confirm_sheet_asset_upload`, characterised (no SQL change).** EXECUTE revoked from `public`, `anon`, +`authenticated`, granted to `service_role` only (migration 20261009100000; pgTAP 006: an editor gets 42501, +the service role confirms, twice is idempotent; `anon` is covered by the grant, not by its own assertion). The +function sets `uploaded_at` for the row id without checking that `.svg` exists in `storage.objects` or +that its bytes match: a service-role caller can confirm a row with no object or with other bytes under the key. +Not exploitable from an API role: no INSERT, UPDATE or DELETE policy exists on the bucket, so only the service +role can place bytes, and the service role already bypasses RLS. In the tool, the row is confirmed only after the +object is read back and hashed. Debt before any public exposure: check the object's existence (and size) in the +function. On DEV, see the next point: the service role is reachable from the LAN today. + +**DEV stack (owner §5).** Measured without printing a secret: the stack uses the Supabase CLI's public default +JWT secret, the service key is the public demo key (`iss: supabase-demo`), and 54321 is open to the LAN by +design, so a device of the network can act as `service_role` on DEV. The checks to run for 54321 (listener, UFW, +rootless or rootful Docker, a probe from another device) and the two remedies are in ENVIRONMENTS.md §3.6. No +firewall or configuration was changed. + +**R5.6 prepared, not started.** Plan `.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md`. + +Closing gates round 1 (257a29b): `pnpm check:all` green 03:39:24; security PASS (2 MEDIUM, 6 LOW, +`.claude/audits/2026-10-24-rust-r5-5-closing-security.md`); fresh verifier ECARTS(2): the shape check was +blind under a positional observation or envelope (fixed, as above), and a stale "or null" message (fixed). +Also fixed: a multicast address no longer counts as an own address (it binds and connects on Linux; the +private-range rule masked it end to end). Kept: the binary's own-address test checks nothing more than +loopback where `ip` is absent; the internal typed re-reads (`pdf/write/export.rs`, `ops.rs`, the export input of +`facade.rs`) read values the core itself built or the page's own state and skip the raw shape check; the other nested v3 fields and v2 keep serde's leniency +(outside the go). + +Closing gates round 2 (1ec9e1b): `pnpm check:all` green 03:51:55; targeted fresh verifier K3 MET, K4 met in +behaviour (23 bypass probes refused, a census of 157 repository JSON files finds no authentic shape refused, +`--features cli` 261 passed), ECARTS(2) formal: the `parse_envelope` error type and an audit-prose FLOOR line, +both settled by a contract Clarification submitted to the owner. + +### 11.19 R5.6 prepared: the fingerprint convention and its registry, not active (2026-10-24) + +Owner brief « Validation R5.5, arbitrage D-R5.6 et préparation de la bascule ». Convention +`sha256-rfc8785-validated-v1` confirmed; the core's compiled registry is the only alias authority; five +consumers approved (`report/rebase.rs`, `archive/read.rs`, `session.rs`, `pdf/write/input.rs`, +`pdf/compare/lines.rs`); Rust becomes the only generator at the switch. **Nothing is active**: no reader, +writer or generated file uses the new module; `pnpm r5:import-equine --check` gives 0 differences and +`documentSha256` stays `27c7383c…2660`. + +**Committed (inert).** `domain/sheet/fingerprint.rs`: `canonical_json` (RFC 8785: UTF-16 member order, +`js_number`, the `JSON.stringify` escape set, no normalisation, I-JSON numbers only), `sheet_fingerprint` +(feature `fingerprint`: strict parse, R2 shape, zero integrity issue, JCS of the typed reading, SHA-256), +`TRUSTED_ALIASES` (one entry: sheet `503dc301-…`, canonical `12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2`, +alias `27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660`, convention of the alias +`sha256-prettier-file-bytes-v0`), `equivalence` (Identical, TrustedAlias, Different; the pair must belong to +the same sheet, either way round; raw values stay with the caller) and `check_declared` (a `sheet-ref.json` +block must name `v1` and list only registered aliases of that sheet and canonical value). +Tests `sheet_fingerprint` (9): the RFC vectors, the 44,322-row V8 number oracle, the independent Node +reference (`scripts/r5-fingerprint-differential.mjs`, own canonicaliser, frozen once into +`oracles/r5/fingerprint-differential.json`, 7 cases: ES number edges, UTF-16 key order, escapes, nesting, +repeated keys), the draft's value recomputed equal to the frozen `b_rfc8785_validated`, invalid and +malformed documents refused, the registry contract, and the census of the historical archives (147 PDF +attachments and the JSON fixtures: 124 sheet stamps, 123 are the alias and open as the same document, the one +other stays different). + +**Prepared, not applied: `.claude/tasks/plans/r5-6-switch.patch`** (applies cleanly on this commit). The +five consumers through `equivalence` (rebase skipped on the registered pair of the same sheet, the stamp kept; +archive snapshot pair; export sheet match; `report-compare` prints both raw values for an alias match; `session.rs` +needs no own change, it goes through the rebase), the generator stamping `sheet_fingerprint` and writing the +descriptive block, the sheet load refusing a block that contradicts the registry (`loaded.rs`, `facade.rs`: +`invalid_sheet`), `.prettierignore` on `legacy-import/` and `draft/`, and the rehearsal suite +`fingerprint_consumers` (3: alias not rebased and stamp kept, real change and forged value rebased, archive pair +kept and forged pair rejected). Rehearsal, corrected by the fresh verifier: `pnpm rust:check` and `pnpm check:all` +(14:32:05) were green with the five consumers wired only, before the generator, load and `report-compare` parts +were added. With the whole patch on the current seed: the `cli`, `fingerprint` and default suites are green, 4 tests +of `curation` fail (below). With the seed switched as well (verifier's simulation in a scratch copy), 3 more fail: +the 2 `fingerprint_consumers` cases whose precondition reads the seed as `27c7…`, and `pdf_import` +`o7_locate_and_read_match_the_typescript`, whose frozen R4 oracle records the stamp of migrated v2 reports +(`scan.report-v2-{full,minimal}.pdf`), which follows the migration map to `12d7…`. Neither suite has run +end to end on a switched seed yet. + +**Seed at the switch (measured with the patch, written to a scratch folder, never to the seed):** + +| File | Before | After | Why | Check | Rollback | +|---|---|---|---|---|---| +| `draft/sheet-ref.json` | sha256 `2c0716f1…b285`, `document_sha256` `27c7…2660` | sha256 `03e7f6ab…623b`, `document_sha256` `12d7…74e2` + block `fingerprint` {`convention`, `aliases: [27c7…2660]`} | the convention | `--check` byte-exact against the regenerated folder; the load check | `git revert` | +| `draft/report-migration-map.json` | sha256 `4139c51d…fce9`, `sheet.documentSha256` `27c7…` | sha256 `0e991bc2…2db`, `12d7…` | a migrated v2 report is stamped with the current value | same | `git revert` | +| the 16 other files | unchanged | unchanged (`document.json`, `horse.svg`, `equine_draft.sql` compared byte for byte) | no content change | `--check` | n/a | + +To settle in the switch: four tests in two suites fail with the generator switched. Two expect it +(`curation_draft`: the draft files byte for byte against the TypeScript ledger, and the historical fingerprint +test): at the switch they compare the two files under a declared rule (the fingerprint field and block only), +the oracles untouched. Two in `curation_review`: `review_drawings_past_their_bound_are_refused_before_rendering` +needs the fingerprint after the drawings bound (order); `the_drawings_projection_bounds_what_is_written` builds a +draft with every annotation removed, an invalid document that now has no fingerprint, so its fixture has to stay +valid (reordering does not fix it). The O7 oracle and the switched-seed preconditions take a declared rule too. + +Gates on 3b9a395: `pnpm check:all` green 14:41:00; security PASS, 2 MEDIUM, 9 LOW +(`.claude/audits/2026-10-24-rust-r5-6-prep-security.md`); fresh verifier ECARTS(2) +(`.claude/audits/2026-10-24-rust-r5-6-prep-verify.md`): the patch broke the `report-compare` build (fixed in the +patch) and these docs claimed a green rehearsal (corrected above). Fixed after: the declared block is strict +(unknown keys refused), and `v1` refuses a value that is not 64 lowercase hex or that is itself a registered +alias (`AliasRefusal::NotCanonical`, test). Open for the owner, MEDIUM M1: on the alias path the report keeps +`27c7…` while a new export's snapshot takes `12d7…` from the loaded sheet; the frozen N-1 reader, a rollback build +and any pre-switch build compare the two strictly and would drop that envelope's snapshot (`sheet_mismatch`; the +report is kept, the archived labels lost), and the registry entry could then never be removed. Remedies: the +export writes the snapshot reference with the report's own stamp on an alias match (recommended: every reader +then sees one value, nothing rewritten), or the report is re-stamped at the rebase, or accepted with an N-1 test. +Open, M2 remainder: a `sheet-ref.json` without a block still loads unchecked (pre-switch bundles and the test +sheets carry none); refusing it at the switch means giving every test sheet a block. Also: the census asserts floors +(over 50 attachments, over 30 alias stamps), not the exact 147/124/123; 11 of the RFC's 24 appendix numbers are not +in the V8 oracle (they print right in a probe, unpinned); the `report-compare` alias line drops the draft/published +status the plain line shows. + +### 11.20 R5.6 rehearsed in isolation on the switched seed (2026-10-25) + +Owner brief « Validation de la préparation R5.6 et corrections préalables à la bascule ». Contract +`.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md`. The final patch `.claude/tasks/plans/r5-6-switch.patch` +(28 files) was applied, with the seed switched, in a detached worktree of 943a25a under the session +scratchpad; the branch's own state stays inactive (seed `27c7…`, nothing active). + +**M1, option 1.** `pdf/write/input.rs` `keep_the_report_stamp`: after `assert_exportable`, an old report on +the registered historical value of the same sheet, exported against the canonical value, archives a +snapshot carrying the report's own stamp; a new report keeps the canonical value. The equivalence is one +way (`equivalence(sheet, stamped, current)`: an old stamp against the canonical value, never the +reverse). The rebase and `report-compare` also need the loaded sheet's `fingerprint_verified` (set only +when a `v1` block was checked against the registry and its value recomputed from the document at load, +`loaded.rs` `check_reference`; hashing is no longer feature-gated, the wasm module carries `sha2`). The +export does NOT: `input.rs` sees only the snapshot, so it grants the pair on the snapshot's claimed value +(gate finding below). `archive/read.rs` +stays strictly equal: the M1 envelope holds one value, so no archive check is loosened. + +**v0 and v1.** No block: a historical reference, loaded as before, unverified, no alias privilege, never +`v1` (even with the canonical value: an old stamp then rebases). A block: known keys only, `v1`, 64 +lowercase hex, never an alias value, aliases only from the registry for that sheet and value, value +recomputed from the document; any contradiction is `invalid_sheet`. + +**Original contexts kept, new behaviour tested apart.** The pre-switch `sheet-ref.json` and migration +map are frozen under `crates/core/tests/fixtures/r5-6/pre-switch` and proven the TypeScript's files +against the R5.1 ledger. O7 (`pdf_import`), O10 (`pdf_compare`), the R2 Zod oracle (`r2-oracles`), the R5.1 +ledger (`r5.pipeline-oracles`), the TypeScript golden (`seed.golden`) and the app goldens (v2 reports taken +as migrated before the switch) run in that context, unchanged. Declared rule `R5.6-fingerprint-v1`: in +the two files only the fingerprint moves from alias to canonical value and `sheet-ref.json` gains the +block (`curation_draft`, byte-exact through the generator's formatter); `report-compare` prints the alias +line, status kept, both raw values, only for a report read as is (77 O10 rows; a migrated v2 report +carries the canonical value and keeps the plain line); a report on another document still prints `!!`. + +**Results on the switched state.** `pnpm rust:check` green; `pnpm check:all` green 00:56:22; `--check` +0 differences on 18 files. Suites: `r5_6_switch` 8 (the owner's nine scenarios: old PDF import, no +rebase, coherent re-export, current reader, pre-switch bundle, labels/views/annotations/branding kept, +new report canonical, forged and case-changed stamps, mixed envelope still rejected, real content change +rebases, load refusals), `sheet_fingerprint` 10 (census pinned: 147 attachments, 124 stamps, 123 alias), +vitest `r5-6.n-1` (the frozen N-1 scanner and Zod readers keep the re-exported snapshot and its +content) and app `r5-6.switch` (2). The app goldens and R4 digests are reproduced byte for byte by +re-exporting the historical reports on the switched sheet. Rollback: the pre-switch build's own +`report-compare` (this branch, unpatched) reads the re-exported PDF with the snapshot kept, matching the +bundled sheet. Generators: the Rust `--out` gives exactly the two switched files; the TypeScript +generator (`import:equine:legacy`) still writes the pre-switch files (`seed.golden`). + +Not done: the patch is not applied to the branch; `pnpm format` must never run over `.claude/` (it +rewrote the append-only audits in the worktree, reverted there). + +Gates on the rehearsal (patch at 82e2e43): security PASS, 1 MEDIUM, 6 LOW +(`.claude/audits/2026-10-25-rust-r5-6-rehearsal-security.md`); fresh verifier ECARTS(3) +(`.claude/audits/2026-10-25-rust-r5-6-rehearsal-verify.md`), one root cause: the export path has no loaded +sheet, so `assert_exportable` and `keep_the_report_stamp` grant the registered pair on the snapshot's +claimed value. Probe: a v0 sheet (no block, unverified) with the canonical value, the old demo report and the +core's own `build_sheet_snapshot` export with `27c7/27c7` where the pre-patch code answered `sheet_mismatch`. +The application cannot reach it (every stored report is rebased first, and the rebase checks the flag), the +core's export API can. The fix needs the snapshot builder, outside the approved files: decide the stamp in +`domain/archive/snapshot_rules.rs` `build_sheet_snapshot` (it holds the loaded sheet and its flag; called by +`ops.rs` `archive.snapshot`) and put `assert_exportable` back to strict equality, so the export never grants +an alias. Not applied: awaiting the owner. LOW kept: `"fingerprint": null` and a misspelt block read as v0 +(no privilege), public mutable `reference`/`fingerprint_verified` fields, a draft-allowed validation warning +would make a `v1` bundle unloadable, `canonical_json` recursion unbounded (trusted input today), stale +comments on `pnpm import:equine` in `scripts/import-equine.sh` and CLAUDE.md. + +### 11.21 R5.6 M1 corrected, full rehearsal repeated (2026-10-25) + +Owner brief « R5.6 : autorisation de correction M1, nouvelle répétition obligatoire ». Supersedes the M1 +mechanism of §11.20: `input.rs` `keep_the_report_stamp` is gone and `pdf/write/input.rs` is unchanged +from 943a25a (strict equality). Final patch `.claude/tasks/plans/r5-6-switch.patch` (30 files, baff882), +rehearsed in a fresh detached worktree of 8e77e37. + +**Cause of the defect.** The export only sees the snapshot (`ExportInput`), never the loaded sheet, so +it could not know whether the sheet's `v1` value had been verified; it granted the registered pair on the +value the snapshot claimed (verifier probe: a v0 sheet carrying the canonical value exported an old +report). + +**Fix.** The decision is taken where the loaded sheet is known: `domain/archive/snapshot_rules.rs` +`build_sheet_snapshot` (behind `archive.snapshot`) keeps the report's historical stamp only when +`LoadedSheet::recognises_historical_stamp` holds: the loader verified a `v1` block (private +`verified_fingerprint`, set only by `from_bundle`), that value still equals the reference, the registry +binds the stamp to it for this sheet id (one direction), and the current document recomputes to it at +the moment of the decision (so a mutated pub `document` or `reference` loses the privilege). The rebase +and `report-compare` use the same predicate; the export refuses any report whose stamp differs from the +snapshot's. `"fingerprint": null` and malformed blocks are refused (`present_block`); a `v1` fingerprint +refuses integrity errors and accepts draft warnings (`is_publishable`: the two warning rules are +allowed in a draft and never block publication; a warnings-only `v1` sheet loads); `canonical_json` is +bounded at 128 levels (`CanonicalError::TooDeep`, serde_json's parse limit). Public API: the patch's own +pub field `fingerprint_verified` becomes the method `is_fingerprint_verified()`; no released or wasm API +changes. + +**Gates on the exact final state.** `pnpm rust:check` green; `pnpm check:all` green 01:53:59; `--check` +0 differences; the Rust `--out` equals the switched seed for `sheet-ref.json` and +`report-migration-map.json` and leaves `document.json`, `horse.svg` and `equine_draft.sql` byte-identical. +`r5_6_switch` 14 (direct export API: unverified v0 refused, mutated document or reference refused, +another sheet id refused, contradicting `v1` content refused at load, `null` and malformed blocks refused, +warnings-only `v1` loads, the earlier scenarios), `sheet_fingerprint` 11 (depth 128/129), vitest +`r5-6.n-1` 2 (snapshot from the core's `archive.snapshot`; the v0 counterpart refused), app goldens and R4 +digests byte for byte. Security PASS, LOW only (`.claude/audits/2026-10-25-rust-r5-6-final-security.md`); +fresh verifier CONFORME 8/8 with its own direct-API probe (`.claude/audits/2026-10-25-rust-r5-6-final-verify.md`). +Wasm: 1,532,324 B raw / 518,018 B gzip before, 1,575,574 / 531,715 after (+43 KB raw, +13.7 KB gzip: `sha2`, +the canonicaliser, the load check); no wasm size budget is defined in the repository. + +Residual, not changed after the last gate: `equivalence` is public and grants from the registry alone (its +only caller is the proof predicate; make it crate-private at activation); stale comments in +`fingerprint.rs` (lines 6, 15, 246-247: "zero integrity issue", "will declare"); a page script can still +hand the export a self-consistent report and snapshot (no equivalence results, every reader decides again); +the rebase's exact-equality branch has no sheet-id check (since R2); `r5_6_switch` writes its re-export under +`/target/tmp` regardless of `CARGO_TARGET_DIR`. + +### 11.22 R5.6 active: the fingerprint convention `sha256-rfc8785-validated-v1` (2026-10-25) + +Owner brief « Autorisation officielle de la bascule R5.6 ». Switch commit **9e87016** on +`feature/rust-r5-pipeline-core` (the verified final patch, plus the owner's adjustments: `equivalence` +crate-private, its test moved inside `fingerprint.rs`; stale comments fixed; the trust boundary documented in +`fingerprint.rs`; two lines of ANATOMICAL_SHEET_MODEL.md; the new-report rollback file written by `r5_6_switch`). +Decision BDR-070. + +**Fingerprints.** The equine draft sheet `503dc301-a8b1-50d4-9e44-0919b2fc2916`: canonical `v1` value +`12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2`; historical value (SHA-256 of the +Prettier `document.json` bytes, convention `sha256-prettier-file-bytes-v0`) +`27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660`, the one entry of `TRUSTED_ALIASES`, +honoured only through `LoadedSheet::recognises_historical_stamp`. Report v3 `sheet.documentSha256` keeps 64 hex. + +**Seed.** Regenerated once by the Rust tool into a fresh temporary folder, compared file by file, the two +authorised files copied: `draft/sheet-ref.json` `2c0716f1…b285` → `03e7f6ab7ffba62007afa2bd39506c72b7034b07b54367d35adf7f7cc670623b` +(value + `fingerprint` block) and `draft/report-migration-map.json` `4139c51d…fce9` → +`0e991bc2b1e54668797706aa8b21670ff420926fad133b2077bfbae61ba6e2db`. `document.json` (`27c7…`), `assets/horse.svg` +(`0ea5202f…`), `equine_draft.sql` (`c5a24312…`) and every other file byte-identical; the fresh output's +`review/app-main.svg` differs from the committed one only under the R3 trigger-name rule declared since R5.4 +(not copied). `pnpm r5:import-equine --check`: 0 differences. `pnpm import:equine` is the Rust pipeline; +`pnpm import:equine:legacy` the TypeScript one until R5.7. The SQL seed's own header still names +`packages/anatomy` (frozen bytes, kept). + +**Trust boundary.** Equal fingerprints keep their historical meaning (the same reference string), which is no +proof of content: an API taking caller-built data (an export input, a hand-made bundle, a mutated pub +`reference`) is trusted for what it declares, as before R5.6. An alias, never: it needs the loader-verified +`v1` value and the document recomputed at the decision. + +**N-1 and rollback (measured).** An old report (`27c7`) on the active sheet: opens with no rebase, re-exports +with one stamp, read with the snapshot kept by the current reader, the frozen N-1 readers and the pre-switch +build (59521dc: `report-compare` "matches the bundled sheet", import `rebased=false`). A NEW report (`12d7`) +read by the pre-switch build: the archive is kept, `report-compare` says "written on another sheet document", +and the import rebases (0 unresolved zones and findings, the stamp set back to `27c7`): nothing is lost, but +the application shows its rebase notice for what is the same content. **The rollback is not transparent for +reports written after the switch**: accepted while R5 stays on the branch; to be settled before any release to +users (keep the switch with the release, or ship the registry to the build that could be rolled back to). + +**Gates on 9e87016.** `pnpm rust:check` green, `pnpm check:all` green 02:10:52, `--check` 0 differences; +`r5_6_switch` 14, `sheet_fingerprint` 11 + the lib unit test, `pdf_import` 4, `pdf_compare` 16, `curation_draft` +20, `curation_review` 12, `archive_rules` 38; vitest N-1 2, app switch 2, goldens 13 + envelopes 3, R2 oracles 7, +anatomy 15. Security PASS, LOW only (`.claude/audits/2026-10-25-rust-r5-6-active-security.md`); fresh verifier: +8 contract clauses and 5 activation criteria met, ECARTS(1) = S7 (isolation) written before the activation was +authorised, settled by the contract Clarification of 2026-10-25 +(`.claude/audits/2026-10-25-rust-r5-6-active-verify.md`). Wasm 531,715 B gzip (518,018 before the switch, ++13.7 KB), under the earlier 600 KB reference mark; no budget added. + +### 11.23 R5.7: consumer census, `packages/anatomy` and `packages/domain` deleted (2026-10-25) + +Owner brief « Validation R5.6 et autorisation R5.7 ». Plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md`, +contract `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`. Base 756b7ef (R5.6 active). + +**Census (before any deletion).** Outside the two packages: `packages/anatomy` was reached by the root script +`import:equine:legacy`, the Dockerfile (`COPY packages/anatomy/package.json`), the workspace (`pnpm -r test:run` ran its 144 +cases inside `pnpm check`), `r4.census.test.ts` (xmldom pinned under it), the SQL seed header (text) and docs and Rust module +comments (text). `packages/domain` was reached by `packages/anatomy` (5 runtime symbols), the Dockerfile, the Rust suites +`report_rules` and `archive_rules` (they read `packages/domain/tests/fixtures/report-v2.{full,minimal}.json` from disk), the +app ESLint ban (a closed door), docs and three SQL migration comments (applied migrations, never edited). No application, +glue or Supabase-package source imported either (grep + `r4.census`). `packages/domain/src` is byte-identical to the frozen +N-1 copy `packages/core-wasm/tests/n-1/domain` (`diff -r`), which stays. `packages/supabase/scripts/upload-sheet-assets.ts` +(`assets:upload:legacy`) was the TS upload tool replaced at R5.5. + +**Matrices.** `crates/core/tests/curation/FILES.tsv`: the 112 tracked files that left (110 deleted, the 2 fixtures moved), +each with its Rust counterpart (55 ported, 48 replaced, 9 package tooling or test helpers deleted). `crates/core/tests/curation/LEDGER.tsv`: +one row per TS case at 756b7ef (anatomy 144 in 22 files, domain 263 in 13), with its contract, status, target, oracle and +note: 256 ported, 149 replaced (frozen oracle, byte-exact committed seed, golden), 2 deleted (`never mutates its inputs`: the +Rust applier takes `&Value`, no aliasing hazard; `r2-horse-slice`: it wrote the JSON fixture from the `.ts` one, the JSON is +the source now), 0 uncovered. The 64 domain rows of `archive.branding-labels` re-registered by two other files are listed +as such. Mapping by two read-only analyses, every target checked against `cargo test -- --list` (154 cargo targets, 0 +missing) and by `apps/app/tests/unit/r5.census.test.ts` on every run. + +**Contracts ported first** (the mapping found 15 anatomy cases whose contract only the TypeScript checked, and one partial +domain oracle): `curation_leaves.rs` (new, 8 tests: the 612 leaves 442/141/29, leaves land on leaves, FR and EN snapshots and +the vet flag per finding, the 29 removed with their legacy path, the 141 moves split 134/7 inside their zone, v3 re-read +stable, the 26 observable legacy ids on the right view with their names, C7 kept on a defined region); `curation_draft` (+7: +a cite of a reference the same change added, the view box read and `1 2 3` refused, the map following a move through a +just-renamed path, `CHG-000` reserved, the dollar-quote tag refused, the 16 rows of the R5.1 ledger equal to the committed +files with the pre-switch substitution, the two generated folders holding exactly the ledger's files plus the byte copies); +`curation_format` (+1: `inferRegionCode`, the 12 rows of `js-semantics.json` no Rust test read, and the TS cases); +`curation_review` (+1: an annotation dropped by a change drawn `removed`); `anatomy_compose` (+1: the halo filter never +duplicated on a root that holds it); `report_contract` (+1: `migration-map.draft.json` read entry by entry as Zod read it, +27 annotations, 792 paths, 34 nulls, the committed map differing only by its fingerprint). Partial points kept as notes in +the ledger (no business contract lost): the empty document's `view_box: null` literal, two relabel assertions, the +`snapshotIndexSource` and `buildSheetIndex` TS-only adapters, JS identity probes. + +**Fixtures.** `report-v2.full.json` (`e96b0882…729c`) and `report-v2.minimal.json` (`ba79698c…fde7`) moved by `git mv` to +`crates/core/tests/fixtures/`, sha256 equal before and after (also asserted by `r5.census`); identical to the app's copies +under `apps/app/tests/fixtures/`, which stay. Kept untouched: the R2 oracles (`oracles/*.json`, `characterisation.json`, +`verdicts.json`), R3 (`oracles/r3`), R4 (`oracles/r4`, `pdf/LEDGER.tsv`, the app goldens and `goldens/r4` digests), R5 +(`oracles/r5`, 13 files), the pre-switch seed copies (`fixtures/r5-6/pre-switch`), `fixtures/horse-slice.json`, the +conformance fixtures, every reference PDF, the migration data, the N-1 readers. The generators that wrote them left with the +packages; an oracle is never regenerated. + +**Deleted.** `packages/anatomy`, `packages/domain`, `packages/supabase/scripts/upload-sheet-assets.ts`, the scripts +`import:equine:legacy` and `assets:upload:legacy`, the two Dockerfile `COPY` lines. Lockfile through `pnpm install --offline` +then `--fix-lockfile`: 69 lines removed, `@xmldom/xmldom` 0.9.12 gone, the two importers gone; `tsx` 4.23.15 is declared by +no package and stays resolved only as vite's optional peer, marked `optional: true` (`pnpm dedupe --check` clean: removing +it would take a hand edit); no other version moved; `--frozen-lockfile` installs. Root Prettier stays (`pnpm format`, +`db:types`, `db:types:check`). Left on disk, git-ignored: `packages/{anatomy,domain}/node_modules` (pnpm symlinks; the +recursive delete was refused to Claude by the permission layer, owner action as for `packages/pdf`). + +**Census tests.** `r4.census.test.ts`: xmldom, the TS domain and the pipeline package banned from the app and glue sources +and manifests; the lockfile holds no `@xmldom/xmldom` and no `packages/{anatomy,domain}` importer, with a non-vacuity check +(the importer split finds `.`, `apps/app`, `packages/core-wasm`). `r5.census.test.ts` (10 cases): the packages and the TS +upload script absent; no manifest declares them, xmldom or tsx, no `:legacy` script, `import:equine` and `assets:upload` run +the Rust binaries; the lockfile importers equal the manifests on disk (non-vacuity) and resolve none of them; no app, Vite, +glue or Supabase-package source imports them (non-vacuity: `@faunosteo/core-wasm` is found); the Dockerfile copies only +existing manifests; the ESLint ban names `@faunosteo/domain`, `@faunosteo/anatomy`, `@xmldom/xmldom`; every `FILES.tsv` row +absent with its counterpart present; every `LEDGER.tsv` row absent, 407 = 144 + 263, valid status, each cargo target a +`#[test]` function of its test file and never an `#[ignore]` one, each oracle file present; the moved fixtures' sha256; the oracles, pre-switch copies and N-1 readers present. + +**Test counts.** Before (756b7ef, vitest JSON): TypeScript 943 (app 436, core-wasm 60, supabase 40, anatomy 144, domain 263); +Rust core 364 (features `cli,upload`) + worker 33. After: TypeScript 546 (app 446 = 436 + the 10 R5 census cases, core-wasm 60, +supabase 40); Rust core 383 (+19 ports) + worker 33. The 407 deleted cases are covered as the ledger says. + +**Historical reproducibility (rehearsed 2026-10-25, detached worktree under the session scratchpad).** + +| | | +|---|---| +| Last commit where the TypeScript pipeline was the official seed writer | `59521dc1953e6005045ca5b39434de6377033237` (`pnpm import:equine` = TS) | +| Last commit holding the TypeScript pipeline | `756b7ef34d9cac9cfcb8288fecbf07599837a5ba` (`pnpm import:equine:legacy`) | +| Tooling | Node 24 (rehearsed on v24.21.0), pnpm 10.13.1 (corepack), lockfile sha256 `a8611f22…1334` (same at both commits) | +| Dependencies resolved | zod 3.25.76, @xmldom/xmldom 0.9.12, prettier 3.8.3, tsx 4.23.15, typescript 5.9.3, vitest 3.2.7, eslint 9.39.4, @types/node 20.19.41 | + +```bash +git worktree add --detach 59521dc +cd && corepack pnpm install --frozen-lockfile --offline # or without --offline +corepack pnpm import:equine # TS writer: rewrites the two seed folders of this worktree only +git status --porcelain # empty: the TS reproduces the committed seed byte for byte +corepack pnpm --filter @faunosteo/anatomy --filter @faunosteo/domain test:run # 144 + 262 green +# at 756b7ef: corepack pnpm import:equine:legacy → exactly draft/sheet-ref.json and draft/report-migration-map.json +# differ (pre-switch values, equal to crates/core/tests/fixtures/r5-6/pre-switch); run the suites on a clean tree +# (they read the committed seed): 144 + 263 green +``` + +Rehearsal results: at 59521dc `git status` empty after the run, 144 + 262 green; at 756b7ef the two files only, at +`2c0716f1…b285` and `4139c51d…fce9`, and 144 + 263 green on the clean tree (one run of the suites over the tree the generator +had just rewritten failed `r2-oracles` "committed migration map after R5.6", as it should). + +Expected sha256 of the TypeScript output (the committed seed except the two R5.6 files; the 16 text rows are also +`oracles/r5/pipeline.json` `artifacts`, asserted by `curation_draft`): + +| File (under `supabase/seed/anatomical-sheets/equine/`) | sha256 | +|---|---| +| `draft/assets/horse.svg` | `0ea5202fa3b95bac167b87c12ee969ab0272e085b60c2d34dbca6202c5f08541` | +| `draft/assets.json` | `c490dc758b330f372548a595826e2d4de73dcb935af1e39cb4883d5b31927cf5` | +| `draft/CHANGELOG.md` | `48c010c8c8010f81d201005b485ecfe01e0b8c8ea76b944d220bcf2174d8b6c7` | +| `draft/document.json` | `27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660` | +| `draft/equine_draft.sql` | `c5a24312c6a77cdd7e545dc34ebee377abd1ef9f9868fbffedbd6c21f53bed1e` | +| `draft/report-migration-map.json` | `4139c51d3acd69ba9ca0ee6bb7bd7ebe7be4eb818e330ff278b37e1d04b7fce9` | +| `draft/review/annotations-head.svg` | `2d6858a1891cdae36ffd364b30bc7586bcfcc1ea76a79ac0cda99497a21672e6` | +| `draft/review/annotations-main.svg` | `1fd2e385468b1013ccd34f03ddf2ad80a7755f8d6b9071514e48aafa0e7bd4e4` | +| `draft/review/app-head.svg` | `8d33077cdc87d2b979a58d75e271102fb9b18fcc2fa93ebd97758672f5eb3e80` | +| `draft/review/app-main.svg` | `985a043aa1871b58ceec1f96e4fc4c6edd02e05bdb82694787a5c4ea5d6f81d5` | +| `draft/REVIEW-REPORT.md` | `fbdaa58db0dbc092b7a0cd039804e1879f1351669abf7c6d0a0cf1189f0c8bfb` | +| `draft/sheet-ref.json` | `2c0716f1536e4182cde9ffb0f183c7255d1ad6a1fc754d72011ff8090304b285` | +| `legacy-import/assets/Horse_head.svg` | `9c03b98c0e55e3f684ce314b88dab2a0e11f488af6cc9140d61e1b2d5f9cb94c` | +| `legacy-import/assets/Horse.svg` | `5fe3819c8bf07f18fcc51f40f3d06b1bc82e6202a62afa003e8639867b5b212d` | +| `legacy-import/assets.json` | `109b0e7b8a03d398ea89ef278021f73d4f387992bbfdb2196c9cb7bec4232f2f` | +| `legacy-import/document.json` | `91e459f4c0ac8043831242c9fccde01f75f1023464db909f1c29571aa8a414c2` | +| `legacy-import/IMPORT-REPORT.md` | `7233bca100c8c1acc6e16310acd9e3e241e6760ab73855dcbf3a2bb92282d240` | +| `legacy-import/legacy-id-map.json` | `4ec2b4e3a0ee7d901145ce45f9cc240d28e30997155a51c6d53ea1c1a36667b7` | + +The old engine is not reintroduced in the tree; no third engine is kept. + +**Seed SQL header.** `equine_draft.sql` line 2 still reads "Generated by `pnpm import:equine` (packages/anatomy)". Changing it +would change the frozen seed bytes (`c5a24312…ed1e`, ledger row): kept, explained in `curation/draft/seed.rs` beside the +emitted text and here. The generator is the Rust module since R5.6. + +**Rust pipeline parity.** `pnpm import:equine --check`: legacy-import 6 files, draft 12 files, 0 differences (app-main under +the declared R3 trigger-name rule). + +**Checks on the final state.** `pnpm install --frozen-lockfile` ok; `pnpm rust:check` green; `pnpm check:all` green 03:58:13 +(advisories ok, wasm, `pnpm check`, app image, worker sandbox tests and runtime image); RFC 8785 and alias (`sheet_fingerprint` +11, `r5_6_switch` 14), archives (`archive_rules` 38, `report_rules` 17 on the moved fixtures), PDF (`pdf_*`, `pdf_compare` 16), +the N-1 suites (`n-1.reader`, `r5-6.n-1`, `n-1.scanner`), seed and sheet integrity (`curation_*`, `sheet_rules`, +`sheet_conformance`), the census suites. + +**Owner validation and pre-merge checks (2026-10-25, brief « Validation R5.7 et dernière vérification pré-fusion »).** +R5.7 is validated. Decision C6: `tsx` may stay named in the lockfile as long as it is only the optional peer of vite +(`pnpm why tsx -r`: `tsx` 4.23.15 reached only as `vite` 7.3.6's peer, `peerDependenciesMeta.tsx.optional: true`, through the +devDependencies of the app, `core-wasm` and `supabase`; no importer lists it, no root `node_modules/.bin/tsx`; pnpm links the peer's bin under the three packages' own +`node_modules/.bin`, which no script calls); no lockfile hand edit, +no override; the contract records the clarification and the census still fails on a declared `tsx`, a manifest script naming it or an +importer listing it. The 149 `replaced` rows were checked active: every cargo target runs in `cargo test` (none `#[ignore]`d, +now asserted by the census), the two vitest targets name existing cases, and every cited oracle is read by a test (the 26 +conformance cases through `read_dir`, the R3 canvas goldens through their view name). The checks were rerun on the state meant +for the merge after the two changes that followed the first `check:all` (the C8 digest typo, the census `#[test]` rule); their +results, the fresh verifier and the security audit are recorded in `.claude/audits/2026-10-25-rust-r5-7-premerge.md`. + +**Follow-ups kept (brief §10, unchanged by R5.7).** The rollback limit of reports written after R5.6 (a build that can roll +back must recognise both conventions before any public exposure; tested by `r5_6_switch`); DEV Supabase hardening +(ENVIRONMENTS.md §3.6); the migration-map cascade debt (§11.12); the direct export API trust boundary (§11.22); the SQL +checks before public exposure (`confirm_sheet_asset_upload`); the accepted LOW items of §11.16 to §11.22. Once the generators +are gone, a change of `curation/changes.json` cannot re-freeze `pipeline.json` or the synthetic oracles: the Rust tests that +pin the real draft (46 changes, 825 records, the 612 fates, the fingerprints) then need an owner decision on a new baseline. diff --git a/docs/development/SUPABASE.md b/docs/development/SUPABASE.md index 63d443b7..1d9bb47e 100644 --- a/docs/development/SUPABASE.md +++ b/docs/development/SUPABASE.md @@ -29,12 +29,11 @@ supabase/ packages/supabase/ ├─ src/client.ts createBrowserClient() (anon key, PKCE) ├─ src/database.types.ts `supabase gen types` output -├─ src/anatomical-sheets.ts publishSheetVersion(): Zod + integrity gate before the RPC +├─ src/anatomical-sheets.ts publishSheetVersion(): the core's verdict (`sheet.check`) as gate before the RPC ├─ src/assets.ts avatar flow: begin / quarantine upload / confirm / remove / own state / download, closed AssetFailure kinds ├─ tests/db/ PGlite harness: runs the pgTAP files without Docker └─ tests/e2e/ real-stack end-to-end (avatar flow with the worker container), `pnpm e2e:avatar` -packages/domain/ -└─ src/anatomical-sheet/ canonical sheet document (Zod), validateSheetDocument, createEmptySheetDocument +crates/core/src/domain/sheet/ canonical sheet document and its integrity rules (Rust core; `packages/domain` deleted at R5.7) ``` ## 2. Prerequisites @@ -112,19 +111,51 @@ SVG files live in the private bucket `anatomical-sheet-assets`, keyed by content (`.svg`). Reading goes through the sheet (policy `anatomical_sheet_assets_read`): a published version of a usable sheet, or any version for its editors. No API role uploads; the operator does, with -the service key, from the generated seed folder: +the service key, from the generated seed folder. The tool is the Rust binary +`upload-sheet-assets` (`crates/core`, feature `upload`, R5.5). It targets the +**local stack only**: there is no default destination and a host that is not +this machine (or the configured `FAUNOSTEO_DEV_HOST`, a private address) is +refused before any request. Run it by hand; the assistant does not. ```bash -export SUPABASE_URL=http://127.0.0.1:54321 +pnpm db:start # the seed creates the asset rows (pending) +export SUPABASE_URL=http://127.0.0.1:54321 # http, explicit port; the DEV address needs FAUNOSTEO_DEV_HOST read -rs SUPABASE_SERVICE_ROLE_KEY && export SUPABASE_SERVICE_ROLE_KEY # typed, not in shell history -pnpm assets:upload supabase/seed/anatomical-sheets/equine/draft +pnpm assets:upload --check supabase/seed/anatomical-sheets/equine/draft # read-only plan +pnpm assets:upload supabase/seed/anatomical-sheets/equine/draft # upload + confirm ``` -The script verifies each file against `assets.json` (sha256, size) before -uploading, keeps objects already present, and calls -`confirm_sheet_asset_upload` (service role only) for each asset row: the -read policy ignores a row whose upload was never confirmed, so a user who -registers a known hash on their own sheet opens nothing. +What a run does, in order, and stops at the first refusal before the first +write: + +1. The folder must lie under `supabase/seed/anatomical-sheets`. `assets.json` + is read under a size cap (strict keys, plain `.svg` file names, lowercase + sha256 and uuid, no repeated entry, 64 entries at most). Each drawing is + read under a cap and must match its entry (size, sha256) and be a drawing + the product accepts (the core's SVG reader, nothing removed). +2. The destination is checked, then a handshake: the bucket exists, is + private, and the key is accepted. +3. Each entry is planned from what the destination holds: an object under the + key is read back and hashed; different bytes, a missing asset row or a row + recording another hash refuse the run (nothing is overwritten, no row is + invented; apply the seed first). +4. Missing objects are created without replacing anything (`x-upsert: + false`), read back and verified, and only then is the row confirmed + (`confirm_sheet_asset_upload`, service role only): the read policy ignores + a row whose upload was never confirmed, so a user who registers a known + hash on their own sheet opens nothing. + +A rerun after any failure resumes: an object already verified is kept, a +confirmed row is left alone. A connection failure or a 5xx answer is retried +three times (four attempts); a refusal (401, 403, a state mismatch, an +oversized answer) is final. Exit codes: 0 done, 1 refused (usage, manifest, +destination, content, handshake, state, access), 2 an argument that is not +UTF-8, 3 network. The DEV address counts only if it is an address of this +machine. The key is +never printed and goes through no proxy. `pnpm e2e:sheet-assets` runs the +whole behaviour against the local stack (upload, rerun, anon and wrong key, +refused destinations, unreachable port). The TypeScript tool +(`packages/supabase/scripts/upload-sheet-assets.ts`) was deleted at R5.7 (RUST.md §11.23). ### 3.2 Files worker (Storage, Step 8) diff --git a/docs/development/TEST_STRATEGY.md b/docs/development/TEST_STRATEGY.md index 374ebac7..b8eadd28 100644 --- a/docs/development/TEST_STRATEGY.md +++ b/docs/development/TEST_STRATEGY.md @@ -19,7 +19,7 @@ Status: Step 0 deliverable, 2026-10-08. Current state: 32 files under | SQL/TS contract | generated types diff check | CI | every PR touching `supabase/` | | Rust core and facade | `cargo test` (unit + fixture tests reading the repository JSON in place), `clippy -D warnings`, `cargo deny`; ts-rs types drift check | `crates/*`, `pnpm rust:check` (native, `scripts/rust-check.sh`; same file in the builder image), `pnpm check:all` | before every Rust commit and every merge; CI job `rust` prepared, no runner yet | | Rust/TS contract | vitest on the built module: byte equality with `JSON.stringify(…, null, 2)` on the real documents, ts-rs types against the Zod output types, the runtime (lazy load, trap → poison → offline re-instantiation, handle rebuild, cap, retry), panic and stack traps on `pkg-proofs`, served size budget and measurements | `packages/core-wasm/tests` (refused, never skipped, when `pkg/` or `pkg-proofs/` is missing or stale) | `pnpm check:all` (after the native `wasm:build`); CI `check` prepared | -| Freeze-then-switch oracles (R2) | outputs of the TypeScript frozen before the switch and checked by cargo: Zod output of the reference documents (byte-equal), 84 report / archive cases, 765 Zod verdicts, 49 editor cases, 26 sheet conformance fixtures (also inlined into the generated pgTAP `011`, drift-checked), the three archive envelopes (deep-equal through the app path) | `crates/core/tests/{oracles,conformance,fixtures}`, generators in `packages/domain/tests/r2-*.test.ts` and `apps/app/tests/unit/archive.envelopes.test.ts` (`MAKE_R2_ORACLES` / `MAKE_R2_FREEZE`, never regenerated without an owner decision) | every Rust commit (`pnpm rust:check`), `pnpm check:all` | +| Freeze-then-switch oracles (R2) | outputs of the TypeScript frozen before the switch and checked by cargo: Zod output of the reference documents (byte-equal), 85 report / archive cases, 765 Zod verdicts, 49 editor cases, 26 sheet conformance fixtures (also inlined into the generated pgTAP `011`, drift-checked), the three archive envelopes (deep-equal through the app path) | `crates/core/tests/{oracles,conformance,fixtures}`, generators `packages/domain/tests/r2-*.test.ts` (deleted at R5.7, at 756b7ef; the oracles stay) and `apps/app/tests/unit/archive.envelopes.test.ts` (`MAKE_R2_ORACLES` / `MAKE_R2_FREEZE`, never regenerated without an owner decision) | every Rust commit (`pnpm rust:check`), `pnpm check:all` | | N-1 reader (permanent) | every draft and archive the core-fed application writes parses with the Zod schemas of the last TypeScript build (`packages/core-wasm/tests/n-1`, develop 1a7ee7d) | `apps/app/tests/unit/n-1.reader.test.ts`, `archive.envelopes.test.ts` | every commit (`pnpm test:run`) | | CSP on the image (R2) | the real app image behind the DEPLOY.md CSP in headless Chromium: with `'wasm-unsafe-eval'` the core runs the editor path, without it the degraded state and an untouched draft; no module request on `/login`, `/app/account`, `/` | `docker/csp-proof/app-image.sh` | before a merge touching the core loading or the image; manual (needs Chromium) | | Worker sandbox | integration tests against the musl binary that ships: fixture corpus through the full sandbox, refusals, SIGSYS on a denied syscall, output cap, `RLIMIT_AS` abort, `RLIMIT_CPU`, deadline; seccomp allowlist derived by `strace` and compared | `crates/worker/tests/sandbox.rs`, Dockerfile stage `test` (`pnpm worker:test`, Docker only, never native) | every `crates/worker` commit, `pnpm check:all`; CI `docker` job prepared | diff --git a/docs/development/WORKSPACE.md b/docs/development/WORKSPACE.md index 06fa5d4e..1e1f4c64 100644 --- a/docs/development/WORKSPACE.md +++ b/docs/development/WORKSPACE.md @@ -13,8 +13,9 @@ faunosteo/ │ ├─ src/ public/ tests/ scripts/ index.html │ ├─ vite.config.ts vitest.config.ts tsconfig*.json eslint.config.js │ └─ package.json app dependencies and scripts -├─ packages/domain/ @faunosteo/domain: canonical anatomical sheet document (Zod) + integrity rules +├─ packages/core-wasm/ @faunosteo/core-wasm: the Rust core in the browser (runtime, ts-rs types, frozen N-1 reader) ├─ packages/supabase/ @faunosteo/supabase: typed client, generated types, PGlite SQL tests +├─ crates/ Rust workspace: core (contracts, rules, SVG, PDF, anatomical pipeline), wasm, worker ├─ supabase/ Supabase CLI config, migrations, seed, pgTAP tests (docs/development/SUPABASE.md) ├─ docker/ nginx.conf, entrypoint.sh (unchanged) ├─ docs/ conventions, audit, development plan @@ -35,7 +36,7 @@ Future units, created only by the step that needs them: |---|---|---| | `apps/public-web` | SSR public site (landing, practitioner profiles, search) | plan Step 22 | | `crates/worker` | Rust job runner (avatars at R1, then emails, expiry, calendar sync, imports) — created at R0, replaces the planned `apps/worker` | R0 (2026-10-12) | -| `packages/*` | shared domain, anatomy, core-wasm, supabase (i18n, config, ui planned; `pdf` deleted at R4.8) | see `packages/README.md` | +| `packages/*` | core-wasm, supabase (i18n, config, ui planned; `pdf` deleted at R4.8, `domain` and `anatomy` at R5.7) | see `packages/README.md` | Rust workspace (plan R0, `docs/development/RUST.md`): `Cargo.toml` at the root with `crates/core` (library), `crates/wasm` (browser facade, built into @@ -111,7 +112,8 @@ Package-scoped: `pnpm --filter @faunosteo/app