package: reject duplicate manifest versions

This commit is contained in:
Hermes Agent
2026-09-04 19:04:20 +00:00
parent e66dded2e4
commit 20a181b631
6 changed files with 14 additions and 3 deletions
+8
View File
@@ -132,6 +132,14 @@ def main():
if "MISSING package manifest: math-tools" not in out:
fail(f"Package manifest-version diagnostic was unclear:\n{out}")
manifest_path.write_text(manifest, encoding="utf-8")
duplicate_version_manifest = manifest + "version: 1\n"
manifest_path.write_text(duplicate_version_manifest, encoding="utf-8")
rc, out = run([str(EXE), "package", "doctor"], work)
if rc == 0:
fail("package doctor must reject duplicate package manifest versions")
if "BAD package version: math-tools" not in out:
fail(f"Package duplicate manifest-version diagnostic was unclear:\n{out}")
manifest_path.write_text(manifest, encoding="utf-8")
manifest_path.write_text(manifest.replace("version: 1", "version: 10"), encoding="utf-8")
rc, out = run([str(EXE), "package", "doctor"], work)
if rc == 0: