From 9e6d9ccb48d42ff5dfa13bfe6797f79f1f66229a Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 19 Jun 2026 20:11:15 -0500 Subject: [PATCH] =?UTF-8?q?test(@projects/@magic-civilization):=20?= =?UTF-8?q?=E2=9C=85=20flip=20stale=20GdTechWeb=20absent-sentinel=20?= =?UTF-8?q?=E2=80=94=20binding=20has=20landed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_gdextension_contract asserted GdTechWeb does NOT exist (mc-tech backlog), but the crate + binding have since landed (`#[class(base=RefCounted)] GdTechWeb` at api-gdext/src/lib.rs:7770; positive coverage in test_tech_web.gd). Per the test's own instruction, removed the ABSENT_CLASSES sentinel and flipped test_gd_tech_web_absent → test_gd_tech_web_present (guards against regression). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../integration/test_gdextension_contract.gd | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/game/engine/tests/integration/test_gdextension_contract.gd b/src/game/engine/tests/integration/test_gdextension_contract.gd index 2e0b6fb7..0a32e52d 100644 --- a/src/game/engine/tests/integration/test_gdextension_contract.gd +++ b/src/game/engine/tests/integration/test_gdextension_contract.gd @@ -111,13 +111,9 @@ const CONTRACT: Dictionary = { ## Classes that should NOT exist. Any regression where one of these accidentally ## gets registered would silently change game behavior — this sentinel catches it. -const ABSENT_CLASSES: Dictionary = { - "GdTechWeb": ( - "mc-tech crate + GdTechWeb binding were planned but never landed. " - + "tech_web.gd is a stub placeholder. If this assertion fails, the binding " - + "has landed — update test_tech_web.gd and remove this sentinel." - ), -} +## (GdTechWeb was removed once the mc-tech crate + binding landed at lib.rs:7770; +## positive coverage now lives in test_tech_web.gd.) +const ABSENT_CLASSES: Dictionary = {} # --------------------------------------------------------------------------- @@ -351,11 +347,14 @@ func test_gd_mc_tree_controller_has_expected_methods() -> void: # in `tests/unit/ai/test_ai_controller_accessor.gd`. -func test_gd_tech_web_absent() -> void: - ## mc-tech crate is still backlog; tech_web.gd is a GDScript stub. If this - ## test fails, the Rust binding landed — rehydrate test_tech_web.gd and - ## remove this sentinel (and add GdTechWeb to CONTRACT). - assert_false( +func test_gd_tech_web_present() -> void: + ## mc-tech crate + GdTechWeb binding have landed (lib.rs:7770); positive + ## coverage lives in test_tech_web.gd. This guards against the binding + ## regressing back out of the registry. + if not ClassDB.class_exists("GdMcTreeController"): + pending("godot-rust GDExtension not loaded") + return + assert_true( ClassDB.class_exists("GdTechWeb"), - ABSENT_CLASSES["GdTechWeb"], + "GdTechWeb binding should be registered (mc-tech crate has landed)", )