[GH-ISSUE #4865] [Bug] Artifact cleanup projection hides physical file failures after recovery #3023

Closed
opened 2026-10-31 00:35:01 +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/4865

Before submitting

  • Searched open/closed ArtifactAnalysisResources reports; #2541/#2542 cover cleanup diagnostics/member scope, #4858 covers cancellation provenance.
  • No credentials or private target data included.

Area

Evidence, artifacts, or reconstruction

Observed behavior

At compiled main8a247fc70, the shared artifact failure projection retains a physical EACCES only inside ArtifactFileCleanupFailure.fileCleanupFailure.outcome. It reports cleanup failure without a typed cleanupPrimary. Once exact descriptor retry succeeds, the same returned error projects execution_failure rather than restoring the original physical file outcome.

Reproduction

One controlled no-launch workflow on Node24.18/macOS arm64: read through ArtifactAnalysisResources.read with canonical withArtifactRegularFile and its actual retained scope. Operation throws an authored EACCES Error; the real FileHandle.close is made to reject while the descriptor remains open. Verify the canonical file outcome still owns that exact EACCES. Restore close, call resources.close, verify fd=-1, then project the original error. Local probe/results: artifact-resource-followup-probe.mjs and artifact-resource-followup-results.json in the ignored audit cache. No naturally occurring OS fault, target or native producer.

Expected behavior

Project the canonical file owner's physical outcome through the normal provider classification, then compose its independently retained cleanup. Resolve only exact cleanup dependencies after retry, without replacing the original physical failure with a generic cleanup adapter failure.

Impact and scope

Observed shared production API with a real descriptor and controlled faults. Sigrok/tshark consumers route ArtifactReaderFailure.cleanup through the same shared helper before normal physical classification (source-derived). NOT_ENOUGH_INFO: public CLI/MCP incident, native Linux/Windows or real producer frequency.

REA version

6.5.0, 8a247fc70f

Runtime and platform

Node24.18.0, macOS arm64.

Target and artifact context

Tiny authored local file; no target execution or hardware acquisition.

Interface

Other: shared artifact resource/file operation boundaries.

Earliest failure stage

Cleanup, cancellation, or lifecycle

Relevant output or evidence

physicalCode=EACCES; exactPhysicalCauseRetainedInFileOwner=true; hasTypedCleanupPrimary=false; beforeRetry=cleanup_incomplete; afterRetry=execution_failure; cleanupResolved=true; actualDescriptorClosed=true. The raw physical cause is retained; its typed primary projection is missing.

Typed outcome or recovery expected

Keep primary classification/evidence and independent cleanup recovery through the existing exact file lease.

Analysis or suspected cause

ArtifactAnalysisResources.cleanupFailure normalizes cancellation only; other ArtifactFileCleanupFailure outcomes bypass the original provider mapper. This is distinct from the exact cancellation repair in #4858.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4865 ### Before submitting - [x] Searched open/closed ArtifactAnalysisResources reports; #2541/#2542 cover cleanup diagnostics/member scope, #4858 covers cancellation provenance. - [x] No credentials or private target data included. ### Area Evidence, artifacts, or reconstruction ### Observed behavior At compiled main8a247fc70, the shared artifact failure projection retains a physical EACCES only inside ArtifactFileCleanupFailure.fileCleanupFailure.outcome. It reports cleanup failure without a typed cleanupPrimary. Once exact descriptor retry succeeds, the same returned error projects execution_failure rather than restoring the original physical file outcome. ### Reproduction One controlled no-launch workflow on Node24.18/macOS arm64: read through ArtifactAnalysisResources.read with canonical withArtifactRegularFile and its actual retained scope. Operation throws an authored EACCES Error; the real FileHandle.close is made to reject while the descriptor remains open. Verify the canonical file outcome still owns that exact EACCES. Restore close, call resources.close, verify fd=-1, then project the original error. Local probe/results: artifact-resource-followup-probe.mjs and artifact-resource-followup-results.json in the ignored audit cache. No naturally occurring OS fault, target or native producer. ### Expected behavior Project the canonical file owner's physical outcome through the normal provider classification, then compose its independently retained cleanup. Resolve only exact cleanup dependencies after retry, without replacing the original physical failure with a generic cleanup adapter failure. ### Impact and scope Observed shared production API with a real descriptor and controlled faults. Sigrok/tshark consumers route ArtifactReaderFailure.cleanup through the same shared helper before normal physical classification (source-derived). NOT_ENOUGH_INFO: public CLI/MCP incident, native Linux/Windows or real producer frequency. ### REA version 6.5.0, 8a247fc70f8294d4e8cfe920007eb135a965bb77 ### Runtime and platform Node24.18.0, macOS arm64. ### Target and artifact context Tiny authored local file; no target execution or hardware acquisition. ### Interface Other: shared artifact resource/file operation boundaries. ### Earliest failure stage Cleanup, cancellation, or lifecycle ### Relevant output or evidence physicalCode=EACCES; exactPhysicalCauseRetainedInFileOwner=true; hasTypedCleanupPrimary=false; beforeRetry=cleanup_incomplete; afterRetry=execution_failure; cleanupResolved=true; actualDescriptorClosed=true. The raw physical cause is retained; its typed primary projection is missing. ### Typed outcome or recovery expected Keep primary classification/evidence and independent cleanup recovery through the existing exact file lease. ### Analysis or suspected cause ArtifactAnalysisResources.cleanupFailure normalizes cancellation only; other ArtifactFileCleanupFailure outcomes bypass the original provider mapper. This is distinct from the exact cancellation repair in #4858.
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#3023
No description provided.