# Happens-Before Relationship

Record: `arch:happens-before-relationship`
Kind: model
Layer: [Causality Core](https://banes-lab.com/records/layer/causality-core.md)
Severity: contextual
Scope: concurrency, distributed events
Canonical: https://banes-lab.com/ontology#arch-happens-before-relationship

## Repair

- Refactored by: Add Synchronization, Add Ordering Constraint
- Detected by: race detectors, missing synchronization
- Violated by: assuming unordered operations are ordered
- Measured by: ordering violation count
- Enforced by: concurrency tests

## requires

- [Ordering Semantics](https://banes-lab.com/records/lex/ordering-semantics.md)

## reinforces

- [Correctness](https://banes-lab.com/records/arch/correctness.md)
- [Causal Reasoning](https://banes-lab.com/records/lex/causal-reasoning.md)

## enables

- [Race Detection](https://banes-lab.com/records/lex/race-detection.md)

## conflicts-with

- [Race Conditions](https://banes-lab.com/records/lex/race-conditions.md)

## tensions-with

- [Parallel Execution](https://banes-lab.com/records/lex/parallel-execution.md)

## tensions

- [Happens-Before Relationship Parallel Execution](https://banes-lab.com/records/tension/happens-before-relationship-parallel-execution.md)

## referenced-by

- [Hybrid Logical Clocks](https://banes-lab.com/records/arch/hybrid-logical-clocks.md)
