FACTUAL ACTIVITY RECORD · An activity record based on work that took place
Stabilizing output waits in LaunchAgent smoke tests
Replacing a fixed delay with bounded polling that waits for complete Runner JSON
Purpose
A real-service smoke test found a race where it read the Runner output immediately after startup and attempted to parse an empty file. The check needed to stop failing because of output timing rather than service behavior.
Implementation
In regression test, the one-second delay after startup was replaced with polling every 200 milliseconds for up to 20 seconds. A result is accepted only after the file is non-empty and parses as JSON.
After parsing, the test still checks no_work and each count, while preserving cleanup of temporary services and test data on both success and failure.
The implementation replaces a fixed one-second sleep with polling until a deadline for non-empty, parseable output. The file path remains a variable reference with no concrete value.
Rendering diagram…
What was confirmed
Verification results
The Connector started through a real LaunchAgent and answered over IPC, while the Runner started and produced a no_work JSON result.
All 28 Swift tests passed, and the target plists and services were confirmed absent after the smoke test.
Startup delays beyond 20 seconds were outside the verification scope at the cutoff.
Basis for completion
This scope ended when bounded polling was in place and the real LaunchAgent smoke results succeeded for both the Connector and Runner.