Completes FN-3976 by reclassifying GitHub import action gating in the engine's `gating-classifications.ts`, updating documentation in `docs/agents.md` accordingly, and adding test coverage across four gating test suites. Fusion-Task-Id: FN-3976
30 lines
1.5 KiB
TypeScript
30 lines
1.5 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
ACTION_GATE_TASK_AGENT_MANAGEMENT_TOOLS,
|
|
PERMANENT_AGENT_TASK_MUTATION_TOOLS,
|
|
TASK_AGENT_MUTATION_TOOLS,
|
|
} from "../gating-classifications.js";
|
|
|
|
describe("gating classifications provisioning split", () => {
|
|
it("keeps provisioning tools out of action-gate set", () => {
|
|
expect(ACTION_GATE_TASK_AGENT_MANAGEMENT_TOOLS.has("fn_agent_create")).toBe(false);
|
|
expect(ACTION_GATE_TASK_AGENT_MANAGEMENT_TOOLS.has("fn_agent_delete")).toBe(false);
|
|
});
|
|
|
|
it("retains provisioning tools in permanent/task mutation sets", () => {
|
|
expect(PERMANENT_AGENT_TASK_MUTATION_TOOLS.has("fn_agent_create")).toBe(true);
|
|
expect(PERMANENT_AGENT_TASK_MUTATION_TOOLS.has("fn_agent_delete")).toBe(true);
|
|
expect(TASK_AGENT_MUTATION_TOOLS.has("fn_agent_create")).toBe(true);
|
|
expect(TASK_AGENT_MUTATION_TOOLS.has("fn_agent_delete")).toBe(true);
|
|
});
|
|
|
|
it("classifies github task imports as action-gated task mutations only", () => {
|
|
expect(ACTION_GATE_TASK_AGENT_MANAGEMENT_TOOLS.has("fn_task_import_github")).toBe(true);
|
|
expect(ACTION_GATE_TASK_AGENT_MANAGEMENT_TOOLS.has("fn_task_import_github_issue")).toBe(true);
|
|
expect(PERMANENT_AGENT_TASK_MUTATION_TOOLS.has("fn_task_import_github")).toBe(false);
|
|
expect(PERMANENT_AGENT_TASK_MUTATION_TOOLS.has("fn_task_import_github_issue")).toBe(false);
|
|
expect(TASK_AGENT_MUTATION_TOOLS.has("fn_task_import_github")).toBe(true);
|
|
expect(TASK_AGENT_MUTATION_TOOLS.has("fn_task_import_github_issue")).toBe(true);
|
|
});
|
|
});
|