[PR #6055] [MERGED] fix(apple): preserve asset catalog caller cancellation reason #7135

Closed
opened 2026-11-01 21:45:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6055
Author: @rkfshakti
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @morluto

Base: main ← Head: fix/asset-catalog-cancellation-reason


📝 Commits (2)

  • ef5eeb8 fix(apple): preserve asset catalog caller cancellation reason
  • 87eb2eb test(apple): cover asset catalog cancellation checkpoints

📊 Changes

2 files changed (+142 additions, -1 deletions)

View changed files

📝 src/artifacts/apple/AppleAssetCatalogAnalysis.ts (+10 -1)
➕ tests/process-global/assetCatalogCancellationReason.test.ts (+132 -0)

📄 Description

Summary

Fixes #5998.

Asset catalog inspection preserved the ExecFileOutputCancelledError wrapper, or no reason at all, instead of the exact object supplied to AbortController.abort. This change passes the caller's exact reason through both assetutil cancellation checkpoints.

Problem and expected behavior

inspect_asset_catalog cancels correctly, but ArtifactReaderFailure.cancellation.reason and the translated cause were not the caller object. The digest-loop cancellation checkpoint had the same bare constructor.

The change keeps cancellation classification, partial coverage, and cleanup behavior unchanged, and retains the exact caller reason at both producing checkpoints.

Change and scope

  • src/artifacts/apple/AppleAssetCatalogAnalysis.ts: add a small cancellationCause() helper; use it in the runAssetUtil catch and pass signal.reason at the digest-loop checkpoint.
  • Scope: ordinary fix within existing asset-catalog cancellation boundaries. No new provider, capability, target authority, or cleanup ownership.
  • Not included: changing cancellation precedence against other catalog failures.

Contract and boundary impact

  • Semantic owner and earliest changed stage: asset-catalog cancellation constructors in runAssetUtil and digestBounded.
  • Contribution scope fit and linked maintainer decision: ordinary fix inside existing boundaries; no scope decision required.
  • CLI and MCP/tool-catalog contract: none; the cancellation cause is internal typed provenance and is not serialized into public JSON.
  • Provider, bridge, target-format, or platform compatibility: macOS asset-catalog inspection only; no bridge or protocol change.
  • Evidence, artifact, provenance, or reconstruction contract: exact caller reason retained on the typed failure.
  • Target selection, authority, upstream behavior, and cleanup details: no target execution or mutation; no cleanup behavior change.
  • Generated metadata/package/installation impact: none.

Expected effects: reads existing files or captured data only. The focused test simulates the assetutil boundary and does not launch the utility.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added: tests/process-global/assetCatalogCancellationReason.test.ts exercises the production catalog walk with a simulated cancelled assetutil command and asserts the exact caller reason.
  • Base reproduction: the new test was applied alone to main and failed (cancellation.reason was missing); it passes on this branch.
  • User-visible CLI/MCP output: not applicable; the cause is not part of the public error projection.
  • Remaining proof gaps: no real assetutil, catalog, CLI signal path, or MCP transport cancellation was exercised.

Validation performed

  • npm run test:focused -- tests/process-global/assetCatalogCancellationReason.test.ts — 1 passed.
  • npm run check:fast — passed.
  • git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable; the test runs on macOS with a simulated utility boundary.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: cancellation reasons are caller-supplied values already present on the signal; no target authority or execution effect changes.

Author readiness

Human owner: @rkfshakti

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are unchanged where not needed.
  • User-visible CLI/MCP changes include representative output. Not applicable: the cause remains internal.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6055 **Author:** [@rkfshakti](https://github.com/rkfshakti) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/asset-catalog-cancellation-reason` --- ### 📝 Commits (2) - [`ef5eeb8`](https://github.com/morluto/rea/commit/ef5eeb84aaf50ddf5b5899065adfcc9c3b5495e8) fix(apple): preserve asset catalog caller cancellation reason - [`87eb2eb`](https://github.com/morluto/rea/commit/87eb2eb12501d90954cfd27df62ffadcd727eb0d) test(apple): cover asset catalog cancellation checkpoints ### 📊 Changes **2 files changed** (+142 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/apple/AppleAssetCatalogAnalysis.ts` (+10 -1) ➕ `tests/process-global/assetCatalogCancellationReason.test.ts` (+132 -0) </details> ### 📄 Description ## Summary Fixes #5998. Asset catalog inspection preserved the `ExecFileOutputCancelledError` wrapper, or no reason at all, instead of the exact object supplied to `AbortController.abort`. This change passes the caller's exact reason through both `assetutil` cancellation checkpoints. ## Problem and expected behavior `inspect_asset_catalog` cancels correctly, but `ArtifactReaderFailure.cancellation.reason` and the translated cause were not the caller object. The digest-loop cancellation checkpoint had the same bare constructor. The change keeps cancellation classification, partial coverage, and cleanup behavior unchanged, and retains the exact caller reason at both producing checkpoints. ## Change and scope - `src/artifacts/apple/AppleAssetCatalogAnalysis.ts`: add a small `cancellationCause()` helper; use it in the `runAssetUtil` catch and pass `signal.reason` at the digest-loop checkpoint. - Scope: ordinary fix within existing asset-catalog cancellation boundaries. No new provider, capability, target authority, or cleanup ownership. - Not included: changing cancellation precedence against other catalog failures. ## Contract and boundary impact - Semantic owner and earliest changed stage: asset-catalog cancellation constructors in `runAssetUtil` and `digestBounded`. - Contribution scope fit and linked maintainer decision: ordinary fix inside existing boundaries; no scope decision required. - CLI and MCP/tool-catalog contract: none; the cancellation cause is internal typed provenance and is not serialized into public JSON. - Provider, bridge, target-format, or platform compatibility: macOS asset-catalog inspection only; no bridge or protocol change. - Evidence, artifact, provenance, or reconstruction contract: exact caller reason retained on the typed failure. - Target selection, authority, upstream behavior, and cleanup details: no target execution or mutation; no cleanup behavior change. - Generated metadata/package/installation impact: none. Expected effects: reads existing files or captured data only. The focused test simulates the `assetutil` boundary and does not launch the utility. - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [x] Inject instrumentation or run scripts/code. - [x] Change process memory, registers, files, or configuration. - [x] Contact network services. - [x] Recover protected code or work around protections. - [x] Documentation or usability only; no target interaction. - [x] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added: `tests/process-global/assetCatalogCancellationReason.test.ts` exercises the production catalog walk with a simulated cancelled `assetutil` command and asserts the exact caller reason. - Base reproduction: the new test was applied alone to `main` and failed (`cancellation.reason` was missing); it passes on this branch. - User-visible CLI/MCP output: not applicable; the cause is not part of the public error projection. - Remaining proof gaps: no real `assetutil`, catalog, CLI signal path, or MCP transport cancellation was exercised. ## Validation performed - `npm run test:focused -- tests/process-global/assetCatalogCancellationReason.test.ts` — 1 passed. - `npm run check:fast` — passed. - `git diff --check` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: not applicable; the test runs on macOS with a simulated utility boundary. - Package or release metadata impact: none. - Security, privacy, process, or containment review: cancellation reasons are caller-supplied values already present on the signal; no target authority or execution effect changes. ## Author readiness Human owner: @rkfshakti - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are unchanged where not needed. - [x] User-visible CLI/MCP changes include representative output. Not applicable: the cause remains internal. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:45:39 +00:00
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#7135
No description provided.