fix(domain): R5.6 prep gates, strict declared block, patch builds, docs corrected

v1 refuses a non-hex or historical value (NotCanonical); the switch patch now builds
report-compare and refuses unknown block keys; RUST.md 11.19 states the measured
rehearsal (4 + 3 expected failures) instead of a green claim.
This commit is contained in:
bchanot committed 2026-10-24 14:57:44 +02:00
1 parent 3b9a395d43
commit 943a25a98f
10 files changed
+280 -18

No files matched your search

+28 -6
View File
@@ -9,6 +9,27 @@ 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/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
+++ b/crates/core/src/bin/report_compare.rs
@@ -37,6 +37,8 @@ struct SeedRef {
document_sha256: String,
schema_version: f64,
species_id: String,
+ #[serde(default)]
+ fingerprint: Option<faunosteo_core::domain::sheet::loaded::DeclaredFingerprint>,
}
fn seed_json<T: for<'de> Deserialize<'de>>(name: &str) -> Result<T, String> {
@@ -58,6 +60,7 @@ fn load_sheet() -> Result<LoadedSheet, String> {
document_sha256: reference.document_sha256,
schema_version,
species_id: reference.species_id,
+ fingerprint: reference.fingerprint,
},
document: seed_json("document.json")?,
migration_map: seed_json("report-migration-map.json")?,
diff --git a/crates/core/src/curation/draft/pipeline.rs b/crates/core/src/curation/draft/pipeline.rs
index 19126aa..12bcaf5 100644
--- a/crates/core/src/curation/draft/pipeline.rs
@@ -129,7 +150,7 @@ index 9281642..b5012be 100644
report: report.clone(),
unresolved_zones: 0,
diff --git a/crates/core/src/domain/sheet/loaded.rs b/crates/core/src/domain/sheet/loaded.rs
index 4065978..aa88299 100644
index 4065978..e6fd44d 100644
--- a/crates/core/src/domain/sheet/loaded.rs
+++ b/crates/core/src/domain/sheet/loaded.rs
@@ -2,6 +2,7 @@
@@ -140,7 +161,7 @@ index 4065978..aa88299 100644
use std::collections::HashMap;
use serde::Deserialize;
@@ -33,6 +34,15 @@ pub struct BundledRef {
@@ -33,6 +34,16 @@ pub struct BundledRef {
pub document_sha256: String,
pub schema_version: JsInt,
pub species_id: String,
@@ -150,13 +171,14 @@ index 4065978..aa88299 100644
+}
+
+#[derive(Debug, Clone, Deserialize)]
+#[serde(deny_unknown_fields)]
+pub struct DeclaredFingerprint {
+ pub convention: String,
+ pub aliases: Vec<String>,
}
/// A loaded, indexed sheet.
@@ -76,6 +86,8 @@ pub enum LoadError {
@@ -76,6 +87,8 @@ pub enum LoadError {
Shape(serde_json::Error),
/// The document has no main view.
NoMainView,
@@ -165,7 +187,7 @@ index 4065978..aa88299 100644
}
impl From<serde_json::Error> for LoadError {
@@ -102,6 +114,15 @@ impl LoadedSheet {
@@ -102,6 +115,15 @@ impl LoadedSheet {
.map(|(id, text)| (id.clone(), read_drawing(text)))
.collect();
let r = data.reference;
@@ -261,11 +283,11 @@ index 120249a..6a4bfe5 100644
if report.observations.len() > MAX_OBSERVATIONS {
diff --git a/crates/core/tests/fingerprint_consumers.rs b/crates/core/tests/fingerprint_consumers.rs
new file mode 100644
index 0000000..bda5a2e
index 0000000..39a5775
--- /dev/null
+++ b/crates/core/tests/fingerprint_consumers.rs
@@ -0,0 +1,69 @@
+//! R5.6 switch rehearsal (part of `.claude/tasks/plans/r5-6-consumers.patch`, not committed
+//! 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.