Opus finding
Time-step update condition uses fragile inline conditional that misreads platform_type for default-platform legacy path
mediumbughigh
- backend/wonderwall/environment/env.py:255-262
The conditional `(A if cond else False)` is awkward but functions correctly. However, the REDDIT legacy branch sets `self.platform_type = DefaultPlatformType.REDDIT` and is silently skipped here — the legacy Reddit simulator no longer advances `sandbox_clock.time_step` after `step()`. Previously the (unspecified) intent was likely to advance the clock for all timed sims. If Reddit relied on this tick, it’s now broken.
Recommendation
Use a plain `if self.platform_type is not None: self.platform.sandbox_clock.time_step += 1` (covers Twitter+Reddit legacy) and keep the `elif` for generic platforms. Add a unit test for both legacy platform types.