Make Pheon structural review results self-contained
Capture revision metadata, cell presence and attributes, and structured diagnostics in owned comparison results. Derive outcomes and render text, JSON, and hierarchy reports without retaining source documents. Keep derived descriptions and graph analysis in their renderers. Use pheon-structural-v1 and PHEON_LAYER_NAMES_V1 consistently, expose helpers through their defining modules, and remove obsolete re-exports. Update user guides and report fixtures without changing schema version 1. Cover dropped inputs, diagnostic ordering, absent and empty cells, offset independence, and CLI failures. All 92 Rust tests pass in debug and release; report and hierarchy goldens retain their behavior.
This commit is contained in:
parent
a723ba2265
commit
df62677f5c
1 changed files with 870 additions and 504 deletions
|
|
@ -1,10 +1,11 @@
|
|||
//! Unique replacement matches that explain removed and added objects.
|
||||
|
||||
use super::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Replacement {
|
||||
pub removed: usize,
|
||||
pub added: usize,
|
||||
pub explanation: String,
|
||||
/// Explanation matching is never object identity or geometric equivalence.
|
||||
pub match_rule: &'static str,
|
||||
}
|
||||
|
|
@ -56,7 +57,6 @@ pub(super) fn replacements(old: &[ObjectChange], new: &[ObjectChange]) -> Vec<Re
|
|||
result.push(Replacement {
|
||||
removed: i,
|
||||
added: j,
|
||||
explanation: explain(&old[i], &new[j]),
|
||||
match_rule: if old[i].target.is_some() {
|
||||
"unique_kind_target"
|
||||
} else if bounds {
|
||||
|
|
@ -74,7 +74,7 @@ pub(super) fn replacements(old: &[ObjectChange], new: &[ObjectChange]) -> Vec<Re
|
|||
result
|
||||
}
|
||||
|
||||
fn explain(old: &ObjectChange, new: &ObjectChange) -> String {
|
||||
pub(super) fn explain(old: &ObjectChange, new: &ObjectChange) -> String {
|
||||
let mut parts = vec![format!(
|
||||
"{} modified{}",
|
||||
kind_name(old.kind),
|
||||
|
|
|
|||
Loading…
Reference in a new issue