fix: document ctx_execute_file workspace boundary

This commit is contained in:
云服务部-叶林立
2026-08-19 09:40:42 +08:00
parent 1b79764858
commit 3d431a353d
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -21,12 +21,20 @@ test("search routing narrows files before requesting matching line numbers", ()
assert.match(section, /Use read with offset\/limit only for the exact matching region/);
});
test("ctx_execute_file routing warns about its project-root boundary", () => {
const section = buildToolRoutingSection(["ctx_execute_file"]);
assert.match(section, /ctx_execute_file is confined to the current project root/);
assert.match(section, /host permission approval does not bypass this Context Mode boundary/);
});
test("routing includes only guidance for active optional tools", () => {
const section = buildToolRoutingSection(["read"]);
assert.doesNotMatch(section, /codegraph_explore first/);
assert.doesNotMatch(section, /For literal search/);
assert.doesNotMatch(section, /Use Context Mode/);
assert.doesNotMatch(section, /ctx_execute_file is confined/);
assert.match(section, /Use read directly/);
});