Skip to content

refactor(renderer): delete the direct-SSH authority and reconnect coordinator - #27587

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-C2b
Oct 11, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-C2b

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​51 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3545 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3494
Prod 56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​86 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3475 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3389

ELI5

When an old-style SSH target (one not yet moved onto the managed Orca server) connects, the app used to run a large "reconnect coordinator". It asked the main process for that host's projects, worktrees and parent/child links, queued the work five at a time, retried timeouts and sent an analytics event. The main process can no longer answer those questions for an ssh: host, because the old relay that served them was deleted. So every one of those reads came back "not available", and nothing was ever applied. This PR deletes that machinery. The one thing it still did, forgetting stale terminal bindings for that target, is now done directly.

What Changed

What you see: nothing changes. Connecting, disconnecting, waking the computer and going back online all behave as before. Port forwards, credential prompts and the connection-state hydration are untouched.

Mechanism:

  • Deleted the renderer reconnect coordinator, its preparation pass, the five-slot worktree refresh scheduler, host catalog/lineage hydration, the rollout flag and the product telemetry adapter (hooks/direct-ssh-reconnect-*, hooks/direct-ssh-worktree-refresh-*, hooks/direct-ssh-host-hydration*, lib/direct-ssh-reconnect-product-telemetry*, hooks/ipc-events/direct-ssh-bridge-runtime.ts).
  • direct-ssh-state-ipc-bridge.ts no longer takes a runtime object. On every pushed connected state it calls clearDirectSshTargetPtyBindings(targetId), and the online/system-resume wake does the same for each connected target. This is exactly when the old code cleared them: changed authority, same-authority push and wake all cleared, and initial hydration did not. invalidateStaleDirectSshTargetPtyBindings is gone. Its authority check always passed at these call sites, because they read the authority from the store in the same tick.
  • Removed the direct-SSH-only options: reconnectPersistedTerminals(signal, options), HydrateWorkspaceSessionOptions.directSshAuthority and rowsFromRemoteSnapshot. Production callers never passed them.
  • Removed acquireDirectSshDetectedWorktreeRefresh (coordinator-only).
  • The repos:listForExecutionHost and worktrees:listLineageForHost IPC handlers had no callers left, so they are deleted along with their preload entries, shared contracts and the main-side lineage-for-host filter (host-repo-catalog-snapshot.ts, host-lineage-listing.ts, workspace-lineage-filtering.ts, lineage-owner-resolution.ts).
  • Removed the direct_ssh_reconnect_operation telemetry schema.

Kept: the host still publishes providerEpoch and connectionGeneration, because mobile reads connectionGeneration. The renderer still reconciles a partial pushed authority, because the worktree listing uses it. The disconnect clear and target-scope resolution are unchanged.

Net lines: prod −3,306, tests −3,515, config −62 (about −6.9k total).

Why

Proof that the deleted code never had an effect:

  • No production code calls registerSshGitProvider, so listReposForExecutionHost returned unavailable or stale for every ssh: host. listDesktopLineageForHost always returned non-authoritative for ssh:. Both catalog merges were unreachable.
  • The coordinator's worktree refresh ran with authorityRequirement: 'required', and main answers an ssh: git repo listing with non-authoritative, so that merge returned early. One exception: a folder project on an ssh: target is listed from local metadata and comes back complete. The coordinator could therefore re-merge those folder rows on connect. Two things make that redundant. The ordinary fetchAllWorktrees path produces the same authoritative merge for a connected target. And a connected ssh: target is always a managed server (plain-SSH mode has no writer), whose conversion removes the source rows.
  • The coordinator therefore only cleared terminal bindings and emitted telemetry. The new code keeps the synchronous clear at the same moments. The connect-reply routing test covers every old route (reply-first, push-first, initial hydration, disconnect/error, partial reconciliation, per-target). On a changed authority, the old code also ran a second, idempotent clear after its (always degraded) preparation finished. Nothing binds an ssh: PTY between the two clears, so dropping it changes nothing.

Alternatives I rejected:

  • Keeping the coordinator as a no-op shell keeps ~3k lines that every SSH change has to work around.
  • Deleting the binding clear too would leave stale ssh: PTY ids on inert tabs. That is a behaviour change, so it is out of scope.

The only observable difference is that the direct_ssh_reconnect_operation analytics event is no longer sent. It described work that could not succeed.

Linked Issue

Phase 3.99 cleanup, item C2b (follows #27489 and #27569).

Visual Proof

N/A: no UI or interaction change. The deleted code produced no visible state.

Testing

  • I manually tested these changes locally (focused suites only; no app launch)

  • Automated tests added/updated, or explained why not below

  • pnpm tc clean. pnpm lint passes, and the ratchets are at or below baseline: ts-nocheck 159, focus-read 1138, layout writers unchanged. check:code-quality:changed reports 0 findings.

  • Dead-code proof: rg for every removed symbol and module path over src config scripts mobile packages tests .github docs returns only the edits in this PR. A word-match rg over all 159 @ts-nocheck files returns 0 hits. build:electron-vite and build:cli both pass.

  • Tests: vitest over src/renderer/src/{store,hooks,app-shell,startup}, src/main/{ipc,ssh}, src/preload and src/shared passes (1,382 + 1,114 files).

  • Rewritten tests: direct-ssh-connect-reply-routing.test.ts asserts when the target clear runs. useIpcEvents-agent-status-ssh-authority.test.ts asserts that a reconciled partial authority clears once and a conflicting one does not.

  • Reliability gates were updated: deleted suites removed, and evidence was re-run for the narrowed command.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH: an unreachable or partial target is never treated as local or exited. The partial-authority reconcile path and the disconnect clear are unchanged.
  • Wire: no RPC, stream or published-content change. The two removed IPC channels are same-app renderer↔main channels with no callers.
  • Mobile: still reads connectionGeneration, which is unchanged.
  • Folder workspaces: the target scope used by the clear is unchanged.
  • Windows/WSL: no platform code touched.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92bf13f3-13e7-4baa-82db-39d1a639feb6

📥 Commits

Reviewing files that changed from the base of the PR and between defa9eef614827254a0c813d4641d8f6c6e6696c and 3ece529.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The change removes host-specific repository and lineage listing APIs and their contracts. It also removes direct SSH host hydration, refresh scheduling, reconnect coordination, and associated telemetry. The direct SSH state IPC bridge now manages its own lifecycle and clears target PTY bindings for pushed connections and wake routing. Terminal hydration uses canonical PTY-claim resolution, and workspace reconnect no longer uses direct SSH authority or workspace-key scope options. Related tests and reliability-gate records are updated.





Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to defa9

This change removes unused direct-SSH reconnect machinery and moves terminal-binding cleanup into the state bridge. No user-visible behavior change is expected. A few manifest descriptions still mention deleted tests and should be tidied.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 24 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: deleting the renderer direct-SSH authority and reconnect coordinator machinery.
Description check Passed The description is complete and directly supports the changes. It includes the user impact, implementation details, rationale, linked issue references, testing evidence, visual-proof rationale, compat…


Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 24 files. (1 skipped: 1 unsupported.)




✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR




🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e940e8ef-7a37-4013-a1ab-8002d97170c3
📥 Commits

Reviewing files that changed from the base of the PR and between d65e9be and defa9eef614827254a0c813d4641d8f6c6e6696c.

📒 Files selected for processing (83)
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/main/ipc/repos-execution-host-catalog.test.ts
  • src/main/ipc/repos.ts
  • src/main/ipc/repos/host-repo-catalog-snapshot.ts
  • src/main/ipc/repos/repo-catalog-handlers.ts
  • src/main/ipc/worktree-create-lineage.test.ts
  • src/main/ipc/worktree-remote.ts
  • src/main/ipc/worktrees-create-metadata-persistence.test.ts
  • src/main/ipc/worktrees-lineage-hydration.test.ts
  • src/main/ipc/worktrees.ts
  • src/main/ipc/worktrees/listing/detected-provider-listing.ts
  • src/main/ipc/worktrees/metadata/host-lineage-listing.ts
  • src/main/ipc/worktrees/metadata/lineage-owner-resolution.ts
  • src/main/ipc/worktrees/metadata/register-worktree-metadata-handlers.ts
  • src/main/ipc/worktrees/metadata/workspace-lineage-candidate-scan.test.ts
  • src/main/ipc/worktrees/metadata/workspace-lineage-filtering.ts
  • src/main/ssh/orcad-retained-source-lists.test.ts
  • src/preload/api/repos-bridge.ts
  • src/preload/api/repository-api.ts
  • src/preload/api/worktree-api.ts
  • src/preload/api/worktrees-bridge.ts
  • src/renderer/src/hooks/direct-ssh-host-catalog-noop.test.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration-scope.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration-telemetry.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration.test.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-outcomes.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-stabilization.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-telemetry.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-types.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-preparation-metrics.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-preparation.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-rollout.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-rollout.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-tokens.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-tokens.ts
  • src/renderer/src/hooks/direct-ssh-runtime-wake-isolation.test.tsx
  • src/renderer/src/hooks/direct-ssh-state-routing.test.ts
  • src/renderer/src/hooks/direct-ssh-state-routing.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-cancellation.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-metrics.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-types.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler.test.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-target-queue.ts
  • src/renderer/src/hooks/ipc-events-ssh-authority-test-fixtures.ts
  • src/renderer/src/hooks/ipc-events/app-lifetime-ipc-bridge.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-bridge-runtime.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-hydration-fanout.test.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-hydration-target-metadata.test.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-initial-state-hydration.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-state-ipc-bridge.ts
  • src/renderer/src/hooks/useIpcEvents-agent-status-ssh-authority.test.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry-types.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry.test.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry.ts
  • src/renderer/src/store/slices/store-session-terminal-reconnect.test.ts
  • src/renderer/src/store/slices/store-session-workspace-hydration.test.ts
  • src/renderer/src/store/slices/terminal-session-row-hydration.ts
  • src/renderer/src/store/slices/terminals-hydration-canonical-pty-overlap.test.ts
  • src/renderer/src/store/slices/terminals-hydration.test.ts
  • src/renderer/src/store/slices/worktrees-fetch-persisted-metadata-fallback.test.ts
  • src/renderer/src/store/slices/worktrees-fetch-refresh-coalescing.test.ts
  • src/renderer/src/store/slices/worktrees-fetch-stale-catalog-version.test.ts
  • src/renderer/src/store/slices/worktrees.ts
  • src/renderer/src/store/slices/worktrees/listing/known-ssh-worktree-fetch.ts
  • src/renderer/src/store/terminals/direct-ssh-terminal-bindings.ts
  • src/renderer/src/store/terminals/terminal-actions.ts
  • src/renderer/src/store/terminals/terminal-contracts.ts
  • src/renderer/src/store/terminals/terminal-pty-identities.ts
  • src/renderer/src/store/terminals/workspace-terminal-hydration-patch.ts
  • src/renderer/src/store/terminals/workspace-terminal-hydration.ts
  • src/renderer/src/store/terminals/workspace-terminal-reconnect.ts
  • src/renderer/src/store/terminals/workspace-terminal-row-plan.ts
  • src/shared/direct-ssh-reconnect-telemetry-schema.test.ts
  • src/shared/host-lineage-contract.ts
  • src/shared/host-repo-catalog-contract.ts
  • src/shared/telemetry-event-registry.ts
  • src/shared/telemetry-feature-education-event-schemas.ts
💤 Files with no reviewable changes (58)
  • src/main/ipc/worktree-create-lineage.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator.test.ts
  • src/shared/telemetry-event-registry.ts
  • src/renderer/src/store/slices/terminals-hydration.test.ts
  • src/main/ipc/worktrees/metadata/workspace-lineage-candidate-scan.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-rollout.test.ts
  • src/preload/api/repository-api.ts
  • src/shared/host-repo-catalog-contract.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-target-queue.ts
  • src/preload/api/worktree-api.ts
  • src/preload/api/worktrees-bridge.ts
  • src/main/ipc/worktrees.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-cancellation.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-rollout.ts
  • src/shared/direct-ssh-reconnect-telemetry-schema.test.ts
  • src/renderer/src/hooks/ipc-events/direct-ssh-bridge-runtime.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration-scope.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry-types.ts
  • src/main/ipc/worktrees-create-metadata-persistence.test.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-telemetry.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration.test.ts
  • src/preload/api/repos-bridge.ts
  • src/main/ipc/repos.ts
  • src/main/ipc/worktrees/listing/detected-provider-listing.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-types.ts
  • src/renderer/src/store/slices/worktrees.ts
  • src/renderer/src/hooks/direct-ssh-host-catalog-noop.test.ts
  • src/shared/telemetry-feature-education-event-schemas.ts
  • src/renderer/src/store/slices/terminals-hydration-canonical-pty-overlap.test.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry.test.ts
  • src/renderer/src/store/terminals/terminal-pty-identities.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-preparation-metrics.ts
  • src/main/ipc/repos/repo-catalog-handlers.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler.test.ts
  • src/main/ipc/worktrees/metadata/register-worktree-metadata-handlers.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-tokens.ts
  • src/main/ipc/repos/host-repo-catalog-snapshot.ts
  • src/main/ipc/worktrees/metadata/workspace-lineage-filtering.ts
  • src/renderer/src/lib/direct-ssh-reconnect-product-telemetry.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-types.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-preparation.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-outcomes.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-tokens.test.ts
  • src/main/ipc/worktrees/metadata/host-lineage-listing.ts
  • src/renderer/src/store/terminals/workspace-terminal-hydration-patch.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator.ts
  • src/shared/host-lineage-contract.ts
  • src/renderer/src/store/slices/store-session-terminal-reconnect.test.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration-telemetry.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler-metrics.ts
  • src/renderer/src/hooks/direct-ssh-reconnect-coordinator-stabilization.ts
  • src/renderer/src/hooks/direct-ssh-host-hydration.ts
  • src/renderer/src/store/terminals/terminal-contracts.ts
  • src/renderer/src/hooks/direct-ssh-worktree-refresh-scheduler.ts
  • src/main/ssh/orcad-retained-source-lists.test.ts
  • src/main/ipc/worktrees/metadata/lineage-owner-resolution.ts
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/hooks/direct-ssh-state-routing.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

"direct SSH generation-scope rollover"
],
"platforms": ["macos", "linux", "windows"],
"providers": ["local", "ssh"],
"coveredPlatforms": ["macos"],
"coveredProviders": ["local", "ssh"],
"coverageNotes": "Local deterministic evidence covers git-common classification, desktop watcher debounce counts, non-overlapping poller semantics, macOS native-watch fallback, preload cleanup, Source Control active-visible repo filtering, paired-runtime publication to two independent clients with reconnect and stale-cache checks, the direct SSH five-slot fair scheduler, timeout barrier, aggregate privacy schema, coordinator-to-renderer telemetry wiring, host-catalog provenance rejection, and process generation-scope rollover across sibling targets. A headed macOS Electron host and separate paired Electron client both rendered a worktree created through the real Git binary and watcher entry path without reconnect. A macOS Electron client also completed a direct SSH disconnect/reconnect against an ephemeral Linux Docker target with exact host/authority hydration and remote proof-file verification. Linux/Windows desktop clients, multi-target live fanout, and WSL runs remain gaps.",
"coverageNotes": "Local deterministic evidence covers git-common classification, desktop watcher debounce counts, non-overlapping poller semantics, macOS native-watch fallback, preload cleanup, Source Control active-visible repo filtering, paired-runtime publication to two independent clients with reconnect and stale-cache checks, and process generation-scope rollover across sibling targets. A headed macOS Electron host and separate paired Electron client both rendered a worktree created through the real Git binary and watcher entry path without reconnect. Linux/Windows desktop clients, multi-target live fanout, and WSL runs remain gaps.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n -i 'scheduler|coordinator|telemetry' config/reliability-gates.jsonc | sed -n '1,80p'

Repository: stablyai/orca

Length of output: 44732


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- current gate block ---'
nl -ba config/reliability-gates.jsonc | sed -n '4258,4480p'
printf '%s\n' '--- sibling ssh-terminal block ---'
nl -ba config/reliability-gates.jsonc | sed -n '13318,13338p'
printf '%s\n' '--- diff for cited ranges ---'
git diff --unified=5 f0b310b1b134aae807bbcf5631be1b0e19a40c15 defa9eef614827254a0c813d4641d8f6c6e6696 -- config/reliability-gates.jsonc | sed -n '/git-worktree.refresh-event-semantics/,/^[^ ]/p'

Repository: stablyai/orca

Length of output: 26030


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- base cited blocks ---'
git show f0b310b1b134aae807bbcf5631be1b0e19a40c15:config/reliability-gates.jsonc | nl -ba | sed -n '4258,4485p'
git show f0b310b1b134aae807bbcf5631be1b0e19a40c15:config/reliability-gates.jsonc | nl -ba | sed -n '13318,13338p'
printf '%s\n' '--- exact diff hunks ---'
git diff --unified=8 f0b310b1b134aae807bbcf5631be1b0e19a40c15 defa9eef614827254a0c813d4641d8f6c6e6696c -- config/reliability-gates.jsonc | rg -n -C 12 'git-worktree.refresh-event-semantics|direct SSH scheduler|detected-worktree|scheduler caps|telemetry'
printf '%s\n' '--- current source references ---'
rg -n -i 'detected-worktree|scheduler caps|late-work allowance|unsettled.*work' src config --glob '!config/reliability-gates.jsonc' || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 41662


Remove the remaining direct-SSH scheduler and telemetry references.

coverageNotes, invariant, and oracle already reflect the narrowed coverage. The stale references remain in runtimeBudget.scope, flakeHistory.evidence, and the sibling ssh-terminal performance budget.

Suggested fix
-        "scope": "focused main/preload/renderer polling and direct SSH scheduler/telemetry tests"
+        "scope": "focused main/preload/renderer polling and direct SSH state-bridge tests"
-        "evidence": "Four focused deterministic local macOS runs cover the original watcher lane, paired-runtime publication lane, main catalog/authority lane, and direct SSH scheduler/telemetry lane; two live Electron runs cover paired external discovery and Docker SSH, while CI soak is still unavailable."
+        "evidence": "Four focused deterministic local macOS runs cover the original watcher lane, paired-runtime publication lane, main catalog/authority lane, and direct SSH state-bridge lane; two live Electron runs cover paired external discovery and Docker SSH, while CI soak is still unavailable."
-        "evidence": "Direct SSH terminal invalidation and retry each use one exact-target store publication and execute before provider discovery; another target's five occupied provider slots cannot delay terminal finalization. Each split-pane completion or delayed mount adds constant-time pending/live lease lookups and no provider listing, polling, subprocess, cross-tab scan, or new fanout; two mounted leaves still perform exactly their two existing provider operations. Delayed snapshot placement retains at most one 10-second store subscription and timer per target; supersession and stop abort both immediately, remove the listener, and clear the timer. The scheduler caps locally unsettled detected-worktree work at five with a two-call late-work allowance. Remote-runtime recovery allocates at most one backoff timer and one one-minute deadline per detached pane, then stops all PTY retry work until explicit user action. Each transport suppresses at most eight distinct error strings and emits at most eight clear callbacks on recovery; each live pane retains at most eight messages, and every message and joined display is clipped to 24 lines and 4,000 characters. Explicit split close and pane replacement release their entries. This adds no provider request, polling, subprocess, or terminal-output work. Timers, accepted-snapshot listeners, stale streams, and pane UI entries are released on health, cutoff, rebind, removal, detach, or destroy; ten-cycle tests prove one unsubscribe per epoch. Common terminal input/output paths add only bounded state checks. No live large-terminal-map direct SSH timing is claimed."
+        "evidence": "Direct SSH terminal invalidation and retry each use one exact-target store publication and execute before provider discovery; another target's five occupied provider slots cannot delay terminal finalization. Each split-pane completion or delayed mount adds constant-time pending/live lease lookups and no provider listing, polling, subprocess, cross-tab scan, or new fanout; two mounted leaves still perform exactly their two existing provider operations. Delayed snapshot placement retains at most one 10-second store subscription and timer per target; supersession and stop abort both immediately, remove the listener, and clear the timer. Remote-runtime recovery allocates at most one backoff timer and one one-minute deadline per detached pane, then stops all PTY retry work until explicit user action. Each transport suppresses at most eight distinct error strings and emits at most eight clear callbacks on recovery; each live pane retains at most eight messages, and every message and joined display is clipped to 24 lines and 4,000 characters. Explicit split close and pane replacement release their entries. This adds no provider request, polling, subprocess, or terminal-output work. Timers, accepted-snapshot listeners, stale streams, and pane UI entries are released on health, cutoff, rebind, removal, detach, or destroy; ten-cycle tests prove one unsubscribe per epoch. Common terminal input/output paths add only bounded state checks. No live large-terminal-map direct SSH timing is claimed."

…rdinator

No ssh: git provider is registered in production, so the reconnect
coordinator's catalog and lineage reads always came back non-authoritative
and its worktree refresh never merged. Its only live effect was clearing an
unconverted target's stale PTY bindings on each connected push and on wake;
the state bridge now does that directly.

Deletes the coordinator, preparation, worktree refresh scheduler, host
hydration, rollout flag and their product telemetry event, the scoped
direct-SSH reconnect/hydration options, and the now caller-less
repos:listForExecutionHost and worktrees:listLineageForHost IPC handlers.

Co-authored-by: m4air <[email protected]>
@OrcaWin
OrcaWin merged commit bd54fc7 into main Oct 11, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant