Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

1.0 KB
Raw Blame
import { defineEval } from "eve/evals";

/**
 * `canary_deploy` is a task that would watch its canary for an hour.
 * `eve__task_cancel` stops it at once: the call settles as cancelled, no result is
 * ever delivered, and with nothing left working the turn ends.
 */
export default defineEval({
  description: "eve__task_cancel stops a working task, which then never reports a result.",
  async test(t) {
    const turn = await t.send("WORKFLOW-CANARY-CANCEL");
    turn.expectOk();

    turn.event("task.started", { count: 1, data: { callId: "canary", name: "canary_deploy" } });
    turn.calledTool("eve__task_cancel", {
      count: 1,
      output: /^Stopped \S+; it won't report back\.$/u,
    });
    turn.event("task.settled", { count: 1, data: { callId: "canary", status: "cancelled" } });
    turn.notEvent("task.settled", { data: { status: "completed" } });
    turn.event("turn.completed", { count: 1 });
    turn.messageIncludes(
      /WORKFLOW-CANARY-RESULT Stopped canary_deploy-\w{6}; it won't report back\./u,
    );
    t.noFailedActions();
  },
});