[GH-ISSUE #2591] fix(session): composite cleanup omits other failing children #908

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/2591

Summary

Closing a composed analysis client with two failing children reports only one child's remaining resource. The caller receives incomplete cleanup information even though the session retains the composite for retry.

Steps to reproduce

  1. On the source baseline below, create a CompositeProvider with two providers declaring disjoint operations address_name and procedure_info. Each executes successfully but returns a ProviderCleanupError from close, naming respectively provider-a-leftover and provider-b-leftover.
  2. Create a client with a valid target descriptor and execute both operations to instantiate both children.
  3. Close through closeAnalysisClient and inspect projectAnalysisError(result.error).details.resources. Retry the close with both failures still present.
  4. As a control, instantiate only the second provider and close it.

Expected behavior

A cleanup failure should report the remaining resources from both children so the caller can review the local resources that could not be confirmed closed.

Actual behavior

The focused probe reported only the first child's resource on the initial close and on retry. The single-child control reported the second child's resource correctly. The session's retry ownership remains intact; the defect discards information about the other failure.

Evidence

  • Expected source: src/domain/providerCleanupError.ts:9 instructs callers to review the reported resources; AGENTS.md requires preservation of partial facts and meaningful failure reasons.
  • Failure source: src/application/binary/CompositeProvider.ts:88 collects every child outcome and returns just the first failure at line 94. src/application/binary/BinarySession.ts:430 retains the composed client for retry without restoring discarded diagnostics.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

A focused simulated-provider test directly asserted the incomplete resource list, repeated-close result, and single-child control. No real provider cleanup failure was induced.

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

For two failing children, require a cleanup failure that preserves both resource identities and their failure information. A repeat close must continue to report all unresolved failures. A single failure must report that child's resources, and successful children must contribute no remaining resources.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The cleanup result hides a retained child's remaining resources, so the caller's review information is incomplete for multiple simultaneous failures. The probe shows no loss of ownership or user data.
  • Workaround status: unverified
  • Workaround basis: Retrying closes all children but the probe still reports only the first persistent failure. No practical way to retrieve every unresolved sibling resource was verified.
Originally created by @coygeek on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2591 ## Summary Closing a composed analysis client with two failing children reports only one child's remaining resource. The caller receives incomplete cleanup information even though the session retains the composite for retry. ## Steps to reproduce 1. On the source baseline below, create a `CompositeProvider` with two providers declaring disjoint operations `address_name` and `procedure_info`. Each executes successfully but returns a `ProviderCleanupError` from close, naming respectively `provider-a-leftover` and `provider-b-leftover`. 2. Create a client with a valid target descriptor and execute both operations to instantiate both children. 3. Close through `closeAnalysisClient` and inspect `projectAnalysisError(result.error).details.resources`. Retry the close with both failures still present. 4. As a control, instantiate only the second provider and close it. ## Expected behavior A cleanup failure should report the remaining resources from both children so the caller can review the local resources that could not be confirmed closed. ## Actual behavior The focused probe reported only the first child's resource on the initial close and on retry. The single-child control reported the second child's resource correctly. The session's retry ownership remains intact; the defect discards information about the other failure. ## Evidence - Expected source: `src/domain/providerCleanupError.ts:9` instructs callers to review the reported resources; `AGENTS.md` requires preservation of partial facts and meaningful failure reasons. - Failure source: `src/application/binary/CompositeProvider.ts:88` collects every child outcome and returns just the first failure at line 94. `src/application/binary/BinarySession.ts:430` retains the composed client for retry without restoring discarded diagnostics. - Evidence provenance: observed - Local verification: reproduced - Reproduction completeness: complete A focused simulated-provider test directly asserted the incomplete resource list, repeated-close result, and single-child control. No real provider cleanup failure was induced. ## 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 For two failing children, require a cleanup failure that preserves both resource identities and their failure information. A repeat close must continue to report all unresolved failures. A single failure must report that child's resources, and successful children must contribute no remaining resources. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: The cleanup result hides a retained child's remaining resources, so the caller's review information is incomplete for multiple simultaneous failures. The probe shows no loss of ownership or user data. - Workaround status: unverified - Workaround basis: Retrying closes all children but the probe still reports only the first persistent failure. No practical way to retrieve every unresolved sibling resource was verified.
bsakaguchi 2026-10-15 18:29:29 +00:00
Author
Owner

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

Addressed on main in 31b99306aa67e7840ae624d5a8e8a958ae600b4f.

Composed close now retains every failed child owner, resource, and diagnostic instead of selecting the first failure.

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:6159178524 --> @morluto commented on GitHub (Oct 14, 2026): Addressed on main in [31b99306aa67e7840ae624d5a8e8a958ae600b4f](https://github.com/morluto/rea/commit/31b99306aa67e7840ae624d5a8e8a958ae600b4f). Composed close now retains every failed child owner, resource, and diagnostic instead of selecting the first failure. 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#908
No description provided.