story 2-12-preview-partial-mode: implemented and reviewed via bmad-loop

This commit is contained in:
bsodfather committed 2026-10-03 15:04:15 +03:00
1 parent d1ba0bd0e4
commit ab35d67177
56 files changed
+5801 -376

No files matched your search

+23 -3
View File
@@ -196,7 +196,16 @@ fn ac_2_manifest_covers_fifty_provenanced_specs_with_exact_expectations() {
"corpus fixtures are single-operation exact oracles"
);
let expected = &document.expected_preview["operations"][0];
let actual_candidate = serde_json::to_value(candidates[0]).unwrap();
let mut actual_candidate = serde_json::to_value(candidates[0]).unwrap();
// Corpus snapshots freeze the pre-location semantic candidate.
// Source provenance is covered by dedicated preview assertions.
actual_candidate
.as_object_mut()
.unwrap()
.remove("source_location");
for finding in actual_candidate["findings"].as_array_mut().unwrap() {
finding.as_object_mut().unwrap().remove("source_location");
}
assert_eq!(
actual_candidate,
expected["candidate"],
@@ -224,13 +233,24 @@ fn ac_2_manifest_covers_fifty_provenanced_specs_with_exact_expectations() {
"candidate canonical digest in {}",
document.file
);
let mut actual_preview = serde_json::to_value(&preview).unwrap();
for group in actual_preview["groups"].as_array_mut().unwrap() {
for candidate in group["operations"].as_array_mut().unwrap() {
candidate.as_object_mut().unwrap().remove("source_location");
for finding in candidate["findings"].as_array_mut().unwrap() {
finding.as_object_mut().unwrap().remove("source_location");
}
}
}
for finding in actual_preview["findings"].as_array_mut().unwrap() {
finding.as_object_mut().unwrap().remove("source_location");
}
assert_eq!(
hex(canonical_json(&serde_json::to_value(&preview).unwrap())),
hex(canonical_json(&actual_preview)),
document.expected_preview["canonical_preview_digest"],
"preview canonical digest in {}",
document.file
);
let actual_preview = serde_json::to_value(&preview).unwrap();
assert_eq!(
actual_preview,
document.expected_preview["canonical_preview"],