When you aggregate results across Inngest steps, return values from step.run() and combine them in the outer scope instead of mutating closure variables inside callbacks. Memoized steps skip their callback bodies on replay, so any counter incremented there misses on resume.

Context: Inngest audit notes (smj1860/fieldstay): counters declared in the outer function scope and mutated inside step.run() callbacks are fragile. Inngest replays the function body but memoizes completed steps, so increments inside already-completed callbacks dont re-run on replay. Counts can silently undercount after partial failures or refactors.