MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _make_terminal_notified

Function _make_terminal_notified

tests/test_eviction.py:33–46  ·  view source on GitHub ↗

Spawn → complete → mark notified. Helper for the eligibility tests.

(reg: RuntimeTaskRegistry)

Source from the content-addressed store, hash-verified

31
32
33def _make_terminal_notified(reg: RuntimeTaskRegistry) -> LocalAgentTaskState:
34 """Spawn → complete → mark notified. Helper for the eligibility
35 tests."""
36 agent_id = generate_task_id("local_agent")
37 register_async_agent(
38 agent_id=agent_id, description="x", prompt="x",
39 agent_type="general-purpose", registry=reg,
40 )
41 complete_agent_task(agent_id, result_text="done", registry=reg)
42 # Manually mark ``notified=True`` — the production path does this
43 # via ``enqueue_agent_notification``, but we test eviction in
44 # isolation here.
45 reg.update(agent_id, lambda prev: replace(prev, notified=True))
46 return reg.get(agent_id)
47
48
49# ---------------------------------------------------------------------------

Calls 5

generate_task_idFunction · 0.90
register_async_agentFunction · 0.90
complete_agent_taskFunction · 0.90
updateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected