fix(anatomy): R5.4 records bounded in total, CHANGELOG tables projected before they are joined

This commit is contained in:
bchanot committed 2026-10-23 14:58:40 +02:00
1 parent 777c8000b8
commit 5880dfa959
9 files changed
+258 -6

No files matched your search

+26
View File
@@ -149,3 +149,29 @@ fn every_probe_is_formatted_as_the_typescript_or_refused() {
assert_eq!(same + refused, 798);
println!("{same} identical, {refused} refused");
}
/// One long authored cell pads every row of its level: the CHANGELOG is refused before its
/// table is joined, through the pipeline (security gate R5.4 round 7), while the records stay
/// within their own bound.
#[test]
fn a_changelog_whose_alignment_would_explode_is_refused_before_it_is_built() {
let frozen = oracle();
let mobility = "finding:hip/hip-dysfunctions/mobility";
let sets: Vec<Value> = (0..20)
.map(|i| json!({ "op": "set", "target": mobility, "field": "name.en", "value": format!("v{i}") }))
.collect();
let change = |id: &str, rationale: String, ops: Vec<Value>| {
json!({ "id": id, "level": "A", "kind": "technical",
"title": { "fr": "Essai", "en": "Test" }, "rationale": rationale,
"reference_ids": [], "ops": ops })
};
let long = change("CHG-001", "a".repeat(2_000_000), vec![sets[0].clone()]);
let rows = change("CHG-002", "Essai".to_owned(), sets);
let case = json!({ "changes_file": { "changes": [long, rows] } });
let (changelog, _) = raw_reports(&frozen, &case);
let error = changelog.unwrap_err();
assert!(
matches!(&error, PipelineError::Guard(message) if message.contains("exceeds the")),
"{error}"
);
}