[GH-ISSUE #4261] [Bug] Shared observation services drop completed Evidence and mask output errors on late abort #1684

Closed
opened 2026-10-16 21:09:03 +00:00 by bsakaguchi · 2 comments
Owner

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

Before submitting

  • Searched open and closed reports. Related #4254/#4255/#4256 cover different owning workflows; no exact operation report found.
  • Uses only controlled provider ports and source-owned fixtures.

Area / interface / earliest failure stage

Evidence, artifacts, or reconstruction / CLI and MCP shared application workflows / Transport or result projection.

Observed behavior

Late cancellation after a successful provider result discards available observations in Go, Rust, Electron fuse inspection, browser observations, and JavaScript Inspector observations. These services return a bare cancellation before building Evidence. Go/Rust/fuse inspection additionally checks cancellation before validating the returned report, so abort masks an output error from the same malformed report.

Reproduction actually run

A disposable source test exercised five services with four controls each: valid result; valid result plus abort immediately before provider return; invalid report without abort; the same invalid report plus abort. All 20 characterization assertions passed. Go/Rust/browser/Inspector use controlled provider ports. Electron fuses uses the production provider on a source-owned image, with a wrapper aborting after it returns.

Valid controls succeed. Valid+abort returns cancellation without partial Evidence. Invalid selected-path Go/Rust/fuse reports return AnalysisOutputError without abort, but cancellation with abort. Browser/Inspector non-JSON output throws during Evidence assembly without abort; abort bypasses assembly. This proves application behavior; it does not claim real browser processes or cancelled MCP-client reply delivery.

Expected behavior / impact and scope

Validate successful reports and assemble Evidence before classifying completion. Late cancellation should retain valid completed Evidence. Output, provider, and cleanup failures should retain precedence. CLI/MCP callers otherwise lose facts the provider already produced. Runtime frequency remains unknown.

REA version / runtime / target

Source baseline 0e1f0bf2d06943e59253b8a66923a1ae6005e81e, Node 24.18.0, macOS arm64; controlled provider ports and a source-owned Electron fuse image.

Relevant source evidence

Proposed repair

Use the shared application completion rule after report validation and Evidence construction. Keep existing producer failure outcomes intact. Parent audit: #4227.

Originally created by @morluto on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4261 ## Before submitting - [x] Searched open and closed reports. Related #4254/#4255/#4256 cover different owning workflows; no exact operation report found. - [x] Uses only controlled provider ports and source-owned fixtures. ## Area / interface / earliest failure stage Evidence, artifacts, or reconstruction / CLI and MCP shared application workflows / Transport or result projection. ## Observed behavior Late cancellation after a successful provider result discards available observations in Go, Rust, Electron fuse inspection, browser observations, and JavaScript Inspector observations. These services return a bare cancellation before building Evidence. Go/Rust/fuse inspection additionally checks cancellation before validating the returned report, so abort masks an output error from the same malformed report. ## Reproduction actually run A disposable source test exercised five services with four controls each: valid result; valid result plus abort immediately before provider return; invalid report without abort; the same invalid report plus abort. All **20 characterization assertions passed**. Go/Rust/browser/Inspector use controlled provider ports. Electron fuses uses the production provider on a source-owned image, with a wrapper aborting after it returns. Valid controls succeed. Valid+abort returns cancellation without partial Evidence. Invalid selected-path Go/Rust/fuse reports return `AnalysisOutputError` without abort, but cancellation with abort. Browser/Inspector non-JSON output throws during Evidence assembly without abort; abort bypasses assembly. This proves application behavior; it does not claim real browser processes or cancelled MCP-client reply delivery. ## Expected behavior / impact and scope Validate successful reports and assemble Evidence before classifying completion. Late cancellation should retain valid completed Evidence. Output, provider, and cleanup failures should retain precedence. CLI/MCP callers otherwise lose facts the provider already produced. Runtime frequency remains unknown. ## REA version / runtime / target Source baseline `0e1f0bf2d06943e59253b8a66923a1ae6005e81e`, Node 24.18.0, macOS arm64; controlled provider ports and a source-owned Electron fuse image. ## Relevant source evidence - [GoBinaryService](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/src/application/go/GoBinaryService.ts#L65) - [RustBinaryService](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/src/application/rust/RustBinaryService.ts#L62) - [ElectronFuseService](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/src/application/electron/ElectronFuseService.ts#L50) - [BrowserObservationService](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/src/application/BrowserObservationService.ts#L32) - [JavaScriptRuntimeObservationService](https://github.com/morluto/rea/blob/0e1f0bf2d06943e59253b8a66923a1ae6005e81e/src/application/javascript/JavaScriptRuntimeObservationService.ts#L24) ## Proposed repair Use the shared application completion rule after report validation and Evidence construction. Keep existing producer failure outcomes intact. Parent audit: #4227.
bsakaguchi 2026-10-16 21:09:03 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

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

The source-wide follow-up screen found six adjacent wrappers with the same guard-before-validation/Evidence pattern. Existing owner tests already reproduce valid provider completion plus late abort for WebSourceLocation, BinaryLayout, PE resources, RecordedCrash, and EVM; WebNetwork has malformed-report controls but no cancellation race control. I am adding paired valid-result+abort and malformed-result+abort controls at each owning service seam before fixing them. The handlers for Browser, Browser Scenario, Electron, and JavaScript Inspector also need one shared result-delivery helper so typed partial Evidence is recorded and returned consistently after the application layer retains it. This extends the same issue's scope; it does not change the separate cleanup/ownership cases in #4254-#4256.

Additional owning services: WebNetworkCaptureService, WebSourceLocationService, BinaryLayoutService, PeResourcesService, RecordedCrashService, and EvmInterfaceService.

<!-- gh-comment-id:6202817458 --> @morluto commented on GitHub (Oct 15, 2026): The source-wide follow-up screen found six adjacent wrappers with the same guard-before-validation/Evidence pattern. Existing owner tests already reproduce valid provider completion plus late abort for WebSourceLocation, BinaryLayout, PE resources, RecordedCrash, and EVM; WebNetwork has malformed-report controls but no cancellation race control. I am adding paired valid-result+abort and malformed-result+abort controls at each owning service seam before fixing them. The handlers for Browser, Browser Scenario, Electron, and JavaScript Inspector also need one shared result-delivery helper so typed partial Evidence is recorded and returned consistently after the application layer retains it. This extends the same issue's scope; it does not change the separate cleanup/ownership cases in #4254-#4256. Additional owning services: `WebNetworkCaptureService`, `WebSourceLocationService`, `BinaryLayoutService`, `PeResourcesService`, `RecordedCrashService`, and `EvmInterfaceService`.
Author
Owner

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

Fixed on main in 3b698645a. Shared application completion validates finished reports before late-cancellation projection and preserves completed Evidence, output errors and captured diagnostics through MCP recording.

Late-abort, malformed-report and partial-Evidence delivery regressions cover the affected boundaries; real-engine timing and delivery to an already-cancelled client are not claimed.

Hosted main CI is still pending; this closure is based on the implemented fix and the scoped regression evidence.

<!-- gh-comment-id:6206004621 --> @morluto commented on GitHub (Oct 16, 2026): Fixed on `main` in [3b698645a](https://github.com/morluto/rea/commit/3b698645a086d80156d9196fd296cbb4195fc888). Shared application completion validates finished reports before late-cancellation projection and preserves completed Evidence, output errors and captured diagnostics through MCP recording. Late-abort, malformed-report and partial-Evidence delivery regressions cover the affected boundaries; real-engine timing and delivery to an already-cancelled client are not claimed. Hosted main CI is still pending; this closure is based on the implemented fix and the scoped regression evidence.
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#1684
No description provided.