From 82e2e43ba360dbdefe5d7c6dc95192dff1be55ef Mon Sep 17 00:00:00 2001 From: bchanot Date: Sun, 25 Oct 2026 00:57:45 +0200 Subject: [PATCH] chore(docs): R5.6 rehearsal contract and final switch patch (inactive) --- .../2026-10-25-rust-r5-6-rehearsal.md | 40 + .claude/tasks/plans/r5-6-switch.patch | 2507 ++++++++++++++++- 2 files changed, 2428 insertions(+), 119 deletions(-) create mode 100644 .claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md diff --git a/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md b/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md new file mode 100644 index 00000000..32c86d9a --- /dev/null +++ b/.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md @@ -0,0 +1,40 @@ +# CONTRACT: R5.6 switch rehearsal (isolated), owner brief 2026-10-24 « Validation de la préparation R5.6 et corrections préalables à la bascule » + +- branch `feature/rust-r5-pipeline-core` at 943a25a (official state, inactive); patch `.claude/tasks/plans/r5-6-switch.patch` +- rehearsal: detached worktree `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56wt` = 943a25a + the patch, seed switched there only + +## Clauses + +S1. **M1 option 1.** On export, an old report whose stamp is the registered historical value of the same sheet, against the +sheet's verified canonical value, archives a snapshot carrying the report's own stamp; only for the registered pair of the +same sheet id, with the loaded sheet's `v1` value recomputed from its document at load; never from an archive's alias list; a +new report keeps the canonical value. Tests cover the owner's 9 scenarios (old PDF import, no rebase, re-export coherent, +current reader, frozen N-1 reader, labels/views/annotations/branding preserved, rollback reader, forged/unknown refused, real +change rebases), not only hash equality. + +S2. **Scope.** Rust changes only in `report/rebase.rs`, `archive/read.rs` (unchanged allowed), `session.rs`, +`pdf/write/input.rs`, `pdf/compare/lines.rs`, `sheet/loaded.rs`, `facade.rs`, `bin/report_compare.rs`, plus the +`sheet/fingerprint.rs` module, the generator (`curation/draft/pipeline.rs`), Cargo/tests/scripts; archive and envelope checks not +loosened; public errors kept where possible; N-1 readers untouched. + +S3. **v0/v1 loading.** A reference without a block is historical (v0): loads as before, unverified, no alias privilege, never +`v1`. A present block is strict (known keys, `v1` convention, 64 lowercase hex, not an alias value, aliases only from the +registry for this sheet and value, value recomputed from the document); any contradiction refused. + +S4. **Artifacts and oracles.** In the switched seed only `sheet-ref.json` and `report-migration-map.json` differ; their value +and block are consistent with `v1`; `document.json`, `horse.svg`, `equine_draft.sql` byte-identical; no R2-R5 oracle or golden +changed; O7, O10, the R2 Zod oracle, the R5.1 ledger and the app goldens run in their original (pre-switch) context, with a +separate test of the post-switch behaviour; every declared difference targeted, tested, unable to hide an anatomical change. + +S5. **report:compare.** The alias line keeps the draft/published status and prints both raw values; other differences still +reported. + +S6. **Generators.** `pnpm import:equine` → the Rust pipeline; `import:equine:legacy` → the TypeScript one; historical tests use +the generator they refer to. + +S7. **Isolation.** The official branch state stays inactive (seed `27c7…`, no new convention active), no DB/Supabase mutation, +no oracle regenerated, nothing deleted. + +S8. **Gates on the switched state.** `pnpm rust:check`, `pnpm check:all`, RFC 8785, Node differential, alias security, the five +consumers + load checks, authentic archive parity, N-1 on re-exported archives, snapshot-bearing reports, real-change rebase, +the two generated artifacts; security audit; fresh verifier. diff --git a/.claude/tasks/plans/r5-6-switch.patch b/.claude/tasks/plans/r5-6-switch.patch index 6f9d2dc5..99263d8c 100644 --- a/.claude/tasks/plans/r5-6-switch.patch +++ b/.claude/tasks/plans/r5-6-switch.patch @@ -9,6 +9,177 @@ index a9140e4..aaeef54 100644 +# 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/apps/app/tests/helpers/goldenReports.ts b/apps/app/tests/helpers/goldenReports.ts +index ef46bce..d66fb68 100644 +--- a/apps/app/tests/helpers/goldenReports.ts ++++ b/apps/app/tests/helpers/goldenReports.ts +@@ -43,15 +43,34 @@ function buildV2Unresolved(sheet: SheetIndex) { + ).read + } + ++/** ++ * The goldens were frozen before R5.6, when a v2 migration stamped the historical fingerprint ++ * (the pre-switch migration map). Since R5.6 the map stamps the canonical `v1` value and ++ * nothing else of the migrated report changes (Rust `pdf_import` ++ * `o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves`): the ++ * golden v2 reports are taken in that original context, as reports migrated before the switch ++ * and exported now. Their export keeps the stamp in the snapshot (M1), so the frozen bytes hold. ++ */ ++export const HISTORICAL_FINGERPRINT = ++ '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++ ++export function migratedBeforeR56(report: Report): Report { ++ return { ++ ...report, ++ sheet: { ...report.sheet, documentSha256: HISTORICAL_FINGERPRINT }, ++ } ++} ++ + export function buildGoldenReports(sheet: SheetIndex): GoldenReports { + const v2unresolved = buildV2Unresolved(sheet) + return { + reports: { +- v2full: importAttachment(readJson('report-v2.full.json'), sheet).read +- .report, ++ v2full: migratedBeforeR56( ++ importAttachment(readJson('report-v2.full.json'), sheet).read.report, ++ ), + demo: importAttachment(readJson('report-v3.demo.json'), sheet).read + .report, +- v2unresolved: v2unresolved.report, ++ v2unresolved: migratedBeforeR56(v2unresolved.report), + }, + unresolvedOfV2Unresolved: v2unresolved.unresolvedFindings, + } +diff --git a/apps/app/tests/unit/r5-6.switch.test.ts b/apps/app/tests/unit/r5-6.switch.test.ts +new file mode 100644 +index 0000000..00c80fc +--- /dev/null ++++ b/apps/app/tests/unit/r5-6.switch.test.ts +@@ -0,0 +1,87 @@ ++/** ++ * R5.6 in the application, on the switched bundled sheet (`sha256-rfc8785-validated-v1`): ++ * a v2 report migrated now carries the canonical value and exports one consistent envelope ++ * that the N-1 readers accept; an old report on the historical value opens with no rebase and ++ * re-exports with its own stamp in the snapshot (the goldens prove the bytes); no visible ++ * change. The historical goldens run in their original context (`helpers/goldenReports.ts`). ++ */ ++import { readFileSync } from 'node:fs' ++import { resolve } from 'node:path' ++import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' ++import { ++ readArchiveDocument, ++ readAttachmentBytes, ++ ReportArchiveEnvelopeSchema, ++} from '@faunosteo/core-wasm/n-1' ++import { exportReportToPdf } from '@/pdf/export' ++import type { SheetIndex } from '@/services/sheetIndex' ++import { bundledMigrationMap, loadTestSheet } from '../helpers/sheet' ++import { FIXTURES_DIR, ONE_PX_PNG } from '../helpers/goldens' ++import { HISTORICAL_FINGERPRINT } from '../helpers/goldenReports' ++import { importAttachment } from '../helpers/pdfImport' ++ ++vi.mock('@/pdf/browserRasterizer', () => ({ ++ browserRasterizer: vi.fn(async () => ONE_PX_PNG), ++})) ++vi.mock('@/pdf/branding', async () => { ++ const { brandingOf } = await import('../helpers/goldens') ++ return { loadBranding: vi.fn(() => brandingOf('nologos')) } ++}) ++ ++const CANONICAL = ++ '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++let sheet: SheetIndex ++ ++beforeAll(async () => { ++ sheet = await loadTestSheet() ++ vi.spyOn(console, 'warn').mockImplementation(() => undefined) ++}) ++afterAll(() => vi.restoreAllMocks()) ++ ++interface Stamped { ++ report: { sheet: { documentSha256: string } } ++ sheetSnapshot: { ref: { documentSha256: string } } ++} ++ ++async function exported( ++ report: Parameters[0], ++): Promise { ++ const { pdf } = await exportReportToPdf(report, sheet, { locale: 'fr' }) ++ const bytes = new Uint8Array(await pdf.arrayBuffer()) ++ return JSON.parse( ++ new TextDecoder().decode(await readAttachmentBytes(bytes)), ++ ) as Stamped ++} ++ ++describe('R5.6 on the switched sheet', () => { ++ it('stamps a new or newly migrated report with the canonical value', async () => { ++ expect(sheet.sheet.ref.documentSha256).toBe(CANONICAL) ++ const v2 = JSON.parse( ++ readFileSync(resolve(FIXTURES_DIR, 'report-v2.full.json'), 'utf8'), ++ ) ++ const migrated = importAttachment(v2, sheet).read.report ++ expect(migrated.sheet.documentSha256).toBe(CANONICAL) ++ const envelope = await exported(migrated) ++ expect(envelope.report.sheet.documentSha256).toBe(CANONICAL) ++ expect(envelope.sheetSnapshot.ref.documentSha256).toBe(CANONICAL) ++ expect(ReportArchiveEnvelopeSchema.safeParse(envelope).success).toBe(true) ++ const outcome = readArchiveDocument(envelope, await bundledMigrationMap()) ++ expect(outcome.snapshotRejected).toBeUndefined() ++ }, 30_000) ++ ++ it('opens an old report with no rebase and re-exports it with one stamp', async () => { ++ const demo = JSON.parse( ++ readFileSync(resolve(FIXTURES_DIR, 'report-v3.demo.json'), 'utf8'), ++ ) ++ const imported = importAttachment(demo, sheet) ++ expect(imported.rebase.rebased).toBe(false) ++ expect(imported.rebase.report.sheet.documentSha256).toBe( ++ HISTORICAL_FINGERPRINT, ++ ) ++ const envelope = await exported(imported.rebase.report) ++ expect(envelope.report.sheet.documentSha256).toBe(HISTORICAL_FINGERPRINT) ++ expect(envelope.sheetSnapshot.ref.documentSha256).toBe( ++ HISTORICAL_FINGERPRINT, ++ ) ++ }, 30_000) ++}) +diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml +index ce5a2fd..7c15f76 100644 +--- a/crates/core/Cargo.toml ++++ b/crates/core/Cargo.toml +@@ -24,10 +24,7 @@ pdf-write = ["pdf-read"] + cli = ["pdf-read", "pdf-write"] + # The anatomical pipeline (R5): legacy importer, curation, generated files and their + # formatting, the `import-equine` tool. Never enabled by the wasm facade or the worker. +-curation = ["fingerprint", "dep:icu_normalizer"] +-# The sheet fingerprint `sha256-rfc8785-validated-v1` (R5.6, prepared, not active): the hashing +-# half of `domain::sheet::fingerprint`; the registry and the comparison compile without it. +-fingerprint = ["dep:sha2"] ++curation = ["dep:icu_normalizer"] + # The sheet-asset upload tool (R5.5): the `upload-sheet-assets` binary, a local-stack operator + # tool. The rules are in `curation::upload`; only the binary reaches the network. + upload = ["curation", "dep:ureq"] +@@ -40,7 +37,8 @@ roxmltree.workspace = true + zmij.workspace = true + ts-rs = { workspace = true, optional = true } + miniz_oxide = { workspace = true, optional = true } +-sha2 = { workspace = true, optional = true } ++# The sheet fingerprint (`sha256-rfc8785-validated-v1`, R5.6): recomputed at sheet load too. ++sha2.workspace = true + icu_normalizer = { workspace = true, optional = true } + ureq = { workspace = true, optional = true } + +@@ -157,4 +155,8 @@ required-features = ["upload"] + + [[test]] + name = "sheet_fingerprint" +-required-features = ["fingerprint", "pdf-read"] ++required-features = ["pdf-read"] ++ ++[[test]] ++name = "r5_6_switch" ++required-features = ["pdf-read", "pdf-write"] diff --git a/crates/core/src/bin/report_compare.rs b/crates/core/src/bin/report_compare.rs index 59cf060..91b34ef 100644 --- a/crates/core/src/bin/report_compare.rs @@ -31,7 +202,7 @@ index 59cf060..91b34ef 100644 document: seed_json("document.json")?, migration_map: seed_json("report-migration-map.json")?, diff --git a/crates/core/src/curation/draft/pipeline.rs b/crates/core/src/curation/draft/pipeline.rs -index 19126aa..12bcaf5 100644 +index 19126aa..dcc19b6 100644 --- a/crates/core/src/curation/draft/pipeline.rs +++ b/crates/core/src/curation/draft/pipeline.rs @@ -8,6 +8,9 @@ @@ -76,16 +247,27 @@ index 19126aa..12bcaf5 100644 } /// The migration map (`report-migration-map.json` value) and its stats. -@@ -307,7 +321,7 @@ pub fn render_draft_artifacts( +@@ -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 +331,10 @@ pub fn render_draft_artifacts( +@@ -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"), @@ -96,34 +278,17 @@ index 19126aa..12bcaf5 100644 }); let changelog = render_changelog( &draft.records, -diff --git a/crates/core/src/domain/archive/read.rs b/crates/core/src/domain/archive/read.rs -index 5419b9d..677fe52 100644 ---- a/crates/core/src/domain/archive/read.rs -+++ b/crates/core/src/domain/archive/read.rs -@@ -4,6 +4,7 @@ - //! wrapper is then validated whole or dropped with a reason. Accepted shapes: a bare Report v2 - //! or v3, or an archive envelope of version 1. - -+use crate::domain::sheet::fingerprint::equivalence; - use serde::{Deserialize, Serialize}; - use serde_json::Value; - #[cfg(feature = "ts")] -@@ -115,7 +116,12 @@ fn read_envelope_v1( - - fn snapshot_matches(snapshot: &SheetSnapshot, report: &Report) -> bool { - snapshot.reference.sheet_id == report.sheet.sheet_id -- && snapshot.reference.document_sha256 == report.sheet.document_sha256 -+ && equivalence( -+ &report.sheet.sheet_id, -+ &snapshot.reference.document_sha256, -+ &report.sheet.document_sha256, -+ ) -+ .same_document() - } - - /// `ReportArchiveEnvelopeSchema.parse`: the shape of a whole envelope (the snapshot's shape +@@ -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/report/rebase.rs b/crates/core/src/domain/report/rebase.rs -index 9281642..b5012be 100644 +index 9281642..9084cae 100644 --- a/crates/core/src/domain/report/rebase.rs +++ b/crates/core/src/domain/report/rebase.rs @@ -5,6 +5,7 @@ @@ -134,13 +299,15 @@ index 9281642..b5012be 100644 use serde::Serialize; #[cfg(feature = "ts")] use ts_rs::TS; -@@ -37,7 +38,13 @@ pub fn rebase_report_on_sheet( +@@ -37,7 +38,15 @@ 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 registry's pair for this very sheet (R5.6). -+ let same_sheet = report.sheet.sheet_id == sheet.reference.sheet_id; ++ // Same document: equal fingerprints, or the registry's pair for this very sheet once its ++ // `v1` value was verified at load (R5.6). ++ let same_sheet = ++ report.sheet.sheet_id == sheet.reference.sheet_id && sheet.fingerprint_verified; + let stamped = &report.sheet.document_sha256; + let current = &sheet.reference.document_sha256; + if stamped == current @@ -149,18 +316,109 @@ index 9281642..b5012be 100644 return Ok(RebaseOutcome { report: report.clone(), unresolved_zones: 0, +diff --git a/crates/core/src/domain/sheet/fingerprint.rs b/crates/core/src/domain/sheet/fingerprint.rs +index 0fca332..eda9746 100644 +--- a/crates/core/src/domain/sheet/fingerprint.rs ++++ b/crates/core/src/domain/sheet/fingerprint.rs +@@ -1,6 +1,5 @@ + //! The sheet fingerprint convention `sha256-rfc8785-validated-v1` (D-R5.6, owner 2026-10-24, +-//! BDR-068) and the trusted alias registry. PREPARED, NOT ACTIVE: no reader, writer or +-//! generated file uses this module until the owner's switch signal (RUST.md §11.19). ++//! BDR-068) and the trusted alias registry (RUST.md §11.19, §11.20). + //! + //! The value is the SHA-256 of the RFC 8785 (JCS) text of the validated document: the strict + //! typed reading of the R2 contract (`AnatomicalSheetDocument`, Zod's defaults filled, the +@@ -56,17 +55,17 @@ impl Equivalence { + } + } + +-/// `a` and `b`, two fingerprints stamped for `sheet_id`: equal, a registered pair of that sheet +-/// (either way round), or different. A real content change is never registered, so it stays +-/// `Different` and rebases as before. +-pub fn equivalence(sheet_id: &str, a: &str, b: &str) -> Equivalence { +- if a == b { ++/// `stamped` (what a report or an archive carries) against `current` (the loaded sheet's ++/// verified value), both for `sheet_id`: equal; the registered pair of that sheet in this one ++/// direction (an old stamp against the canonical value, never the reverse, so a sheet that ++/// declares no `v1` value recognises no `v1` stamp); or different. A real content change is ++/// never registered, so it stays `Different` and rebases as before. ++pub fn equivalence(sheet_id: &str, stamped: &str, current: &str) -> Equivalence { ++ if stamped == current { + return Equivalence::Identical; + } + let paired = TRUSTED_ALIASES.iter().any(|entry| { +- entry.sheet_id == sheet_id +- && ((entry.canonical == a && entry.alias == b) +- || (entry.canonical == b && entry.alias == a)) ++ entry.sheet_id == sheet_id && entry.alias == stamped && entry.canonical == current + }); + if paired { + Equivalence::TrustedAlias +@@ -84,6 +83,9 @@ pub enum AliasRefusal { + Untrusted(String), + /// The value declared under `v1` is not a 64-hex value, or is itself a historical alias. + NotCanonical(String), ++ /// The declared `v1` value is not the document's (the value recomputed, or why it could ++ /// not be). ++ ContentMismatch(String), + } + + /// Checks what a `sheet-ref.json` declares (descriptive only): the convention must be `v1` and +@@ -189,10 +191,8 @@ 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}; + +@@ -211,18 +211,26 @@ mod hashing { + 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); ++ document_fingerprint(&document) ++ } ++ ++ /// The fingerprint of a typed document: zero integrity issue, then JCS of its reading ++ /// serialised back, then SHA-256 (the sheet load recomputes it, R5.6). ++ pub fn document_fingerprint( ++ document: &AnatomicalSheetDocument, ++ ) -> Result { ++ let issues = validate_sheet_document(document); + if !issues.is_empty() { + return Err(FingerprintError::Invalid(issues.len())); + } + let validated = +- serde_json::to_value(&document).map_err(|e| FingerprintError::Shape(e.to_string()))?; ++ serde_json::to_value(document).map_err(|e| FingerprintError::Shape(e.to_string()))?; + let canonical = canonical_json(&validated).ok_or(FingerprintError::Canonical)?; + Ok(Sha256::digest(canonical.as_bytes()) + .iter() diff --git a/crates/core/src/domain/sheet/loaded.rs b/crates/core/src/domain/sheet/loaded.rs -index 4065978..e6fd44d 100644 +index 4065978..3030989 100644 --- a/crates/core/src/domain/sheet/loaded.rs +++ b/crates/core/src/domain/sheet/loaded.rs -@@ -2,6 +2,7 @@ - //! read once from the bundled payload, then indexed. Its document and migration map pass the - //! strict schemas; the provenance fields come from the build and are taken as they are. - -+use super::fingerprint::{AliasRefusal, check_declared}; - use std::collections::HashMap; +@@ -6,6 +6,7 @@ use std::collections::HashMap; use serde::Deserialize; + ++use super::fingerprint::{AliasRefusal, check_declared, document_fingerprint}; + use super::index::{IndexedDocument, NoMainView, SheetIndex}; + use super::schema::AnatomicalSheetDocument; + use crate::anatomy::svg::{Element, read_svg}; @@ -33,6 +34,16 @@ pub struct BundledRef { pub document_sha256: String, pub schema_version: JsInt, @@ -178,7 +436,18 @@ index 4065978..e6fd44d 100644 } /// A loaded, indexed sheet. -@@ -76,6 +87,8 @@ pub enum LoadError { +@@ -49,6 +60,10 @@ pub struct LoadedSheet { + /// sha256 by `svg_asset_id`; carried into an archive as provenance. + pub asset_hashes: HashMap, + pub migration_map: ReportMigrationMap, ++ /// The reference declared `v1` and its value was recomputed from the document (R5.6): only ++ /// then does a registered historical stamp count as this sheet's. A historical reference ++ /// (no block) loads as before, with no alias privilege. ++ pub fingerprint_verified: bool, + 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 +91,8 @@ pub enum LoadError { Shape(serde_json::Error), /// The document has no main view. NoMainView, @@ -187,22 +456,52 @@ index 4065978..e6fd44d 100644 } impl From for LoadError { -@@ -102,6 +115,15 @@ impl LoadedSheet { +@@ -102,6 +119,8 @@ impl LoadedSheet { .map(|(id, text)| (id.clone(), read_drawing(text))) .collect(); let r = data.reference; -+ if let Some(declared) = &r.fingerprint { -+ check_declared( -+ &r.sheet_id, -+ &r.document_sha256, -+ &declared.convention, -+ &declared.aliases, -+ ) -+ .map_err(LoadError::Fingerprint)?; -+ } ++ let fingerprint_verified = ++ check_reference(&r, &document).map_err(LoadError::Fingerprint)?; Ok(Self { status: data.status, reference: SheetRef { +@@ -115,6 +134,7 @@ impl LoadedSheet { + assets: data.assets, + asset_hashes: data.asset_hashes, + migration_map, ++ fingerprint_verified, + index, + drawings, + }) +@@ -133,3 +153,28 @@ impl LoadedSheet { + self.drawings.get(asset_id) + } + } ++ ++/// The reference against the document (R5.6): `true` when a `v1` block, checked against the ++/// registry, declares the value recomputed from the document. With no block the reference is a ++/// historical one (v0): read as before, unverified (`false`), so an absent block never stands ++/// for `v1` and never brings an alias. ++fn check_reference( ++ reference: &BundledRef, ++ document: &AnatomicalSheetDocument, ++) -> Result { ++ let value = &reference.document_sha256; ++ let Some(declared) = &reference.fingerprint else { ++ return Ok(false); ++ }; ++ check_declared( ++ &reference.sheet_id, ++ value, ++ &declared.convention, ++ &declared.aliases, ++ )?; ++ match document_fingerprint(document) { ++ Ok(computed) if computed == *value => Ok(true), ++ Ok(computed) => Err(AliasRefusal::ContentMismatch(computed)), ++ Err(error) => Err(AliasRefusal::ContentMismatch(format!("{error:?}"))), ++ } ++} diff --git a/crates/core/src/facade.rs b/crates/core/src/facade.rs index f0c6997..7f73cff 100644 --- a/crates/core/src/facade.rs @@ -216,7 +515,7 @@ index f0c6997..7f73cff 100644 } diff --git a/crates/core/src/pdf/compare/lines.rs b/crates/core/src/pdf/compare/lines.rs -index 35e8dd2..4dfc313 100644 +index 35e8dd2..3753529 100644 --- a/crates/core/src/pdf/compare/lines.rs +++ b/crates/core/src/pdf/compare/lines.rs @@ -2,6 +2,7 @@ @@ -227,41 +526,50 @@ index 35e8dd2..4dfc313 100644 use serde::Deserialize; use serde_json::Value; -@@ -346,8 +347,23 @@ fn archive_line(outcome: &ArchiveReadOutcome) -> Vec { +@@ -346,13 +347,32 @@ 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 = equivalence( ++ let same = match equivalence( + &reference.sheet_id, + &report.sheet.document_sha256, + &reference.document_sha256, -+ ); ++ ) { ++ // The alias privilege needs the loaded sheet's verified `v1` value (R5.6). ++ Equivalence::TrustedAlias if !sheet.fingerprint_verified => Equivalence::Different, ++ other => other, ++ }; + let same_sheet = report.sheet.sheet_id == reference.sheet_id && same.same_document(); -+ if same_sheet && 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 {} (matches the bundled sheet through the trusted alias: report sha {}…, sheet sha {}…)", -+ esc(&reference.sheet_id), -+ esc(&stamped), -+ esc(¤t) -+ ); -+ } 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/src/pdf/write/input.rs b/crates/core/src/pdf/write/input.rs -index 120249a..6a4bfe5 100644 +index 120249a..23734ac 100644 --- a/crates/core/src/pdf/write/input.rs +++ b/crates/core/src/pdf/write/input.rs @@ -2,6 +2,7 @@ //! branding and the labels through their schemas again, the snapshot gate with every asset //! accepted by the SVG reader, the report's sheet and the page caps. Today's error kinds. -+use crate::domain::sheet::fingerprint::equivalence; ++use crate::domain::sheet::fingerprint::{Equivalence, equivalence}; use std::collections::HashMap; use serde::{Deserialize, Serialize}; @@ -281,78 +589,2039 @@ index 120249a..6a4bfe5 100644 return Err(error(ExportErrorKind::SheetMismatch, "")); } if report.observations.len() > MAX_OBSERVATIONS { -diff --git a/crates/core/tests/fingerprint_consumers.rs b/crates/core/tests/fingerprint_consumers.rs +@@ -225,11 +229,30 @@ fn assert_exportable(report: &Report, snapshot: &SheetSnapshot) -> Result<(), Ex + Ok(()) + } + ++/// M1 (owner 2026-10-24, option 1): an old report on the registered historical fingerprint of ++/// this very sheet, exported against the sheet's verified canonical value, archives a snapshot ++/// that carries the report's own stamp, so the envelope holds one value and every reader (the ++/// frozen N-1 one, a rollback build) keeps the snapshot. Only the registered pair of the same ++/// sheet: any other combination was refused by `assert_exportable`, and a new report already ++/// carries the canonical value. ++fn keep_the_report_stamp(report: &Report, snapshot: &mut SheetSnapshot) { ++ let reference = &snapshot.reference; ++ let same = equivalence( ++ &reference.sheet_id, ++ &report.sheet.document_sha256, ++ &reference.document_sha256, ++ ); ++ if same == Equivalence::TrustedAlias && report.sheet.sheet_id == reference.sheet_id { ++ snapshot.reference.document_sha256 = report.sheet.document_sha256.clone(); ++ } ++} ++ + /// Every check of export.ts before a page is drawn, in its order. + pub fn check_input(input: ExportInput) -> Result { + let (branding, labels) = typed_branding(&input)?; +- let (snapshot, assets) = checked_snapshot(&input.sheet_snapshot)?; ++ let (mut snapshot, assets) = checked_snapshot(&input.sheet_snapshot)?; + assert_exportable(&input.report, &snapshot)?; ++ keep_the_report_stamp(&input.report, &mut snapshot); + let index = SheetIndex::build(&snapshot.document) + .map_err(|NoMainView| error(ExportErrorKind::SnapshotInvalid, "no main view"))?; + Ok(CheckedInput { +diff --git a/crates/core/tests/curation_draft.rs b/crates/core/tests/curation_draft.rs +index 31c9ffc..ba3b2c1 100644 +--- a/crates/core/tests/curation_draft.rs ++++ b/crates/core/tests/curation_draft.rs +@@ -29,6 +29,9 @@ use faunosteo_core::curation::prettier_json::format_json; + use faunosteo_core::domain::report::ReportMigrationMap; + use faunosteo_core::domain::report::read::read_report_document; + use faunosteo_core::domain::sheet::AnatomicalSheetDocument; ++use faunosteo_core::domain::sheet::fingerprint::{ ++ FINGERPRINT_CONVENTION, TRUSTED_ALIASES, sheet_fingerprint, ++}; + use faunosteo_core::json::to_js_compact; + use serde_json::{Map, Value, json}; + +@@ -139,18 +142,85 @@ fn the_r5_3_files_of_the_committed_draft_folder_are_reproduced_byte_for_byte() { + assert_eq!(frozen.len(), asset.byte_size); + } + ++/// The declared difference of the R5.6 switch, `R5.6-fingerprint-v1` (owner 2026-10-24): from the ++/// pre-switch file the TypeScript wrote, only the fingerprint moves from the registered alias to ++/// its canonical value, and `sheet-ref.json` gains the descriptive block. Applied to a parsed ++/// value, then printed by the generator's own formatter: anything else that differs fails. ++fn r5_6_rule(name: &str, mut value: Value) -> Value { ++ let pair = &TRUSTED_ALIASES[0]; ++ let stamp = match name { ++ "sheet-ref.json" => &mut value["document_sha256"], ++ "report-migration-map.json" => &mut value["sheet"]["documentSha256"], ++ other => panic!("{other}: no declared rule"), ++ }; ++ assert_eq!( ++ *stamp, pair.alias, ++ "{name}: the pre-switch value is the alias" ++ ); ++ *stamp = Value::from(pair.canonical); ++ if name == "sheet-ref.json" { ++ value.as_object_mut().unwrap().insert( ++ "fingerprint".into(), ++ serde_json::json!({ "convention": FINGERPRINT_CONVENTION, "aliases": [pair.alias] }), ++ ); ++ } ++ value ++} ++ ++fn pre_switch(name: &str) -> String { ++ common::repo_file(&format!( ++ "crates/core/tests/fixtures/r5-6/pre-switch/{name}" ++ )) ++} ++ + #[test] +-fn the_document_fingerprint_is_the_historical_value() { ++fn the_pre_switch_copies_are_the_files_the_typescript_wrote() { ++ let artifacts = oracle("pipeline.json")["artifacts"].clone(); ++ for name in ["sheet-ref.json", "report-migration-map.json"] { ++ let row = artifacts ++ .as_array() ++ .unwrap() ++ .iter() ++ .find(|a| a["file"] == name && a["folder"].as_str().unwrap().ends_with("draft")) ++ .unwrap() ++ .clone(); ++ let text = pre_switch(name); ++ assert_eq!(row["sha256"], sha256_hex(text.as_bytes()), "{name}"); ++ assert_eq!(row["bytes"], text.len(), "{name}"); ++ } ++} ++ ++#[test] ++fn the_switch_changes_only_the_fingerprint_of_the_two_files() { ++ for name in ["sheet-ref.json", "report-migration-map.json"] { ++ let before: Value = serde_json::from_str(&pre_switch(name)).unwrap(); ++ let expected = format_json(&r5_6_rule(name, before)).unwrap(); ++ assert!( ++ expected == common::repo_file(&format!("{DRAFT}/{name}")), ++ "{name}: the committed file is not the pre-switch one under R5.6-fingerprint-v1" ++ ); ++ } ++} ++ ++#[test] ++fn the_document_fingerprint_is_v1_and_its_bytes_keep_the_historical_alias() { + let files = render_draft_artifacts(&equine_draft(), &[]).unwrap(); + let document = &files[0].1; + let reference: Value = serde_json::from_str(&files[2].1).unwrap(); ++ let pair = &TRUSTED_ALIASES[0]; ++ assert_eq!(sha256_hex(document.as_bytes()), pair.alias); + assert_eq!( + reference["document_sha256"], +- sha256_hex(document.as_bytes()) ++ sheet_fingerprint(document).unwrap() + ); ++ assert_eq!(reference["document_sha256"], pair.canonical); + assert_eq!( +- reference["document_sha256"], +- "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ reference["fingerprint"]["convention"], ++ FINGERPRINT_CONVENTION ++ ); ++ assert_eq!( ++ reference["fingerprint"]["aliases"], ++ serde_json::json!([pair.alias]) + ); + } + +diff --git a/crates/core/tests/curation_review.rs b/crates/core/tests/curation_review.rs +index aecf855..4b17621 100644 +--- a/crates/core/tests/curation_review.rs ++++ b/crates/core/tests/curation_review.rs +@@ -553,11 +553,12 @@ fn unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering() { + #[test] + fn the_drawings_projection_bounds_what_is_written() { + use faunosteo_core::curation::draft::pipeline::review_drawings_bytes; +- let written = |draft: &DraftResult, anomalies: &[Anomaly]| -> usize { +- render_draft_artifacts(draft, anomalies) ++ // The drawings alone (`render_draft_artifacts` writes exactly these): a draft with no ++ // annotation is no valid sheet, so since R5.6 it has no fingerprint and no full render. ++ let written = |draft: &DraftResult, _anomalies: &[Anomaly]| -> usize { ++ faunosteo_core::curation::draft::pipeline::review_drawings(draft) + .unwrap() + .iter() +- .filter(|(name, _)| name.starts_with("review/")) + .map(|(_, text)| text.len()) + .sum() + }; +diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json new file mode 100644 -index 0000000..39a5775 +index 0000000..c199d71 --- /dev/null -+++ b/crates/core/tests/fingerprint_consumers.rs -@@ -0,0 +1,69 @@ -+//! R5.6 switch rehearsal (part of `.claude/tasks/plans/r5-6-switch.patch`, not committed -+//! active): with the loaded sheet stamped with the canonical `v1` value, a report or an archive -+//! stamped with the registered historical value is the same document (no rebase, archive kept); -+//! a real content change, a forged value or another sheet still differ. ++++ b/crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json +@@ -0,0 +1,997 @@ ++{ ++ "schema_version": 1, ++ "sheet": { ++ "sheetId": "503dc301-a8b1-50d4-9e44-0919b2fc2916", ++ "versionId": null, ++ "documentSha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ }, ++ "main_view_id": "main", ++ "views": { ++ "head": "head" ++ }, ++ "annotations": { ++ "point-mpbwrkp0": { ++ "id": "hind-fetlock", ++ "name": { ++ "fr": "Boulet post. (métatarso-phalangien)", ++ "en": "Hind fetlock" ++ } ++ }, ++ "point-mpbwsi9q": { ++ "id": "hock", ++ "name": { ++ "fr": "Jarret (tarsien)", ++ "en": "Hock" ++ } ++ }, ++ "point-mpbwt4fa": { ++ "id": "stifle", ++ "name": { ++ "fr": "Grasset (fémoro-tibial)", ++ "en": "Stifle" ++ } ++ }, ++ "point-mpbwtst0": { ++ "id": "hip", ++ "name": { ++ "fr": "Hanche (coxo-fémorale)", ++ "en": "Hip joint" ++ } ++ }, ++ "point-mpbwugty": { ++ "id": "sacroiliac", ++ "name": { ++ "fr": "Articulation Sacro-Iliaque", ++ "en": "Sacroiliac Joint" ++ } ++ }, ++ "point-mpbwv4xy": { ++ "id": "shoulder", ++ "name": { ++ "fr": "Épaule (scapulo-humérale)", ++ "en": "Shoulder joint" ++ } ++ }, ++ "point-mpbwvpvt": { ++ "id": "elbow", ++ "name": { ++ "fr": "Coude (huméro-radial)", ++ "en": "Elbow joint" ++ } ++ }, ++ "point-mpbwwaru": { ++ "id": "fore-fetlock", ++ "name": { ++ "fr": "Boulet ant. (métacarpo-phalangien)", ++ "en": "Fore fetlock" ++ } ++ }, ++ "point-mpbwwxvn": { ++ "id": "fore-sesamoids", ++ "name": { ++ "fr": "Sésamoïdes ant. (boulet)", ++ "en": "Forelimb Sesamoids" ++ } ++ }, ++ "point-mpbwxnb4": { ++ "id": "l6-s1", ++ "name": { ++ "fr": "Charnière L6-S1 (lombo-sacrée)", ++ "en": "L6-S1 (Lumbosacral)" ++ } ++ }, ++ "point-mpbwyd9i": { ++ "id": "t18-l1", ++ "name": { ++ "fr": "Charnière T18-L1 (dorso-lombaire)", ++ "en": "T18-L1 (Thoracolumbar)" ++ } ++ }, ++ "point-mpbwyyc9": { ++ "id": "c7-t1", ++ "name": { ++ "fr": "Charnière C7-T1 (cervico-thoracique)", ++ "en": "C7-T1 (Cervicothoracic)" ++ } ++ }, ++ "zone-mpbx00jq": { ++ "id": "caudal", ++ "name": { ++ "fr": "Vertèbres caudales", ++ "en": "Coccygeal Vertebrae" ++ } ++ }, ++ "zone-mpbx0xnp": { ++ "id": "sacral", ++ "name": { ++ "fr": "Vertèbres sacrales", ++ "en": "Sacral Vertebrae" ++ } ++ }, ++ "zone-mpbx1rm9": { ++ "id": "lumbar", ++ "name": { ++ "fr": "Vertèbres lombaires", ++ "en": "Lumbar Vertebrae" ++ } ++ }, ++ "zone-mpbx2rpe": { ++ "id": "thoracic", ++ "name": { ++ "fr": "Vertèbres thoraciques", ++ "en": "Thoracic Vertebrae" ++ } ++ }, ++ "zone-mpbx5hx2": { ++ "id": "cervical", ++ "name": { ++ "fr": "Vertèbres cervicales", ++ "en": "Cervical Vertebrae" ++ } ++ }, ++ "zone-mpby55kd": { ++ "id": "head-trigger", ++ "name": { ++ "fr": "", ++ "en": "" ++ } ++ }, ++ "point-mpbykomv": { ++ "id": "parietal", ++ "name": { ++ "fr": "Pariétal", ++ "en": "Parietal bone" ++ } ++ }, ++ "point-mpbylh35": { ++ "id": "frontal", ++ "name": { ++ "fr": "Frontal", ++ "en": "Frontal bone" ++ } ++ }, ++ "point-mpbymcln": { ++ "id": "sphenoid", ++ "name": { ++ "fr": "Sphénoïde", ++ "en": "Sphenoid" ++ } ++ }, ++ "point-mpbyn2k3": { ++ "id": "temporal", ++ "name": { ++ "fr": "Temporel", ++ "en": "Temporal" ++ } ++ }, ++ "point-mpbynls5": { ++ "id": "occipital", ++ "name": { ++ "fr": "Occipital", ++ "en": "Occipital" ++ } ++ }, ++ "point-mpbyo7zq": { ++ "id": "atm", ++ "name": { ++ "fr": "Articulation Temporo-Mandibulaire (ATM)", ++ "en": "Temporomandibular Joint (TMJ)" ++ } ++ }, ++ "point-mpbyphay": { ++ "id": "ssb", ++ "name": { ++ "fr": "Synchondrose Sphéno-Basilaire (SSB)", ++ "en": "Spheno-Basilar Synchondrosis (SBS)" ++ } ++ }, ++ "point-mpbyq841": { ++ "id": "hyoid", ++ "name": { ++ "fr": "Hyoïde", ++ "en": "Hyoid" ++ } ++ }, ++ "point-mpbyqxbg": { ++ "id": "c0-c1", ++ "name": { ++ "fr": "Charnière C0-C1 (occipito-atloïdienne)", ++ "en": "C0-C1 (Occipito-atlantal)" ++ } ++ } ++ }, ++ "finding_paths": { ++ "parietal/parietal-dysfunctions": "parietal/parietal-dysfunctions", ++ "parietal/parietal-dysfunctions/mobility": "parietal/parietal-dysfunctions/mobility", ++ "parietal/parietal-dysfunctions/mobility/flexion-external-rotation": "parietal/parietal-dysfunctions/mobility/flexion-external-rotation", ++ "parietal/parietal-dysfunctions/mobility/extension-internal-rotation": "parietal/parietal-dysfunctions/mobility/extension-internal-rotation", ++ "parietal/parietal-dysfunctions/mobility/global-restriction": "parietal/parietal-dysfunctions/mobility/global-restriction", ++ "parietal/parietal-dysfunctions/intraosseous": "parietal/parietal-dysfunctions/intraosseous", ++ "parietal/parietal-dysfunctions/intraosseous/squama-deformation": "parietal/parietal-dysfunctions/intraosseous/squama-deformation", ++ "parietal/parietal-dysfunctions/intraosseous/interparietal-compression": "parietal/parietal-dysfunctions/intraosseous/interparietal-compression", ++ "parietal/parietal-dysfunctions/sutures": "parietal/parietal-dysfunctions/sutures", ++ "parietal/parietal-dysfunctions/sutures/frontoparietal": "parietal/parietal-dysfunctions/sutures/frontoparietal", ++ "parietal/parietal-dysfunctions/sutures/parieto-occipital": "parietal/parietal-dysfunctions/sutures/parieto-occipital", ++ "parietal/parietal-dysfunctions/sutures/parieto-temporal": "parietal/parietal-dysfunctions/sutures/parieto-temporal", ++ "parietal/parietal-dysfunctions/sutures/sphenoparietal": "parietal/parietal-dysfunctions/sutures/sphenoparietal", ++ "parietal/parietal-dysfunctions/sutures/interparietal": "parietal/parietal-dysfunctions/sutures/sagittal", ++ "parietal/parietal-observations": "parietal/parietal-consultation-reasons", ++ "parietal/parietal-observations/behavior-change": "parietal/parietal-consultation-reasons/behavior-change", ++ "parietal/parietal-observations/behavior-change/head-touch-hypersensitivity": "parietal/parietal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "parietal/parietal-observations/behavior-change/new-irritability": "parietal/parietal-consultation-reasons/behavior-change/new-irritability", ++ "parietal/parietal-observations/post-trauma-head": "parietal/parietal-consultation-reasons/post-trauma-head", ++ "parietal/anamnesis": "parietal/anamnesis", ++ "parietal/anamnesis/trauma-direct": "parietal/anamnesis/trauma-direct", ++ "parietal/anamnesis/stress-context": "parietal/anamnesis/stress-context", ++ "parietal/anamnesis/posture-context": "parietal/anamnesis/posture-context", ++ "parietal/anamnesis/dental-context": "parietal/anamnesis/dental-context", ++ "parietal/anamnesis/post-veterinary": "parietal/anamnesis/post-veterinary", ++ "parietal/anamnesis/no-identified-cause": "parietal/anamnesis/no-identified-cause", ++ "frontal/frontal-dysfunctions": "frontal/frontal-dysfunctions", ++ "frontal/frontal-dysfunctions/mobility": "frontal/frontal-dysfunctions/mobility", ++ "frontal/frontal-dysfunctions/mobility/flexion-external-rotation": "frontal/frontal-dysfunctions/mobility/flexion-external-rotation", ++ "frontal/frontal-dysfunctions/mobility/extension-internal-rotation": "frontal/frontal-dysfunctions/mobility/extension-internal-rotation", ++ "frontal/frontal-dysfunctions/mobility/global-restriction": "frontal/frontal-dysfunctions/mobility/global-restriction", ++ "frontal/frontal-dysfunctions/intraosseous": "frontal/frontal-dysfunctions/intraosseous", ++ "frontal/frontal-dysfunctions/intraosseous/metopic-compression": "frontal/frontal-dysfunctions/intraosseous/interfrontal-compression", ++ "frontal/frontal-dysfunctions/intraosseous/squama-deformation": "frontal/frontal-dysfunctions/intraosseous/squama-deformation", ++ "frontal/frontal-dysfunctions/sutures": "frontal/frontal-dysfunctions/sutures", ++ "frontal/frontal-dysfunctions/sutures/frontoparietal": "frontal/frontal-dysfunctions/sutures/frontoparietal", ++ "frontal/frontal-dysfunctions/sutures/frontosphenoidal": "frontal/frontal-dysfunctions/sutures/frontosphenoidal", ++ "frontal/frontal-dysfunctions/sutures/frontonasal": "frontal/frontal-dysfunctions/sutures/frontonasal", ++ "frontal/frontal-dysfunctions/sutures/frontolacrimal": "frontal/frontal-dysfunctions/sutures/frontolacrimal", ++ "frontal/frontal-dysfunctions/sutures/frontozygomatic": null, ++ "frontal/frontal-dysfunctions/sutures/interfrontal": "frontal/frontal-dysfunctions/sutures/interfrontal", ++ "frontal/frontal-observations": "frontal/frontal-consultation-reasons", ++ "frontal/frontal-observations/behavior-change": "frontal/frontal-consultation-reasons/behavior-change", ++ "frontal/frontal-observations/behavior-change/head-touch-hypersensitivity": "frontal/frontal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "frontal/frontal-observations/behavior-change/new-irritability": "frontal/frontal-consultation-reasons/behavior-change/new-irritability", ++ "frontal/frontal-observations/head-rubbing": "frontal/frontal-consultation-reasons/head-rubbing", ++ "frontal/frontal-observations/frontal-relief-asymmetry": "frontal/frontal-consultation-reasons/frontal-relief-asymmetry", ++ "frontal/frontal-observations/post-trauma-head": "frontal/frontal-consultation-reasons/post-trauma-head", ++ "frontal/anamnesis": "frontal/anamnesis", ++ "frontal/anamnesis/trauma-direct": "frontal/anamnesis/trauma-direct", ++ "frontal/anamnesis/stress-context": "frontal/anamnesis/stress-context", ++ "frontal/anamnesis/posture-context": "frontal/anamnesis/posture-context", ++ "frontal/anamnesis/dental-context": "frontal/anamnesis/dental-context", ++ "frontal/anamnesis/post-veterinary": "frontal/anamnesis/post-veterinary", ++ "frontal/anamnesis/no-identified-cause": "frontal/anamnesis/no-identified-cause", ++ "sphenoid/ssb-dysfunctions": null, ++ "sphenoid/ssb-dysfunctions/physiological": null, ++ "sphenoid/ssb-dysfunctions/physiological/flexion": null, ++ "sphenoid/ssb-dysfunctions/physiological/extension": null, ++ "sphenoid/ssb-dysfunctions/physiological/torsion-right": null, ++ "sphenoid/ssb-dysfunctions/physiological/torsion-left": null, ++ "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-right": null, ++ "sphenoid/ssb-dysfunctions/physiological/sidebending-rotation-left": null, ++ "sphenoid/ssb-dysfunctions/traumatic": null, ++ "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-superior": null, ++ "sphenoid/ssb-dysfunctions/traumatic/vertical-strain-inferior": null, ++ "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-right": null, ++ "sphenoid/ssb-dysfunctions/traumatic/lateral-strain-left": null, ++ "sphenoid/ssb-dysfunctions/traumatic/compression": null, ++ "sphenoid/ssb-dysfunctions/intraosseous": "sphenoid/sphenoid-dysfunctions/intraosseous", ++ "sphenoid/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, ++ "sphenoid/ssb-dysfunctions/intraosseous/lesser-wings": null, ++ "sphenoid/ssb-dysfunctions/intraosseous/greater-wings": null, ++ "sphenoid/ssb-dysfunctions/sutures": "sphenoid/sphenoid-dysfunctions/sutures", ++ "sphenoid/ssb-dysfunctions/sutures/sphenopetrosal": "sphenoid/sphenoid-dysfunctions/sutures/sphenopetrosal", ++ "sphenoid/ssb-dysfunctions/sutures/sphenosquamous": "sphenoid/sphenoid-dysfunctions/sutures/sphenosquamous", ++ "sphenoid/ssb-dysfunctions/sutures/sphenoparietal": "sphenoid/sphenoid-dysfunctions/sutures/sphenoparietal", ++ "sphenoid/ssb-dysfunctions/sutures/frontosphenoidal": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenozygomatic": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenomaxillary": "sphenoid/sphenoid-dysfunctions/sutures/sphenomaxillary", ++ "sphenoid/ssb-dysfunctions/sutures/sphenovomerian": null, ++ "sphenoid/ssb-dysfunctions/sutures/sphenopalatine": "sphenoid/sphenoid-dysfunctions/sutures/sphenopalatine", ++ "sphenoid/sphenoid-observations": "sphenoid/sphenoid-consultation-reasons", ++ "sphenoid/sphenoid-observations/behavior-change": "sphenoid/sphenoid-consultation-reasons/behavior-change", ++ "sphenoid/sphenoid-observations/behavior-change/irritability": "sphenoid/sphenoid-consultation-reasons/behavior-change/irritability", ++ "sphenoid/sphenoid-observations/behavior-change/withdrawal": "sphenoid/sphenoid-consultation-reasons/behavior-change/withdrawal", ++ "sphenoid/sphenoid-observations/behavior-change/hypersensitivity": "sphenoid/sphenoid-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "sphenoid/sphenoid-observations/performance-drop": "sphenoid/sphenoid-consultation-reasons/performance-drop", ++ "sphenoid/sphenoid-observations/cycle-irregularity": "sphenoid/sphenoid-consultation-reasons/cycle-irregularity", ++ "sphenoid/sphenoid-observations/post-trauma-head": "sphenoid/sphenoid-consultation-reasons/post-trauma-head", ++ "sphenoid/anamnesis": "sphenoid/anamnesis", ++ "sphenoid/anamnesis/trauma-direct": "sphenoid/anamnesis/trauma-direct", ++ "sphenoid/anamnesis/stress-context": "sphenoid/anamnesis/stress-context", ++ "sphenoid/anamnesis/posture-context": "sphenoid/anamnesis/posture-context", ++ "sphenoid/anamnesis/dental-context": "sphenoid/anamnesis/dental-context", ++ "sphenoid/anamnesis/post-veterinary": "sphenoid/anamnesis/post-veterinary", ++ "sphenoid/anamnesis/no-identified-cause": "sphenoid/anamnesis/no-identified-cause", ++ "temporal/temporal-dysfunctions": "temporal/temporal-dysfunctions", ++ "temporal/temporal-dysfunctions/mobility": "temporal/temporal-dysfunctions/mobility", ++ "temporal/temporal-dysfunctions/mobility/temporal-anteriority": "temporal/temporal-dysfunctions/mobility/temporal-anteriority", ++ "temporal/temporal-dysfunctions/mobility/flexion-external-rotation": "temporal/temporal-dysfunctions/mobility/flexion-external-rotation", ++ "temporal/temporal-dysfunctions/mobility/extension-internal-rotation": "temporal/temporal-dysfunctions/mobility/extension-internal-rotation", ++ "temporal/temporal-dysfunctions/mobility/global-restriction": "temporal/temporal-dysfunctions/mobility/global-restriction", ++ "temporal/temporal-dysfunctions/intraosseous": "temporal/temporal-dysfunctions/intraosseous", ++ "temporal/temporal-dysfunctions/intraosseous/petrosquamous": "temporal/temporal-dysfunctions/intraosseous/petrosquamous", ++ "temporal/temporal-dysfunctions/intraosseous/tympanic-part": "temporal/temporal-dysfunctions/intraosseous/tympanic-part", ++ "temporal/temporal-dysfunctions/sutures": "temporal/temporal-dysfunctions/sutures", ++ "temporal/temporal-dysfunctions/sutures/parieto-temporal": "temporal/temporal-dysfunctions/sutures/parieto-temporal", ++ "temporal/temporal-dysfunctions/sutures/sphenosquamous": "temporal/temporal-dysfunctions/sutures/sphenosquamous", ++ "temporal/temporal-dysfunctions/sutures/occipitomastoid": "temporal/temporal-dysfunctions/sutures/occipitomastoid", ++ "temporal/temporal-dysfunctions/sutures/temporozygomatic": "temporal/temporal-dysfunctions/sutures/temporozygomatic", ++ "temporal/temporal-dysfunctions/sutures/petro-occipital": "temporal/temporal-dysfunctions/sutures/petro-occipital", ++ "temporal/temporal-observations": "temporal/temporal-consultation-reasons", ++ "temporal/temporal-observations/behavior-change": "temporal/temporal-consultation-reasons/behavior-change", ++ "temporal/temporal-observations/behavior-change/head-touch-hypersensitivity": "temporal/temporal-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "temporal/temporal-observations/behavior-change/new-irritability": "temporal/temporal-consultation-reasons/behavior-change/new-irritability", ++ "temporal/temporal-observations/post-trauma-head": "temporal/temporal-consultation-reasons/post-trauma-head", ++ "temporal/anamnesis": "temporal/anamnesis", ++ "temporal/anamnesis/trauma-direct": "temporal/anamnesis/trauma-direct", ++ "temporal/anamnesis/stress-context": "temporal/anamnesis/stress-context", ++ "temporal/anamnesis/posture-context": "temporal/anamnesis/posture-context", ++ "temporal/anamnesis/dental-context": "temporal/anamnesis/dental-context", ++ "temporal/anamnesis/post-veterinary": "temporal/anamnesis/post-veterinary", ++ "temporal/anamnesis/no-identified-cause": "temporal/anamnesis/no-identified-cause", ++ "occipital/occipital-dysfunctions": "occipital/occipital-dysfunctions", ++ "occipital/occipital-dysfunctions/mobility": "occipital/occipital-dysfunctions/mobility", ++ "occipital/occipital-dysfunctions/mobility/condylar-compression": "occipital/occipital-dysfunctions/mobility/condylar-compression", ++ "occipital/occipital-dysfunctions/mobility/flexion-external-rotation": "occipital/occipital-dysfunctions/mobility/flexion-external-rotation", ++ "occipital/occipital-dysfunctions/mobility/extension-internal-rotation": "occipital/occipital-dysfunctions/mobility/extension-internal-rotation", ++ "occipital/occipital-dysfunctions/mobility/global-restriction": "occipital/occipital-dysfunctions/mobility/global-restriction", ++ "occipital/occipital-dysfunctions/intraosseous": "occipital/occipital-dysfunctions/intraosseous", ++ "occipital/occipital-dysfunctions/intraosseous/squama-part": "occipital/occipital-dysfunctions/intraosseous/squama-part", ++ "occipital/occipital-dysfunctions/intraosseous/condylar-parts": "occipital/occipital-dysfunctions/intraosseous/condylar-parts", ++ "occipital/occipital-dysfunctions/intraosseous/basilar-part": "occipital/occipital-dysfunctions/intraosseous/basilar-part", ++ "occipital/occipital-dysfunctions/sutures": "occipital/occipital-dysfunctions/sutures", ++ "occipital/occipital-dysfunctions/sutures/parieto-occipital": "occipital/occipital-dysfunctions/sutures/parieto-occipital", ++ "occipital/occipital-dysfunctions/sutures/occipitomastoid": "occipital/occipital-dysfunctions/sutures/occipitomastoid", ++ "occipital/occipital-dysfunctions/sutures/petro-occipital": "occipital/occipital-dysfunctions/sutures/petro-occipital", ++ "occipital/occipital-observations": "occipital/occipital-consultation-reasons", ++ "occipital/occipital-observations/behavior-change": "occipital/occipital-consultation-reasons/behavior-change", ++ "occipital/occipital-observations/behavior-change/head-touch-hypersensitivity": "occipital/occipital-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "occipital/occipital-observations/behavior-change/new-irritability": "occipital/occipital-consultation-reasons/behavior-change/new-irritability", ++ "occipital/occipital-observations/post-trauma-head": "occipital/occipital-consultation-reasons/post-trauma-head", ++ "occipital/anamnesis": "occipital/anamnesis", ++ "occipital/anamnesis/trauma-direct": "occipital/anamnesis/trauma-direct", ++ "occipital/anamnesis/stress-context": "occipital/anamnesis/stress-context", ++ "occipital/anamnesis/posture-context": "occipital/anamnesis/posture-context", ++ "occipital/anamnesis/dental-context": "occipital/anamnesis/dental-context", ++ "occipital/anamnesis/post-veterinary": "occipital/anamnesis/post-veterinary", ++ "occipital/anamnesis/no-identified-cause": "occipital/anamnesis/no-identified-cause", ++ "ssb/ssb-dysfunctions": "ssb/ssb-dysfunctions", ++ "ssb/ssb-dysfunctions/physiological": "ssb/ssb-dysfunctions/physiological", ++ "ssb/ssb-dysfunctions/physiological/flexion": "ssb/ssb-dysfunctions/physiological/flexion", ++ "ssb/ssb-dysfunctions/physiological/extension": "ssb/ssb-dysfunctions/physiological/extension", ++ "ssb/ssb-dysfunctions/physiological/torsion-right": "ssb/ssb-dysfunctions/physiological/torsion-right", ++ "ssb/ssb-dysfunctions/physiological/torsion-left": "ssb/ssb-dysfunctions/physiological/torsion-left", ++ "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-right", ++ "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left": "ssb/ssb-dysfunctions/physiological/sidebending-rotation-left", ++ "ssb/ssb-dysfunctions/traumatic": "ssb/ssb-dysfunctions/traumatic", ++ "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-superior", ++ "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior": "ssb/ssb-dysfunctions/traumatic/vertical-strain-inferior", ++ "ssb/ssb-dysfunctions/traumatic/lateral-strain-right": "ssb/ssb-dysfunctions/traumatic/lateral-strain-right", ++ "ssb/ssb-dysfunctions/traumatic/lateral-strain-left": "ssb/ssb-dysfunctions/traumatic/lateral-strain-left", ++ "ssb/ssb-dysfunctions/traumatic/compression": "ssb/ssb-dysfunctions/traumatic/compression", ++ "ssb/ssb-dysfunctions/intraosseous": null, ++ "ssb/ssb-dysfunctions/intraosseous/pre-post-sphenoid": null, ++ "ssb/ssb-dysfunctions/intraosseous/lesser-wings": null, ++ "ssb/ssb-dysfunctions/intraosseous/greater-wings": null, ++ "ssb/ssb-dysfunctions/sutures": null, ++ "ssb/ssb-dysfunctions/sutures/sphenopetrosal": null, ++ "ssb/ssb-dysfunctions/sutures/sphenosquamous": null, ++ "ssb/ssb-dysfunctions/sutures/sphenoparietal": null, ++ "ssb/ssb-dysfunctions/sutures/frontosphenoidal": null, ++ "ssb/ssb-dysfunctions/sutures/sphenozygomatic": null, ++ "ssb/ssb-dysfunctions/sutures/sphenomaxillary": null, ++ "ssb/ssb-dysfunctions/sutures/sphenovomerian": null, ++ "ssb/ssb-dysfunctions/sutures/sphenopalatine": null, ++ "ssb/ssb-observations": "ssb/ssb-consultation-reasons", ++ "ssb/ssb-observations/behavior-change": "ssb/ssb-consultation-reasons/behavior-change", ++ "ssb/ssb-observations/behavior-change/irritability": "ssb/ssb-consultation-reasons/behavior-change/irritability", ++ "ssb/ssb-observations/behavior-change/withdrawal": "ssb/ssb-consultation-reasons/behavior-change/withdrawal", ++ "ssb/ssb-observations/behavior-change/hypersensitivity": "ssb/ssb-consultation-reasons/behavior-change/head-touch-hypersensitivity", ++ "ssb/ssb-observations/performance-drop": "ssb/ssb-consultation-reasons/performance-drop", ++ "ssb/ssb-observations/cycle-irregularity": "ssb/ssb-consultation-reasons/cycle-irregularity", ++ "ssb/ssb-observations/post-trauma-head": "ssb/ssb-consultation-reasons/post-trauma-head", ++ "ssb/anamnesis": "ssb/anamnesis", ++ "ssb/anamnesis/trauma-direct": "ssb/anamnesis/trauma-direct", ++ "ssb/anamnesis/stress-context": "ssb/anamnesis/stress-context", ++ "ssb/anamnesis/posture-context": "ssb/anamnesis/posture-context", ++ "ssb/anamnesis/dental-context": "ssb/anamnesis/dental-context", ++ "ssb/anamnesis/post-veterinary": "ssb/anamnesis/post-veterinary", ++ "ssb/anamnesis/no-identified-cause": "ssb/anamnesis/no-identified-cause", ++ "atm/atm-dysfunctions": "atm/atm-dysfunctions", ++ "atm/atm-dysfunctions/articular": "atm/atm-dysfunctions/articular", ++ "atm/atm-dysfunctions/articular/restriction-opening": "atm/atm-dysfunctions/articular/restriction-opening", ++ "atm/atm-dysfunctions/articular/restriction-closing": "atm/atm-dysfunctions/articular/restriction-closing", ++ "atm/atm-dysfunctions/articular/restriction-lateral": "atm/atm-dysfunctions/articular/restriction-lateral", ++ "atm/atm-dysfunctions/articular/restriction-protrusion": "atm/atm-dysfunctions/articular/restriction-protrusion", ++ "atm/atm-dysfunctions/articular/hypomobility": "atm/atm-dysfunctions/articular/hypomobility", ++ "atm/atm-dysfunctions/articular/hypermobility": "atm/atm-dysfunctions/articular/hypermobility", ++ "atm/atm-dysfunctions/muscular": "atm/atm-dysfunctions/muscular", ++ "atm/atm-dysfunctions/muscular/masseter-tension": "atm/atm-dysfunctions/muscular/masseter-tension", ++ "atm/atm-dysfunctions/muscular/temporalis-tension": "atm/atm-dysfunctions/muscular/temporalis-tension", ++ "atm/atm-dysfunctions/muscular/pterygoid-tension": "atm/atm-dysfunctions/muscular/pterygoid-tension", ++ "atm/atm-dysfunctions/muscular/trigger-points": "atm/atm-dysfunctions/muscular/trigger-points", ++ "atm/atm-dysfunctions/mechanical": "atm/atm-dysfunctions/mechanical", ++ "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw": "atm/atm-dysfunctions/mechanical/lateral-deviation-jaw", ++ "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear": "atm/atm-dysfunctions/mechanical/asymmetric-dental-wear", ++ "atm/atm-dysfunctions/mechanical/opening-deviation": "atm/atm-dysfunctions/mechanical/opening-deviation", ++ "atm/atm-dysfunctions/mechanical/asymmetric-amplitude": "atm/atm-dysfunctions/mechanical/asymmetric-amplitude", ++ "atm/atm-observations": "atm/atm-consultation-reasons", ++ "atm/atm-observations/bit-defense": "atm/atm-consultation-reasons/bit-defense", ++ "atm/atm-observations/headshaking": "atm/atm-consultation-reasons/headshaking", ++ "atm/atm-observations/head-tilt-saddle": "atm/atm-consultation-reasons/head-tilt-saddle", ++ "atm/atm-observations/slow-eating": "atm/atm-consultation-reasons/slow-eating", ++ "atm/atm-observations/drops-food": "atm/atm-consultation-reasons/drops-food", ++ "atm/atm-observations/hand-contact-refusal": "atm/atm-consultation-reasons/hand-contact-refusal", ++ "atm/atm-observations/false-bend": "atm/atm-consultation-reasons/false-bend", ++ "atm/atm-observations/post-dental-care": "atm/atm-consultation-reasons/post-dental-care", ++ "atm/anamnesis": "atm/anamnesis", ++ "atm/anamnesis/trauma-direct": "atm/anamnesis/trauma-direct", ++ "atm/anamnesis/stress-context": "atm/anamnesis/stress-context", ++ "atm/anamnesis/posture-context": "atm/anamnesis/posture-context", ++ "atm/anamnesis/dental-context": "atm/anamnesis/dental-context", ++ "atm/anamnesis/post-veterinary": "atm/anamnesis/post-veterinary", ++ "atm/anamnesis/no-identified-cause": "atm/anamnesis/no-identified-cause", ++ "hyoid/hyoid-dysfunctions": "hyoid/hyoid-dysfunctions", ++ "hyoid/hyoid-dysfunctions/mobility": "hyoid/hyoid-dysfunctions/mobility", ++ "hyoid/hyoid-dysfunctions/mobility/global-restriction": "hyoid/hyoid-dysfunctions/mobility/global-restriction", ++ "hyoid/hyoid-dysfunctions/mobility/lateral-deviation": "hyoid/hyoid-dysfunctions/mobility/lateral-deviation", ++ "hyoid/hyoid-dysfunctions/mobility/swing-restriction": "hyoid/hyoid-dysfunctions/mobility/retraction-protraction-restriction", ++ "hyoid/hyoid-dysfunctions/muscular": "hyoid/hyoid-dysfunctions/muscular", ++ "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/suprahyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension": "hyoid/hyoid-dysfunctions/muscular/infrahyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension": "hyoid/hyoid-dysfunctions/muscular/stylohyoid-tension", ++ "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension": "hyoid/hyoid-dysfunctions/muscular/tongue-base-tension", ++ "hyoid/hyoid-dysfunctions/intraosseous": "hyoid/hyoid-dysfunctions/intraosseous", ++ "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone": "hyoid/hyoid-dysfunctions/intraosseous/stylohyoid-bone", ++ "hyoid/hyoid-dysfunctions/intraosseous/basihyoid": "hyoid/hyoid-dysfunctions/intraosseous/basihyoid", ++ "hyoid/hyoid-observations": "hyoid/hyoid-consultation-reasons", ++ "hyoid/hyoid-observations/bit-defense": "hyoid/hyoid-consultation-reasons/bit-defense", ++ "hyoid/hyoid-observations/tongue-over-bit": "hyoid/hyoid-consultation-reasons/tongue-over-bit", ++ "hyoid/hyoid-observations/swallowing-difficulty": "hyoid/hyoid-consultation-reasons/swallowing-difficulty", ++ "hyoid/hyoid-observations/head-carriage-resistance": "hyoid/hyoid-consultation-reasons/head-carriage-resistance", ++ "hyoid/hyoid-observations/post-dental-care": "hyoid/hyoid-consultation-reasons/post-dental-care", ++ "hyoid/anamnesis": "hyoid/anamnesis", ++ "hyoid/anamnesis/trauma-direct": "hyoid/anamnesis/trauma-direct", ++ "hyoid/anamnesis/stress-context": "hyoid/anamnesis/stress-context", ++ "hyoid/anamnesis/posture-context": "hyoid/anamnesis/posture-context", ++ "hyoid/anamnesis/dental-context": "hyoid/anamnesis/dental-context", ++ "hyoid/anamnesis/post-veterinary": "hyoid/anamnesis/post-veterinary", ++ "hyoid/anamnesis/no-identified-cause": "hyoid/anamnesis/no-identified-cause", ++ "c0-c1/c0-c1-dysfunctions": "c0-c1/c0-c1-dysfunctions", ++ "c0-c1/c0-c1-dysfunctions/segmental": "c0-c1/c0-c1-dysfunctions/segmental", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-flexion", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension": "c0-c1/c0-c1-dysfunctions/segmental/restriction-extension", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion": "c0-c1/c0-c1-dysfunctions/segmental/restriction-lateroflexion", ++ "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation": "c0-c1/c0-c1-dysfunctions/segmental/restriction-rotation", ++ "c0-c1/c0-c1-dysfunctions/segmental/fixation": "c0-c1/c0-c1-dysfunctions/segmental/fixation", ++ "c0-c1/c0-c1-dysfunctions/muscular": "c0-c1/c0-c1-dysfunctions/muscular", ++ "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/rectus-capitis-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension": "c0-c1/c0-c1-dysfunctions/muscular/obliquus-capitis-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension": "c0-c1/c0-c1-dysfunctions/muscular/splenius-tension", ++ "c0-c1/c0-c1-dysfunctions/muscular/trigger-points": "c0-c1/c0-c1-dysfunctions/muscular/trigger-points", ++ "c0-c1/c0-c1-dysfunctions/mechanical": "c0-c1/c0-c1-dysfunctions/mechanical", ++ "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/amplitude-asymmetry", ++ "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry": "c0-c1/c0-c1-dysfunctions/mechanical/alignment-asymmetry", ++ "c0-c1/c0-c1-observations": "c0-c1/c0-c1-consultation-reasons", ++ "c0-c1/c0-c1-observations/poll-sensitivity": "c0-c1/c0-c1-consultation-reasons/poll-sensitivity", ++ "c0-c1/c0-c1-observations/head-carriage": "c0-c1/c0-c1-consultation-reasons/head-carriage", ++ "c0-c1/c0-c1-observations/headshaking": "c0-c1/c0-c1-consultation-reasons/headshaking", ++ "c0-c1/c0-c1-observations/bridle-resistance": "c0-c1/c0-c1-consultation-reasons/bridle-resistance", ++ "c0-c1/c0-c1-observations/palpation-sensitivity": "c0-c1/c0-c1-consultation-reasons/palpation-sensitivity", ++ "c0-c1/anamnesis": "c0-c1/anamnesis", ++ "c0-c1/anamnesis/trauma-direct": "c0-c1/anamnesis/trauma-direct", ++ "c0-c1/anamnesis/saddle-context": "c0-c1/anamnesis/saddle-context", ++ "c0-c1/anamnesis/posture-context": "c0-c1/anamnesis/posture-context", ++ "c0-c1/anamnesis/stress-context": "c0-c1/anamnesis/stress-context", ++ "c0-c1/anamnesis/post-veterinary": "c0-c1/anamnesis/post-veterinary", ++ "c0-c1/anamnesis/no-identified-cause": "c0-c1/anamnesis/no-identified-cause", ++ "cervical/cervical-dysfunctions": "cervical/cervical-dysfunctions", ++ "cervical/cervical-dysfunctions/segmental": "cervical/cervical-dysfunctions/segmental", ++ "cervical/cervical-dysfunctions/segmental/restriction-flexion": "cervical/cervical-dysfunctions/segmental/restriction-flexion", ++ "cervical/cervical-dysfunctions/segmental/restriction-extension": "cervical/cervical-dysfunctions/segmental/restriction-extension", ++ "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion": "cervical/cervical-dysfunctions/segmental/restriction-lateroflexion", ++ "cervical/cervical-dysfunctions/segmental/restriction-rotation": "cervical/cervical-dysfunctions/segmental/restriction-rotation", ++ "cervical/cervical-dysfunctions/segmental/localized-fixation": "cervical/cervical-dysfunctions/segmental/localized-fixation", ++ "cervical/cervical-dysfunctions/group": "cervical/cervical-dysfunctions/group", ++ "cervical/cervical-dysfunctions/group/nsr-group": "cervical/cervical-dysfunctions/group/nsr-group", ++ "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude": "cervical/cervical-dysfunctions/group/functional-scoliotic-attitude", ++ "cervical/cervical-dysfunctions/muscular": "cervical/cervical-dysfunctions/muscular", ++ "cervical/cervical-dysfunctions/muscular/splenius-tension": "cervical/cervical-dysfunctions/muscular/splenius-tension", ++ "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis": "cervical/cervical-dysfunctions/muscular/longissimus-capitis-cervicis", ++ "cervical/cervical-dysfunctions/muscular/scalenus-tension": "cervical/cervical-dysfunctions/muscular/scalenus-tension", ++ "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension": "cervical/cervical-dysfunctions/muscular/brachiocephalicus-tension", ++ "cervical/cervical-dysfunctions/muscular/multifidus-cervicis": "cervical/cervical-dysfunctions/muscular/multifidus-cervicis", ++ "cervical/cervical-dysfunctions/mechanical": "cervical/cervical-dysfunctions/mechanical", ++ "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry": "cervical/cervical-dysfunctions/mechanical/lateral-bend-asymmetry", ++ "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry": "cervical/cervical-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "cervical/cervical-observations": "cervical/cervical-consultation-reasons", ++ "cervical/cervical-observations/ridden-work": "cervical/cervical-consultation-reasons/ridden-work", ++ "cervical/cervical-observations/ridden-work/bend-asymmetry-work": "cervical/cervical-consultation-reasons/ridden-work/bend-asymmetry-work", ++ "cervical/cervical-observations/ridden-work/head-carriage": "cervical/cervical-consultation-reasons/ridden-work/head-carriage", ++ "cervical/cervical-observations/ridden-work/contact-resistance": "cervical/cervical-consultation-reasons/ridden-work/contact-resistance", ++ "cervical/cervical-observations/stumbling-proprioceptive": "cervical/cervical-consultation-reasons/stumbling-proprioceptive", ++ "cervical/cervical-observations/palpation-sensitivity": "cervical/cervical-consultation-reasons/palpation-sensitivity", ++ "cervical/cervical-observations/new-stiffness": "cervical/cervical-consultation-reasons/new-stiffness", ++ "cervical/anamnesis": "cervical/anamnesis", ++ "cervical/anamnesis/trauma-direct": "cervical/anamnesis/trauma-direct", ++ "cervical/anamnesis/saddle-context": "cervical/anamnesis/saddle-context", ++ "cervical/anamnesis/posture-context": "cervical/anamnesis/posture-context", ++ "cervical/anamnesis/stress-context": "cervical/anamnesis/stress-context", ++ "cervical/anamnesis/post-veterinary": "cervical/anamnesis/post-veterinary", ++ "cervical/anamnesis/no-identified-cause": "cervical/anamnesis/no-identified-cause", ++ "c7-t1/c7-t1-dysfunctions": "c7-t1/c7-t1-dysfunctions", ++ "c7-t1/c7-t1-dysfunctions/segmental": "c7-t1/c7-t1-dysfunctions/segmental", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-flexion", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension": "c7-t1/c7-t1-dysfunctions/segmental/restriction-extension", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion": "c7-t1/c7-t1-dysfunctions/segmental/restriction-lateroflexion", ++ "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation": "c7-t1/c7-t1-dysfunctions/segmental/restriction-rotation", ++ "c7-t1/c7-t1-dysfunctions/segmental/fixation": "c7-t1/c7-t1-dysfunctions/segmental/fixation", ++ "c7-t1/c7-t1-dysfunctions/muscular": "c7-t1/c7-t1-dysfunctions/muscular", ++ "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension": "c7-t1/c7-t1-dysfunctions/muscular/scalenus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension": "c7-t1/c7-t1-dysfunctions/muscular/serratus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension": "c7-t1/c7-t1-dysfunctions/muscular/brachiocephalicus-tension", ++ "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension": "c7-t1/c7-t1-dysfunctions/muscular/deep-cervical-tension", ++ "c7-t1/c7-t1-dysfunctions/mechanical": "c7-t1/c7-t1-dysfunctions/mechanical", ++ "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/amplitude-asymmetry", ++ "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry": "c7-t1/c7-t1-dysfunctions/mechanical/alignment-asymmetry", ++ "c7-t1/c7-t1-observations": "c7-t1/c7-t1-consultation-reasons", ++ "c7-t1/c7-t1-observations/base-neck-stiffness": "c7-t1/c7-t1-consultation-reasons/base-neck-stiffness", ++ "c7-t1/c7-t1-observations/forelimb-engagement": "c7-t1/c7-t1-consultation-reasons/forelimb-engagement", ++ "c7-t1/c7-t1-observations/ewe-neck-posture": "c7-t1/c7-t1-consultation-reasons/ewe-neck-posture", ++ "c7-t1/c7-t1-observations/forelimb-lameness": "c7-t1/c7-t1-consultation-reasons/forelimb-lameness", ++ "c7-t1/anamnesis": "c7-t1/anamnesis", ++ "c7-t1/anamnesis/trauma-direct": "c7-t1/anamnesis/trauma-direct", ++ "c7-t1/anamnesis/saddle-context": "c7-t1/anamnesis/saddle-context", ++ "c7-t1/anamnesis/posture-context": "c7-t1/anamnesis/posture-context", ++ "c7-t1/anamnesis/stress-context": "c7-t1/anamnesis/stress-context", ++ "c7-t1/anamnesis/post-veterinary": "c7-t1/anamnesis/post-veterinary", ++ "c7-t1/anamnesis/no-identified-cause": "c7-t1/anamnesis/no-identified-cause", ++ "shoulder/shoulder-dysfunctions": "shoulder/shoulder-dysfunctions", ++ "shoulder/shoulder-dysfunctions/articular": "shoulder/shoulder-dysfunctions/articular", ++ "shoulder/shoulder-dysfunctions/articular/restriction-flexion": "shoulder/shoulder-dysfunctions/articular/restriction-flexion", ++ "shoulder/shoulder-dysfunctions/articular/restriction-extension": "shoulder/shoulder-dysfunctions/articular/restriction-extension", ++ "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction": "shoulder/shoulder-dysfunctions/articular/restriction-abduction-adduction", ++ "shoulder/shoulder-dysfunctions/articular/restriction-glide": "shoulder/shoulder-dysfunctions/articular/restriction-glide", ++ "shoulder/shoulder-dysfunctions/articular/hypomobility": "shoulder/shoulder-dysfunctions/articular/hypomobility", ++ "shoulder/shoulder-dysfunctions/articular/hypermobility": "shoulder/shoulder-dysfunctions/articular/hypermobility", ++ "shoulder/shoulder-dysfunctions/muscular": "shoulder/shoulder-dysfunctions/muscular", ++ "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus": "shoulder/shoulder-dysfunctions/muscular/supraspinatus-infraspinatus", ++ "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension": "shoulder/shoulder-dysfunctions/muscular/subscapularis-tension", ++ "shoulder/shoulder-dysfunctions/muscular/deltoid-tension": "shoulder/shoulder-dysfunctions/muscular/deltoid-tension", ++ "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension": "shoulder/shoulder-dysfunctions/muscular/biceps-brachii-tension", ++ "shoulder/shoulder-dysfunctions/muscular/trigger-points": "shoulder/shoulder-dysfunctions/muscular/trigger-points", ++ "shoulder/shoulder-dysfunctions/mechanical": "shoulder/shoulder-dysfunctions/mechanical", ++ "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/amplitude-asymmetry", ++ "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry": "shoulder/shoulder-dysfunctions/mechanical/scapula-position-asymmetry", ++ "shoulder/shoulder-observations": "shoulder/shoulder-consultation-reasons", ++ "shoulder/shoulder-observations/ridden-work": "shoulder/shoulder-consultation-reasons/ridden-work", ++ "shoulder/shoulder-observations/ridden-work/canter-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/canter-difficulty", ++ "shoulder/shoulder-observations/ridden-work/backing-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/backing-difficulty", ++ "shoulder/shoulder-observations/ridden-work/limb-engagement": "shoulder/shoulder-consultation-reasons/ridden-work/limb-engagement", ++ "shoulder/shoulder-observations/ridden-work/jumping-difficulty": "shoulder/shoulder-consultation-reasons/ridden-work/jumping-difficulty", ++ "shoulder/shoulder-observations/shortened-cranial-phase": "shoulder/shoulder-consultation-reasons/shortened-cranial-phase", ++ "shoulder/shoulder-observations/limb-lameness": "shoulder/shoulder-consultation-reasons/limb-lameness", ++ "shoulder/anamnesis": "shoulder/anamnesis", ++ "shoulder/anamnesis/trauma-direct": "shoulder/anamnesis/trauma-direct", ++ "shoulder/anamnesis/sport-context": "shoulder/anamnesis/sport-context", ++ "shoulder/anamnesis/posture-context": "shoulder/anamnesis/posture-context", ++ "shoulder/anamnesis/stress-context": "shoulder/anamnesis/stress-context", ++ "shoulder/anamnesis/post-veterinary": "shoulder/anamnesis/post-veterinary", ++ "shoulder/anamnesis/no-identified-cause": "shoulder/anamnesis/no-identified-cause", ++ "elbow/elbow-dysfunctions": "elbow/elbow-dysfunctions", ++ "elbow/elbow-dysfunctions/articular": "elbow/elbow-dysfunctions/articular", ++ "elbow/elbow-dysfunctions/articular/restriction-flexion": "elbow/elbow-dysfunctions/articular/restriction-flexion", ++ "elbow/elbow-dysfunctions/articular/restriction-extension": "elbow/elbow-dysfunctions/articular/restriction-extension", ++ "elbow/elbow-dysfunctions/articular/restriction-lateromedial": "elbow/elbow-dysfunctions/articular/restriction-lateromedial", ++ "elbow/elbow-dysfunctions/articular/hypomobility": "elbow/elbow-dysfunctions/articular/hypomobility", ++ "elbow/elbow-dysfunctions/articular/hypermobility": "elbow/elbow-dysfunctions/articular/hypermobility", ++ "elbow/elbow-dysfunctions/muscular": "elbow/elbow-dysfunctions/muscular", ++ "elbow/elbow-dysfunctions/muscular/triceps-tension": "elbow/elbow-dysfunctions/muscular/triceps-tension", ++ "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension": "elbow/elbow-dysfunctions/muscular/biceps-brachialis-tension", ++ "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin": "elbow/elbow-dysfunctions/muscular/carpal-extensors-origin", ++ "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin": "elbow/elbow-dysfunctions/muscular/carpal-flexors-origin", ++ "elbow/elbow-dysfunctions/muscular/trigger-points": "elbow/elbow-dysfunctions/muscular/trigger-points", ++ "elbow/elbow-dysfunctions/mechanical": "elbow/elbow-dysfunctions/mechanical", ++ "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry": "elbow/elbow-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry": "elbow/elbow-dysfunctions/mechanical/amplitude-asymmetry", ++ "elbow/elbow-observations": "elbow/elbow-consultation-reasons", ++ "elbow/elbow-observations/ridden-work": "elbow/elbow-consultation-reasons/ridden-work", ++ "elbow/elbow-observations/ridden-work/canter-difficulty": "elbow/elbow-consultation-reasons/ridden-work/canter-difficulty", ++ "elbow/elbow-observations/ridden-work/backing-difficulty": "elbow/elbow-consultation-reasons/ridden-work/backing-difficulty", ++ "elbow/elbow-observations/ridden-work/limb-engagement": "elbow/elbow-consultation-reasons/ridden-work/limb-engagement", ++ "elbow/elbow-observations/ridden-work/jumping-difficulty": "elbow/elbow-consultation-reasons/ridden-work/jumping-difficulty", ++ "elbow/elbow-observations/limb-lameness": "elbow/elbow-consultation-reasons/limb-lameness", ++ "elbow/anamnesis": "elbow/anamnesis", ++ "elbow/anamnesis/trauma-direct": "elbow/anamnesis/trauma-direct", ++ "elbow/anamnesis/sport-context": "elbow/anamnesis/sport-context", ++ "elbow/anamnesis/posture-context": "elbow/anamnesis/posture-context", ++ "elbow/anamnesis/stress-context": "elbow/anamnesis/stress-context", ++ "elbow/anamnesis/post-veterinary": "elbow/anamnesis/post-veterinary", ++ "elbow/anamnesis/no-identified-cause": "elbow/anamnesis/no-identified-cause", ++ "fore-fetlock/fore-fetlock-dysfunctions": "fore-fetlock/fore-fetlock-dysfunctions", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular": "fore-fetlock/fore-fetlock-dysfunctions/articular", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-flexion", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-extension", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial": "fore-fetlock/fore-fetlock-dysfunctions/articular/restriction-lateromedial", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypomobility", ++ "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility": "fore-fetlock/fore-fetlock-dysfunctions/articular/hypermobility", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular": "fore-fetlock/fore-fetlock-dysfunctions/muscular", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-flexors-tendon", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon": "fore-fetlock/fore-fetlock-dysfunctions/muscular/digital-extensor-tendon", ++ "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia": "fore-fetlock/fore-fetlock-dysfunctions/muscular/palmar-fascia", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical": "fore-fetlock/fore-fetlock-dysfunctions/mechanical", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/amplitude-asymmetry", ++ "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "fore-fetlock/fore-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", ++ "fore-fetlock/fore-fetlock-observations": "fore-fetlock/fore-fetlock-consultation-reasons", ++ "fore-fetlock/fore-fetlock-observations/ridden-work": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/canter-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/canter-difficulty", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/backing-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/backing-difficulty", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/limb-engagement": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/limb-engagement", ++ "fore-fetlock/fore-fetlock-observations/ridden-work/jumping-difficulty": "fore-fetlock/fore-fetlock-consultation-reasons/ridden-work/jumping-difficulty", ++ "fore-fetlock/fore-fetlock-observations/limb-lameness": "fore-fetlock/fore-fetlock-consultation-reasons/limb-lameness", ++ "fore-fetlock/anamnesis": "fore-fetlock/anamnesis", ++ "fore-fetlock/anamnesis/trauma-direct": "fore-fetlock/anamnesis/trauma-direct", ++ "fore-fetlock/anamnesis/sport-context": "fore-fetlock/anamnesis/sport-context", ++ "fore-fetlock/anamnesis/posture-context": "fore-fetlock/anamnesis/posture-context", ++ "fore-fetlock/anamnesis/stress-context": "fore-fetlock/anamnesis/stress-context", ++ "fore-fetlock/anamnesis/post-veterinary": "fore-fetlock/anamnesis/post-veterinary", ++ "fore-fetlock/anamnesis/no-identified-cause": "fore-fetlock/anamnesis/no-identified-cause", ++ "fore-sesamoids/fore-sesamoids-dysfunctions": "fore-sesamoids/fore-sesamoids-dysfunctions", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/sesamoid-glide-restriction", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/medial-sesamoid", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid": "fore-sesamoids/fore-sesamoids-dysfunctions/mobility/lateral-sesamoid", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/intersesamoidean", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide": "fore-sesamoids/fore-sesamoids-dysfunctions/ligamentous/flexor-tendon-glide", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/sesamoid-asymmetry", ++ "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry": "fore-sesamoids/fore-sesamoids-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "fore-sesamoids/fore-sesamoids-observations": "fore-sesamoids/fore-sesamoids-consultation-reasons", ++ "fore-sesamoids/fore-sesamoids-observations/local-sensitivity": "fore-sesamoids/fore-sesamoids-consultation-reasons/local-sensitivity", ++ "fore-sesamoids/fore-sesamoids-observations/shortened-stride": "fore-sesamoids/fore-sesamoids-consultation-reasons/shortened-stride", ++ "fore-sesamoids/fore-sesamoids-observations/forelimb-lameness": "fore-sesamoids/fore-sesamoids-consultation-reasons/forelimb-lameness", ++ "fore-sesamoids/anamnesis": "fore-sesamoids/anamnesis", ++ "fore-sesamoids/anamnesis/trauma-direct": "fore-sesamoids/anamnesis/trauma-direct", ++ "fore-sesamoids/anamnesis/sport-context": "fore-sesamoids/anamnesis/sport-context", ++ "fore-sesamoids/anamnesis/posture-context": "fore-sesamoids/anamnesis/posture-context", ++ "fore-sesamoids/anamnesis/stress-context": "fore-sesamoids/anamnesis/stress-context", ++ "fore-sesamoids/anamnesis/post-veterinary": "fore-sesamoids/anamnesis/post-veterinary", ++ "fore-sesamoids/anamnesis/no-identified-cause": "fore-sesamoids/anamnesis/no-identified-cause", ++ "thoracic/thoracic-dysfunctions": "thoracic/thoracic-dysfunctions", ++ "thoracic/thoracic-dysfunctions/segmental": "thoracic/thoracic-dysfunctions/segmental", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-flexion": "thoracic/thoracic-dysfunctions/segmental/restriction-flexion", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-extension": "thoracic/thoracic-dysfunctions/segmental/restriction-extension", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion": "thoracic/thoracic-dysfunctions/segmental/restriction-lateroflexion", ++ "thoracic/thoracic-dysfunctions/segmental/restriction-rotation": "thoracic/thoracic-dysfunctions/segmental/restriction-rotation", ++ "thoracic/thoracic-dysfunctions/segmental/localized-fixation": "thoracic/thoracic-dysfunctions/segmental/localized-fixation", ++ "thoracic/thoracic-dysfunctions/costovertebral": "thoracic/thoracic-dysfunctions/costovertebral", ++ "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-head-restriction", ++ "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction": "thoracic/thoracic-dysfunctions/costovertebral/rib-respiratory-restriction", ++ "thoracic/thoracic-dysfunctions/group": "thoracic/thoracic-dysfunctions/group", ++ "thoracic/thoracic-dysfunctions/group/nsr-group": "thoracic/thoracic-dysfunctions/group/nsr-group", ++ "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude": "thoracic/thoracic-dysfunctions/group/functional-scoliotic-attitude", ++ "thoracic/thoracic-dysfunctions/muscular": "thoracic/thoracic-dysfunctions/muscular", ++ "thoracic/thoracic-dysfunctions/muscular/longissimus-tension": "thoracic/thoracic-dysfunctions/muscular/longissimus-tension", ++ "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension": "thoracic/thoracic-dysfunctions/muscular/iliocostalis-tension", ++ "thoracic/thoracic-dysfunctions/muscular/trapezius-tension": "thoracic/thoracic-dysfunctions/muscular/trapezius-tension", ++ "thoracic/thoracic-dysfunctions/muscular/latissimus-tension": "thoracic/thoracic-dysfunctions/muscular/latissimus-tension", ++ "thoracic/thoracic-dysfunctions/muscular/trigger-points": "thoracic/thoracic-dysfunctions/muscular/trigger-points", ++ "thoracic/thoracic-dysfunctions/mechanical": "thoracic/thoracic-dysfunctions/mechanical", ++ "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry": "thoracic/thoracic-dysfunctions/mechanical/withers-asymmetry", ++ "thoracic/thoracic-observations": "thoracic/thoracic-consultation-reasons", ++ "thoracic/thoracic-observations/ridden-work": "thoracic/thoracic-consultation-reasons/ridden-work", ++ "thoracic/thoracic-observations/ridden-work/saddle-region-sensitivity": "thoracic/thoracic-consultation-reasons/ridden-work/saddle-region-sensitivity", ++ "thoracic/thoracic-observations/ridden-work/cold-backed": "thoracic/thoracic-consultation-reasons/ridden-work/cold-backed", ++ "thoracic/thoracic-observations/ridden-work/hindquarter-engagement": "thoracic/thoracic-consultation-reasons/ridden-work/back-transmission", ++ "thoracic/thoracic-observations/ridden-work/bucking": "thoracic/thoracic-consultation-reasons/ridden-work/bucking", ++ "thoracic/thoracic-observations/girthing-defense": "thoracic/thoracic-consultation-reasons/girthing-defense", ++ "thoracic/thoracic-observations/palpation-sensitivity": "thoracic/thoracic-consultation-reasons/palpation-sensitivity", ++ "thoracic/thoracic-observations/new-stiffness": "thoracic/thoracic-consultation-reasons/new-stiffness", ++ "thoracic/anamnesis": "thoracic/anamnesis", ++ "thoracic/anamnesis/trauma-direct": "thoracic/anamnesis/trauma-direct", ++ "thoracic/anamnesis/saddle-context": "thoracic/anamnesis/saddle-context", ++ "thoracic/anamnesis/posture-context": "thoracic/anamnesis/posture-context", ++ "thoracic/anamnesis/stress-context": "thoracic/anamnesis/stress-context", ++ "thoracic/anamnesis/post-veterinary": "thoracic/anamnesis/post-veterinary", ++ "thoracic/anamnesis/no-identified-cause": "thoracic/anamnesis/no-identified-cause", ++ "t18-l1/t18-l1-dysfunctions": "t18-l1/t18-l1-dysfunctions", ++ "t18-l1/t18-l1-dysfunctions/segmental": "t18-l1/t18-l1-dysfunctions/segmental", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-flexion", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension": "t18-l1/t18-l1-dysfunctions/segmental/restriction-extension", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion": "t18-l1/t18-l1-dysfunctions/segmental/restriction-lateroflexion", ++ "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation": "t18-l1/t18-l1-dysfunctions/segmental/restriction-rotation", ++ "t18-l1/t18-l1-dysfunctions/segmental/fixation": "t18-l1/t18-l1-dysfunctions/segmental/fixation", ++ "t18-l1/t18-l1-dysfunctions/muscular": "t18-l1/t18-l1-dysfunctions/muscular", ++ "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension": "t18-l1/t18-l1-dysfunctions/muscular/longissimus-tension", ++ "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension": "t18-l1/t18-l1-dysfunctions/muscular/iliocostalis-tension", ++ "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia": "t18-l1/t18-l1-dysfunctions/muscular/thoracolumbar-fascia", ++ "t18-l1/t18-l1-dysfunctions/muscular/trigger-points": "t18-l1/t18-l1-dysfunctions/muscular/trigger-points", ++ "t18-l1/t18-l1-dysfunctions/mechanical": "t18-l1/t18-l1-dysfunctions/mechanical", ++ "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/amplitude-asymmetry", ++ "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry": "t18-l1/t18-l1-dysfunctions/mechanical/alignment-asymmetry", ++ "t18-l1/t18-l1-observations": "t18-l1/t18-l1-consultation-reasons", ++ "t18-l1/t18-l1-observations/back-mobility-loss": "t18-l1/t18-l1-consultation-reasons/back-mobility-loss", ++ "t18-l1/t18-l1-observations/saddle-rear-sensitivity": "t18-l1/t18-l1-consultation-reasons/saddle-rear-sensitivity", ++ "t18-l1/t18-l1-observations/transmission-defect": "t18-l1/t18-l1-consultation-reasons/transmission-defect", ++ "t18-l1/t18-l1-observations/palpation-sensitivity": "t18-l1/t18-l1-consultation-reasons/palpation-sensitivity", ++ "t18-l1/anamnesis": "t18-l1/anamnesis", ++ "t18-l1/anamnesis/trauma-direct": "t18-l1/anamnesis/trauma-direct", ++ "t18-l1/anamnesis/saddle-context": "t18-l1/anamnesis/saddle-context", ++ "t18-l1/anamnesis/posture-context": "t18-l1/anamnesis/posture-context", ++ "t18-l1/anamnesis/stress-context": "t18-l1/anamnesis/stress-context", ++ "t18-l1/anamnesis/post-veterinary": "t18-l1/anamnesis/post-veterinary", ++ "t18-l1/anamnesis/no-identified-cause": "t18-l1/anamnesis/no-identified-cause", ++ "lumbar/lumbar-dysfunctions": "lumbar/lumbar-dysfunctions", ++ "lumbar/lumbar-dysfunctions/segmental": "lumbar/lumbar-dysfunctions/segmental", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-flexion": "lumbar/lumbar-dysfunctions/segmental/restriction-flexion", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-extension": "lumbar/lumbar-dysfunctions/segmental/restriction-extension", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion": "lumbar/lumbar-dysfunctions/segmental/restriction-lateroflexion", ++ "lumbar/lumbar-dysfunctions/segmental/restriction-rotation": "lumbar/lumbar-dysfunctions/segmental/restriction-rotation", ++ "lumbar/lumbar-dysfunctions/segmental/localized-fixation": "lumbar/lumbar-dysfunctions/segmental/localized-fixation", ++ "lumbar/lumbar-dysfunctions/group": "lumbar/lumbar-dysfunctions/group", ++ "lumbar/lumbar-dysfunctions/group/nsr-group": "lumbar/lumbar-dysfunctions/group/nsr-group", ++ "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude": "lumbar/lumbar-dysfunctions/group/functional-scoliotic-attitude", ++ "lumbar/lumbar-dysfunctions/muscular": "lumbar/lumbar-dysfunctions/muscular", ++ "lumbar/lumbar-dysfunctions/muscular/longissimus-tension": "lumbar/lumbar-dysfunctions/muscular/longissimus-tension", ++ "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension": "lumbar/lumbar-dysfunctions/muscular/iliocostalis-tension", ++ "lumbar/lumbar-dysfunctions/muscular/psoas-tension": "lumbar/lumbar-dysfunctions/muscular/psoas-tension", ++ "lumbar/lumbar-dysfunctions/muscular/trigger-points": "lumbar/lumbar-dysfunctions/muscular/trigger-points", ++ "lumbar/lumbar-dysfunctions/mechanical": "lumbar/lumbar-dysfunctions/mechanical", ++ "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/muscle-relief-asymmetry", ++ "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry": "lumbar/lumbar-dysfunctions/mechanical/pelvic-tilt-asymmetry", ++ "lumbar/lumbar-observations": "lumbar/lumbar-consultation-reasons", ++ "lumbar/lumbar-observations/ridden-work": "lumbar/lumbar-consultation-reasons/ridden-work", ++ "lumbar/lumbar-observations/ridden-work/hollow-back-under-rider": "lumbar/lumbar-consultation-reasons/ridden-work/hollow-back-under-rider", ++ "lumbar/lumbar-observations/ridden-work/hindlimb-engagement": "lumbar/lumbar-consultation-reasons/ridden-work/hindlimb-engagement", ++ "lumbar/lumbar-observations/ridden-work/jumping-difficulty": "lumbar/lumbar-consultation-reasons/ridden-work/jumping-difficulty", ++ "lumbar/lumbar-observations/ridden-work/blocking-at-work": "lumbar/lumbar-consultation-reasons/ridden-work/blocking-at-work", ++ "lumbar/lumbar-observations/girthing-defense": "lumbar/lumbar-consultation-reasons/girthing-defense", ++ "lumbar/lumbar-observations/palpation-sensitivity": "lumbar/lumbar-consultation-reasons/palpation-sensitivity", ++ "lumbar/lumbar-observations/new-stiffness": "lumbar/lumbar-consultation-reasons/new-stiffness", ++ "lumbar/anamnesis": "lumbar/anamnesis", ++ "lumbar/anamnesis/trauma-direct": "lumbar/anamnesis/trauma-direct", ++ "lumbar/anamnesis/saddle-context": "lumbar/anamnesis/saddle-context", ++ "lumbar/anamnesis/posture-context": "lumbar/anamnesis/posture-context", ++ "lumbar/anamnesis/stress-context": "lumbar/anamnesis/stress-context", ++ "lumbar/anamnesis/post-veterinary": "lumbar/anamnesis/post-veterinary", ++ "lumbar/anamnesis/no-identified-cause": "lumbar/anamnesis/no-identified-cause", ++ "l6-s1/l6-s1-dysfunctions": "l6-s1/l6-s1-dysfunctions", ++ "l6-s1/l6-s1-dysfunctions/segmental": "l6-s1/l6-s1-dysfunctions/segmental", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-flexion", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension": "l6-s1/l6-s1-dysfunctions/segmental/restriction-extension", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion": "l6-s1/l6-s1-dysfunctions/segmental/restriction-lateroflexion", ++ "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation": "l6-s1/l6-s1-dysfunctions/segmental/restriction-rotation", ++ "l6-s1/l6-s1-dysfunctions/segmental/fixation": "l6-s1/l6-s1-dysfunctions/segmental/fixation", ++ "l6-s1/l6-s1-dysfunctions/muscular": "l6-s1/l6-s1-dysfunctions/muscular", ++ "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension": "l6-s1/l6-s1-dysfunctions/muscular/psoas-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension": "l6-s1/l6-s1-dysfunctions/muscular/longissimus-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension": "l6-s1/l6-s1-dysfunctions/muscular/gluteal-tension", ++ "l6-s1/l6-s1-dysfunctions/muscular/trigger-points": "l6-s1/l6-s1-dysfunctions/muscular/trigger-points", ++ "l6-s1/l6-s1-dysfunctions/mechanical": "l6-s1/l6-s1-dysfunctions/mechanical", ++ "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/amplitude-asymmetry", ++ "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry": "l6-s1/l6-s1-dysfunctions/mechanical/alignment-asymmetry", ++ "l6-s1/l6-s1-observations": "l6-s1/l6-s1-consultation-reasons", ++ "l6-s1/l6-s1-observations/hindlimb-engagement": "l6-s1/l6-s1-consultation-reasons/hindlimb-engagement", ++ "l6-s1/l6-s1-observations/canter-quality": "l6-s1/l6-s1-consultation-reasons/canter-quality", ++ "l6-s1/l6-s1-observations/jumping-propulsion": "l6-s1/l6-s1-consultation-reasons/jumping-propulsion", ++ "l6-s1/l6-s1-observations/palpation-sensitivity": "l6-s1/l6-s1-consultation-reasons/palpation-sensitivity", ++ "l6-s1/anamnesis": "l6-s1/anamnesis", ++ "l6-s1/anamnesis/trauma-direct": "l6-s1/anamnesis/trauma-direct", ++ "l6-s1/anamnesis/saddle-context": "l6-s1/anamnesis/saddle-context", ++ "l6-s1/anamnesis/posture-context": "l6-s1/anamnesis/posture-context", ++ "l6-s1/anamnesis/stress-context": "l6-s1/anamnesis/stress-context", ++ "l6-s1/anamnesis/post-veterinary": "l6-s1/anamnesis/post-veterinary", ++ "l6-s1/anamnesis/no-identified-cause": "l6-s1/anamnesis/no-identified-cause", ++ "sacral/sacral-dysfunctions": "sacral/sacral-dysfunctions", ++ "sacral/sacral-dysfunctions/mobility": "sacral/sacral-dysfunctions/mobility", ++ "sacral/sacral-dysfunctions/mobility/nutation-restriction": "sacral/sacral-dysfunctions/mobility/nutation-restriction", ++ "sacral/sacral-dysfunctions/mobility/counternutation-restriction": "sacral/sacral-dysfunctions/mobility/counternutation-restriction", ++ "sacral/sacral-dysfunctions/mobility/sacral-torsion": "sacral/sacral-dysfunctions/mobility/sacral-torsion", ++ "sacral/sacral-dysfunctions/mobility/lateralisation": "sacral/sacral-dysfunctions/mobility/lateralisation", ++ "sacral/sacral-dysfunctions/muscular": "sacral/sacral-dysfunctions/muscular", ++ "sacral/sacral-dysfunctions/muscular/gluteal-tension": "sacral/sacral-dysfunctions/muscular/gluteal-tension", ++ "sacral/sacral-dysfunctions/muscular/longissimus-tension": "sacral/sacral-dysfunctions/muscular/longissimus-tension", ++ "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension": "sacral/sacral-dysfunctions/muscular/sacrocaudalis-tension", ++ "sacral/sacral-dysfunctions/muscular/trigger-points": "sacral/sacral-dysfunctions/muscular/trigger-points", ++ "sacral/sacral-dysfunctions/mechanical": "sacral/sacral-dysfunctions/mechanical", ++ "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacral/sacral-dysfunctions/mechanical/tuber-sacrale-asymmetry", ++ "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity": "sacral/sacral-dysfunctions/mechanical/pelvic-obliquity", ++ "sacral/sacral-observations": "sacral/sacral-consultation-reasons", ++ "sacral/sacral-observations/ridden-work": "sacral/sacral-consultation-reasons/ridden-work", ++ "sacral/sacral-observations/ridden-work/hindlimb-propulsion": "sacral/sacral-consultation-reasons/ridden-work/hindlimb-propulsion", ++ "sacral/sacral-observations/ridden-work/canter-quality": "sacral/sacral-consultation-reasons/ridden-work/canter-quality", ++ "sacral/sacral-observations/ridden-work/bunny-hopping": "sacral/sacral-consultation-reasons/ridden-work/bunny-hopping", ++ "sacral/sacral-observations/tail-carriage": "sacral/sacral-consultation-reasons/tail-carriage", ++ "sacral/sacral-observations/palpation-sensitivity": "sacral/sacral-consultation-reasons/palpation-sensitivity", ++ "sacral/sacral-observations/new-stiffness": "sacral/sacral-consultation-reasons/new-stiffness", ++ "sacral/anamnesis": "sacral/anamnesis", ++ "sacral/anamnesis/trauma-direct": "sacral/anamnesis/trauma-direct", ++ "sacral/anamnesis/saddle-context": "sacral/anamnesis/saddle-context", ++ "sacral/anamnesis/posture-context": "sacral/anamnesis/posture-context", ++ "sacral/anamnesis/stress-context": "sacral/anamnesis/stress-context", ++ "sacral/anamnesis/post-veterinary": "sacral/anamnesis/post-veterinary", ++ "sacral/anamnesis/no-identified-cause": "sacral/anamnesis/no-identified-cause", ++ "sacroiliac/sacroiliac-dysfunctions": "sacroiliac/sacroiliac-dysfunctions", ++ "sacroiliac/sacroiliac-dysfunctions/articular": "sacroiliac/sacroiliac-dysfunctions/articular", ++ "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/nutation-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/counternutation-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation": "sacroiliac/sacroiliac-dysfunctions/articular/iliac-rotation", ++ "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction": "sacroiliac/sacroiliac-dysfunctions/articular/shear-restriction", ++ "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypomobility", ++ "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility": "sacroiliac/sacroiliac-dysfunctions/articular/hypermobility", ++ "sacroiliac/sacroiliac-dysfunctions/muscular": "sacroiliac/sacroiliac-dysfunctions/muscular", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/gluteus-medius-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/longissimus-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/biceps-femoris-tension", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-tension": "sacroiliac/sacroiliac-dysfunctions/muscular/sacrotuberous-ligament", ++ "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points": "sacroiliac/sacroiliac-dysfunctions/muscular/trigger-points", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical": "sacroiliac/sacroiliac-dysfunctions/mechanical", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-sacrale-asymmetry", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry": "sacroiliac/sacroiliac-dysfunctions/mechanical/tuber-coxae-asymmetry", ++ "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity": "sacroiliac/sacroiliac-dysfunctions/mechanical/pelvic-obliquity", ++ "sacroiliac/sacroiliac-observations": "sacroiliac/sacroiliac-consultation-reasons", ++ "sacroiliac/sacroiliac-observations/ridden-work": "sacroiliac/sacroiliac-consultation-reasons/ridden-work", ++ "sacroiliac/sacroiliac-observations/ridden-work/hindlimb-engagement": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/hindlimb-engagement", ++ "sacroiliac/sacroiliac-observations/ridden-work/canter-disunited": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/canter-disunited", ++ "sacroiliac/sacroiliac-observations/ridden-work/bunny-hopping": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/bunny-hopping", ++ "sacroiliac/sacroiliac-observations/ridden-work/jumping-difficulty": "sacroiliac/sacroiliac-consultation-reasons/ridden-work/jumping-difficulty", ++ "sacroiliac/sacroiliac-observations/croup-asymmetry": "sacroiliac/sacroiliac-consultation-reasons/croup-asymmetry", ++ "sacroiliac/sacroiliac-observations/hindlimb-lameness": "sacroiliac/sacroiliac-consultation-reasons/hindlimb-lameness", ++ "sacroiliac/anamnesis": "sacroiliac/anamnesis", ++ "sacroiliac/anamnesis/trauma-direct": "sacroiliac/anamnesis/trauma-direct", ++ "sacroiliac/anamnesis/sport-context": "sacroiliac/anamnesis/sport-context", ++ "sacroiliac/anamnesis/posture-context": "sacroiliac/anamnesis/posture-context", ++ "sacroiliac/anamnesis/stress-context": "sacroiliac/anamnesis/stress-context", ++ "sacroiliac/anamnesis/post-veterinary": "sacroiliac/anamnesis/post-veterinary", ++ "sacroiliac/anamnesis/no-identified-cause": "sacroiliac/anamnesis/no-identified-cause", ++ "hip/hip-dysfunctions": "hip/hip-dysfunctions", ++ "hip/hip-dysfunctions/articular": "hip/hip-dysfunctions/articular", ++ "hip/hip-dysfunctions/articular/restriction-flexion": "hip/hip-dysfunctions/articular/restriction-flexion", ++ "hip/hip-dysfunctions/articular/restriction-extension": "hip/hip-dysfunctions/articular/restriction-extension", ++ "hip/hip-dysfunctions/articular/restriction-abduction-adduction": "hip/hip-dysfunctions/articular/restriction-abduction-adduction", ++ "hip/hip-dysfunctions/articular/restriction-rotation": "hip/hip-dysfunctions/articular/restriction-rotation", ++ "hip/hip-dysfunctions/articular/hypomobility": "hip/hip-dysfunctions/articular/hypomobility", ++ "hip/hip-dysfunctions/articular/hypermobility": "hip/hip-dysfunctions/articular/hypermobility", ++ "hip/hip-dysfunctions/muscular": "hip/hip-dysfunctions/muscular", ++ "hip/hip-dysfunctions/muscular/gluteal-group-tension": "hip/hip-dysfunctions/muscular/gluteal-group-tension", ++ "hip/hip-dysfunctions/muscular/iliopsoas-tension": "hip/hip-dysfunctions/muscular/iliopsoas-tension", ++ "hip/hip-dysfunctions/muscular/adductors-tension": "hip/hip-dysfunctions/muscular/adductors-tension", ++ "hip/hip-dysfunctions/muscular/biceps-femoris-tension": "hip/hip-dysfunctions/muscular/biceps-femoris-tension", ++ "hip/hip-dysfunctions/muscular/trigger-points": "hip/hip-dysfunctions/muscular/trigger-points", ++ "hip/hip-dysfunctions/mechanical": "hip/hip-dysfunctions/mechanical", ++ "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry": "hip/hip-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hip/hip-dysfunctions/mechanical/amplitude-asymmetry": "hip/hip-dysfunctions/mechanical/amplitude-asymmetry", ++ "hip/hip-dysfunctions/mechanical/croup-asymmetry": "hip/hip-dysfunctions/mechanical/croup-asymmetry", ++ "hip/hip-observations": "hip/hip-consultation-reasons", ++ "hip/hip-observations/ridden-work": "hip/hip-consultation-reasons/ridden-work", ++ "hip/hip-observations/ridden-work/canter-difficulty": "hip/hip-consultation-reasons/ridden-work/canter-difficulty", ++ "hip/hip-observations/ridden-work/backing-difficulty": "hip/hip-consultation-reasons/ridden-work/backing-difficulty", ++ "hip/hip-observations/ridden-work/limb-engagement": "hip/hip-consultation-reasons/ridden-work/limb-engagement", ++ "hip/hip-observations/ridden-work/jumping-difficulty": "hip/hip-consultation-reasons/ridden-work/jumping-difficulty", ++ "hip/hip-observations/limb-lameness": "hip/hip-consultation-reasons/limb-lameness", ++ "hip/anamnesis": "hip/anamnesis", ++ "hip/anamnesis/trauma-direct": "hip/anamnesis/trauma-direct", ++ "hip/anamnesis/sport-context": "hip/anamnesis/sport-context", ++ "hip/anamnesis/posture-context": "hip/anamnesis/posture-context", ++ "hip/anamnesis/stress-context": "hip/anamnesis/stress-context", ++ "hip/anamnesis/post-veterinary": "hip/anamnesis/post-veterinary", ++ "hip/anamnesis/no-identified-cause": "hip/anamnesis/no-identified-cause", ++ "stifle/stifle-dysfunctions": "stifle/stifle-dysfunctions", ++ "stifle/stifle-dysfunctions/articular": "stifle/stifle-dysfunctions/articular", ++ "stifle/stifle-dysfunctions/articular/restriction-flexion": "stifle/stifle-dysfunctions/articular/restriction-flexion", ++ "stifle/stifle-dysfunctions/articular/restriction-extension": "stifle/stifle-dysfunctions/articular/restriction-extension", ++ "stifle/stifle-dysfunctions/articular/restriction-patellar-glide": "stifle/stifle-dysfunctions/articular/restriction-patellar-glide", ++ "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation": "stifle/stifle-dysfunctions/articular/restriction-tibial-rotation", ++ "stifle/stifle-dysfunctions/articular/hypomobility": "stifle/stifle-dysfunctions/articular/hypomobility", ++ "stifle/stifle-dysfunctions/articular/hypermobility": "stifle/stifle-dysfunctions/articular/hypermobility", ++ "stifle/stifle-dysfunctions/muscular": "stifle/stifle-dysfunctions/muscular", ++ "stifle/stifle-dysfunctions/muscular/quadriceps-tension": "stifle/stifle-dysfunctions/muscular/quadriceps-tension", ++ "stifle/stifle-dysfunctions/muscular/hamstrings-tension": "stifle/stifle-dysfunctions/muscular/hamstrings-tension", ++ "stifle/stifle-dysfunctions/muscular/tfl-tension": "stifle/stifle-dysfunctions/muscular/tfl-tension", ++ "stifle/stifle-dysfunctions/muscular/trigger-points": "stifle/stifle-dysfunctions/muscular/trigger-points", ++ "stifle/stifle-dysfunctions/mechanical": "stifle/stifle-dysfunctions/mechanical", ++ "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry": "stifle/stifle-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry": "stifle/stifle-dysfunctions/mechanical/amplitude-asymmetry", ++ "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation": "stifle/stifle-dysfunctions/mechanical/patellar-lateral-deviation", ++ "stifle/stifle-observations": "stifle/stifle-consultation-reasons", ++ "stifle/stifle-observations/ridden-work": "stifle/stifle-consultation-reasons/ridden-work", ++ "stifle/stifle-observations/ridden-work/canter-difficulty": "stifle/stifle-consultation-reasons/ridden-work/canter-difficulty", ++ "stifle/stifle-observations/ridden-work/backing-difficulty": "stifle/stifle-consultation-reasons/ridden-work/backing-difficulty", ++ "stifle/stifle-observations/ridden-work/limb-engagement": "stifle/stifle-consultation-reasons/ridden-work/limb-engagement", ++ "stifle/stifle-observations/ridden-work/jumping-difficulty": "stifle/stifle-consultation-reasons/ridden-work/jumping-difficulty", ++ "stifle/stifle-observations/patellar-catching": "stifle/stifle-consultation-reasons/patellar-catching", ++ "stifle/stifle-observations/limb-lameness": "stifle/stifle-consultation-reasons/limb-lameness", ++ "stifle/anamnesis": "stifle/anamnesis", ++ "stifle/anamnesis/trauma-direct": "stifle/anamnesis/trauma-direct", ++ "stifle/anamnesis/sport-context": "stifle/anamnesis/sport-context", ++ "stifle/anamnesis/posture-context": "stifle/anamnesis/posture-context", ++ "stifle/anamnesis/stress-context": "stifle/anamnesis/stress-context", ++ "stifle/anamnesis/post-veterinary": "stifle/anamnesis/post-veterinary", ++ "stifle/anamnesis/no-identified-cause": "stifle/anamnesis/no-identified-cause", ++ "hock/hock-dysfunctions": "hock/hock-dysfunctions", ++ "hock/hock-dysfunctions/articular": "hock/hock-dysfunctions/articular", ++ "hock/hock-dysfunctions/articular/restriction-flexion": "hock/hock-dysfunctions/articular/restriction-flexion", ++ "hock/hock-dysfunctions/articular/restriction-extension": "hock/hock-dysfunctions/articular/restriction-extension", ++ "hock/hock-dysfunctions/articular/restriction-rotation": "hock/hock-dysfunctions/articular/restriction-rotation", ++ "hock/hock-dysfunctions/articular/restriction-small-joints": "hock/hock-dysfunctions/articular/restriction-small-joints", ++ "hock/hock-dysfunctions/articular/hypomobility": "hock/hock-dysfunctions/articular/hypomobility", ++ "hock/hock-dysfunctions/articular/hypermobility": "hock/hock-dysfunctions/articular/hypermobility", ++ "hock/hock-dysfunctions/muscular": "hock/hock-dysfunctions/muscular", ++ "hock/hock-dysfunctions/muscular/gastrocnemius-tension": "hock/hock-dysfunctions/muscular/gastrocnemius-tension", ++ "hock/hock-dysfunctions/muscular/peroneus-tertius": "hock/hock-dysfunctions/muscular/peroneus-tertius", ++ "hock/hock-dysfunctions/muscular/deep-digital-flexor": "hock/hock-dysfunctions/muscular/deep-digital-flexor", ++ "hock/hock-dysfunctions/muscular/tibialis-cranialis": "hock/hock-dysfunctions/muscular/tibialis-cranialis", ++ "hock/hock-dysfunctions/muscular/trigger-points": "hock/hock-dysfunctions/muscular/trigger-points", ++ "hock/hock-dysfunctions/mechanical": "hock/hock-dysfunctions/mechanical", ++ "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry": "hock/hock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hock/hock-dysfunctions/mechanical/amplitude-asymmetry": "hock/hock-dysfunctions/mechanical/amplitude-asymmetry", ++ "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry": "hock/hock-dysfunctions/mechanical/hock-axis-asymmetry", ++ "hock/hock-observations": "hock/hock-consultation-reasons", ++ "hock/hock-observations/ridden-work": "hock/hock-consultation-reasons/ridden-work", ++ "hock/hock-observations/ridden-work/canter-difficulty": "hock/hock-consultation-reasons/ridden-work/canter-difficulty", ++ "hock/hock-observations/ridden-work/backing-difficulty": "hock/hock-consultation-reasons/ridden-work/backing-difficulty", ++ "hock/hock-observations/ridden-work/limb-engagement": "hock/hock-consultation-reasons/ridden-work/limb-engagement", ++ "hock/hock-observations/ridden-work/jumping-difficulty": "hock/hock-consultation-reasons/ridden-work/jumping-difficulty", ++ "hock/hock-observations/limb-lameness": "hock/hock-consultation-reasons/limb-lameness", ++ "hock/anamnesis": "hock/anamnesis", ++ "hock/anamnesis/trauma-direct": "hock/anamnesis/trauma-direct", ++ "hock/anamnesis/sport-context": "hock/anamnesis/sport-context", ++ "hock/anamnesis/posture-context": "hock/anamnesis/posture-context", ++ "hock/anamnesis/stress-context": "hock/anamnesis/stress-context", ++ "hock/anamnesis/post-veterinary": "hock/anamnesis/post-veterinary", ++ "hock/anamnesis/no-identified-cause": "hock/anamnesis/no-identified-cause", ++ "hind-fetlock/hind-fetlock-dysfunctions": "hind-fetlock/hind-fetlock-dysfunctions", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular": "hind-fetlock/hind-fetlock-dysfunctions/articular", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-flexion", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-extension", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial": "hind-fetlock/hind-fetlock-dysfunctions/articular/restriction-lateromedial", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypomobility", ++ "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility": "hind-fetlock/hind-fetlock-dysfunctions/articular/hypermobility", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular": "hind-fetlock/hind-fetlock-dysfunctions/muscular", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-flexors-tendon", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon": "hind-fetlock/hind-fetlock-dysfunctions/muscular/digital-extensor-tendon", ++ "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia": "hind-fetlock/hind-fetlock-dysfunctions/muscular/plantar-fascia", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical": "hind-fetlock/hind-fetlock-dysfunctions/mechanical", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/weight-bearing-asymmetry", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/amplitude-asymmetry", ++ "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry": "hind-fetlock/hind-fetlock-dysfunctions/mechanical/fetlock-axis-asymmetry", ++ "hind-fetlock/hind-fetlock-observations": "hind-fetlock/hind-fetlock-consultation-reasons", ++ "hind-fetlock/hind-fetlock-observations/ridden-work": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/canter-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/canter-difficulty", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/backing-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/backing-difficulty", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/limb-engagement": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/limb-engagement", ++ "hind-fetlock/hind-fetlock-observations/ridden-work/jumping-difficulty": "hind-fetlock/hind-fetlock-consultation-reasons/ridden-work/jumping-difficulty", ++ "hind-fetlock/hind-fetlock-observations/limb-lameness": "hind-fetlock/hind-fetlock-consultation-reasons/limb-lameness", ++ "hind-fetlock/anamnesis": "hind-fetlock/anamnesis", ++ "hind-fetlock/anamnesis/trauma-direct": "hind-fetlock/anamnesis/trauma-direct", ++ "hind-fetlock/anamnesis/sport-context": "hind-fetlock/anamnesis/sport-context", ++ "hind-fetlock/anamnesis/posture-context": "hind-fetlock/anamnesis/posture-context", ++ "hind-fetlock/anamnesis/stress-context": "hind-fetlock/anamnesis/stress-context", ++ "hind-fetlock/anamnesis/post-veterinary": "hind-fetlock/anamnesis/post-veterinary", ++ "hind-fetlock/anamnesis/no-identified-cause": "hind-fetlock/anamnesis/no-identified-cause", ++ "caudal/caudal-dysfunctions": "caudal/caudal-dysfunctions", ++ "caudal/caudal-dysfunctions/segmental": "caudal/caudal-dysfunctions/segmental", ++ "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion": "caudal/caudal-dysfunctions/segmental/restriction-lateroflexion", ++ "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral": "caudal/caudal-dysfunctions/segmental/restriction-dorsoventral", ++ "caudal/caudal-dysfunctions/segmental/localized-fixation": "caudal/caudal-dysfunctions/segmental/localized-fixation", ++ "caudal/caudal-dysfunctions/muscular": "caudal/caudal-dysfunctions/muscular", ++ "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-dorsalis", ++ "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis": "caudal/caudal-dysfunctions/muscular/sacrocaudalis-ventralis", ++ "caudal/caudal-dysfunctions/muscular/coccygeus-tension": "caudal/caudal-dysfunctions/muscular/coccygeus-tension", ++ "caudal/caudal-dysfunctions/mechanical": "caudal/caudal-dysfunctions/mechanical", ++ "caudal/caudal-dysfunctions/mechanical/tail-deviation": "caudal/caudal-dysfunctions/mechanical/tail-deviation", ++ "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry": "caudal/caudal-dysfunctions/mechanical/tail-carriage-asymmetry", ++ "caudal/caudal-observations": "caudal/caudal-consultation-reasons", ++ "caudal/caudal-observations/tail-clamped": "caudal/caudal-consultation-reasons/tail-clamped", ++ "caudal/caudal-observations/tail-swishing": "caudal/caudal-consultation-reasons/tail-swishing", ++ "caudal/caudal-observations/tail-deviation-new": "caudal/caudal-consultation-reasons/tail-deviation-new", ++ "caudal/caudal-observations/tail-handling-sensitivity": "caudal/caudal-consultation-reasons/tail-handling-sensitivity", ++ "caudal/anamnesis": "caudal/anamnesis", ++ "caudal/anamnesis/trauma-direct": "caudal/anamnesis/trauma-direct", ++ "caudal/anamnesis/saddle-context": "caudal/anamnesis/saddle-context", ++ "caudal/anamnesis/posture-context": "caudal/anamnesis/posture-context", ++ "caudal/anamnesis/stress-context": "caudal/anamnesis/stress-context", ++ "caudal/anamnesis/post-veterinary": "caudal/anamnesis/post-veterinary", ++ "caudal/anamnesis/no-identified-cause": "caudal/anamnesis/no-identified-cause" ++ } ++} +diff --git a/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json +new file mode 100644 +index 0000000..5633394 +--- /dev/null ++++ b/crates/core/tests/fixtures/r5-6/pre-switch/sheet-ref.json +@@ -0,0 +1,7 @@ ++{ ++ "sheet_id": "503dc301-a8b1-50d4-9e44-0919b2fc2916", ++ "version_id": null, ++ "document_sha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", ++ "schema_version": 2, ++ "species_id": "equine" ++} +diff --git a/crates/core/tests/pdf_compare.rs b/crates/core/tests/pdf_compare.rs +index c864071..c445999 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().fingerprint_verified && !draft_sheet().fingerprint_verified); + } +diff --git a/crates/core/tests/pdf_import.rs b/crates/core/tests/pdf_import.rs +index 97f13ec..05fcdf3 100644 +--- a/crates/core/tests/pdf_import.rs ++++ b/crates/core/tests/pdf_import.rs +@@ -32,22 +32,34 @@ const SEED: &str = "supabase/seed/anatomical-sheets/equine/draft"; + + /// The bundled draft sheet exactly as `apps/app/vite/sheet-bundle.ts` embeds it. + fn draft_sheet() -> LoadedSheet { ++ sheet_with(&repo_root().join(SEED)) ++} ++ ++/// The sheet the R4 oracles were frozen against (before R5.6): the same document and drawing, ++/// with the pre-switch `sheet-ref.json` and migration map (`tests/fixtures/r5-6/pre-switch`, ++/// proven to be the TypeScript's files by `curation_draft`). ++fn historical_sheet() -> LoadedSheet { ++ sheet_with(&repo_root().join("crates/core/tests/fixtures/r5-6/pre-switch")) ++} ++ ++/// The seed's document and drawings, with `sheet-ref.json` and the migration map from `refs`. ++fn sheet_with(refs: &std::path::Path) -> LoadedSheet { + let seed = repo_root().join(SEED); +- let read = |name: &str| std::fs::read_to_string(seed.join(name)).unwrap(); +- let manifest: Value = serde_json::from_str(&read("assets.json")).unwrap(); ++ let read = |dir: &std::path::Path, name: &str| std::fs::read_to_string(dir.join(name)).unwrap(); ++ let manifest: Value = serde_json::from_str(&read(&seed, "assets.json")).unwrap(); + let mut assets = serde_json::Map::new(); + let mut hashes = serde_json::Map::new(); + for asset in manifest.as_array().unwrap() { + let id = asset["svg_asset_id"].as_str().unwrap().to_owned(); + let file = format!("assets/{}", asset["file"].as_str().unwrap()); +- assets.insert(id.clone(), Value::String(read(&file))); ++ assets.insert(id.clone(), Value::String(read(&seed, &file))); + hashes.insert(id, asset["sha256"].clone()); + } + let payload = json!({ + "status": "draft", +- "ref": parse_json(&read("sheet-ref.json")).unwrap(), +- "document": parse_json(&read("document.json")).unwrap(), +- "migrationMap": parse_json(&read("report-migration-map.json")).unwrap(), ++ "ref": parse_json(&read(refs, "sheet-ref.json")).unwrap(), ++ "document": parse_json(&read(&seed, "document.json")).unwrap(), ++ "migrationMap": parse_json(&read(refs, "report-migration-map.json")).unwrap(), + "assets": assets, + "assetHashes": hashes, + }); +@@ -126,7 +138,9 @@ fn archive_row(text: &str, sheet: &LoadedSheet) -> Value { + #[test] + fn o7_locate_and_read_match_the_typescript() { + let oracle = r4_oracle("read.json"); +- let sheet = draft_sheet(); ++ // In its original context: the oracle froze the reports a v2 migration stamps with the ++ // pre-switch map (R5.6 leaves it untouched; the post-switch stamp has its own test below). ++ let sheet = historical_sheet(); + let (mut inputs, mut located, mut archives, mut mismatches) = (0, 0, 0, Vec::new()); + for row in oracle["inputs"].as_array().unwrap() { + if row["kind"] != "pdf" { +@@ -179,6 +193,46 @@ fn o7_locate_and_read_match_the_typescript() { + println!("O7: {inputs} inputs, {located} locate rows, {archives} archive rows"); + } + ++/// After R5.6 a v2 migration stamps the canonical value; everything else is what O7 froze. ++#[test] ++fn o7_after_r5_6_migrated_v2_reports_carry_the_canonical_stamp_and_nothing_else_moves() { ++ let (now, then) = (draft_sheet(), historical_sheet()); ++ for file in ["scan.report-v2-full.pdf", "scan.report-v2-minimal.pdf"] { ++ let bytes = r4_input("read", file); ++ let text = read_attached_document(&bytes, ProbeLimits::UNBOUNDED) ++ .unwrap() ++ .text ++ .into_owned(); ++ let data = parse_json(&text).unwrap(); ++ let after = read_archive_document(&data, &now.migration_map).unwrap(); ++ let before = read_archive_document(&data, &then.migration_map).unwrap(); ++ assert_eq!( ++ after.report.sheet.document_sha256, now.reference.document_sha256, ++ "{file}" ++ ); ++ assert_eq!( ++ before.report.sheet.document_sha256, then.reference.document_sha256, ++ "{file}" ++ ); ++ let mut aligned = after.report.clone(); ++ aligned.sheet.document_sha256 = before.report.sheet.document_sha256.clone(); ++ assert_eq!(aligned, before.report, "{file}"); ++ assert_eq!( ++ ( ++ after.migrated, ++ after.unresolved_zones, ++ after.unresolved_findings ++ ), ++ ( ++ before.migrated, ++ before.unresolved_zones, ++ before.unresolved_findings ++ ), ++ "{file}" ++ ); ++ } ++} ++ + fn compare( + mismatches: &mut Vec, + file: &str, +diff --git a/crates/core/tests/r5_6_switch.rs b/crates/core/tests/r5_6_switch.rs +new file mode 100644 +index 0000000..44b07e5 +--- /dev/null ++++ b/crates/core/tests/r5_6_switch.rs +@@ -0,0 +1,265 @@ ++//! 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_map, draft_sheet, json_file}; -+use faunosteo_core::domain::archive::read_archive_document; -+use faunosteo_core::domain::report::{Report, rebase_report_on_sheet}; -+use faunosteo_core::domain::sheet::LoadedSheet; -+use serde_json::Value; ++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 ALIAS: &str = "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660"; -+const CANONICAL: &str = "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2"; ++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 switched_sheet() -> LoadedSheet { -+ let mut sheet = draft_sheet(); -+ assert_eq!(sheet.reference.document_sha256, ALIAS); -+ sheet.reference.document_sha256 = CANONICAL.to_owned(); -+ sheet ++fn alias() -> &'static str { ++ TRUSTED_ALIASES[0].alias +} + -+fn demo(sha: &str) -> Report { -+ let mut value = json_file("apps/app/tests/fixtures/report-v3.demo.json"); -+ value["sheet"]["documentSha256"] = Value::from(sha); -+ serde_json::from_value(value).unwrap() ++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 a_report_on_the_historical_value_is_not_rebased_and_keeps_its_stamp() { -+ let outcome = rebase_report_on_sheet(&demo(ALIAS), &switched_sheet(), None).unwrap(); -+ assert!(!outcome.rebased); -+ assert_eq!(outcome.report.sheet.document_sha256, ALIAS); ++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 a_real_change_or_a_forged_value_still_rebases() { -+ for sha in ["a".repeat(64), "b".repeat(64)] { -+ let outcome = rebase_report_on_sheet(&demo(&sha), &switched_sheet(), None).unwrap(); -+ assert!(outcome.rebased, "{sha}"); ++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 an_archive_pairing_the_alias_and_the_canonical_value_is_kept_and_a_forged_pair_is_not() { -+ let base = json_file("apps/app/tests/fixtures/goldens/r2/envelope.demo.fr.nologos.json"); -+ let map = draft_map(); -+ let mut paired = base.clone(); -+ paired["sheetSnapshot"]["ref"]["documentSha256"] = Value::from(CANONICAL); -+ assert!( -+ read_archive_document(&paired, &map) -+ .unwrap() -+ .archive -+ .is_some() ++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" + ); -+ let mut forged = base.clone(); -+ forged["sheetSnapshot"]["ref"]["documentSha256"] = Value::from("c".repeat(64)); -+ let read = read_archive_document(&forged, &map).unwrap(); -+ assert!(read.archive.is_none() && read.snapshot_rejected.is_some()); -+ assert!( -+ read_archive_document(&base, &map) -+ .unwrap() -+ .archive -+ .is_some() ++ assert_eq!(after["assets"], before["assets"]); ++ assert_eq!(after["ref"], before["ref"]); ++} ++ ++#[test] ++fn a_new_report_still_carries_the_canonical_value() { ++ let sheet = draft_sheet(); ++ let mut envelope = old_envelope(); ++ envelope["report"]["sheet"]["documentSha256"] = json!(canonical()); ++ envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); ++ let written = attachment(&reexport(&sheet, &envelope)); ++ assert_eq!(written["report"]["sheet"]["documentSha256"], canonical()); ++ assert_eq!( ++ written["sheetSnapshot"]["ref"]["documentSha256"], ++ canonical() + ); +} ++ ++#[test] ++fn an_unknown_or_forged_stamp_rebases_and_a_mixed_envelope_loses_its_snapshot() { ++ let sheet = draft_sheet(); ++ let mut envelope = old_envelope(); ++ envelope["report"]["sheet"]["documentSha256"] = json!("c".repeat(64)); ++ envelope["sheetSnapshot"]["ref"]["documentSha256"] = json!("c".repeat(64)); ++ assert!( ++ import_archive(&sheet, &envelope.to_string()) ++ .unwrap() ++ .rebase ++ .rebased ++ ); ++ // A case-changed canonical value is no 64-lowercase-hex stamp: the v3 contract refuses it. ++ let mut upper = old_envelope(); ++ upper["report"]["sheet"]["documentSha256"] = json!(canonical().to_uppercase()); ++ assert!(import_archive(&sheet, &upper.to_string()).is_err()); ++ // An archive pairing the alias with the canonical value is not loosened into a match. ++ let mut mixed = old_envelope(); ++ mixed["sheetSnapshot"]["ref"]["documentSha256"] = json!(canonical()); ++ let import = import_archive(&sheet, &mixed.to_string()).unwrap(); ++ assert!(import.read.archive.is_none() && import.read.snapshot_rejected.is_some()); ++} ++ ++#[test] ++fn a_real_content_change_still_rebases() { ++ let mut document = json_file(&format!("{DRAFT}/document.json")); ++ document["name"]["fr"] = json!("Fiche équine modifiée"); ++ let typed = from(document.clone()); ++ let changed = document_fingerprint(&typed).unwrap(); ++ assert_ne!(changed, canonical()); ++ let mut reference = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ reference["document_sha256"] = json!(changed); ++ reference["fingerprint"]["aliases"] = json!([]); ++ let base = draft_sheet(); ++ let assets: serde_json::Map = base ++ .assets ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let hashes: serde_json::Map = base ++ .asset_hashes ++ .iter() ++ .map(|(k, v)| (k.clone(), json!(v))) ++ .collect(); ++ let sheet = loaded( ++ reference, ++ document, ++ json_file(&format!("{DRAFT}/report-migration-map.json")), ++ Value::Object(assets), ++ Value::Object(hashes), ++ ); ++ let import = import_archive(&sheet, &old_envelope().to_string()).unwrap(); ++ assert!(import.rebase.rebased); ++} ++ ++#[test] ++fn the_sheet_load_refuses_a_reference_that_contradicts_the_registry_or_the_content() { ++ let map = json_file(&format!("{DRAFT}/report-migration-map.json")); ++ let good = json_file(&format!("{DRAFT}/sheet-ref.json")); ++ assert!(sheet_with_ref(good.clone(), map.clone()).is_ok()); ++ let mut cases = Vec::new(); ++ let mut forged = good.clone(); ++ forged["fingerprint"]["aliases"] = json!(["d".repeat(64)]); ++ cases.push(forged); ++ let mut convention = good.clone(); ++ convention["fingerprint"]["convention"] = json!("sha256-rfc8785-validated-v2"); ++ cases.push(convention); ++ let mut content = good.clone(); ++ content["document_sha256"] = json!("e".repeat(64)); ++ content["fingerprint"]["aliases"] = json!([]); ++ cases.push(content); ++ let mut unknown_key = good.clone(); ++ unknown_key["fingerprint"]["trusted"] = json!(true); ++ cases.push(unknown_key); ++ for reference in cases { ++ assert!( ++ sheet_with_ref(reference.clone(), map.clone()).is_err(), ++ "{reference}" ++ ); ++ } ++ // A historical v0 reference (no block) still loads, unverified, with no alias privilege, ++ // even when it carries the canonical value: an old stamp then rebases. ++ let rollback = sheet_with_ref( ++ json_file(&format!("{PRE_SWITCH}/sheet-ref.json")), ++ map.clone(), ++ ); ++ assert!(!rollback.unwrap().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.fingerprint_verified); ++ let import = import_archive(&unverified, &old_envelope().to_string()).unwrap(); ++ assert!(import.rebase.rebased); ++ assert!(draft_sheet().fingerprint_verified); ++} +diff --git a/crates/core/tests/sheet_fingerprint.rs b/crates/core/tests/sheet_fingerprint.rs +index 79a9e09..f298826 100644 +--- a/crates/core/tests/sheet_fingerprint.rs ++++ b/crates/core/tests/sheet_fingerprint.rs +@@ -126,17 +126,16 @@ fn the_registry_holds_one_pair_bound_to_the_equine_sheet() { + equivalence(SHEET, CANONICAL, CANONICAL), + Equivalence::Identical + ); +- assert_eq!( +- equivalence(SHEET, CANONICAL, ALIAS), +- Equivalence::TrustedAlias +- ); ++ // One direction only: an old stamp against the canonical value (R5.6 rehearsal), never a ++ // canonical stamp against a sheet that declares the old value. + assert_eq!( + equivalence(SHEET, ALIAS, CANONICAL), + Equivalence::TrustedAlias + ); ++ assert_eq!(equivalence(SHEET, CANONICAL, ALIAS), Equivalence::Different); + let other_sheet = "00000000-0000-0000-0000-000000000000"; + assert_eq!( +- equivalence(other_sheet, CANONICAL, ALIAS), ++ equivalence(other_sheet, ALIAS, CANONICAL), + Equivalence::Different + ); + let other_content = "a".repeat(64); +@@ -239,7 +238,7 @@ fn historical_archives_open_as_the_same_document_only_through_the_registered_pai + stamps(&value, &mut found); + } + } +- assert!(pdfs > 50, "{pdfs} attachments read"); ++ assert_eq!(pdfs, 147, "attachments read"); + let mut same = 0; + for (sheet, sha) in &found { + let verdict = equivalence(sheet, sha, CANONICAL); +@@ -252,7 +251,7 @@ fn historical_archives_open_as_the_same_document_only_through_the_registered_pai + "census: {pdfs} PDF attachments, {} stamps, {same} alias", + found.len() + ); +- assert!(same > 30, "{same} of {}", found.len()); ++ assert_eq!((found.len(), same), (124, 123), "stamps, aliases"); + } + + #[test] +diff --git a/package.json b/package.json +index 6907a5a..02b42a7 100644 +--- a/package.json ++++ b/package.json +@@ -25,7 +25,8 @@ + "check": "pnpm typecheck && pnpm test:run && pnpm lint && pnpm build", + "check:all": "bash scripts/check-all.sh", + "report:compare": "bash scripts/report-compare.sh", +- "import:equine": "pnpm --filter @faunosteo/anatomy import:equine", ++ "import:equine": "bash scripts/import-equine.sh", ++ "import:equine:legacy": "pnpm --filter @faunosteo/anatomy import:equine", + "r5:import-equine": "bash scripts/import-equine.sh", + "supabase": "bash scripts/supabase.sh", + "db:start": "bash scripts/supabase.sh start", +diff --git a/packages/anatomy/tests/r5.pipeline-oracles.test.ts b/packages/anatomy/tests/r5.pipeline-oracles.test.ts +index 20e3d08..55d44ac 100644 +--- a/packages/anatomy/tests/r5.pipeline-oracles.test.ts ++++ b/packages/anatomy/tests/r5.pipeline-oracles.test.ts +@@ -350,8 +350,16 @@ describe('R5.1 oracles (crates/core/tests/oracles/r5)', () => { + const oracle = JSON.parse(frozen('pipeline.json')) as { + artifacts: Array<{ folder: string; file: string; sha256: string }> + } ++ // Since R5.6 the two fingerprinted draft files are Rust's (`v1`); the ledger recorded the ++ // TypeScript's, frozen under `crates/core/tests/fixtures/r5-6/pre-switch` (the Rust suite ++ // `curation_draft` proves the committed ones are those under the declared rule). ++ const preSwitch = new Set(['sheet-ref.json', 'report-migration-map.json']) + for (const row of oracle.artifacts) { +- const committed = readFileSync(resolve(REPO, row.folder, row.file)) ++ const folder = ++ row.folder.endsWith('/draft') && preSwitch.has(row.file) ++ ? 'crates/core/tests/fixtures/r5-6/pre-switch' ++ : row.folder ++ const committed = readFileSync(resolve(REPO, folder, row.file)) + expect(sha256Hex(committed), `${row.folder}/${row.file}`).toBe(row.sha256) + } + }) +diff --git a/packages/anatomy/tests/seed.golden.test.ts b/packages/anatomy/tests/seed.golden.test.ts +index 5af7cb3..f49eb78 100644 +--- a/packages/anatomy/tests/seed.golden.test.ts ++++ b/packages/anatomy/tests/seed.golden.test.ts +@@ -62,10 +62,21 @@ describe('committed legacy-import folder (golden)', () => { + }) + }) + ++/** ++ * Since R5.6 the Rust pipeline writes the seed (`pnpm import:equine`) under the fingerprint ++ * convention `sha256-rfc8785-validated-v1`; this TypeScript generator (`import:equine:legacy`) ++ * keeps the historical one. Its two fingerprint-bearing files are compared with the pre-switch ++ * files it wrote (frozen under `crates/core/tests/fixtures/r5-6/pre-switch`, proven against the ++ * R5.1 ledger by the Rust suite `curation_draft`); every other file with the committed seed. ++ */ ++const PRE_SWITCH = join(REPO_ROOT, 'crates/core/tests/fixtures/r5-6/pre-switch') ++const FINGERPRINTED = new Set(['sheet-ref.json', 'report-migration-map.json']) ++ + describe('committed draft folder (golden)', () => { +- it('equals a fresh run for every produced file (rerun pnpm import:equine)', async () => { ++ it('equals a fresh run for every produced file (the two fingerprinted ones before R5.6)', async () => { + for (const [file, content] of Object.entries(draftFiles)) { +- expect(await readFile(join(draftDir, file), 'utf8'), file).toBe(content) ++ const dir = FINGERPRINTED.has(file) ? PRE_SWITCH : draftDir ++ expect(await readFile(join(dir, file), 'utf8'), file).toBe(content) + } + }) + +diff --git a/packages/core-wasm/tests/r5-6.n-1.test.ts b/packages/core-wasm/tests/r5-6.n-1.test.ts +new file mode 100644 +index 0000000..accb865 +--- /dev/null ++++ b/packages/core-wasm/tests/r5-6.n-1.test.ts +@@ -0,0 +1,84 @@ ++/** ++ * R5.6 M1 (owner 2026-10-24, option 1) through the module and the frozen N-1 readers: an old ++ * PDF stamped with the registered historical value, re-exported against the switched sheet ++ * (its snapshot carries the canonical value), is written with the report's own stamp in the ++ * snapshot, and the N-1 scanner and Zod readers of the R3 build and 0.2.0 keep the snapshot, ++ * its labels, views and annotations (a rollback to that build loses nothing). 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 { loadProofModule } 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 ALIAS = '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++const CANONICAL = ++ '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++ ++interface Envelope { ++ report: { sheet: { documentSha256: string } } ++ sheetSnapshot: { ++ ref: { documentSha256: string } ++ document: unknown ++ assets: unknown ++ } ++ branding: unknown ++ labels: unknown ++ locale: string ++} ++ ++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 pdf = new Uint8Array( ++ readFileSync( ++ join(ROOT, 'apps/app/tests/fixtures/pdf/r3/demo.fr.nologos.pdf'), ++ ), ++ ) ++ const old = (await readAttachedDocument(pdf)) as Envelope ++ expect(old.report.sheet.documentSha256).toBe(ALIAS) ++ // What the switched sheet's snapshot carries: the same content, the canonical value. ++ const snapshot = { ++ ...old.sheetSnapshot, ++ ref: { ...old.sheetSnapshot.ref, documentSha256: CANONICAL }, ++ } ++ const input = JSON.stringify({ ++ report: old.report, ++ sheetSnapshot: snapshot, ++ branding: old.branding, ++ labels: old.labels, ++ locale: old.locale, ++ exportedAt: '2026-10-24T12:00:00.000Z', ++ }) ++ const rasters = JSON.stringify({ views: [] }) ++ const written = (await readAttachedDocument( ++ proofs.export_pdf_for_test(input, rasters), ++ )) 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.parse( ++ readFileSync( ++ join( ++ ROOT, ++ 'supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json', ++ ), ++ 'utf8', ++ ), ++ ), ++ ) ++ 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) ++}) +diff --git a/packages/domain/tests/r2-oracles.test.ts b/packages/domain/tests/r2-oracles.test.ts +index e0593ef..2fcb5e5 100644 +--- a/packages/domain/tests/r2-oracles.test.ts ++++ b/packages/domain/tests/r2-oracles.test.ts +@@ -22,25 +22,89 @@ const MAKE = process.env.MAKE_R2_ORACLES === '1' + const SEED = 'supabase/seed/anatomical-sheets/equine' + + const CASES: Array<[string, string, z.ZodTypeAny]> = [ +- ['sheet.draft.json', `${SEED}/draft/document.json`, AnatomicalSheetDocumentSchema], +- ['sheet.legacy-import.json', `${SEED}/legacy-import/document.json`, AnatomicalSheetDocumentSchema], +- ['migration-map.draft.json', `${SEED}/draft/report-migration-map.json`, ReportMigrationMapSchema], +- ['report-v3.demo.json', 'apps/app/tests/fixtures/report-v3.demo.json', ReportSchema], +- ['report-v2.full.json', 'apps/app/tests/fixtures/report-v2.full.json', ReportV2Schema], +- ['report-v2.minimal.json', 'apps/app/tests/fixtures/report-v2.minimal.json', ReportV2Schema], ++ [ ++ 'sheet.draft.json', ++ `${SEED}/draft/document.json`, ++ AnatomicalSheetDocumentSchema, ++ ], ++ [ ++ 'sheet.legacy-import.json', ++ `${SEED}/legacy-import/document.json`, ++ AnatomicalSheetDocumentSchema, ++ ], ++ [ ++ 'migration-map.draft.json', ++ `${SEED}/draft/report-migration-map.json`, ++ ReportMigrationMapSchema, ++ ], ++ [ ++ 'report-v3.demo.json', ++ 'apps/app/tests/fixtures/report-v3.demo.json', ++ ReportSchema, ++ ], ++ [ ++ 'report-v2.full.json', ++ 'apps/app/tests/fixtures/report-v2.full.json', ++ ReportV2Schema, ++ ], ++ [ ++ 'report-v2.minimal.json', ++ 'apps/app/tests/fixtures/report-v2.minimal.json', ++ ReportV2Schema, ++ ], + ] + ++/** ++ * Since R5.6 the committed migration map carries the `v1` fingerprint; the oracle was frozen on ++ * the pre-switch file, read here in that original context (`tests/fixtures/r5-6/pre-switch`, ++ * proven the same TypeScript output by the Rust suite `curation_draft`). ++ */ ++const PRE_SWITCH: Record = { ++ [`${SEED}/draft/report-migration-map.json`]: ++ 'crates/core/tests/fixtures/r5-6/pre-switch/report-migration-map.json', ++} ++const ALIAS = '27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660' ++const CANONICAL = ++ '12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2' ++ + describe('Zod output oracles of the R2 switch', () => { + it.each(CASES)('%s', (name, source, schema) => { +- const input: unknown = JSON.parse(readFileSync(resolve(ROOT, source), 'utf8')) ++ const read = PRE_SWITCH[source] ?? source ++ const input: unknown = JSON.parse(readFileSync(resolve(ROOT, read), 'utf8')) + const text = JSON.stringify(schema.parse(input), null, 2) + const file = resolve(OUT, name) + if (MAKE) { + mkdirSync(OUT, { recursive: true }) +- writeFileSync(file, `${JSON.stringify({ source, output: JSON.parse(text) })}\n`) ++ writeFileSync( ++ file, ++ `${JSON.stringify({ source, output: JSON.parse(text) })}\n`, ++ ) ++ } ++ const oracle = JSON.parse(readFileSync(file, 'utf8')) as { ++ source: string ++ output: unknown + } +- const oracle = JSON.parse(readFileSync(file, 'utf8')) as { source: string; output: unknown } + expect(oracle.source).toBe(source) + expect(JSON.stringify(oracle.output, null, 2)).toBe(text) + }) + }) ++ ++describe('the committed migration map after R5.6', () => { ++ it('is the oracle with only the fingerprint moved to the canonical value', () => { ++ const source = `${SEED}/draft/report-migration-map.json` ++ const committed = ReportMigrationMapSchema.parse( ++ JSON.parse(readFileSync(resolve(ROOT, source), 'utf8')), ++ ) ++ const oracle = JSON.parse( ++ readFileSync(resolve(OUT, 'migration-map.draft.json'), 'utf8'), ++ ) as { output: { sheet: { documentSha256: string } } } ++ expect(oracle.output.sheet.documentSha256).toBe(ALIAS) ++ const expected = { ++ ...oracle.output, ++ sheet: { ...oracle.output.sheet, documentSha256: CANONICAL }, ++ } ++ expect(JSON.stringify(committed, null, 2)).toBe( ++ JSON.stringify(expected, null, 2), ++ ) ++ }) ++}) +diff --git a/scripts/rust-check.sh b/scripts/rust-check.sh +index d5f8207..568c1bc 100755 +--- a/scripts/rust-check.sh ++++ b/scripts/rust-check.sh +@@ -33,10 +33,10 @@ cargo test -p faunosteo-core --features curation --locked + # against a loopback stub of the local stack (`upload_tool`); never built into the module. + cargo clippy -p faunosteo-core --all-targets --features upload --locked -- -D warnings + cargo test -p faunosteo-core --features upload --locked +-# The sheet fingerprint (R5.6, prepared, not active): RFC 8785, the V8 and Node oracles, the +-# registry, and the census of the fixture archives (their attachments need the PDF reader). +-cargo clippy -p faunosteo-core --all-targets --features fingerprint,pdf-read --locked -- -D warnings +-cargo test -p faunosteo-core --features fingerprint,pdf-read --locked --test sheet_fingerprint ++# The sheet fingerprint (R5.6): RFC 8785, the V8 and Node oracles, the registry, and the census ++# of the fixture archives (their attachments need the PDF reader). ++cargo clippy -p faunosteo-core --all-targets --features pdf-read --locked -- -D warnings ++cargo test -p faunosteo-core --features pdf-read --locked --test sheet_fingerprint + # Exports the TypeScript types of the contracts (ts-rs) into packages/core-wasm/types. + # `git status --porcelain --untracked-files=all -- packages/core-wasm/types` must stay + # empty afterwards (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types +diff --git a/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json b/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json +index c199d71..e90de50 100644 +--- a/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json ++++ b/supabase/seed/anatomical-sheets/equine/draft/report-migration-map.json +@@ -3,7 +3,7 @@ + "sheet": { + "sheetId": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "versionId": null, +- "documentSha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ "documentSha256": "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2" + }, + "main_view_id": "main", + "views": { +diff --git a/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json b/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json +index 5633394..b79c201 100644 +--- a/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json ++++ b/supabase/seed/anatomical-sheets/equine/draft/sheet-ref.json +@@ -1,7 +1,13 @@ + { + "sheet_id": "503dc301-a8b1-50d4-9e44-0919b2fc2916", + "version_id": null, +- "document_sha256": "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660", ++ "document_sha256": "12d788727c1e532641bd5b3a7ecf39dbdd25e70350f8a76be5ca917b262874e2", + "schema_version": 2, +- "species_id": "equine" ++ "species_id": "equine", ++ "fingerprint": { ++ "convention": "sha256-rfc8785-validated-v1", ++ "aliases": [ ++ "27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660" ++ ] ++ } + }