# Graph Scheduling Specification
Rivox schedules build execution over the unified multigraph using topological sorting (Kahn's algorithm).
---
## Execution Phases
1. **Subgraph Ingestion**: Adapters resolve native lockfiles and produce graph nodes.
2. **Cross-Ref Binding**: `rivox.toml` cross-references add dependency edges across ecosystem boundaries.
3. **Cycle Detection**: Kahn's algorithm verifies that the graph is a DAG, returning an error if cycles exist.
4. **Phase Plan Execution**: Scheduled nodes are checked against CAS cache keys. Cache hits instantiate hard-links instantly; cache misses execute inside OS sandboxes.
See also: [architecture.md](architecture.md), [sandbox.md](sandbox.md).