# Lava Flow

> A defect in which obsolete or half-migrated code survives because nothing records whether it is still needed.

Record: `architecture:lava-flow`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: architecture_evolution
Canonical: https://banes-lab.com/ontology#architecture-lava-flow

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Pattern Cargo Cult](https://banes-lab.com/records/architecture/pattern-cargo-cult.md) and before [Zombie Code](https://banes-lab.com/records/architecture/zombie-code.md).

## Repair

- Refactored by: usage_instrumentation, owner_assignment, deprecation_plan, delete_after_evidence
- Detected by: old_paths_never_called, deprecated_code_without_removal_date, feature_flags_stuck_on_or_off, comments_say_do_not_touch
- Violated by: Preserve obsolete, half-migrated, or unexplained code paths because no record says whether they are still needed.
- Measured by: code paths with no runtime hits, deprecated code past its removal date
- Enforced by: dead-code analysis, removal dates on deprecated paths

## Severity

- [discouraged](https://banes-lab.com/records/vocabulary/severity-discouraged.md)

## Category

- [Anti-patterns](https://banes-lab.com/records/architecture-category/anti-patterns.md)

## Force

- [Architecture evolution](https://banes-lab.com/records/force/architecture-evolution.md)

## Negated by

- [Evolutionary Architecture](https://banes-lab.com/records/architecture/evolutionary-architecture.md)

## Linked from

- [Fail at the boundary](https://banes-lab.com/disciplined-methodology/build/fail-at-the-boundary.md)
- [An anti-pattern is a decay path](https://banes-lab.com/software-architecture/decay/an-anti-pattern-is-a-decay-path.md)
- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Architecture Review / Evolution / Governance Artifacts](https://banes-lab.com/ontology/principles/architecture-category-architecture-review-evolution-governance-artifacts.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The forces](https://banes-lab.com/ontology/schema/the-forces.md)
