[GH-ISSUE #2590] fix(session): reopen retains a dead child without a health snapshot #907

Closed
opened 2026-10-15 18:29:29 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @coygeek on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2590

Summary

Reopening the same target can report success while retaining a dead analysis client when that child exposes no operation-health snapshot. The next query still fails. A focused simulated-provider test confirms that explicitly closing and reopening recovers the session.

Steps to reproduce

  1. On the source baseline below, construct a selectable session with one available deep provider declaring address_name and an auxiliary provider declaring no overlapping operations. Give each created deep client independent live/dead state, a successful close method, and no operationHealthSnapshot hook.
  2. Open process.execPath and execute address_name to instantiate the deep child. While live, its execution method returns a successful analysis execution; after marking that particular client dead, it returns ProviderAdapterError for every operation.
  3. Reopen the same target while live and confirm one child remains. Mark the instantiated child dead, reopen again, then execute address_name.
  4. Record the reopen result, query result, creation count, and whether the old child closed. Explicitly close, reopen, and query again as the recovery control.

Expected behavior

Same-target reopening may reuse a client when it is genuinely live. A dead instantiated child must be retired so the next query can use a fresh client.

Actual behavior

The focused test observed successful reopen, failed query, one created child, and no close of that child. After explicit close and reopen, the query succeeded and a second child existed. The live-child control reused one child.

Evidence

  • Expected source: src/application/binary/BinarySession.ts:100 states that reuse requires a genuinely live client; src/application/binary/BinarySessionLiveness.test.ts:24 states dead-child recovery through same-target open.
  • Failure source: src/application/binary/CompositeProvider.ts:107 answers health without consulting children, while src/application/binary/BinarySession.ts:817 accepts that response when the aggregate snapshot is undefined.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

Verification used the existing liveness fixture with its health hook disabled and per-client state. Seven focused tests passed, including assertions of the defective behavior and explicit-close recovery. This establishes application composition behavior with simulated providers; no real IDA session was tested

Runtime or environment

Source revision 8b181716ac, Node.js v26.10.0, npm 11.19.1, installed locked dependencies, and Vitest 5.0.3.

Restoration check

Repeat the dead-child sequence and require retirement of the old child, successful same-target reopen, and a successful next query using a second client. The live-child sequence must still reuse one client, and cancellation during the liveness check must preserve the session.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: Same-target recovery reports success but leaves the next analysis query failing for a child without a health snapshot. The observed failure is bounded and does not show data loss.
  • Workaround status: available
  • Workaround basis: The focused test directly confirmed that explicit close followed by open creates a fresh child and restores the query.
Originally created by @coygeek on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2590 ## Summary Reopening the same target can report success while retaining a dead analysis client when that child exposes no operation-health snapshot. The next query still fails. A focused simulated-provider test confirms that explicitly closing and reopening recovers the session. ## Steps to reproduce 1. On the source baseline below, construct a selectable session with one available deep provider declaring `address_name` and an auxiliary provider declaring no overlapping operations. Give each created deep client independent live/dead state, a successful close method, and no `operationHealthSnapshot` hook. 2. Open `process.execPath` and execute `address_name` to instantiate the deep child. While live, its execution method returns a successful analysis execution; after marking that particular client dead, it returns `ProviderAdapterError` for every operation. 3. Reopen the same target while live and confirm one child remains. Mark the instantiated child dead, reopen again, then execute `address_name`. 4. Record the reopen result, query result, creation count, and whether the old child closed. Explicitly close, reopen, and query again as the recovery control. ## Expected behavior Same-target reopening may reuse a client when it is genuinely live. A dead instantiated child must be retired so the next query can use a fresh client. ## Actual behavior The focused test observed successful reopen, failed query, one created child, and no close of that child. After explicit close and reopen, the query succeeded and a second child existed. The live-child control reused one child. ## Evidence - Expected source: `src/application/binary/BinarySession.ts:100` states that reuse requires a genuinely live client; `src/application/binary/BinarySessionLiveness.test.ts:24` states dead-child recovery through same-target open. - Failure source: `src/application/binary/CompositeProvider.ts:107` answers health without consulting children, while `src/application/binary/BinarySession.ts:817` accepts that response when the aggregate snapshot is undefined. - Evidence provenance: observed - Local verification: reproduced - Reproduction completeness: complete Verification used the existing liveness fixture with its health hook disabled and per-client state. Seven focused tests passed, including assertions of the defective behavior and explicit-close recovery. This establishes application composition behavior with simulated providers; no real IDA session was tested ## Runtime or environment Source revision 8b181716aca2cb467be499cba226abfb5ae19141, Node.js v26.10.0, npm 11.19.1, installed locked dependencies, and Vitest 5.0.3. ## Restoration check Repeat the dead-child sequence and require retirement of the old child, successful same-target reopen, and a successful next query using a second client. The live-child sequence must still reuse one client, and cancellation during the liveness check must preserve the session. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: Same-target recovery reports success but leaves the next analysis query failing for a child without a health snapshot. The observed failure is bounded and does not show data loss. - Workaround status: available - Workaround basis: The focused test directly confirmed that explicit close followed by open creates a fresh child and restores the query.
bsakaguchi 2026-10-15 18:29:29 +00:00
Author
Owner

@morluto commented on GitHub (Oct 14, 2026):

Addressed on main in 31b99306aa67e7840ae624d5a8e8a958ae600b4f.

Composite health probes instantiated children when snapshots are unavailable; an empty composite does not eagerly start a provider.

Validation: Affected suites passed in the merged 65-file run (1169 passed, 2 explicit skips), with full static/architecture checks and documentation checks passing. Final installed-package verification is recorded separately in the audit.

Verification scope: Controlled source and production-boundary verification on macOS with pinned Node 24.18.0; real external engines and Windows hosts were not independently rerun. Closure covers the described source defect, not broader provider conformance or performance.

<!-- gh-comment-id:6159179778 --> @morluto commented on GitHub (Oct 14, 2026): Addressed on main in [31b99306aa67e7840ae624d5a8e8a958ae600b4f](https://github.com/morluto/rea/commit/31b99306aa67e7840ae624d5a8e8a958ae600b4f). Composite health probes instantiated children when snapshots are unavailable; an empty composite does not eagerly start a provider. Validation: Affected suites passed in the merged 65-file run (1169 passed, 2 explicit skips), with full static/architecture checks and documentation checks passing. Final installed-package verification is recorded separately in the audit. Verification scope: Controlled source and production-boundary verification on macOS with pinned Node 24.18.0; real external engines and Windows hosts were not independently rerun. Closure covers the described source defect, not broader provider conformance or performance.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#907
No description provided.