class-v6: the pack tests read identity.json as the thirteenth export file beside the pinned twelve (the era, v5, reg64 and file-list tests); the A04 test reads a class v4 program (the shadow is class v4's)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 19:18:44 +00:00
parent 76340cfb21
commit 3ec6ed9971

View file

@ -433,7 +433,9 @@ fn check_export(pack: &str) {
if e.dataset.mode() == DatasetMode::MemoryHard {
expected.extend(["memhard.h", "memhard.metal"]);
}
assert_eq!(out.files.iter().map(|(n, _)| n.as_str()).collect::<Vec<_>>(), expected);
let mut with_identity: Vec<&str> = expected.clone();
with_identity.insert(1, "identity.json");
assert_eq!(out.files.iter().map(|(n, _)| n.as_str()).collect::<Vec<_>>(), with_identity);
let mut on_disk: Vec<String> = std::fs::read_dir(pack_dir(pack))
.unwrap()
.map(|d| d.unwrap().file_name().to_string_lossy().to_string())
@ -646,6 +648,9 @@ fn era_emitted_sources_match_and_loads_have_the_era_form() {
let source = era_json(pack, "vectors.json")["source"].as_str().unwrap().to_string();
let out = export_pack(e, &day, &source);
for (name, text) in &out.files {
if name == "identity.json" {
continue; // A06's identity file is new beside the pinned files
}
let want = era_read(pack, name);
assert!(text == &want, "{pack}/{name} differs from the emitter");
}
@ -974,6 +979,9 @@ fn v5_pack_is_the_v4_program_over_the_state_leaves() {
let v = v5_json(pack, "vectors.json");
let out = export_pack(e, v["day"].as_str().unwrap(), v["source"].as_str().unwrap());
for (name, text) in &out.files {
if name == "identity.json" {
continue; // A06's identity file is new beside the pinned files
}
assert_eq!(v5_read(pack, name), *text, "{pack}/{name} differs from the export");
}
for (name, bytes) in &out.binaries {
@ -1034,6 +1042,9 @@ fn reg64_plain_path_reexports_the_pinned_devnet_pack_unchanged() {
let out = export_pack(e, &day_label(pack), PINNED_SOURCE);
assert_eq!(out.files.len(), 13);
for (name, text) in &out.files {
if name == "identity.json" {
continue; // A06's identity file is new beside the pinned twelve
}
assert_same_text(pack, name, text);
}
}
@ -1256,10 +1267,12 @@ fn a07_bound_hash_is_group_aligned_across_tails_and_rollover() {
#[test]
fn a04_a_zeroing_shadow_fails_acceptance() {
use igneum_pow::accept::check;
let e = epoch("mx8-devnet-epoch0");
assert!(check(&e.program).is_ok());
let mut z = e.program.clone();
assert!(!z.shadow.is_empty(), "the pinned class has a shadow block");
// a class v4 program (the shadow block is class v4's): the same seed and era as the lib's program_classes test
let era = [7u8; 32];
let p = generate_from_seed_bytes_program_class("igneum-genesis", b"igneum-genesis", ProgramClass::V4, Some(&era));
assert!(check(&p).is_ok(), "the class v4 program of the genesis seed passes");
let mut z = p.clone();
assert!(!z.shadow.is_empty(), "class v4 has a shadow block");
for ins in z.shadow.iter_mut() {
ins.op = Op::Xor;
ins.src = ins.dst;