Repository navigation
Move saved server reads and writes off the main thread - #42253
Conversation
Co-authored-by: OrcaWin <[email protected]>
…42610) Claude Code parks replaced skill copies in `.trash` and in-progress syncs in `.staging` under its skills roots. Discovery walked into both, so each synced skill showed up as duplicates. Prune those directory names in the native file walk and in the generated WSL `find` command. Co-authored-by: Neil <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
|
Reading or saving server connections could freeze Orca. Saved-server operations now run in one background worker on desktop and persistent servers. Short CLI commands run the same serialized operations inline. Saved formats, private-file permissions, unreadable records and durable replacement are preserved. The full fresh reviewer pair is clean through Validation: final head Required real QA is complete. SSH saved-host terminal output, reconnect, upgrade, graceful restart and real Claude Opus medium/Codex high replies passed earlier. WSL baseline-to-target upgrade, credential ACLs and both real agent replies also passed earlier. The missing real WSL disconnect → Start/reconnect and graceful-restart command flows now pass under isolated orcaqa ticket 5745, using a newly rebuilt WSL stopped state and Start: WSL command output after reconnect: WSL command output after graceful restart: Performance: with 100 hosts and 1,000 production-store triggers, the largest main-loop gap fell from about 29 ms to 1.3–2.2 ms and main filesystem calls fell to zero. All five sequential pairs improved wall time (501–531 ms before; 282–392 ms after). Limits: shared-host timing noise, synthetic durability delays and unmeasured Windows cold-worker latency. Observations kept separate from passes: exact WSL transition latency was not captured (first samples were 10.5 s after termination and 9.3 s after Start). The old pre-disconnect terminal showed a bare prompt and lost its earlier output after reconnect; new terminals worked, matching the earlier need to open a new terminal after termination. After restart the host was already ready, so Start was exercised after the real disconnect. SSH startup read failure remains process-scoped as on main, worker-start failure retries on new work, and the existing standalone retirement diagnostic still has a PairingOffer/connection-constructor mismatch. Concurrent sessions changed neil's Earlier SSH restart and native-agent proof (the Claude/Codex chats in these two images ran locally with SSH hosts connected): Earlier real agent replies on WSL: |
…e-sync-io # Conflicts: # src/main/runtime/agent-senders/runtime-agent-sender-associations.ts








Orca can freeze while reading or saving remote server connections. Desktop and persistent server processes now send complete saved-server operations to one background worker, keeping disk reads and durable writes off their event loops. Short CLI commands use the same serialized operations in-process to avoid worker startup overhead.
Saved filenames, formats, private-file permissions and durable replacement order are preserved. Reads remain fresh across completed changes from another process or older build, including records this version cannot understand. Callers now await fresh connection state while retaining pairing, subscription, publication and cancellation ownership.
Fresh reviews repaired repeated shared-host lookups, phone requests losing replies when their connection retired, and snapshot/subscriber ownership during async preparation. Delayed WSL callbacks no longer overwrite a confirmed stopped-distro state or hide Start; new Ready callbacks retain their pairing save and notification. Main is merged through
7f38c5d0042, preserving its startup extraction, shutdown drains and shared-contract moves. The final conflict resolution changes only a type import path. Fresh Claude/Codex reviews and performance screens are clean; the startup conflict resolution also has a clean fresh Codex high review.Validation
cec94663a692988659331f3161eaae536080f820: full typecheck and 52 tests across ten named store, cache, WSL, quit/teardown and sender-association owner files pass. Earlier full owner coverage passed 540 tests across 49 named files with seven intentional skips. Counterfactual runs reproduce the original lookup, reply-retirement, publication and WSL ordering failures.pnpm check:changedpassed 36 non-unit gates. Its broad unit fallback timed out at five minutes; that timeout is not a pass. Final-head CI is green: 81 checks pass with 18 skips, including all unit shards, changed E2Es, SSH/WSL, Windows packaging and performance contracts.Performance
The CLI sample measures the production resolver with startup/import/close, rather than a complete packaged command. The shared Linux host produced noisy timing samples (110 ms after-run spread). Sequential reads still inspect exact bytes per operation for external-write visibility; synthetic disk-flush delays do not reproduce every loaded-disk condition. The measured production store is unchanged in the final merge. The earlier 100/1,000-row counterfactual reproduced shared-server lookup amplification. Main’s later test cleanup removed that spy-count suite; the request-scoped lookup map remains unchanged and was inspected again in merge review.
Risk and compatibility
The broad caller migration makes asynchronous ownership the main risk. Formats and remote protocols are unchanged. An inaccessible profile reports a storage error rather than an empty list, preventing failed reads from authorizing an overwrite. Independent simultaneous writers retain the existing last-publisher behavior. Frequent durable last-used updates still rewrite the registry and can queue later reads while main stays responsive. Reverting this PR preserves readable store files and completed user edits.
The standalone retirement diagnostic now awaits saved-server lookups and uses the existing inline executor; its pre-existing connection-constructor mismatch remains a separate limitation.
No controls, copy or layout change. Phone UI was not exercised; the retired-request behavior has a focused protocol regression.
Retained macOS before/after evidence: