## Conditional Logic Omission (Medium)

### Trigger Signals

Start this detection when the following code characteristics appear:
- switch/case handling enum types, status values, or order types
- Same business concept handled by if/else branches in multiple places (e.g., discount calculation scattered across multiple functions)
- Variable definitions with default value assignment (`let x = null`, `const default = ...`)
- Configuration-driven conditional branches (reading rules from config files/databases then branching)

### Judgment Process

1. **Identify conditional branch set**: `Read` extracts all switch/case and key if/else branches, marking which enum value/status value/scenario each branch handles
2. **Compare with enum/status definitions**: `find_definition` looks up related enum or constant definitions, comparing with conditional branches:
   - Whether unhandled enum values/status values exist
   - Whether default branch is reasonable (safe fallback vs. silent ignore)
3. **Cross-compare logic in multiple locations**: For multiple conditional branches of the same business concept, `Grep` searches for related keywords, `Read` compares:
   - Whether handling of the same state/type is consistent across different locations
   - Whether sorting rules, pagination logic inconsistencies cause business contradictions
4. **Verify default value semantics**: `find_references` tracks variable default values, `Read` checks whether default values match business expectations (e.g., amount default null vs. 0, role default admin vs. user)

### Evidence Construction

After confirming a defect, the output must include:
- Enum/status definition (complete list of valid values)
- Missing branches (which values are not covered by conditional branches, with file:line number)
- Logic contradiction points (inconsistencies when handling the same concept in multiple locations)
- Business impact (consequences of missed scenarios or logic contradictions)

### Exclusions

- TypeScript switch with exhaustive check (compiler-level guarantee)
- Complex conditions already replaced by strategy pattern/lookup table approach (no need to check per branch)
- i18n/multi-language branch differences (by design)
