Disabled Ventilation Policies Fall Back to Enabled on Lookup
Level 2 · node · Data · Explicit false boolean settings replaced by a default
Scenario
A fictional research building manages automatic ventilation permission as a boolean for each site and device. Devices with no saved policy are enabled by default, but an explicitly disabled device must return false. The current lookup treats stored false as though no setting exists and displays the device as enabled. Review the repository, service, and controller.
Requirements
Distinguish an explicitly stored false value from an absent policy. Return stored true or false unchanged and use the true default only when no record exists. Preserve site isolation and invalid input rejection.
Acceptance criteria
- A device explicitly disabled returns false on lookup.
- A device explicitly enabled returns true on lookup.
- A device without a saved setting defaults to true.
- The same device identifier in different sites remains independent.
- Invalid setting inputs are rejected without modifying saved values.
- Invalid lookup identifiers are rejected.