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:
1 parent
3b9a395d43
commit
943a25a98f
10 files changed
+280
-18
No files matched your search
@@ -341,8 +341,8 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
|
||||
- [x] gates: round 1 check:all 03:39:24, security PASS (2 MEDIUM, 6 LOW), verifier ECARTS(2) → positional-parent bypass fixed (1ec9e1b); round 2 check:all 03:51:55, verifier K3/K4 behaviour MET, 2 formal gaps → contract Clarification (owner to confirm) → checkpoint, STOP (no R5.6 without signal)
|
||||
- [ ] R5.6 preparation (owner 2026-10-24 « arbitrage D-R5.6 »; nothing active)
|
||||
- [x] `domain/sheet/fingerprint.rs` + `sheet_fingerprint` tests (RFC, V8, Node differential, draft 12d7…, registry, census 123/124 alias)
|
||||
- [x] switch patch `.claude/tasks/plans/r5-6-switch.patch` rehearsed (rust:check + check:all 14:32:05 green), files restored
|
||||
- [ ] gates: check:all, security, fresh verifier → checkpoint, STOP (switch on signal)
|
||||
- [x] switch patch `.claude/tasks/plans/r5-6-switch.patch` (5-consumer wiring rehearsed green rust:check + check:all 14:32:05; whole patch: 4 curation tests fail on current seed, +3 on switched seed, RUST.md §11.19), files restored
|
||||
- [x] gates on 3b9a395: check:all 14:41:00, security PASS (M1 snapshot stamp → owner, M2 block strictness partly fixed), verifier ECARTS(2) (report-compare build in patch fixed, false "rehearsed green" corrected) → checkpoint, STOP (switch on signal)
|
||||
- [ ] R5.6 D-R5 switch (convention, aliases, membership test in gated readers with per-file go, seed regenerated once by the Rust tool, `.prettierignore`, CHANGELOG)
|
||||
- [ ] R5.7 consumer census, domain fixtures moved, packages deleted, xmldom + prettier out of the lockfile, docs, ledger; `pnpm check:all`; merge only on the owner's signal
|
||||
- [ ] DEV hardening (owner 2026-10-24, risk accepted temporarily, not scheduled): Supabase on CLI demo keys + 54321 LAN-open (rootless, UFW allow incoming, no 54321 rule) → own JWT secret/signing keys via env() or narrower 54321 rule before any untrusted device or user (ENVIRONMENTS.md §3.6); never these keys in production; `confirm_sheet_asset_upload` object check before public exposure
|
||||
|
||||
@@ -89,7 +89,7 @@ fingerprint) is later. No merge, no release, no deploy.
|
||||
Decided: convention confirmed; compiled registry the only authority, bound to sheet + content; five consumers
|
||||
(adds `pdf/compare/lines.rs`); Rust the only generator, `pnpm import:equine` → Rust, TypeScript kept as
|
||||
`import:equine:legacy` until R5.7; no visible change, no migration message. Prepared (RUST.md §11.19):
|
||||
module + tests committed inert; the switch as `.claude/tasks/plans/r5-6-switch.patch`, rehearsed green.
|
||||
module + tests committed inert; the switch as `.claude/tasks/plans/r5-6-switch.patch` (applies cleanly; on the current seed 4 `curation` tests fail as expected, with the seed switched 3 more: RUST.md §11.19; the earlier "rehearsed green" covered the five consumers only).
|
||||
|
||||
Still to decide at the switch signal:
|
||||
1. `loaded.rs` + `facade.rs` (sheet load refuses a contradicting block): outside the five approved files,
|
||||
@@ -97,7 +97,10 @@ Still to decide at the switch signal:
|
||||
2. The two `curation_draft` cases move to a declared rule for `sheet-ref.json` and `report-migration-map.json`
|
||||
(fingerprint field and block only), the R5.1 oracles untouched.
|
||||
|
||||
Switch procedure (on the signal): apply the patch; move the fingerprint after the drawings bound; declared
|
||||
3. M1 (security): the export's snapshot reference on an alias match: the report's own stamp (recommended), re-stamp at rebase, or accept with an N-1 test.
|
||||
4. M2 remainder: refuse a `sheet-ref.json` without a fingerprint block after the switch (every test sheet then needs one).
|
||||
|
||||
Switch procedure (on the signal): apply the patch; move the fingerprint after the drawings bound and keep the drawings-bound fixture valid; declared rules for the O7 oracle and the switched-seed preconditions; declared
|
||||
rule in `curation_draft`; `pnpm import:equine` → `scripts/import-equine.sh`, TS as `import:equine:legacy`;
|
||||
`import-equine --out` into an empty folder, diff reviewed (only the two files of §11.19), copied over `draft/`;
|
||||
`--check` 0 differences; `pnpm rust:check`, `pnpm check:all`, security, fresh verifier; owner device check
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user