package: reject duplicate manifest names

This commit is contained in:
Hermes Agent
2026-09-04 12:54:53 +00:00
parent c585356ce3
commit beac4c634b
6 changed files with 14 additions and 3 deletions
+9
View File
@@ -147,6 +147,15 @@ def main():
fail(f"Package manifest source diagnostic was unclear:\n{out}")
manifest_path.write_text(manifest, encoding="utf-8")
duplicate_name_manifest = manifest + "name: other-tools\n"
manifest_path.write_text(duplicate_name_manifest, encoding="utf-8")
rc, out = run([str(EXE), "package", "doctor"], work)
if rc == 0:
fail("package doctor must reject duplicate package manifest names")
if "BAD package manifest name: math-tools" not in out:
fail(f"Package duplicate manifest-name diagnostic was unclear:\n{out}")
manifest_path.write_text(manifest, encoding="utf-8")
rc, out = run([str(EXE), "package", "doctor"], work)
if rc != 0:
fail(out)