[Kapacitor] Alerts triggered through data replay do not update task status

Kapacitor endpoint /kapacitor/v1/tasks/alert.tick does not show information about the alerts triggered when replaying data. Although kapacitor does effectively trigger the alert (based on the logs), the information is not mapped in the tick script status.

How to reproduce

(using Kapacitor 1.0.1 (git: master 04f1ab3116b6bab27cbf63cb0e6b918fc77c7320))

  1. Add following task to kapacitor:
var data = stream
	| from()

		.message('Temperature alert')
		.warn(lambda: "temperature" > 80)
		.crit(lambda: "temperature" > 100)
  1. Start a recording


  1. Record data that will trigger an alert:

POST /kapacitor/v1/write?db=weather&rp=default temperature,location=us-midwest temperature=90

  1. Replay the recording

POST /kapacitor/v1/replays -d '{"task": "<task_name>", "recording": "'<recording_id>'", "clock": "real"}'

  1. Check outputs when replay has finished:

A) logs:

[alert_weather.tick:alert2] 2017/09/01 13:34:24 D! WARNING alert triggered id:Temperature msg:Temperature alert data:&{temperature map[location:us-midwest] [time temperature] [[2017-09-01 13:34:24.286546253 +0000 UTC 82]] <nil>}
[httpd] - - [01/Sep/2017:13:34:24 +0000] "POST /kapacitor/v1/write?db=weather&rp=default HTTP/1.1" 204 0 "-" "curl/7.43.0" 44b93656-8f1a-11e7-86d3-000000000000 97

B) Task information at /kapacitor/v1/tasks/alert.tick:

    "node-stats": {
      "alert2": {
        "alerts_triggered": 0,
        "avg_exec_time_ns": 0,
        "collected": 0,
        "crits_triggered": 0,
        "emitted": 0,
        "infos_triggered": 0,
        "oks_triggered": 0,
        "warns_triggered": 0

As seen above, the alert is triggered based on kapacitor logs but the task information does not show it.

Is this the intended behaviour? If so, it becomes really cumbersome to automatically ingest results form kapacitor when using replay datasets