ARCHOS 525 BLUEPRINT · /d/dgm_code-topological-ordering
Topological Ordering & Dependency Resolution (Kahn BFS & Build DAGs)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_code-topological-ordering) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-topological-ordering)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-topological-ordering" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Topological Ordering & Dependency Resolution (Kahn BFS & Build DAGs) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Dependency Graph"]
n1_1[("In-Degree Counter")]
n2a_2[("Ready Queue")]
n2b_3["Cycle Detector"]
n3_4["Parallel Execution Plan"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Init indeg · OV+E"| n1_1
n1_1 -->|"2a. Enqueue 0 · Kahn BFS"| n2a_2
n1_1 -->|"2b. Assert DAG · Check"| n2b_3
n2a_2 -->|"3a. Schedule · DAG"| n3_4
n2b_3 -->|"3b. Merge · RAM"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Dependency GraphSTATELESSTasks / Modules / Models
- In-Degree CounterSTATEFULCounts unmet prerequisites per node
- Ready QueueSTATEFULParallel wave execution frontier
- Cycle DetectorSTATELESSvisited < V proves cycle exists
- Parallel Execution PlanSTATELESSOrdered waves / critical path
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Dependency Graph → In-Degree Counter (Init indeg)[OV+E]
- In-Degree Counter → Ready Queue (Enqueue 0)[Kahn BFS]
- In-Degree Counter → Cycle Detector (Assert DAG)[Check]
- Ready Queue → Parallel Execution Plan (Schedule)[DAG]
- Cycle Detector → Parallel Execution Plan (Merge)[RAM]
- Parallel Execution Plan → Downstream & OTel (Emit /)[OTLP/API]