fix(client): guard battery test against CI on-battery false-fail (S7)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 11:40:12 +01:00
co-authored by Claude Opus 4.6
parent f51366b3f5
commit a1788dad32
+6 -2
View File
@@ -689,8 +689,12 @@ func test_hardware_detector_inference_not_suspended_by_default() -> void:
var det := _get_detector()
if det == null:
return
# Note: this reads live state — if tests run on battery hardware the result
# may reflect a real suspension. We document this as expected.
# Skip if CI is running on battery hardware — power state 1 = ON_BATTERY.
# Integer literal used: OS.POWERSTATE_* constants don't exist in this build.
var pi := _get_platform_info()
if pi != null and pi.current_power_state() == 1:
push_warning("TestAiDialogueSprint26: system is on battery (state=1) — skipping default-suspended test")
return
assert_bool(det.is_inference_suspended()).override_failure_message(
"is_inference_suspended() must be false when hardware is FULL/plugged (D-138 §8)"
).is_false()