From 227ee2af958eba340d5d7b269387455b4513277d Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 12 Aug 2026 06:39:37 +0000 Subject: Reject ambiguous archive members in comparison --- src/manifest.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/manifest.rs') diff --git a/src/manifest.rs b/src/manifest.rs index 4cd256c..067dc9a 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -110,6 +110,7 @@ impl ArtifactManifest { let mut services = Vec::new(); let mut archive_members = Vec::new(); let mut initrd = None; + let mut member_paths = HashSet::new(); for entry in archive .entries() @@ -121,6 +122,12 @@ impl ArtifactManifest { if is_archive_root_path(&path) || is_internal_metadata_path(&path) { continue; } + if !member_paths.insert(path.clone()) { + bail!( + "duplicate archive member record: {path} in {}", + archive_path.display() + ); + } let entry_type = entry.header().entry_type(); let kind = match entry_type { EntryType::Regular => "file", -- cgit v1.2.3