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
@@ -271,29 +271,6 @@ describe("PermissionSession", () => {
});
});
describe("infrastructure paths", () => {
it("getInfrastructureReadDirs combines piInfrastructureDirs and piInfrastructureReadPaths", () => {
const configStore = makeConfigStore({
current: vi.fn().mockReturnValue({
piInfrastructureReadPaths: ["/extra/path"],
}),
});
const { session } = createSession({ configStore });
expect(session.getInfrastructureReadDirs()).toEqual([
"/test/agent",
"/test/agent/git",
"/extra/path",
]);
});
it("getInfrastructureReadDirs returns only piInfrastructureDirs when config omits the field", () => {
const { session } = createSession();
expect(session.getInfrastructureReadDirs()).toEqual([
"/test/agent",
"/test/agent/git",
]);
});
});
describe("config delegation", () => {
it("refreshConfig delegates to configStore.refresh with the trust flag", () => {