blob: 9672527da8d3e4af1f9cf62961d9aba6f6aaee8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
from __future__ import annotations
import asyncio
import json
from pathlib import Path
from gap_pipeline.e2e import run_offline_smoke
def test_offline_end_to_end_smoke(tmp_path: Path) -> None:
result = asyncio.run(run_offline_smoke(tmp_path / "e2e"))
assert result["mode"] == "offline-smoke"
assert result["surface_families"] == [
"descriptive_long",
"descriptive_long_confusing",
"descriptive_long_misleading",
"garbled_string",
]
assert result["kernel_status"] == "accepted"
assert result["verification_rounds"] == 2
assert result["export_status"] == "complete"
assert result["exported_item_count"] == 1
record = json.loads(Path(result["release_record"]).read_text())
assert set(record["variants"]) == {
"descriptive_long",
"descriptive_long_confusing",
"descriptive_long_misleading",
"garbled_string",
"kernel_variant",
}
kernel_meta = record["variants"]["kernel_variant"]["_meta"]
assert kernel_meta["proof_dag"]["terminal_node_id"] == "n3"
assert kernel_meta["replacement_plan"]["changes"][0]["slot_id"] == "s1"
assert kernel_meta["diffused_proof"]["terminal_answer"] == "4"
|