ARCHOS 525 BLUEPRINT · /d/dgm_code-cycle-detection
Cycle Detection in Sequences & Graphs (Floyd Tortoise-Hare & 3-Color DFS)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_code-cycle-detection) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-cycle-detection)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-cycle-detection" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Cycle Detection in Sequences & Graphs (Floyd Tortoise-Hare & 3-Color DFS) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Graph / Linked Pointer"]
n1_1["Fast / Slow Pointers"]
n2a_2[("3-Color DFS Tracker")]
n2b_3[("Wait-For Lock Graph")]
n3_4["Cycle Break / Abort"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Step 1x/2x · Floyd"| n1_1
n1_1 -->|"2a. Check Gray · DFS"| n2a_2
n1_1 -->|"2b. Scan waits · Deadlock"| n2b_3
n2a_2 -->|"3a. Break loop · Abort"| n3_4
n2b_3 -->|"3b. Merge · RAM"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Graph / Linked PointerSTATELESSLocks, Redirects or Workflows
- Fast / Slow PointersSTATELESSFloyd 2x vs 1x in O space
- 3-Color DFS TrackerSTATEFULGray back-edge = directed cycle
- Wait-For Lock GraphSTATEFULDetects DB transaction deadlocks
- Cycle Break / AbortSTATELESSAborts youngest TX or bad redirect
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Graph / Linked Pointer → Fast / Slow Pointers (Step 1x/2x)[Floyd]
- Fast / Slow Pointers → 3-Color DFS Tracker (Check Gray)[DFS]
- Fast / Slow Pointers → Wait-For Lock Graph (Scan waits)[Deadlock]
- 3-Color DFS Tracker → Cycle Break / Abort (Break loop)[Abort]
- Wait-For Lock Graph → Cycle Break / Abort (Merge)[RAM]
- Cycle Break / Abort → Downstream & OTel (Emit /)[OTLP/API]