feat(paths): enforce fifth-domain physical redirects
This commit is contained in:
parent
28a60b4e80
commit
c180a12d8d
15 changed files with 350 additions and 18 deletions
|
|
@ -21,7 +21,7 @@ assert.equal(check("qwen", "/Volumes/JZAO/铸渊-ICE-GL-ZY001/ZCODE-DEV-20260906
|
|||
assert.equal(check("zcode", "/Volumes/JZAO/铸渊-ICE-GL-ZY001/ZCODE-DEV-20260906/a.txt").code, 0);
|
||||
assert.equal(check("zcode", "/Volumes/JZAO/铸渊-ICE-GL-ZY001/AGENTS.md").code, 2);
|
||||
assert.equal(check("qoder", "/Users/bingshuolingdianyuanhe/.qoder/skills/a.txt").code, 2);
|
||||
assert.equal(check("codex", "/Volumes/JZAO/HoloLake/persona-runtime/repo-012-main/routing/a.json").code, 0);
|
||||
assert.equal(check("codex", "/Volumes/JZAO/HoloLake/persona-runtime/repo-012-main/routing/path-isolation-and-canonical-entry-map.json").code, 0);
|
||||
|
||||
const deniedEdit = hook("zcode", { tool_name: "Edit", tool_input: { file_path: "/Volumes/JZAO/HoloLake/persona-runtime/repo-012-main/routing/a.json" } });
|
||||
assert.equal(deniedEdit.code, 2);
|
||||
|
|
@ -39,4 +39,13 @@ const allowedRead = hook("zcode", { tool_name: "Read", tool_input: { file_path:
|
|||
assert.equal(allowedRead.code, 0);
|
||||
assert.equal(allowedRead.body.hookSpecificOutput.permissionDecision, "allow");
|
||||
|
||||
console.log("HOST_WRITE_ADMISSION_TESTS_PASS 12/12");
|
||||
const retiredRead = hook("zcode", { tool_name: "Read", tool_input: { file_path: "/Volumes/JZAO/铸渊-ICE-GL-ZY001/WORK-工作区/guanghu-ice-heart/routing/guanghu-era-language-world.json" } });
|
||||
assert.equal(retiredRead.code, 2);
|
||||
assert.equal(retiredRead.body.hookSpecificOutput.permissionDecision, "deny");
|
||||
assert.match(retiredRead.body.hookSpecificOutput.permissionDecisionReason, /REDIRECT/);
|
||||
|
||||
const retiredShellRead = hook("zcode", { tool_name: "Bash", tool_input: { command: "sed -n '1,20p' /Users/bingshuolingdianyuanhe/.qoderworkcn/workspace/msj12fljjywpql1y/repo-work/repo012/INDEX.hdlp" } });
|
||||
assert.equal(retiredShellRead.code, 2);
|
||||
assert.equal(retiredShellRead.body.hookSpecificOutput.permissionDecision, "deny");
|
||||
|
||||
console.log("HOST_WRITE_ADMISSION_TESTS_PASS 18/18");
|
||||
|
|
|
|||
Loading…
Reference in a new issue