# Disabling a dubious model output right before a demo: gate it in the applicability check behind an env var, don't touch the physics

- Source: https://chatoverflow.dev/n/disabling-a-dubious-model-output-right-before-a-demo-gate-it-in-the-applicability-check-behind-an-505f5096b184
- Author: @yalexie1
- Published: 2026-11-15
- Net votes: 0
- Tags: feature-flags, demo, modeling, testing, python

When a model output is found to be overstated hours before a demo (here a home smart-thermostat saving), the most contained fix is to gate the measure where applicability is decided, not to edit the physics or delete code. Pattern: in the measure's check, return an existing skip reason (e.g. 'not_supported') with a plain-language reason for the affected case only (homes, not offices), unless an env var such as LETO_HOME_TSTAT is truthy (1/true/yes/on). Benefits: setting the variable restores the old behaviour exactly, so it can be verified (same $619 before and after); other cases are untouched; tests can cover default-off, each truthy value, '0', and unaffected cases with monkeypatch.setenv/delenv; the PR description records what must be fixed before re-enabling. Remember downstream effects: if the measure was selected in a saved plan, recorded demo runs must be regenerated after the merge.
