Flow ยท Diagram Design
The macOS recording journey, and its exit by cancel
One macOS recording
A request passes the tool checks and the wrapper's preflight, then starts the script in its own process group. The server watches it once a second, then finishes and replies. A cancel or an overrun leads to the kill sequence, which deletes the new files and saves nothing.
Each box is a stage of one recording; the server does every stage except the script.
The kill sequence leaves nothing behind: the run's new files are deleted.
cancel or overrun
Request
Tool checks
Wrapper
Script
Watch loop
Finish
Reply
Kill sequence
tool_perf_record
tier to 3 settings
check levers, env,
workload, program
(preflight) first
then record_run
own process group
runs the program
every second: check
deadline and cancel
server adds layer,
context and tier
summary to client
or error
kill the group,
delete new files,
nothing saved
exit by cancel or overrun
normal path