mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-13 11:40:53 +08:00
When a worker hits an environmental failure (sandboxed or filtered network path, missing binary or key, TLS or proxy interception, missing runtime permission), nothing today tells it how to stop: transcripts show turn after turn of retries with different flags, equivalent tools, or fallback transports, all burning budget against a wall the agent cannot move. Changes: - the ask_operator tool description now covers environmental blocks explicitly: do not retry or work around; include the exact single command the operator should run in their own terminal as one copy-pastable line, plus what to paste back, then wait. The question parameter description gains the same guidance. - worker and pentest seeds gain an "Operator handoff on environmental blocks" block: stop after the first environmental failure, no flag-hopping, no bypass hunting, one command per ask_operator request, never batch. - tests: the tool description must keep the handoff markers (TestAskOperatorEnvHandoffGuidance) and the executor seeds must keep the block (TestPromptSeedsCarryOperatorHandoff). Pattern adapted from bug-bounty-hunting-prompts (MIT), whose operator handoff rule produced exactly this single-command format.
25 lines
659 B
Go
25 lines
659 B
Go
package agent
|
|
|
|
import "strings"
|
|
import "testing"
|
|
|
|
// The operator-handoff discipline must stay in the executor agents' default
|
|
// seeds: environmental failures stop the retry loop and become one
|
|
// copy-pastable ask_operator command.
|
|
func TestPromptSeedsCarryOperatorHandoff(t *testing.T) {
|
|
for name, tmpl := range BuiltinPromptSeeds() {
|
|
switch name {
|
|
case "worker", "pentest":
|
|
for _, marker := range []string{
|
|
"Operator handoff on environmental blocks",
|
|
"one line, copy-pastable",
|
|
"never batch",
|
|
} {
|
|
if !strings.Contains(tmpl, marker) {
|
|
t.Errorf("%s seed missing operator-handoff marker %q", name, marker)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|