fix: purge 5 remaining E2E lies — dead code, theater tests, ghost skips
CRITICAL LIES FIXED: - bot_flow.py:474 compared achieve() (returns bool) to 'GOAL_ACHIEVED' (string). Success path was dead code — True never == string. - TestBotFlowDMGating built its own local target_map dict and asserted against it. bot_flow.py no longer has target_map (uses GoalExecutor). Tests verified their own imagination, not production code. - test_perception_mock_theater_purged was a skip+pass ghost creating false 'skipped' coverage in reports. - test_perceive_notification_shade silently passed on FileNotFoundError instead of reporting the missing fixture. - test_resolve_uses_visual_discovery_when_device_available only checked hasattr — verifying method existence, not behavior. PRODUCTION BUGS FIXED: - GoalExecutor constructor called with wrong args (memory, telepathic, config, session_state) — it only accepts (device, bot_username). - achieve() result comparison was dead code: always hit warning branch. E2E: 57 passed, 4 skipped (live_llm waivers), 0 failures.
This commit is contained in:
@@ -464,20 +464,14 @@ def start_bot(**kwargs):
|
||||
if getattr(configs.args, "goals", None):
|
||||
logger.info(f"🤖 Autonomous Mode Active. Delegating to GoalExecutor for: {current_goal}")
|
||||
|
||||
goal_executor = GoalExecutor(
|
||||
device=device,
|
||||
telepathic=telepathic,
|
||||
memory=growth_brain.memory,
|
||||
config=configs,
|
||||
session_state=session_state,
|
||||
)
|
||||
goal_executor = GoalExecutor(device=device, bot_username=getattr(configs.args, "username", ""))
|
||||
|
||||
result = goal_executor.achieve(current_goal)
|
||||
|
||||
if result == "GOAL_ACHIEVED":
|
||||
if result:
|
||||
logger.info("✅ Goal achieved autonomously!")
|
||||
else:
|
||||
logger.warning(f"⚠️ Goal execution returned: {result}")
|
||||
logger.warning(f"⚠️ Goal execution failed for: {current_goal}")
|
||||
|
||||
continue # The GoalExecutor handles navigation internally
|
||||
|
||||
|
||||
Reference in New Issue
Block a user