# Source Behavior Audit — v1.0.8.10

This pass compared the web emulator's active runtime logic against the two supplied Scratch projects:

- `Honeywell 6150 Keypad Demo (1)(2).sb3`
- `6160V-Excluding-Voice-Implementation(1).sb3`

The website's existing graphics remain authoritative. **No costume, backdrop, PNG, JPG, or SVG was imported from either Scratch project.**

## Source findings applied

### 6150 audio

The 6150 source project contains distinct keypad audio. In particular:

- `arming` is the audible 6150 entry/exit warning pulse.
- `arming2` is digital silence and is used by the Scratch project as a one-second timing track while it broadcasts countdown updates. It must not be used as the warning sound.
- `10seconds` is the 6150 final-ten-second warning.
- `6150alarm` is the 6150 burglary alarm.
- `startup` is the 6150 startup sound.
- `ding`, `2beeps`, `3beeps`, and `type` remain the model-specific acknowledgement/key sounds already used by the web build.

The web build now imports only the missing `arming` and `startup` WAV files. Existing 6150 sounds already matched their source-project files.

### Fire cadence

Both supplied Scratch projects implement the fire sounder as a loop of:

1. Play the model's `arming` warning pulse to completion.
2. Repeat that three times.
3. Wait one second.
4. Repeat until the fire condition is cleared.

The browser temporal-three implementation now follows that source behavior rather than synthesizing it from the generic low beep.

### 6160V audio

The web build's existing 6160/6160V power, arming, final-ten-second, acknowledgement, key, and burglary-alarm sources already correspond to the supplied 6160V project, so no additional 6160V sound files were imported.

## Runtime bugs found during the code audit

- A special life-safety branch consumed the digit `1` before normal command parsing whenever fire/CO was active. This could break valid disarm codes beginning with 1. The branch was removed; life-safety alarms now use the ordinary VISTA code+OFF parser.
- Entry countdown was marked audible before its lead-in/voice sequence finished, allowing the repeating warning to overlap the initial warning/voice sequence. Countdown timing and delay-audio enablement are now separate.
- The previous start-burst helper played one warning pulse despite comments describing three. It now plays three real pulses.
- New alarms could overwrite the active sounder kind. Effective sounder type is now derived from the complete active-alarm set with fire/CO priority retained.
- Fixed-English 6150 alarm rendering always selected the first alarm zone instead of the shared cycling zone. It now follows the common alarm display cycle.
- A/B/C/D handling was inconsistent between native, swapped, auxiliary, and keyboard input paths. Those paths now use the same programming/hold/function routing rules.
- Legacy browser storage could preserve an emergency function underneath a blank custom label. A `No Label Applied` key is now normalized to an inert key on load and checked again at execution time.

## Image integrity rule

The release packaging validation compares every website image asset against v1.0.8.9. All image hashes must remain identical before the package is accepted.
