fix(HEL-892): bind VOSR2 loop evidence to frontend 1.23.0
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"Actual d70a286f upgrade, one-row protection/rollback, frozen boundaries and packages."
|
||||
"Real historical-code upgrade/rollback, including an existing reference document."
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -17,6 +17,8 @@ from pathlib import Path
|
||||
from build_definition import OUT, PATHS, REPO, canonical
|
||||
from rebuild import BASE, RESOURCE, build_all
|
||||
|
||||
BASE = os.environ.get("VOSR2_IMPORT_BASE", BASE)
|
||||
|
||||
sys.path.insert(0, str(REPO / "calliope-backend"))
|
||||
|
||||
|
||||
@@ -67,8 +69,10 @@ def main():
|
||||
old_blocks_unchanged=35,
|
||||
old_saved=1106,
|
||||
old_notes=25,
|
||||
new_saved=89,
|
||||
new_notes=3,
|
||||
new_saved=0 if BASE.startswith("3c307e0") else 89,
|
||||
retained_saved=89 if BASE.startswith("3c307e0") else 0,
|
||||
new_notes=0 if BASE.startswith("3c307e0") else 3,
|
||||
retained_notes=3 if BASE.startswith("3c307e0") else 0,
|
||||
total_documents=36,
|
||||
total_saved=1195,
|
||||
total_notes=28,
|
||||
@@ -123,7 +127,12 @@ def main():
|
||||
first, _ = run("historical", True)
|
||||
before = rows()
|
||||
assert first["counts"] == {"imported": 155, "user_excluded": 1}
|
||||
assert all("fixed_version" not in json.loads(before[p]["doc_json"]) for p in PATHS)
|
||||
assert all(
|
||||
"fixed_version" in json.loads(before[p]["doc_json"])
|
||||
if BASE.startswith("3c307e0")
|
||||
else "fixed_version" not in json.loads(before[p]["doc_json"])
|
||||
for p in PATHS
|
||||
)
|
||||
assert all(
|
||||
json.loads(before[p]["doc_json"])["fixed_version"]["matched"]
|
||||
for p in DEFINITIONS
|
||||
@@ -167,9 +176,11 @@ def main():
|
||||
old_doc = json.loads(before[p]["doc_json"])
|
||||
without = dict(d)
|
||||
fixed = without.pop("fixed_version")
|
||||
assert without["steps"] == old_doc["steps"][:-3] + fixed["steps"]
|
||||
replaced_steps = len(old_doc.get("fixed_version", {}).get("steps", [])) or 3
|
||||
assert without["steps"] == old_doc["steps"][:-replaced_steps] + fixed["steps"]
|
||||
without["steps"] = old_doc["steps"]
|
||||
assert without.pop("source_review_sha") != old_doc.pop("source_review_sha")
|
||||
old_doc.pop("fixed_version", None)
|
||||
assert without == old_doc
|
||||
write("actual-" + Path(p).stem + ".json", d)
|
||||
repeat, _ = run("repeat")
|
||||
@@ -224,8 +235,10 @@ def main():
|
||||
source_named_fields=1217,
|
||||
positional_widgets=3660,
|
||||
companion_values=companion,
|
||||
new_saved=89,
|
||||
new_notes=3,
|
||||
new_saved=0 if BASE.startswith("3c307e0") else 89,
|
||||
retained_saved=89 if BASE.startswith("3c307e0") else 0,
|
||||
new_notes=0 if BASE.startswith("3c307e0") else 3,
|
||||
retained_notes=3 if BASE.startswith("3c307e0") else 0,
|
||||
old_saved=1106,
|
||||
old_notes=25,
|
||||
overviews=36,
|
||||
@@ -240,6 +253,7 @@ def main():
|
||||
current = json.loads((REPO / RESOURCE).read_bytes())
|
||||
for p in PATHS:
|
||||
current[p].pop("fixed_version_document")
|
||||
old_reviews[p].pop("fixed_version_document", None)
|
||||
assert current == old_reviews
|
||||
boundaries = json.loads(
|
||||
(REPO / ("docs/hel-892/h3-document-evidence/unchanged-boundaries.json")).read_bytes()
|
||||
@@ -319,7 +333,7 @@ def main():
|
||||
)
|
||||
write("package-check.json", packages)
|
||||
print(
|
||||
"PASS actual d70a286f upgrade1/skip154, repe"
|
||||
f"PASS actual {BASE} upgrade1/skip154, repe"
|
||||
"at155, rollback1, edits1/29cols, fresh155,"
|
||||
" 1217/3660/294, 36 definitions, frozen bou"
|
||||
"ndaries, wheel/sdist"
|
||||
|
||||
Reference in New Issue
Block a user