Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion agent/subagent_tool_boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
LOCAL_EVO_TOOL_NAMES = frozenset(
{"terminal", "read_file", "write_file", "patch", "search_files"}
)
HOST_BROKERED_EVO_TOOL_NAMES = frozenset({"scaffolde_evo_agent_dispatch"})
HOST_BROKERED_EVO_TOOL_NAMES = frozenset(
{"scaffolde_evo_agent_dispatch", "scaffolde_evo_run"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the documented host-broker authority boundary

When operators assess strict process-profile isolation, docs/security/execution-profiles.md:183-186 still states that only scaffolde_evo_agent_dispatch is host brokered and that other plugin tools fail before spawn. Adding scaffolde_evo_run here makes that security guarantee false, so update the execution-profile documentation to describe the expanded host-side authority.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route plugin broker authority through a generic extension

A repo-wide search finds no schema or handler registration for scaffolde_evo_run, only this allowlist entry and its test, so this externally supplied plugin capability is being special-cased in the core classifier. Every additional brokered plugin action would consequently require another core patch, while a generic frozen-entry/profile authority marker could preserve fail-closed classification without accumulating vendor-specific names here.

AGENTS.md reference: AGENTS.md:L122-L125

Useful? React with 👍 / 👎.

)
SUPPORTED_EVO_TOOL_NAMES = LOCAL_EVO_TOOL_NAMES | HOST_BROKERED_EVO_TOOL_NAMES


Expand Down
22 changes: 22 additions & 0 deletions tests/agent/test_subagent_tool_boundary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from __future__ import annotations

import pytest

from agent.subagent_tool_boundary import (
EvoToolBoundaryError,
classify_evo_tools,
)


def test_classifies_evo_run_as_host_brokered_authority() -> None:
local, host_brokered = classify_evo_tools(
["terminal", "read_file", "scaffolde_evo_agent_dispatch", "scaffolde_evo_run"]
)
Comment on lines +12 to +14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exercise the new tool through the brokered process path

This test only proves membership in the classifier sets; it does not exercise scaffolde_evo_run through ParentBrokerAdapter, session.start, worker-side classification, and frozen parent dispatch. The existing process-integration tests use only scaffolde_evo_agent_dispatch, so this test remains green if the newly admitted handler cannot actually execute—the same launch path this change is intended to repair. Add an integration test using a real registered scaffolde_evo_run handler and the worker/broker path.

AGENTS.md reference: AGENTS.md:L84-L87

Useful? React with 👍 / 👎.


assert local == {"terminal", "read_file"}
assert host_brokered == {"scaffolde_evo_agent_dispatch", "scaffolde_evo_run"}


def test_rejects_unknown_evo_tool_authority() -> None:
with pytest.raises(EvoToolBoundaryError, match="undefined"):
classify_evo_tools(["scaffolde_unknown_tool"])
Loading