feat(worker,gateway): report record-info pin outcome in WorkerReady; drain-thread completion tests

The worker logged its MXSTATUS_PROXY record-info pin outcome only to its own
stderr, which the gateway's launcher does not capture, so operators never saw
whether the pin took.

- Contract (additive, internal IPC): WorkerReady.record_info_pin_status = 5.
  No protocol version bump; an older peer ignores it or sends it empty.
  Regenerated Contracts/Generated, the client protoset, the Rust vendored
  proto, and the Go/Python/Java worker bindings (real delta only).
- Worker: the handshake copies MxStatusProxyRecordInfoPin.Status into
  WorkerReady unless the runtime already set it.
- Gateway: WorkerClient records it (IWorkerClient.RecordInfoPinStatus, default
  null) and logs it at Information when pinned, Warning otherwise; empty is
  not logged. Shown as "Record-info pin" in the dashboard session details
  Worker table via DashboardSessionSummary.WorkerRecordInfoPinStatus.
- Tests: drain-thread cancellation (task ends Canceled; RunAsync cancels,
  runtime disposed, thread exits, no EventDrain stop-failure log) and fault
  (exception on the thread faults RunAsync with the same instance) paths;
  WorkerReady carries the pin status; gateway logging/recording and the
  dashboard projection.
- Docs: gateway.md STA thread model (drain thread, pin step in COM lifetime),
  MxAccessWorkerInstanceDesign, GatewayProcessDesign, GatewayDashboardDesign,
  WorkerFrameProtocol.
This commit is contained in:
Joseph Doherty
2026-11-21 08:11:31 -05:00
parent 659bb831a2
commit 30ac3f3225
23 changed files with 878 additions and 145 deletions
+9
View File
@@ -507,6 +507,15 @@ and nonce, waits for `WorkerReady`, and only then exposes `Ready` state. The
read loop starts after readiness so the handshake has a single owner for its
ordered frames.
`WorkerReady.record_info_pin_status` carries the worker's `MXSTATUS_PROXY`
record-info pin outcome (see `MxAccessWorkerInstanceDesign.md`). The gateway does
not capture worker stderr, so `WorkerClient` is where operators see it: a status
starting `pinned ` is logged at Information, anything else at Warning, because an
unpinned worker pays a type-library reload on every data change. It is kept as
`IWorkerClient.RecordInfoPinStatus` and shown on the dashboard's session details
page. It never gates readiness, and an empty status (an older worker) is neither
logged nor shown.
### Read loop
The read loop: