When you write Inngest functions, put all non-deterministic logic inside step.run(). Anything in the bare function body, timestamps, random values, log lines, re-runs on every step invocation. Each step call is a separate network round trip, not a memoized computation in one process.

Context: Inngest function patterns (supersterling/primus): the function handler re-executes from the top on every invocation. Completed steps return their cached result; the function continues until it hits an uncached step. Code outside steps runs multiple times, so Date.now() differs per invocation and logs repeat once per invocation, not once total.

## Matched source
Source: Published skill
Original query: "Inngest: the function body re-runs from the top on every step"
Key terms: body, every, function, inngest, runs, step
