docs: Add session debrief about test fixes and MCP tool lesson
This commit is contained in:
38
add_debug.py
Normal file
38
add_debug.py
Normal file
@@ -0,0 +1,38 @@
|
||||
with open("tests/test_visual_orchestration.py", "r", encoding="utf-8", newline="") as f:
|
||||
content = f.read()
|
||||
|
||||
# Add debug polling
|
||||
content = content.replace(
|
||||
"""# 3. Verify that Tier 1 generates tracks
|
||||
print("[Test] Polling for Tier 1 tracks...")
|
||||
tracks_generated = False
|
||||
for i in range(120):
|
||||
mma_status = client.get_mma_status()
|
||||
proposed = mma_status.get("proposed_tracks", [])
|
||||
if proposed and len(proposed) > 0:
|
||||
tracks_generated = True
|
||||
print(f"[Test] Tracks generated after {i}s")
|
||||
break
|
||||
time.sleep(1)""",
|
||||
"""# 3. Verify that Tier 1 generates tracks
|
||||
print("[Test] Polling for Tier 1 tracks...")
|
||||
tracks_generated = False
|
||||
for i in range(120):
|
||||
mma_status = client.get_mma_status()
|
||||
proposed = mma_status.get("proposed_tracks", [])
|
||||
if proposed and len(proposed) > 0:
|
||||
tracks_generated = True
|
||||
print(f"[Test] Tracks generated after {i}s")
|
||||
print(f"[Test] Proposed tracks: {proposed}")
|
||||
break
|
||||
# Debug: also check tier usage
|
||||
if i % 10 == 0:
|
||||
tier_usage = mma_status.get("mma_tier_usage", {})
|
||||
print(f"[Test] Debug: tier_usage={tier_usage}, proposed={proposed}")
|
||||
time.sleep(1)""",
|
||||
)
|
||||
|
||||
with open("tests/test_visual_orchestration.py", "w", encoding="utf-8", newline="") as f:
|
||||
f.write(content)
|
||||
|
||||
print("Added debug to test")
|
||||
Reference in New Issue
Block a user