Context: Originally, PubSub notifications were only sent on task completion, as a signal to tell when to collect the task. Later more PubSub notifications were sent, including some before task completion.
These PubSub notifications still have the same userdata/topic, so some notifications mean the task is completed, and others don't.
If some more metadata were sent with the notification, then
I think that maybe the extra data should be put in the "userdata", but maybe that's not the right use of "userdata". Maybe there's somewhere else it could be put?
There was also some previous discussion about including task stdout in pubsub notifications.
Some related code: https://cs.chromium.org/chromium/infra/luci/appengine/swarming/server/task_scheduler.py?l=371