The daily package is cut by the first export that runs, and the export runs on
the `hermes-shared-metrics-flush` worker. The test asserted the exact metric set
of a package cut after the task closed but before the session-summary rows
(`hermes.context_peak.count`, `hermes.session.count`) were emitted, and read the
outbox without waiting for the worker. Which side of the session close the
worker landed on was scheduler luck.
Delaying the worker (sleep in `_flush_and_export`): 0.01s and up cut the package
after the session close and the assertion failed on the extra metrics; with no
wait at all the outbox could still be empty.
Join the worker the task close scheduled before the session closes. The package
is then always the task's, and the read no longer races it.