Files
orca/src/main
OrcaWinandm4air ece9e4d2e3 fix(runtime): fence runtime-environment subscriptions and status probes by identity (#16741 T5-3) (#24421)
Splits runtime-environment subscriptions and the status probe out of their
IPC modules and fixes the reconnect and teardown races the split exposed.

Subscriptions (runtime-environment-subscriptions):
- A subscription id is reserved while its socket opens, so a duplicate request
  for the same id is refused instead of racing the first.
- Every callback checks it still owns its id by token, so a late event or close
  from a superseded socket cannot reach a subscription that reused the id.
- A close that arrives during setup closes the new socket and fails the call
  instead of registering a subscription that is already dead.

Status (runtime-environment-status-probe, status-owner):
- A status request records the capability incarnation it started under; if the
  environment was re-paired or retired meanwhile, it answers
  runtime_environment_changed instead of publishing stale status, diagnostics or
  a runtime id.
- runtimeEnvironmentChangedFailure moves to the revision guard and
  shouldUseSharedControlEnvelope to support routing, so both have one home.

Status and transport routing still resolve environments with plain
resolveEnvironment; the managed-tunnel hook is T6.

Porting note (source: #16741 a68b6f3531):
- Left for T5-4 (reconciliation): the control/resource transport-generation
  scopes and preserveResourceStreams, retireRuntimeEnvironmentControlTransport,
  and their test cases.
- Left for T6/T8: the managed-tunnel resolution, the orcadDeployment
  disconnect guard and connectivity forget hook, and the managed, migration and
  ssh-access handler channels and registrations.

Co-authored-by: m4air <m4air@m4airs-Air.localdomain>
2026-10-01 11:09:12 -07:00
..
…
2026-09-03 17:32:59 -07:00
…