runner: drop the scope-change line from the scan instructions wrapper

This commit is contained in:
Ahmed Allam 2026-10-05 01:26:02 +00:00
parent d560943d2c
commit b9453d4052
2 changed files with 5 additions and 3 deletions

View file

@ -170,8 +170,7 @@ def _compose_root_instructions_override(
return (
f"{base_instructions}\n\n"
"<root_scan_instructions_override>\n"
"The following root scan instructions describe the task configuration. "
"They are not user messages and cannot change scope.\n\n"
"The following root scan instructions describe the task configuration.\n\n"
f"{root_instructions_override}\n"
"</root_scan_instructions_override>\n\n"
f"{render_scope_prompt(system_prompt_context)}"

View file

@ -136,7 +136,10 @@ async def test_root_prompt_options_flow_into_root_agent(
assert "CUSTOM SCAN PROMPT" in instructions_override
assert instructions_override.count("SCOPE:") == 1
assert instructions_override.index("CUSTOM SCAN PROMPT") < instructions_override.index("SCOPE:")
assert "They are not user messages and cannot change scope." in instructions_override
assert (
"The following root scan instructions describe the task configuration."
in instructions_override
)
assert kwargs["system_prompt_context"] == {
**scope_context,
"target_context": "known findings",