anchor.diff:  -type task_registry() :: #{AtmTaskSchemaId :: automation:id() => atm_task_execution:id()}.
   -type task_selector() :: {atm_lane_execution:lane_run_selector(), automation:id(), automation:id()}.
   
  +-type expectation() ::
  +    {current_lane_run_selector, {atm_lane_execution:index(), atm_lane_execution:run_num()}} |
  +
  +    {task, atm_task_execution:id(), atm_task_execution:status()} |
  +    {all_tasks, atm_lane_execution:lane_run_selector(), atm_task_execution:status()} |
  +    {all_tasks, atm_lane_execution:lane_run_selector(), abruptly, failed | cancelled | interrupted} |
  +    {all_tasks, atm_lane_execution:lane_run_selector(), stopping_due_to, pause | interrupt | cancel} |
  +
  +    {lane_run, atm_lane_execution:lane_run_selector(), automatic_retry_scheduled} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), manual_retry_scheduled, atm_lane_execution:run_num()} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), manual_rerun_scheduled, atm_lane_execution:run_num()} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), manual_repeat_scheduled, retry | rerun, atm_lane_execution:run_num()} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), started_preparing} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), started_preparing_as_current_lane_run} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), started_preparing_in_advance} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), created} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), atm_lane_execution:run_status()} |
  +
  +    {lane_run, atm_lane_execution:lane_run_selector(), run_num_set, atm_lane_execution:run_num()} |
  +    {lane_run, atm_lane_execution:lane_run_selector(), removed} |
  +    {lane_runs, atm_lane_execution:lane_run_selector() | [atm_lane_execution:lane_run_selector()], rerunable} |
  +    {lane_runs, atm_lane_execution:lane_run_selector() | [atm_lane_execution:lane_run_selector()], retriable} |
  +
  +    workflow_scheduled |
  +    workflow_resuming |
  +    workflow_active |
  +    workflow_stopping |
  +    workflow_finished |
  +    workflow_failed |
  +    workflow_cancelled |
  +    workflow_paused |
  +    workflow_interrupted |
  +    workflow_crashed.
  +
   -type log_fun() :: fun((binary(), [term()]) -> ok).
   
  --export_type([ctx/0, task_selector/0]).
  +-export_type([ctx/0, task_selector/0, expectation/0]).
   
   
   -define(JSON_PATH(__QUERY_BIN), binary:split(__QUERY_BIN, <<".">>, [global])).
  
positive.code:     ).
  
  
  -spec expect_task_finished(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_finished(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"finished">>, ExpStateCtx).
  
  
  -spec expect_task_skipped(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_skipped(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"skipped">>, ExpStateCtx).
  
  
  -spec expect_task_failed(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_failed(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"failed">>, ExpStateCtx).
  
  
  -spec expect_task_interrupted(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_interrupted(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"interrupted">>, ExpStateCtx).
  
  
  -spec expect_task_paused(atm_task_execution:id(), ctx()) -> ctx().
  expect_task_paused(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"paused">>, ExpStateCtx).
  
  
  -spec expect_task_cancelled(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_cancelled(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"cancelled">>, ExpStateCtx).
  
  
  -spec expect_task_parallel_box_transitioned_to_inferred_status(
      atm_task_execution:id(),
      fun((CurrentParallelBoxStatus :: binary(), [AtmTaskStatus :: binary()]) -> binary()),
  
negative.code:         ))}
      end,
      update_exp_task_parallel_box_execution_state(AtmTaskExecutionId, Diff, ExpStateCtx).
  
  
  -spec expect_task_finished(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_finished(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"finished">>, ExpStateCtx).
  
  
  -spec expect_task_skipped(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_skipped(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"skipped">>, ExpStateCtx).
  
  
  -spec expect_task_failed(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_failed(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"failed">>, ExpStateCtx).
  
  
  -spec expect_task_interrupted(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_interrupted(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"interrupted">>, ExpStateCtx).
  
  
  -spec expect_task_paused(atm_task_execution:id(), ctx()) -> ctx().
  expect_task_paused(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"paused">>, ExpStateCtx).
  
  
  -spec expect_task_cancelled(atm_task_execution:id(), ctx()) ->
      ctx().
  expect_task_cancelled(AtmTaskExecutionId, ExpStateCtx) ->
      expect_task_transitioned_to(AtmTaskExecutionId, <<"cancelled">>, ExpStateCtx).
  
  
  -spec expect_all_tasks_pending(atm_lane_execution:lane_run_selector(), ctx()) ->
  