On this page
Editor connections
stado product editor serves existing native build settings and reports the connections that own them. It does not compile, restore dependencies, restart editors or hold the disk-reclamation lock.
Start and inspect
Editors launch stado product editor serve from the connection declaration written by stado product swift index. Standard input and output carry the build-server protocol, not a JSON command report. An explicit --package-path selects the canonical package before the connection starts; otherwise build/initialize supplies its local file URI. A connection cannot switch to a different package after initialization.
stado product editor status --json
stado product editor --package-path "$PACKAGE" status --json
Here PACKAGE is the existing canonical Swift package directory. Omitting it lists every active workspace in this Stado product state directory. An unreadable or nonexistent supplied path refuses with the filesystem cause. Status prints a table of workspace, process, parent, start time and measured age; an empty result explicitly says there are no active connections. --json returns the structured status document consumed by Desktop. serve --json refuses because a command report cannot share protocol stdout.
Ownership and lifetime
A workspace has one active editor instance. Its canonical physical path selects an exclusive OS lock; the process holds that lock for the connection's lifetime. A second instance refuses with the workspace and held lock path; editor status reports the active process, parent and start time. With no explicit package, ownership is acquired during build/initialize, and a duplicate is a protocol error rather than an accepted initialization.
Closing stdin ends the server. The server also observes its launching parent: macOS subscribes to the process-exit event with kqueue; Linux requests a kernel parent-death signal. Parent observation is registered before package resolution, and a parent change during registration refuses startup. A parent exit ends the server even when another process still holds the stdin writer. Kernel events determine this lifetime. Platforms without a parent-exit implementation refuse rather than run an unowned connection.
Instance receipts and lock files live under editor/instances in Stado's product home. Each connection has its own live identity, separate from the reusable workspace lock, so acquiring a workspace cannot revive a crashed predecessor's receipt. The receipt alone does not establish liveness: status checks the corresponding instance lock and excludes released entries. A normal exit or process termination releases ownership; a later connection can reuse the workspace without deleting a lock file or restarting a service. A held instance lock with an unreadable receipt is an inspection failure, not an empty list.
The status document contains observed_at and instances. Every instance contains workspace, pid, parent_pid, started_at, measured age_seconds, state and lock. It reports observed connection ownership, not a compiler-health verdict. Processes started by older binaries without this ownership protocol do not acquire these locks or publish these receipts.
Desktop
In Products, choose Inspect live editor instances, parent processes and connection age under the product operations. Leave the package field empty to inspect every connection on the selected Stado API host, or supply its canonical package directory. The native operation returns the same document and exact refusal as the CLI. It does not launch a local browser, shell command or additional editor server in the desktop application.
Real qualification
The sourcekit selection of the space-reclaim integration journey, which the editor-reclaim quality gate runs, includes tests/space_reclaim/sourcekit/lifetime.rs. The test takes no input from outside: in an isolated product home it creates a workspace holding a canonical checkout on main whose origin names a GitHub repository and whose committed Package.swift is a real Swift package, so the editor resolves it as that repository's canonical package exactly as it resolves an operator's. It then starts a real client process and editor, exchanges a framed protocol request, verifies the reported owner and refuses another instance of that workspace. It kills only its isolated client while retaining the stdin writer, collects the editor's kernel process-exit event, verifies that status has no remaining owner, and starts a replacement connection. The existing editor-reclamation journey independently checks stdin EOF and reclaim-lock independence.
The fixture retains source identity, binary version, commands (the git commands that built the isolated checkout among them), exit statuses, protocol responses, stderr and observed state. It does not manufacture compiler settings or stop an operator's editor. Source changes and documentation do not establish that qualification has run.
Source: this website