Synchronize delegation cancellation test

81e4c25eb5b5 · AtlantisPleb · · parent 9ba43cf77453

Synchronize delegation cancellation test

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified test/openagents/work/delegation_report_test.exs

Diff

1 file changed, +3 -0

test/openagents/work/delegation_report_test.exs modified +3

@@ -57,15 +57,18 @@ defmodule OpenAgents.Work.DelegationReportTest do

57 57
58 58
  test "cancelling a delegation reports the cancellation, never a partial transcript" do
59 59
    %{conversation: conversation, machine: machine} = delegation_owner("deleg-report-cancel")
60
    test_pid = self()
60 61
61 62
    # A delegation that streams and never returns: the owner stops it from the
62 63
    # live panel while the tool log is still growing.
63 64
    connect(machine.id, fn {:agent, request_id, _payload, caller} ->
64 65
      FakeController.chunk(caller, request_id, noisy_transcript())
66
      send(test_pid, :delegation_streaming)
65 67
    end)
66 68
67 69
    {:ok, started} = Work.start_delegation(delegation_attributes(conversation, machine))
68 70
    assert eventually(fn -> Work.get_job!(started.id).status == "running" end)
71
    assert_receive :delegation_streaming
69 72
70 73
    :ok = Work.cancel_active_delegations(conversation.id)
71 74
    assert eventually(fn -> Work.get_job!(started.id).status == "cancelled" end)

This page updates live while a promote is in flight · changelog