mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
refactor(permission-system): simplify policy and autoreview flow
This commit is contained in:
@@ -160,20 +160,6 @@ describe("checkPermission", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("resolves an external_directory path query through an access-path intent matching the canonical alias", () => {
|
||||
realpathSync.mockImplementation((p: string) =>
|
||||
p === "/test/project/link" ? "/test/project/real" : p,
|
||||
);
|
||||
const { service, resolver } = makeService();
|
||||
service.checkPermission("external_directory", "link");
|
||||
expect(resolver.resolve).toHaveBeenCalledTimes(1);
|
||||
const intent = resolver.resolve.mock.calls[0][0];
|
||||
expect(intent.kind).toBe("access-path");
|
||||
if (intent.kind === "access-path") {
|
||||
expect(intent.surface).toBe("external_directory");
|
||||
expect(intent.path.matchValues()).toContain("/test/project/real");
|
||||
}
|
||||
});
|
||||
|
||||
it("resolves a path-bearing tool query (read) through an access-path intent", () => {
|
||||
const { service, resolver } = makeService();
|
||||
|
||||
Reference in New Issue
Block a user