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/CLAUDE.md b/CLAUDE.md
index e6642502..7773db9c 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 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/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/crates/core/Cargo.toml b/crates/core/Cargo.toml
index ce5a2fdf..7c15f76b 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 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/curation/draft/pipeline.rs b/crates/core/src/curation/draft/pipeline.rs
index 19126aaf..dcc19b66 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 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/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
index 0fca3329..341b72fa 100644
--- a/crates/core/src/domain/sheet/fingerprint.rs
+++ b/crates/core/src/domain/sheet/fingerprint.rs
@@ -1,19 +1,27 @@
//! 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).
+//! 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 zero integrity issue, 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. `v1` freezes these rules and the validation.
+//! 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` will declare it at the switch.
+/// 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";
@@ -56,17 +64,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(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.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 +92,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 +127,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 {
- let mut out = String::new();
- write_value(value, &mut out)?;
- Some(out)
+/// 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,
}
-fn write_value(value: &Value, out: &mut String) -> Option<()> {
+/// 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())?;
+ 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 +169,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 +195,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,44 +223,83 @@ 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: 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).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}"))
.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/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/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/curation_draft.rs b/crates/core/tests/curation_draft.rs
index 31c9ffcc..ba3b2c10 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["fingerprint"]["convention"],
+ FINGERPRINT_CONVENTION
);
assert_eq!(
- reference["document_sha256"],
- "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660"
+ 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 aecf8554..4b176214 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 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/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/sheet_fingerprint.rs b/crates/core/tests/sheet_fingerprint.rs
index 79a9e09e..1630d268 100644
--- a/crates/core/tests/sheet_fingerprint.rs
+++ b/crates/core/tests/sheet_fingerprint.rs
@@ -5,12 +5,13 @@
//! 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, Equivalence, FINGERPRINT_CONVENTION, FingerprintError, TRUSTED_ALIASES,
- canonical_json, check_declared, equivalence, 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;
@@ -120,34 +121,20 @@ fn an_invalid_or_malformed_document_has_no_fingerprint() {
#[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!(
- equivalence(SHEET, CANONICAL, CANONICAL),
- Equivalence::Identical
- );
- assert_eq!(
- equivalence(SHEET, CANONICAL, ALIAS),
- Equivalence::TrustedAlias
- );
- assert_eq!(
- equivalence(SHEET, ALIAS, CANONICAL),
- Equivalence::TrustedAlias
- );
- let other_sheet = "00000000-0000-0000-0000-000000000000";
- assert_eq!(
- equivalence(other_sheet, CANONICAL, ALIAS),
- Equivalence::Different
- );
- let other_content = "a".repeat(64);
- assert_eq!(
- equivalence(SHEET, &other_content, ALIAS),
- Equivalence::Different
- );
- assert_eq!(
- equivalence(SHEET, &other_content, CANONICAL),
- Equivalence::Different
+ (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]
@@ -239,12 +226,17 @@ 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 loaded = archive_support::draft_sheet();
+ assert_eq!(loaded.reference.document_sha256, CANONICAL);
let mut same = 0;
for (sheet, sha) in &found {
- let verdict = equivalence(sheet, sha, CANONICAL);
+ // 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!(verdict.same_document(), expected, "{sheet} {sha}");
+ 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.
@@ -252,7 +244,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 +260,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/docs/development/ANATOMICAL_SHEET_MODEL.md b/docs/development/ANATOMICAL_SHEET_MODEL.md
index a45c0db9..bb12b519 100644
--- a/docs/development/ANATOMICAL_SHEET_MODEL.md
+++ b/docs/development/ANATOMICAL_SHEET_MODEL.md
@@ -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 in `packages/anatomy` stays as
+`pnpm import:equine:legacy` until R5.7) 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,7 +315,7 @@ 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
id `CHG-nnn`, a level (A demonstrated error, B supported improvement, C
diff --git a/package.json b/package.json
index 6907a5a7..02b42a7a 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 20e3d086..55d44ac0 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 5af7cb38..f49eb783 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 00000000..953fc1d2
--- /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 e0593ef1..2fcb5e5b 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 011f78d9..861b2276 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 d5f82078..568c1bcd 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 c199d71f..e90de503 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 5633394d..b79c2014 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"
+ ]
+ }
}