# Hidden Side Effect

Record: `arch:hidden-side-effect`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: event_messaging
Canonical: https://banes-lab.com/ontology#arch-hidden-side-effect

## Repair

- Refactored by: rename_command, separate_query_from_command, make_effect_explicit, move_to_effect_boundary
- Detected by: getter_mutates_state, query_writes, function_emits_event_unexpectedly, global_context_modified
- Violated by: Make an operation appear like a query or pure function while it mutates state, performs I/O, emits events, or changes global context.

## referenced-by

- [Controlled Side Effects](https://banes-lab.com/records/arch/controlled-side-effects.md)
