State diagrams
Every file in crates/merlion-render/tests/fixtures/state/. A stateDiagram-v2 lowers to the same layered graph a flowchart uses, so these run through the seven layout phases with no engine of their own (how it works).
The five llm- sources carry the mistakes a language model makes — -> for -->, a transition label with no :, a composite state left open, a stray } — and render through the parser’s repairs (State diagrams).
Accessible review
Section titled “Accessible review”Diagram source
---title: Access review---stateDiagram-v2 accTitle: Quarterly access review accDescr: Every account moves from collected to retained or revoked.
[*] --> Collected Collected --> UnderReview : a reviewer takes the account UnderReview --> Retained : the access stays UnderReview --> Revoked : the access is removed Retained --> [*] Revoked --> [*]
click UnderReview href "https://example.com/access-review" _blankAgent tool loop
Section titled “Agent tool loop”Diagram source
stateDiagram-v2 state decide <<choice>> [*] --> Planning Planning --> decide decide --> CallingTool : a tool call is needed decide --> Answering : the answer is ready CallingTool --> Observing Observing --> Planning : feed the result back Answering --> [*] note right of Observing : Each observation is appended to the transcript.Choice fork join
Section titled “Choice fork join”Diagram source
stateDiagram-v2 state score_gate <<choice>> state fan_out <<fork>> state fan_in <<join>>
[*] --> Collect Collect --> score_gate score_gate --> Reject : the score is under 0.5 score_gate --> fan_out : the score is 0.5 or over fan_out --> Index fan_out --> Notify Index --> fan_in Notify --> fan_in fan_in --> Done Reject --> [*] Done --> [*]Ci pipeline
Section titled “Ci pipeline”Diagram source
stateDiagram-v2 [*] --> Queued Queued --> Running : a runner picks the job up state Running { [*] --> Checkout Checkout --> Build Build --> Test Test --> [*] } Running --> Passed : every stage is green Running --> Failed : a stage exits non-zero Failed --> Queued : retry Passed --> [*]Deploy rollout
Section titled “Deploy rollout”Diagram source
stateDiagram-v2 [*] --> Staged Staged --> Canary : promote 5% of the fleet Canary --> Rollout : the error rate stays under 1% Canary --> RollingBack : the error rate passes 1% Rollout --> Live : every shard runs the new build RollingBack --> Staged : the previous build is back Live --> [*]Door lock
Section titled “Door lock”Diagram source
stateDiagram-v2 [*] --> Locked Locked --> Unlocked : the code matches Locked --> Alarm : three codes in a row do not Alarm --> Locked : an operator resets the panel Unlocked --> Locked : no motion for 30s Unlocked --> [*]Elevator
Section titled “Elevator”Diagram source
stateDiagram-v2 [*] --> Idle Idle --> Moving : a floor is requested state Moving { [*] --> Accelerating Accelerating --> Cruising state Cruising { [*] --> Level Level --> Level : pass a floor Level --> [*] } Cruising --> Decelerating Decelerating --> [*] } Moving --> DoorsOpen : the car arrives DoorsOpen --> Idle : the doors close Idle --> [*]Ingest direction
Section titled “Ingest direction”Diagram source
stateDiagram-v2 direction LR [*] --> Ingest state Ingest { direction TB [*] --> Fetch Fetch --> Parse : the payload arrives Parse --> [*] } Ingest --> Store Store --> Indexed : the writer commits Indexed --> [*]Keyboard concurrency
Section titled “Keyboard concurrency”Diagram source
stateDiagram-v2 [*] --> Active state Active { [*] --> NumLockOff NumLockOff --> NumLockOn : EvNumLockPressed NumLockOn --> NumLockOff : EvNumLockPressed -- [*] --> CapsLockOff CapsLockOff --> CapsLockOn : EvCapsLockPressed CapsLockOn --> CapsLockOff : EvCapsLockPressed -- [*] --> ScrollLockOff ScrollLockOff --> ScrollLockOn : EvScrollLockPressed ScrollLockOn --> ScrollLockOff : EvScrollLockPressed } Active --> [*]Llm missing colons
Section titled “Llm missing colons”Diagram source
stateDiagram-v2 [*] --> Queued Queued --> Running picked up by a runner Running --> Passed every check is green Running --> Failed a check exits non-zero Passed --> [*] Failed --> [*]Llm mixed mistakes
Section titled “Llm mixed mistakes”Diagram source
stateDiagram-v2 [*] -> Received state Processing { [*] --> Validate Validate --> Enrich Enrich --> [*] Received --> Processing queue the record Processing ==> Stored Stored --> [*]Llm stray braces
Section titled “Llm stray braces”Diagram source
stateDiagram-v2 [*] --> Open Open --> Triaged : an owner takes the issue } -- Triaged --> Closed : the fix ships Closed --> [*]Llm unclosed composite
Section titled “Llm unclosed composite”Diagram source
stateDiagram-v2 [*] --> Ready Ready --> Working : start state Working { [*] --> Fetching Fetching --> Transforming Transforming --> [*] Working --> Done : finish Done --> [*]Llm unclosed note
Section titled “Llm unclosed note”Diagram source
stateDiagram-v2 [*] --> Drafting note right of Drafting The author writes the post and can save it as often as they like. Drafting --> Review : submit Review --> Published : approve Review --> Drafting : request changes Published --> [*]Llm wrong arrows
Section titled “Llm wrong arrows”Diagram source
stateDiagram-v2 [*] -> Idle Idle ->> Fetching : refresh Fetching --> Ready Ready ==> Idle : reset Ready -.-> Failed : the request times out Failed --> [*]Media player
Section titled “Media player”Diagram source
stateDiagram-v2 direction LR [*] --> Stopped Stopped --> Playing : play Playing --> Paused : pause Paused --> Playing : resume Playing --> Stopped : stop Paused --> Stopped : stop Playing --> Playing : seek Stopped --> [*]Notes and descriptions
Section titled “Notes and descriptions”Diagram source
stateDiagram-v2 state "Waiting for the author" as Draft Review : Two approvals are required note right of Draft The author edits freely until they submit. end note note left of Review : An approval expires after 14 days. [*] --> Draft Draft --> Review : submit Review --> Published : approve Published --> [*]Order lifecycle
Section titled “Order lifecycle”Diagram source
---title: Order lifecycle---stateDiagram-v2 [*] --> Draft Draft --> Submitted : submit Submitted --> Review : queue for an editor Review --> Published : approved Review --> Draft : rejected Published --> Archived : retire Archived --> [*]Payment authorization
Section titled “Payment authorization”Diagram source
stateDiagram-v2 state risk <<choice>> [*] --> Authorizing Authorizing --> risk risk --> Captured : the risk score is under 40 risk --> ThreeDS : the risk score is 40 or over state ThreeDS { [*] --> Challenge Challenge --> Verified : the issuer accepts Challenge --> Abandoned : the shopper leaves Verified --> [*] Abandoned --> [*] } ThreeDS --> Captured : verified ThreeDS --> Declined : abandoned Captured --> [*] Declined --> [*]Styled roles
Section titled “Styled roles”Diagram source
stateDiagram-v2 classDef terminal stroke-width:2px classDef risky font-weight:bold
[*] --> Received Received --> Screening:::risky Screening --> Approved : the record is clean Screening --> Blocked : a rule flags the record Approved --> [*] Blocked --> [*]
class Approved,Blocked terminal style Received stroke-dasharray:4 4Tcp connection
Section titled “Tcp connection”Diagram source
stateDiagram-v2 direction LR [*] --> Closed Closed --> Listen : passive open Closed --> SynSent : active open Listen --> SynReceived : receive SYN SynSent --> SynReceived : receive SYN SynSent --> Established : receive SYN+ACK SynReceived --> Established : receive ACK Established --> FinWait1 : close Established --> CloseWait : receive FIN FinWait1 --> FinWait2 : receive ACK FinWait2 --> TimeWait : receive FIN CloseWait --> LastAck : close LastAck --> Closed : receive ACK TimeWait --> Closed : the 2MSL timer expires Closed --> [*]