From dddef79d8df4695be20d697c9bff16daf3ae78a3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 2 Dec 2026 12:10:30 +0100 Subject: [PATCH] live kitbash, kitbash_assembly: the rows the host must load are the action table's, read from brokkr_actions.json Both suites listed the kitbash rows by hand, ending at ribs, and failed once shell added a row. Co-Authored-By: Claude Fable 5.2 --- surfaces/blender/tests/live/kitbash.py | 5 +++-- surfaces/blender/tests/live/kitbash.result.json | 3 ++- surfaces/blender/tests/live/kitbash_assembly.py | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/surfaces/blender/tests/live/kitbash.py b/surfaces/blender/tests/live/kitbash.py index 9c48891..609051a 100644 --- a/surfaces/blender/tests/live/kitbash.py +++ b/surfaces/blender/tests/live/kitbash.py @@ -49,6 +49,8 @@ target.reload_host_actions() R = {"blender": bpy.app.version_string, "checks": [], "hostErrors": target.host_actions()[1], "hostRows": [row["name"] for row in target.host_actions()[0]]} COUNT = [0] +# the rows the add-on's action table names, in its order: what the host must load, whatever rows the table grows +TABLE = [row["name"] for row in json.loads((SURFACE / "brokkr_kitbash" / "brokkr_actions.json").read_text(encoding="utf-8"))["actions"]] def check(name, ok, detail=None): @@ -74,8 +76,7 @@ def extent(obj, axis=2): check("the kitbash rows load as host actions with no errors", not R["hostErrors"] - and [r for r in R["hostRows"] if r.startswith("brokkr_kitbash.")] == [f"brokkr_kitbash.{name}" for name in ( - "place_part", "set_params", "describe", "report", "attach", "detach", "roll", "aim", "reach", "close", "boolean", "cut", "cut_many", "apply", "ribs")], [R["hostErrors"], R["hostRows"]]) + and [r for r in R["hostRows"] if r.startswith("brokkr_kitbash.")] == TABLE != [], [R["hostErrors"], R["hostRows"]]) # --- describe --------------------------------------------------------------------------------------------------------- kit = core.load_kit("mechanical") diff --git a/surfaces/blender/tests/live/kitbash.result.json b/surfaces/blender/tests/live/kitbash.result.json index 7d2950a..8e751b7 100644 --- a/surfaces/blender/tests/live/kitbash.result.json +++ b/surfaces/blender/tests/live/kitbash.result.json @@ -420,7 +420,8 @@ "brokkr_kitbash.cut", "brokkr_kitbash.cut_many", "brokkr_kitbash.apply", - "brokkr_kitbash.ribs" + "brokkr_kitbash.ribs", + "brokkr_kitbash.shell" ], "placed": { "nozzle": { diff --git a/surfaces/blender/tests/live/kitbash_assembly.py b/surfaces/blender/tests/live/kitbash_assembly.py index 3802282..5e73eac 100644 --- a/surfaces/blender/tests/live/kitbash_assembly.py +++ b/surfaces/blender/tests/live/kitbash_assembly.py @@ -59,6 +59,8 @@ target.configure_action_dirs("", str(WORK)) target.reload_host_actions() R = {"blender": bpy.app.version_string, "checks": [], "hostErrors": target.host_actions()[1], "readings": {}} COUNT = [0] +# the rows the add-on's action table names, in its order: what the host must load, whatever rows the table grows +TABLE = [row["name"] for row in json.loads((SURFACE / "brokkr_kitbash" / "brokkr_actions.json").read_text(encoding="utf-8"))["actions"]] kit = core.load_kit("mechanical") # Metres (or a difference of unit vectors) between where a seated socket is and where its mate puts it, read from # the two world matrices. Shipped worst 1.5e-07 (float32 matrices, parts a few metres from the origin); least @@ -176,8 +178,7 @@ def evaluated(obj): rows = [row["name"] for row in target.host_actions()[0] if row["name"].startswith("brokkr_kitbash.")] -check("the kitbash rows load as host actions with no errors", not R["hostErrors"] and rows == [f"brokkr_kitbash.{n}" for n in ( - "place_part", "set_params", "describe", "report", "attach", "detach", "roll", "aim", "reach", "close", "boolean", "cut", "cut_many", "apply", "ribs")], [R["hostErrors"], rows]) +check("the kitbash rows load as host actions with no errors", not R["hostErrors"] and rows == TABLE != [], [R["hostErrors"], rows]) # --- attach ------------------------------------------------------------------------------------------------------------- tank = place("Tank", "tank", location=[1.0, 2.0, 3.0], rotation=[0.3, -0.2, 0.5]) # port size 0.088