feat: enhance expert invitation handling with case-insensitive matching and session management

This commit is contained in:
X-iZhang
2026-08-07 16:42:40 +01:00
committed by Xi Zhang
parent ab1a6b0062
commit aff63ccd65
10 changed files with 159 additions and 23 deletions
+19
View File
@@ -1321,6 +1321,25 @@ class TestPanelDispatchEvents:
assert completes[0]["id"] == "ptc_task_abc12345"
assert completes[0]["duration_ms"] == 1234
async def test_complete_event_with_null_duration_normalizes_to_zero(self):
agent = FakeV3Agent(
[
custom_subagent_event(
{
"type": "subagent",
"phase": "complete",
"id": "ptc_task_abc12345",
"eval_id": "ci_eval_1",
"duration_ms": None,
}
),
]
)
events = await collect_events(agent)
completes = [e for e in events if e.get("type") == "panel_dispatch_complete"]
assert len(completes) == 1
assert completes[0]["duration_ms"] == 0
async def test_error_event_becomes_panel_dispatch_error(self):
agent = FakeV3Agent(
[