Skip to content

feat(ssh): track connection-manager drains, test probes and provider continuations (#16741 T2 P3+P8a) - #24407

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/node-rt-p3-t2-p3
Oct 1, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/node-rt-p3-t2-p3

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​838 $\color{#cf222e}{\Huge{\mathbf{−}}}$​67 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​771
Prod 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​517 $\color{#cf222e}{\Huge{\mathbf{−}}}$​101 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​416

This is the P3 slice of the T2 port of #16741 (SSH core), with P8a (SSH provider continuations) folded in. It is stacked on #24401 (P2) and will be retargeted to main once that merges.

ELI5

Orca now keeps per-host notes of what it is still doing over SSH: which connections it opened and whether they have really closed, which connects and disconnects are still running, which "Test connection" checks are in flight, and which file or worktree operations are still finishing. A later change can then wait until a host is truly quiet before resetting or handing it over. Nothing the user does waits on these notes yet, so behavior stays the same.

What Changed

Before: the SSH connection manager forgot a connection as soon as it left the pool, even if its sockets were still closing. A failed connect was dropped without being disconnected. "Test connection" probes were tracked as a flat set, so a second probe on the same host could clear the first one's state.

After: behavior is unchanged for users, apart from cleanup. Underneath:

  • Connection manager:
    • It counts every connection a host has allocated, including ones already removed from the pool, until that connection reports it has physically closed (from feat(ssh): wire SshConnection through the work and transport close ledgers (#16741 T2 P2) #24401).
    • Connect, disconnect, reconnect and teardown are tracked per host. A teardown that fails is remembered as unconfirmed.
    • A connect that fails now disconnects the half-opened connection instead of just forgetting it.
    • New disconnectAndDrain, and a drain option on disconnectConnection, for owned connections. The drain is capped at 10 seconds.
    • disconnectAll can skip hosts.
  • Test connection:
    • Each probe is registered per host before it starts.
    • The "testing" and credential-prompt flags clear only when that host's last probe finishes.
    • Quitting still waits for an in-flight probe, within the existing 6-second shutdown budget.
  • Quit: the shutdown drain takes a "may detach" filter. Today it allows every host, so quit behaves exactly as before.
  • Provider continuations (P8a): these per-host operations are tracked until they settle locally:
    • SSH file writes and deletes;
    • drag-in imports;
    • detected-worktree listings;
    • worktree and folder-workspace removals, including folders that are identified only by their execution host.
  • Smaller pieces:
    • Hosts owned by a runtime are hidden from clients by owner as well as by id.
    • A resolver reports whether this process holds a host's relay session.
    • The git and filesystem providers gain "unregister only if this is still the current provider".

Everything here is local bookkeeping. A host that cannot be reached is never treated as having exited.

Why

Reset (T3) and ownership handoff (T8) need a reliable answer to "is this host's work really finished here?" Recording that at the connection manager and at each SSH provider entry point catches every caller in one place.

Left for later slices:

  • connectExclusive and assertTargetTransportsClosed (T8).
  • hasTargetActivity, the reset admission checks, and the shutdown reset predicate (T3).
  • Profile-lifetime admission (P8b).
  • The network-tunnel resolver (T4).
  • The managed-orcad provisioning test changes (T6).

Until T3 and T8 add the public readers, the tests read the manager's internal state through a small test-only probe.

Linked Issue

Part of the Node runtime plan, Phase 3, T2 slices P3 and P8a. Ported from #16741 (head a68b6f3, merge-base 277c289). Stacked on #24401.

Visual Proof

N/A. This is internal SSH bookkeeping with no UI or interaction change.

Testing

  • Ported tests (123 passing):

    • connection manager, including closure and registry;
    • test-probe registry and probe presence;
    • target registry, state-broadcast fanout and the connection store, using the shared store fixture;
    • filesystem-provider and worktree-removal continuations;
    • SSH provider authority for worktrees;
    • two of the four deferred disconnect-drain cases.
  • Regression: all of src/main/ssh, the SSH providers, SSH, filesystem and worktree IPC, and the quit path: 430 files, 5,415 passed.

  • Not ported yet: cases that need connectExclusive (4) or profile admission (3).

  • Tested on macOS locally; CI covers Linux and Windows.

  • I manually tested these changes locally

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

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH: quit stays bounded by the existing shutdown budget, and an owned drain is capped at 10 seconds.
  • Workspaces: folder workspaces are covered as well as worktrees.
  • Wire: nothing new is sent to relays or clients.

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)

@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p3-t2-p3 branch from 5b0e356 to 8deda77 Compare October 1, 2026 16:12

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor suggestion inline. The port is faithful to #16741's head, the tests exercise the new behavior, and I re-ran the seven new/changed test files (37 passing).

Reviewed changes

  • Connection-manager bookkeeping — per-target pendingTargetOperations, unconfirmedTargetTeardowns, and a per-connection unclosedTransportsByTarget count driven by SshConnection.subscribeTransportClosure; failed startup now disconnects the half-open connection rather than forgetting it; disconnectAll/disconnectConnection gain exclusion and drain support.
  • Per-target test probes — runSshTestConnectionProbe keyed by target, so testingTargets and credentialRequestedForTarget clear only when a host's last probe settles; awaitSshTestConnectionProbes rechecks after each joined snapshot.
  • Shutdown drain — beginSshShutdown(mayDetach) / disconnectAll(mayDetach) with a default that still detaches every host.
  • Provider continuations — SSH file writes/deletes, drag-in imports, detected-worktree listings, and worktree/folder removals tracked until local settlement via runSshProviderContinuation.
  • Misc — owner-based suppression in broadcastSshState; remotePathExists extracted to its own module without the old NodeJS.ErrnoException cast; createMockStore extracted to a shared fixture.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@@ -37,6 +37,16 @@ export function unregisterSshFilesystemProvider(connectionId: string): void {
sshProviders.delete(connectionId)
}

export function unregisterSshFilesystemProviderIfCurrent(

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.

unregisterSshFilesystemProviderIfCurrent (and its unregisterSshGitProviderIfCurrent counterpart, plus hasRegisteredDirectSshAuthority with its setDirectSshAuthorityResolver registration) have no callers anywhere in the tree, and none of them has a test. If they're staged for the T3/T8 slices that's reasonable, but note the PR's "left for later" list doesn't name them, so they currently ship as unverified API. Consider either wiring them into the relay teardown path in this slice or dropping them until their consumer lands.

@pullfrog pullfrog 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.

✅ No new issues found in the incremental changes.

Reviewed changes (since my previous review at 5b0e356)

  • Type-assertion lint fixes — line-specific oxlint-disable ... -- SAFETY: comments added for the remaining as casts in the new test files, matching the repo's checked-types rule.
  • Test typing tightened — worktree-removal-continuations.test.ts returns Promise<unknown> from a typed arrow instead of casting the handler result; ssh-connection-manager-closure.test.ts drops the unused profile-lifetime-admission mock, replaces its hoisted as/optional-property state with a typed ClosureMockState, and builds a complete SshTarget literal instead of as SshTarget.
  • New test probe — managerUnclosedTransportTargets replaces the inline private-field cast in the closure test.

These are all test-only quality improvements; the production surface is unchanged from the previously reviewed version.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Refactors SSH connection lifecycle tracking and provider continuations.

No new blocking issue was found, but the existing teardown bookkeeping finding remains open.

Findings

  1. P2 Teardown failure flag never clears ▶

Summary

The PR adds per-host SSH connection and provider-operation bookkeeping, tracks concurrent test-connection probes, and introduces bounded connection drains. The latest revision clarifies a test handler payload type without changing production behavior.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[SSH connection or provider operation] --> B[Register target activity]
  B --> C[Operation settles or transport closes]
  C --> D[Clear corresponding activity]
  D --> E[Target closure can be assessed]
Loading

Reviews (3) · Last reviewed commit: "test(ssh): name the filesystem continuat..."

return await operation()
} catch (error) {
if (retainFailure) {
this.unconfirmedTargetTeardowns.add(targetId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Teardown failure flag never clears A failed disconnect adds this target to unconfirmedTargetTeardowns, but a later successful disconnect does not remove it. Even after the connection physically closes, the manager’s closure probe still reports the target as active. That makes the new bookkeeping unable to recognize a confirmed retry when reset or handoff uses it.

Knowledge Base Used: Remote connectivity and execution

@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p3-t2-p3 branch from 8deda77 to 9bccb33 Compare October 1, 2026 16:47
@OrcaWin
OrcaWin changed the base branch from OrcaWin/node-rt-p3-t2-p2 to main October 1, 2026 16:47
@OrcaWin OrcaWin closed this Oct 1, 2026
@OrcaWin OrcaWin reopened this Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: f073a6ff-dbc1-4b0f-a33e-73f4cd991d2c

📥 Commits

Reviewing files that changed from the base of the PR and between 9bccb33106a517737991ed48478c43bca6329499 and b6f9c64.

📒 Files selected for processing (1)
  • src/main/ipc/filesystem-provider-continuations.test.ts

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


📝 Walkthrough

Walkthrough

The change adds per-target tracking for SSH provider operations and test-connection probes. Filesystem and worktree handlers use provider continuations. SSH connection management tracks pending operations, failed teardowns, and transport closure, and shutdown accepts a target filter. The change also adds direct SSH authority resolution and suppresses state broadcasts for runtime-owned targets.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to b6f9c

The lifecycle bookkeeping retains stale activity after a teardown failure. Current impact is bounded to activity and closure checks, so merging requires awareness of this unresolved limitation.

Security Architecture Review

Security architecture risk: 🔵 Low · up to b6f9c

The inspected changes improve SSH cleanup and preserve existing file-operation checks. No introduced security vulnerability was established, but access isolation for runtime-managed connections and recovery after failed teardown remain incompletely established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The examined renderer-originated write and delete requests select a registered SSH provider using the supplied connection identity and generation. Their potential effects concern paths accessible through that provider; the continuation wrapper does not broaden provider selection. Broader tenant, environment, or credential exposure was not established by the available source.

Trust Boundaries and Controls

  • observed — SSH mutation admission rejects mismatched target identity, missing or stale generation, and a mismatched execution host when supplied. Runtime-owned targets are filtered from client listings, but the inspected mutation handlers and provider lookup contain no explicit runtime-owner admission check. These admission and lookup paths predate the PR; listing and broadcast suppression alone do not establish authorization against direct IPC requests.

Resilience and Maintainability Implications

  • observed — Retained teardown failure has no clearing transition in the manager. Later successful teardown or physical closure does not remove that uncertainty, so the test-side activity and closure probes continue to fail closed. The failure test explicitly expects retained uncertainty; a current production security or recovery failure was not established.
  • observed — Selective shutdown applies the same predicate to synchronous detachment, session teardown, connection disconnection, and the final drain. It still joins all captured in-flight work within a shared deadline and reports errors or unfinished tasks instead of treating timeout as confirmed completion.

Hardening Proposals

  • proposed — Before enabling production reset or handoff gates, define whether retained teardown uncertainty requires permanent quarantine or an explicit recovery transition. Any clearance should rely on evidence covering the failed connection, rather than success of an unrelated replacement.
  • proposed — Document and verify whether renderer callers may access runtime-owned SSH targets. If that access is forbidden, establish an owner-aware admission control independent of target-list and broadcast suppression.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 30 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: tracking SSH connection-manager drains, test probes, and provider continuations. The issue and phase references add context without making the title misle…
Description check ✅ Passed The description is complete and aligned with the template. It includes the ELI5 summary, changes, rationale, issue references, visual-proof statement, testing details, review notes, scope boundary, an…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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: 8f0ec28d-009b-451d-ad15-35153d93ef18

📥 Commits

Reviewing files that changed from the base of the PR and between 4e8edc8 and 9bccb33106a517737991ed48478c43bca6329499.

📒 Files selected for processing (30)
  • src/main/ipc/filesystem-import-ssh-remote-existence.ts
  • src/main/ipc/filesystem-import-ssh.ts
  • src/main/ipc/filesystem-provider-continuations.test.ts
  • src/main/ipc/filesystem/filesystem-write-handlers.ts
  • src/main/ipc/ssh-active-relay-sessions.ts
  • src/main/ipc/ssh-connect-attempt-registry.ts
  • src/main/ipc/ssh-connection-handlers.ts
  • src/main/ipc/ssh-ipc-module-mocks.ts
  • src/main/ipc/ssh-renderer-broadcast.ts
  • src/main/ipc/ssh-shutdown-drain.ts
  • src/main/ipc/ssh-state-broadcast-fanout.test.ts
  • src/main/ipc/ssh-target-lifecycle-queue.ts
  • src/main/ipc/ssh-test-connection-probe-registry.test.ts
  • src/main/ipc/ssh-test-probe-presence.test.ts
  • src/main/ipc/worktrees-ssh-provider-authority.test.ts
  • src/main/ipc/worktrees/listing/register-detected-worktree-handlers.ts
  • src/main/ipc/worktrees/removal/register-worktree-removal-handlers.ts
  • src/main/ipc/worktrees/removal/worktree-removal-continuations.test.ts
  • src/main/providers/ssh-filesystem-dispatch.ts
  • src/main/providers/ssh-git-dispatch.ts
  • src/main/ssh/ssh-connection-disconnect-drain.test.ts
  • src/main/ssh/ssh-connection-manager-closure.test.ts
  • src/main/ssh/ssh-connection-manager-registry.test.ts
  • src/main/ssh/ssh-connection-manager-test-probes.ts
  • src/main/ssh/ssh-connection-manager.test.ts
  • src/main/ssh/ssh-connection-manager.ts
  • src/main/ssh/ssh-connection-store-test-fixture.ts
  • src/main/ssh/ssh-connection-store.test.ts
  • src/main/ssh/ssh-provider-continuations.ts
  • src/main/ssh/ssh-target-registry.ts

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

Comment on lines +166 to +189
private async trackTargetOperation<T>(
targetId: string,
operation: () => Promise<T>,
retainFailure = false
): Promise<T> {
this.pendingTargetOperations.set(
targetId,
(this.pendingTargetOperations.get(targetId) ?? 0) + 1
)
try {
return await operation()
} catch (error) {
if (retainFailure) {
this.unconfirmedTargetTeardowns.add(targetId)
}
throw error
} finally {
const remaining = (this.pendingTargetOperations.get(targetId) ?? 1) - 1
if (remaining === 0) {
this.pendingTargetOperations.delete(targetId)
} else {
this.pendingTargetOperations.set(targetId, remaining)
}
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,260p' src/main/ssh/ssh-connection-manager.ts
rg -n 'unconfirmedTargetTeardowns|managerTargetActive|assertManagerTargetTransportsClosed|hasTargetActivity' src/main

Repository: stablyai/orca

Length of output: 11642


🏁 Script executed:

sed -n '1,120p' src/main/ssh/ssh-connection-manager-test-probes.ts
sed -n '1,125p' src/main/ssh/ssh-connection-manager-closure.test.ts
sed -n '225,270p' src/main/ssh/ssh-connection-disconnect-drain.test.ts
rg -n 'subscribeTransportClosure|disconnectAndDrain|async disconnect|disconnect\\(|unconfirmedTargetTeardowns|unclosedTransportsByTarget' src/main/ssh/ssh-connection.ts src/main/ssh/ssh-connection-manager.ts src/main/ssh --glob '*.ts'

Repository: stablyai/orca

Length of output: 7896


🏁 Script executed:

rg -n 'subscribeTransportClosure|disconnectAndDrain|async disconnect|disconnect\\(|emit\\(.close.|transport|close' src/main/ssh/ssh-connection.ts src/main/ssh --glob '*.ts'
sed -n '1,260p' src/main/ssh/ssh-connection.ts

Repository: stablyai/orca

Length of output: 10567


🏁 Script executed:

grep -nE 'subscribeTransportClosure|disconnectAndDrain|^[[:space:]]*(async )?disconnect\\b|transportClosure|transportCloseLedger' src/main/ssh/ssh-connection.ts
grep -nE 'disconnectAndAwaitSshTransportClose|subscribe|notify|close' src/main/ssh/ssh-connection-close-drain.ts src/main/ssh/ssh-connection-transport-closure.ts src/main/ssh/ssh-transport-close-ledger.ts

Repository: stablyai/orca

Length of output: 3184


🏁 Script executed:

sed -n '1735,1875p' src/main/ssh/ssh-connection.ts
sed -n '1,110p' src/main/ssh/ssh-connection-close-drain.ts
sed -n '1,80p' src/main/ssh/ssh-connection-transport-closure.ts

Repository: stablyai/orca

Length of output: 7340


Remove failed-teardown markers only after all transports close.

trackTargetOperation adds targetId after a retained teardown failure, but no current code removes it. The test probes then report stale activity after the final transport closes.

The closure callback alone is not sufficient. disconnectAndDrain can call disconnect(), allow the closure callback to run, and then reject with ssh_connection_close_transport_unproven. The catch block would otherwise add the marker again.

Do not clear the marker on a successful teardown while another transport remains unclosed. managerTargetActive does not check unclosedTransportsByTarget, so that edit would hide outstanding closure debt.

Suggested fix
       if (remaining === 0) {
         this.unclosedTransportsByTarget.delete(targetId)
+        this.unconfirmedTargetTeardowns.delete(targetId)
       } else {
         this.unclosedTransportsByTarget.set(targetId, remaining)
       }
@@
     } catch (error) {
       if (retainFailure) {
-        this.unconfirmedTargetTeardowns.add(targetId)
+        if (this.unclosedTransportsByTarget.has(targetId)) {
+          this.unconfirmedTargetTeardowns.add(targetId)
+        }
       }
       throw error

m4air added 2 commits October 1, 2026 10:40
…continuations (#16741 T2 P3+P8a)

The SSH connection manager now registers each connection it allocates against
the connection's transport-closure notice, and tracks every connect,
disconnect, reconnect and teardown per target, so later slices can tell when a
target's local work and transports are really gone. Ordinary connect,
disconnect and quit behavior is unchanged apart from cleanup.

Manager (ssh-connection-manager.ts):
- registerConnection counts every connection a target allocated, retired pool
  entries included, until its transport-closure notice arrives.
- connect/disconnect/reconnect/disconnectConnection/disconnectAll run through
  trackTargetOperation; a failed teardown is remembered as unconfirmed.
- A failed startup is now disconnected, not just dropped from the pool.
- disconnectAndDrain(targetId, signal) and disconnectConnection(..., drain),
  bounded by a 10s timeout.
- disconnectAll(shouldDisconnect) only tears down targets the filter allows.

IPC:
- ssh-connect-attempt-registry: runSshTestConnectionProbe publishes a probe per
  target before it starts and clears testingTargets / credential flags only
  when the target's last probe settles. ssh:testConnection uses it, so quit
  still joins an in-flight probe within the shutdown budget.
- ssh-target-lifecycle-queue: runTargetLifecycle returns the operation's value.
- ssh-shutdown-drain: a mayDetach predicate (default: every target) is plumbed
  through detach, invalidation and disconnectAll.
- ssh-renderer-broadcast: targets owned by a runtime are hidden by owner too,
  not only by id prefix.
- ssh-target-registry: direct-authority resolver, installed by
  ssh-active-relay-sessions.
- Provider dispatch: unregister*IfCurrent for git and filesystem providers.

P8a, SSH provider continuations: ssh-provider-continuations tracks local
settlement of SSH filesystem writes/deletes, imports, detected-worktree
listings and worktree/folder removals per target. It records only local
settlement, never remote execution or exit.

Porting note (source: #16741 head a68b6f3, merge-base 277c289):
- Left for later slices: connectExclusive and assertTargetTransportsClosed
  (T8), hasTargetActivity (T3), assertProfileLifetimeAdmission (P8b, stubbed
  out of the manager and continuations), the reset admission checks in
  ssh-connection-handlers and the reset predicate in the shutdown drain (T3),
  the network-tunnel resolver (T4), and the managed-orcad provisioning test
  hunks in ssh-target-registry.test.ts (T6).
- Tests read the manager's bookkeeping through
  ssh-connection-manager-test-probes until T3/T8 expose readers. Two of the
  four deferred disconnect-drain cases are restored; the two that need
  connectExclusive, two closure cases that need it and three profile-admission
  cases stay deferred.
- The removal and detected-worktree call sites were rebased onto main's
  background removal and execution-host routing. filesystem-import-ssh moved
  its remote-existence helpers out to stay under 300 lines.
@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p3-t2-p3 branch from 9bccb33 to b6f9c64 Compare October 1, 2026 17:41
@OrcaWin
OrcaWin merged commit d53063d into main Oct 1, 2026
49 checks passed
OrcaWin added a commit that referenced this pull request Oct 2, 2026
* Revert "feat(orcad): source-side dormant export of a relay-hosted SSH target (#16741 T6-8) (#24519)"

This reverts commit 783101b.

* Revert "feat(ssh): update, roll back, recover and stop a managed orcad server (#16741 T6-5 follow-up) (#24463)"

This reverts commit 38c2d1d.

* Revert "feat(ssh): deploy and pair an empty managed orcad server over SSH (#16741 T6-5) (#24453)"

This reverts commit 8b76683.

* Revert "fix(ssh): orcad GC honors the activation journal; readiness requires proven daemon coverage (#16741 T6 follow-up) (#24451)"

This reverts commit d3f8c50.

* Revert "feat(ssh): remote orcad stop by request file and journaled decommission (#16741 T6-4) (#24449)"

This reverts commit 43d9b43.

* Revert "feat(orcad): supervisable server: stop requests, managed stop receipts and a lifetime that keeps its lock on failed teardown (#16741 T6-3) (#24433)"

This reverts commit b093d3a.

* Revert "feat(ssh): crash-safe orcad activation, rollback and recovery (#16741 T6-2) (#24423)"

This reverts commit 1a9ac0e.

* Revert "feat(runtime): SSH access links for paired servers in a downgrade-safe sidecar (#16741 T5-1+T5-2) (#24420)"

This reverts commit 99db2bf.

* Revert "feat(relay): capability-gated owner reset with a durable preparation journal (#16741 T3 R1) (#24418)"

This reverts commit 34a582b.

* Revert "feat(ssh): track connection-manager drains, test probes and provider continuations (#16741 T2 P3+P8a) (#24407)"

This reverts commit d53063d.

* Revert "feat(daemon): idle retirement, session census and recovery-only provider (#16741 T2 P4b) (#24409)"

This reverts commit ff212db.

* Revert "feat(ssh): add pty.resumeClient and split SSH PTY process listing (#16741 T2 P5+P6) (#24414)"

This reverts commit 92cb717.

* Revert "feat(relay): await owned watcher and agent children on shutdown (#16741 T2 P1) (#24400)"

This reverts commit 6b36e4f.

* Revert "feat(session): retry failed renderer session writes and verify local folder PTYs (#16741 T2 P9) (#24406)"

This reverts commit d23ecef.

* Revert "feat(ssh): remote orcad primitives on the pinned Node runtime (#16741 T6-1) (#24419)"

This reverts commit dd87ae5.

* Revert "fix(runtime): fence runtime-environment subscriptions and status probes by identity (#16741 T5-3) (#24421)"

This reverts commit ece9e4d.

* Revert "feat(orcad): migration manifest and dormant-state contracts (#16741 T6-7) (#24422)"

This reverts commit 3fbdaba.

* Revert "feat(ssh): wire SshConnection through the work and transport close ledgers (#16741 T2 P2) (#24401)"

This reverts commit 4e8edc8.

* Revert "feat(profiles): carry markdown frontmatter visibility in project transfers (#16741 T2 P7) (#24405)"

This reverts commit 60c9326.

* Revert "fix(runtime): project the PTY incarnation onto mobile session tabs (#24413)"

This reverts commit 99e0303.

* Revert "feat(daemon): tag daemon stream data with the PTY incarnation id (#16741 T2 P4a) (#24402)"

This reverts commit 817af76.

* Revert "feat(ssh): port the SSH connection work ledger and transport close ledger (#16741 T2) (#24210)"

This reverts commit c991893.

* Revert "feat(relay): fence and drain file and git response streams on shutdown (#24185)"

This reverts commit dc08ffe.

* Revert "refactor(runtime-rpc): extract the Node WebSocket lifecycle; opt-in pinned port (#24186)"

This reverts commit a789233.

* Revert "feat(relay): route relay handlers through work admission; producer publication drain (#24181)"

This reverts commit 0b812bd.

* Revert "feat(relay): land the #16741 T1 seam (work drain, publication drain, release gate) (#24156)"

This reverts commit 3aa2d3a.

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
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