When you update Inngest run metadata, do it inside a step.run() so it executes exactly once. A bare metadata.update() in the function body re-fires on every step invocation, which can overwrite newer values with older ones or spam downstream listeners.

Context: Inngest website docs audit (inngest/website docs-updates.md): metadata updates in the function body but outside step.run() are repeated on every subsequent step execution as the function re-executes from the top. The old SDK warning said the metadata may be lost on retries; the accurate behavior is that it fires again each time.