feat(FN-3957): add delegate_task override flag to bypass executor role poli

Adds a `delegate_override` flag to the `delegate_task` tool that allows executor-role tasks to be assigned to non-executor agents. The override is persisted as metadata in the extension and honored by the heartbeat inbox guard, with test coverage across engine, core, and CLI packages plus updated do

Fusion-Task-Id: FN-3957
This commit is contained in:
Fusion
2026-05-10 19:19:15 -07:00
committed by gsxdsm
parent a5a794d12e
commit a0c7c3315a
12 changed files with 160 additions and 10 deletions

View File

@@ -2007,6 +2007,14 @@ describe("fn pi extension (runnable structured-output regression slice)", () =>
expect(result.isError).not.toBe(true);
expect(result.details.agentId).toBe(reviewer.id);
const store = new TaskStore(tmpDir);
await store.init();
const task = await store.getTask(result.details.taskId);
expect(task.sourceMetadata).toMatchObject({ executorRoleOverride: true });
const selected = await store.selectNextTaskForAgent(reviewer.id, { id: reviewer.id, role: reviewer.role });
expect(selected?.task.id).toBe(task.id);
});
it("wires dependencies correctly", async () => {