[GH-ISSUE #4858] [Bug] Artifact producer consumers discard exact cancellation reasons #3020

Closed
opened 2026-10-31 00:34:58 +00:00 by bsakaguchi · 0 comments
Owner

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

Before submitting

  • Searched open/closed ArtifactAnalysisResources and sigrok cancellation reports. #4638 fixed the process owner; #4227 is the broader lifecycle audit.
  • No credentials or private target data included.

Area

Cleanup, cancellation, or lifecycle

Observed behavior

Compiled production-boundary reproduction at main300905c11: ArtifactAnalysisResources.run drops the caller's exact reason on cancelled admission. Its commandFailure mapper receives an OwnedCommandFailure with the exact reason but returns AnalysisCancelledError whose cause is the wrapper instead. SignalRecordingService.inspectDecoders also drops preadmission reasons.

Reproduction

On Node24.18/macOS arm64, abort separately with null, a string and a caller-created ProviderCleanupError. Call the compiled resource admission boundary, runOwnedCommand with an already-aborted signal and a launcher that must not run, then commandFailure; also call SignalRecordingService.inspectDecoders with that signal. All three values lose exact identity at each consumer. The process owner retains identity in all three cases. Zero provider subprocesses launched; no target opened. Local probe/results: artifact-analysis-cancellation-probe.mjs and artifact-analysis-cancellation-baseline.json under the ignored audit cache.

Expected behavior

Consume producer-owned cancellation facts and preserve the exact opaque caller reason through admission, command projection and service finalization. Keep physical failure/cleanup facts separate; never adopt resources merely because the caller reason is a typed cleanup error.

Impact and scope

Observed at shared production APIs only. Source consumers include sigrok/tshark and shared pcap admission. NOT_ENOUGH_INFO: public CLI/MCP user impact, actual producer cancellation and native Linux/Windows behavior. Caller cleanup error remained unchanged in the control.

REA version

6.5.0, 300905c11b

Runtime and platform

Node24.18.0, macOS arm64.

Target and artifact context

No target, hardware acquisition, producer or native engine launched.

Interface

Other: compiled shared resource and signal-service boundaries.

Earliest failure stage

Cleanup, cancellation, or lifecycle

Relevant output or evidence

For null/string/foreign typed error: ownerExact=true; preAdmissionExact=false; mappedExact=false; mappedCauseIsWrapper=true; serviceExact=false; cleanupResources=[]; foreign cleanup remained unresolved. Source: src/process/ArtifactAnalysisResources.ts run/commandFailure and src/application/signals/SignalRecordingService.ts admission checks. SigrokRecordingProvider and TsharkCaptureProvider additionally wrap ArtifactReaderFailure cancellation instead of consuming its reason; this latter scope is source-derived, not exercised by this probe.

Typed outcome or recovery expected

Exact reason identity, unchanged typed primary/cleanup provenance, retained partial Evidence on late cancellation, no metadata-derived ownership.

Analysis or suspected cause

The producing command owner was repaired in #4638, but these consumers still synthesize cancellation from the kind alone or wrap already-parsed facts. Trace the shared owner and affected services together rather than adding downstream signal resampling. Failed cleanup/primary composition needs separate validation while changing these projections.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4858 ### Before submitting - [x] Searched open/closed ArtifactAnalysisResources and sigrok cancellation reports. #4638 fixed the process owner; #4227 is the broader lifecycle audit. - [x] No credentials or private target data included. ### Area Cleanup, cancellation, or lifecycle ### Observed behavior Compiled production-boundary reproduction at main300905c11: ArtifactAnalysisResources.run drops the caller's exact reason on cancelled admission. Its commandFailure mapper receives an OwnedCommandFailure with the exact reason but returns AnalysisCancelledError whose cause is the wrapper instead. SignalRecordingService.inspectDecoders also drops preadmission reasons. ### Reproduction On Node24.18/macOS arm64, abort separately with null, a string and a caller-created ProviderCleanupError. Call the compiled resource admission boundary, runOwnedCommand with an already-aborted signal and a launcher that must not run, then commandFailure; also call SignalRecordingService.inspectDecoders with that signal. All three values lose exact identity at each consumer. The process owner retains identity in all three cases. Zero provider subprocesses launched; no target opened. Local probe/results: artifact-analysis-cancellation-probe.mjs and artifact-analysis-cancellation-baseline.json under the ignored audit cache. ### Expected behavior Consume producer-owned cancellation facts and preserve the exact opaque caller reason through admission, command projection and service finalization. Keep physical failure/cleanup facts separate; never adopt resources merely because the caller reason is a typed cleanup error. ### Impact and scope Observed at shared production APIs only. Source consumers include sigrok/tshark and shared pcap admission. NOT_ENOUGH_INFO: public CLI/MCP user impact, actual producer cancellation and native Linux/Windows behavior. Caller cleanup error remained unchanged in the control. ### REA version 6.5.0, 300905c11be1c25b98fda9e2b71dfa899fc2831c ### Runtime and platform Node24.18.0, macOS arm64. ### Target and artifact context No target, hardware acquisition, producer or native engine launched. ### Interface Other: compiled shared resource and signal-service boundaries. ### Earliest failure stage Cleanup, cancellation, or lifecycle ### Relevant output or evidence For null/string/foreign typed error: ownerExact=true; preAdmissionExact=false; mappedExact=false; mappedCauseIsWrapper=true; serviceExact=false; cleanupResources=[]; foreign cleanup remained unresolved. Source: src/process/ArtifactAnalysisResources.ts run/commandFailure and src/application/signals/SignalRecordingService.ts admission checks. SigrokRecordingProvider and TsharkCaptureProvider additionally wrap ArtifactReaderFailure cancellation instead of consuming its reason; this latter scope is source-derived, not exercised by this probe. ### Typed outcome or recovery expected Exact reason identity, unchanged typed primary/cleanup provenance, retained partial Evidence on late cancellation, no metadata-derived ownership. ### Analysis or suspected cause The producing command owner was repaired in #4638, but these consumers still synthesize cancellation from the kind alone or wrap already-parsed facts. Trace the shared owner and affected services together rather than adding downstream signal resampling. Failed cleanup/primary composition needs separate validation while changing these projections.
bsakaguchi 2026-10-31 00:34:58 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
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#3020
No description provided.