mirror of
https://github.com/usestrix/strix.git
synced 2026-08-16 09:26:39 +02:00
docs(core): correct the rationale for notifying a stalled child's parent
The user can message any agent from the TUI, not only the root, so the justification is that the parent is an agent with no other way to learn the child parked - not that the child has no human resumer.
This commit is contained in:
@@ -537,9 +537,9 @@ async def _exhausted_recovery(
|
|||||||
agent_id,
|
agent_id,
|
||||||
)
|
)
|
||||||
await coordinator.set_status(agent_id, "waiting")
|
await coordinator.set_status(agent_id, "waiting")
|
||||||
# The user talks to the root, so parking is only self-service there. A parked
|
# A parked child owes its parent a completion report it can no longer send. The
|
||||||
# subagent owes its parent a report it can no longer send, and the parent would
|
# parent is an agent, not a watching human, so nothing else tells it to stop
|
||||||
# otherwise wait out its full timeout for a message that is never coming.
|
# waiting and it burns its full timeout on a message that is never coming.
|
||||||
await _notify_parent_on_stall(coordinator, agent_id)
|
await _notify_parent_on_stall(coordinator, agent_id)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -895,10 +895,11 @@ async def test_interactive_recovery_exhaustion_parks_instead_of_crashing(
|
|||||||
async def test_interactive_subagent_exhaustion_tells_its_parent(
|
async def test_interactive_subagent_exhaustion_tells_its_parent(
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""The user only talks to the root, so a parked child must report up.
|
"""A parked child must report up so its parent stops waiting on it.
|
||||||
|
|
||||||
Otherwise a parent blocked in wait_for_message burns its whole timeout
|
The parent is an agent, not a watching human, so a parent blocked in
|
||||||
waiting for a completion report the child can no longer send.
|
wait_for_message otherwise burns its whole timeout on a completion
|
||||||
|
report the child can no longer send.
|
||||||
"""
|
"""
|
||||||
coordinator = AgentCoordinator()
|
coordinator = AgentCoordinator()
|
||||||
await coordinator.register("root", "strix", parent_id=None)
|
await coordinator.register("root", "strix", parent_id=None)
|
||||||
@@ -924,7 +925,7 @@ async def test_interactive_subagent_exhaustion_tells_its_parent(
|
|||||||
async def test_interactive_root_exhaustion_notifies_nobody(
|
async def test_interactive_root_exhaustion_notifies_nobody(
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""A parked root is self-service: the user is already watching it."""
|
"""The root has no parent to report to, so parking stays silent."""
|
||||||
coordinator = AgentCoordinator()
|
coordinator = AgentCoordinator()
|
||||||
await coordinator.register("root", "strix", parent_id=None)
|
await coordinator.register("root", "strix", parent_id=None)
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
|
|||||||
Reference in New Issue
Block a user