feat(pbs): add Set and reusable identity hashing

This commit is contained in:
2026-10-25 12:15:13 +00:00
parent 632ba6d0d6
commit 8105604f92
59 changed files with 4190 additions and 34 deletions
+7 -1
View File
@@ -12,6 +12,8 @@ parser.add_argument("--runtime", type=pathlib.Path, default=pathlib.Path("../run
parser.add_argument("--fixtures", type=pathlib.Path, default=pathlib.Path("prometeu-compiler/prometeu-build-pipeline/build/registry-conformance"))
parser.add_argument("--online", action="store_true", help="Allow Cargo to fetch uncached dependencies")
parser.add_argument("--release", action="store_true", help="Execute an optimized runtime harness")
parser.add_argument("--set-only", action="store_true", help="Run mandatory PBS Set corpus")
parser.add_argument("--identity-hashing-only", action="store_true", help="Run mandatory neutral and PBS identity/hash corpus")
parser.add_argument("--math-only", action="store_true", help="Run the complete PBS math corpus only")
parser.add_argument("--random-only", action="store_true", help="Run the complete PBS Random corpus only")
parser.add_argument("--generic-contracts-only", action="store_true", help="Run the mandatory generic-contract source corpus only")
@@ -25,6 +27,10 @@ if not args.math_only:
consumer_vectors = pathlib.Path("prometeu-architecture-tests/src/test/resources/random/random-conformance.tsv")
if provider_vectors.read_bytes() != consumer_vectors.read_bytes():
raise SystemExit("Random oracle differs from the selected provider; update provenance and requalify")
provider_hash_vectors = runtime / "crates/console/prometeu-vm/tests/fixtures/hash-conformance.tsv"
consumer_hash_vectors = pathlib.Path("prometeu-architecture-tests/src/test/resources/hash/hash-conformance.tsv")
if provider_hash_vectors.read_bytes() != consumer_hash_vectors.read_bytes():
raise SystemExit("Hash oracle differs from selected provider")
print(subprocess.check_output(["rustc", "-Vv"], text=True).strip(), flush=True)
for source in [pathlib.Path(__file__), pathlib.Path(__file__).with_name("main.rs"),
pathlib.Path("prometeu-architecture-tests/src/test/java/p/studio/compiler/backend/irvm/PbsRuntimeRandomTest.java"),
@@ -52,4 +58,4 @@ with tempfile.TemporaryDirectory(prefix="pbx-conformance-") as directory:
(root / "Cargo.lock").write_text((runtime / "Cargo.lock").read_text())
(root / "src").mkdir()
(root / "src/main.rs").write_text(pathlib.Path(__file__).with_name("main.rs").read_text())
subprocess.run(["cargo", "run", *(["--release"] if args.release else []), *([] if args.online else ["--offline"]), "--manifest-path", str(root / "Cargo.toml"), "--", str(args.fixtures.resolve()), str(runtime / "devtools/headless-protocol/response.schema.json"), *(["--math-only"] if args.math_only else []), *(["--random-only"] if args.random_only else []), *(["--generic-contracts-only"] if args.generic_contracts_only else []), *(["--generic-structs-only"] if args.generic_structs_only else []), *(["--list-cursor-only"] if args.list_cursor_only else []), *(["--linked-only"] if args.linked_only else [])], check=True)
subprocess.run(["cargo", "run", *(["--release"] if args.release else []), *([] if args.online else ["--offline"]), "--manifest-path", str(root / "Cargo.toml"), "--", str(args.fixtures.resolve()), str(runtime / "devtools/headless-protocol/response.schema.json"), *(["--set-only"] if args.set_only else []), *(["--identity-hashing-only"] if args.identity_hashing_only else []), *(["--math-only"] if args.math_only else []), *(["--random-only"] if args.random_only else []), *(["--generic-contracts-only"] if args.generic_contracts_only else []), *(["--generic-structs-only"] if args.generic_structs_only else []), *(["--list-cursor-only"] if args.list_cursor_only else []), *(["--linked-only"] if args.linked_only else [])], check=True)