refactor(permission-system): simplify policy and autoreview flow

This commit is contained in:
云服务部-叶林立
2026-09-03 02:01:06 +08:00
parent 180da95ab7
commit 6e7effa792
112 changed files with 911 additions and 10346 deletions
@@ -3,7 +3,6 @@ import { describe, expect, test } from "vitest";
import {
PATH_BEARING_TOOLS,
PATH_SURFACES,
READ_ONLY_PATH_BEARING_TOOLS,
} from "#src/access-intent/path-surfaces";
describe("PATH_BEARING_TOOLS", () => {
@@ -19,21 +18,9 @@ describe("PATH_BEARING_TOOLS", () => {
});
});
describe("READ_ONLY_PATH_BEARING_TOOLS", () => {
test("contains read, find, grep, ls", () => {
for (const tool of ["read", "find", "grep", "ls"]) {
expect(READ_ONLY_PATH_BEARING_TOOLS.has(tool)).toBe(true);
}
});
test("does not contain write or edit", () => {
expect(READ_ONLY_PATH_BEARING_TOOLS.has("write")).toBe(false);
expect(READ_ONLY_PATH_BEARING_TOOLS.has("edit")).toBe(false);
});
});
describe("PATH_SURFACES", () => {
test("contains the path-bearing tools plus the cross-cutting gates", () => {
test("contains the path-bearing tools plus the path gate", () => {
for (const surface of [
"read",
"write",
@@ -41,7 +28,6 @@ describe("PATH_SURFACES", () => {
"find",
"grep",
"ls",
"external_directory",
"path",
]) {
expect(PATH_SURFACES.has(surface)).toBe(true);