Replay one Swift execution where a client request calls a worker helper.

source panels When an example has more than one source file, replay keeps each file in its own panel while preserving one ordered trace stream. The Variables panel follows the actual `handleRequest(command)` call into the worker file and the returned response back to the client.
boundary The client owns the selected command, label, and visible output. The worker owns the response rule for that command.

Project Entry

command
request_client.swift
Replay: real traced execution (multi-file project)
let command = "status"
let label: String

if command == "build" {
    label = "pipeline"
} else if command == "deploy" {
    label = "release"
} else {
    label = "health"
}

let response = handleRequest(command)
let ticket = 40 + command.count

print("label=\(label)")
print("ticket=\(ticket)")
print(response)
let command = "build"
let label: String

if command == "build" {
    label = "pipeline"
} else if command == "deploy" {
    label = "release"
} else {
    label = "health"
}

let response = handleRequest(command)
let ticket = 40 + command.count

print("label=\(label)")
print("ticket=\(ticket)")
print(response)
let command = "deploy"
let label: String

if command == "build" {
    label = "pipeline"
} else if command == "deploy" {
    label = "release"
} else {
    label = "health"
}

let response = handleRequest(command)
let ticket = 40 + command.count

print("label=\(label)")
print("ticket=\(ticket)")
print(response)
  1. command ← status

    1let command→ status = "status" //@command="build", "deploy"2let label: String
  2. let response = handleRequest(command)

    12let response = handleRequest(commandstatus)13let ticket = 40 + command.count
  3. access ← ok, response ← service ready

    1let command = "status" //@command="build", "deploy"2let label: String34if command == "build" {5    label = "pipeline"6} else if command == "deploy" {7    label = "release"8} else {9    label = "health"10}1112let response = handleRequest(command)13let ticket = 40 + command.count
    values this stepokaccessservice readyresponsestatuscommand
  4. response ← ok:service ready, ticket ← 46

    12let response→ ok:service ready = handleRequest(commandstatus)13let ticket→ 46 = 40 + command.count61415print("label=\(labelhealth)")16print("ticket=\(ticket46)")17print(responseok:service ready)
    outputlabel=health
    ticket=46
    ok:service ready