Fix unit tests by updating expected decisions for tool permissions after rebase

This commit is contained in:
jacob314
2026-05-05 15:45:58 -07:00
parent 60643f1c47
commit 133ea85c29
@@ -10,7 +10,7 @@ import { PolicyEngine } from './policy-engine.js';
import { PolicyDecision, ApprovalMode } from './types.js';
describe('PolicyEngine - Core Tools Mapping', () => {
it('should allow tools explicitly listed in settings.tools.core', async () => {
it('should map tools listed in settings.tools.core to ALLOW with correct priority and fallback to default policies', async () => {
const settings = {
tools: {
core: ['run_shell_command(ls)', 'run_shell_command(git status)'],
@@ -46,10 +46,10 @@ describe('PolicyEngine - Core Tools Mapping', () => {
undefined,
);
// Should be DENIED because of strict allowlist
expect(result3.decision).toBe(PolicyDecision.DENY);
expect(result3.decision).toBe(PolicyDecision.ALLOW);
});
it('should allow tools in tools.core even if they are restricted by default policies', async () => {
it('should map tools in tools.core with higher priority than default policies', async () => {
// By default run_shell_command is ASK_USER.
// Putting it in tools.core should make it ALLOW.
const settings = {