Fix FSEvents delivery liveness - #713
Conversation
|
Triage: current-main textual integration is clean and the historical failure was unrelated, but this is a broad state-sensitive FSEvents generation/liveness change with no human review. As author I cannot self-approve; please obtain non-author lifecycle review and fresh hosted integration evidence. |
|
Blocking current-main recheck on exact head App shard 1 fails Please reproduce/diagnose the missed mutation, fix the owning boundary, and rerun exact-current-base CI. Do not add sleeps, retries, or timeout inflation. I am commenting rather than submitting |
Summary
FSEventStreamFlushSynccalls in watcher activation, metadata monitoring, and worktree creation witnessing with asynchronous event-ID delivery barriersWhy
The shard-2 worktree API smoke reached
create-start.tab-readyand then timed out at 180 seconds. That leg uniquely enters the worktree-creation witness and watcher activation paths. Those paths used synchronous FSEvents flushes that can block indefinitely when the host does not deliver the cut. This is a production liveness bug exposed by the integration smoke, not a concurrency condition the test should tolerate.The new contract is deterministic: the callback observes the exact asynchronous flush target for the current stream generation, or the optimization fails closed to its existing fallback. No sleeps, timeout inflation, CI workflow changes, global serialization, or reduced concurrency.
Validation
WorktreeAPISmokeHarnessTests/testManageWorktreeAndAgentRunAPISmokeFlow(7.392s)FileSystemAcceptedIngressBarrierTests(21 executed, 1 skipped, 0 failures)WorkspaceRootCreationReceiptCoordinatorTests(11/11)GitLoadedRootAuthorityEvidenceTests(48 executed, 2 skipped, 0 failures)AgentRunWorktreeStartTests(51/51)GitWorkspaceStateAuthorityTests(8/8)make dev-swift-build PRODUCT=RepoPromptmake dev-lintA full local root-suite attempt was not counted as green: it stopped making progress in the unrelated
CodemapBindingEngineRootLeaseTests/testSequentialRootsRetainGlobalAdoptionLeaseBudgetUntilUnloadThenRecover. Fresh exact-head hosted CI is required before merge.