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
35
36
37
38
39
40
41
42
|
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["core_steps"] == [
"use nonnegativity of a square",
"expand the square",
"divide by a positive quantity",
]
assert kernel_meta["mutable_slots"] == {
"slot1": {
"description": "positive square root at equality",
"original": "1",
}
}
|