[PR #6143] [MERGED] fix(cancellation): preserve caller abort reasons through late finalization #7158

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

📋 Pull Request Information

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

Base: main ← Head: fix/cancel-late-cleanup


📝 Commits (4)

  • 6c4e287 fix(cancellation): preserve caller abort reasons through late finalization
  • 68162fe fix(cancellation): keep caller reasons through export rollback and commit
  • f9e77ab fix(cancellation): bind export cancellations to cleanup and caller reasons
  • 9241033 fix(merge): reconcile cancellation cleanup with command deadlines

📊 Changes

21 files changed (+611 additions, -61 deletions)

View changed files

📝 src/adb/AdbProvider.ts (+6 -4)
📝 src/application/WebScriptExportService.ts (+32 -2)
📝 src/application/binary/BinarySession.ts (+10 -0)
📝 src/application/javascript/JavaScriptRecoveryService.test.ts (+26 -0)
📝 src/application/javascript/JavaScriptRecoveryService.ts (+8 -4)
📝 src/application/native/NativeValueTrace.test.ts (+19 -0)
📝 src/application/native/NativeValueTrace.ts (+6 -0)
📝 src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts (+48 -1)
📝 src/artifacts/apple/AppleAssetCatalogAnalysis.ts (+1 -0)
📝 src/browser/CdpObservationSession.ts (+8 -0)
📝 src/browser/assets/PublishWebScripts.ts (+22 -5)
📝 src/cli/reverseEngineeringCommands.ts (+22 -5)
📝 src/cli/webScriptCommands.ts (+42 -38)
📝 src/hopper/HopperRegexSearch.test.ts (+42 -1)
📝 src/hopper/HopperRegexSearch.ts (+4 -0)
📝 tests/boundary/browser/cdpObservationWindowScope.test.ts (+21 -0)
📝 tests/boundary/cli/reverseEngineeringCommands.test.ts (+14 -0)
📝 tests/boundary/cli/webScriptSelectionCli.test.ts (+46 -1)
📝 tests/boundary/filesystem/webScriptExport.test.ts (+189 -0)
📝 tests/boundary/providers/adb/adbBugreportPublication.test.ts (+21 -0)

...and 1 more files

📄 Description

Summary

Fixes #6042
Fixes #6043
Fixes #6048
Fixes #6049
Fixes #6057
Fixes #6060
Fixes #6078
Fixes #6080
Fixes #6108
Fixes #6111
Fixes #6115

When a caller aborts during final provider, cleanup, or protocol handling, several shared workflows and CLI handlers returned success, a cleanup-derived error, or an I/O error instead of cancellation. The expected contract is AnalysisCancelledError carrying the exact signal.reason, with completed partial Evidence or cleanup state retained. This PR makes each affected path sample the caller signal after its owner has settled.

Problem and expected behavior

Smallest triggers and violated invariants, one per issue:

  • #6042: abort inside the first output write surfaced the internal ArtifactReaderFailure as the cancellation cause instead of the caller reason.
  • #6043: a capture close that failed once and then succeeded on retry dropped a cancellation recorded during the close.
  • #6048: native value tracing returned ok and recorded Evidence when the signal aborted just before the final provider reply was consumed.
  • #6049: Hopper regex search returned ok when the signal aborted during the matching worker's termination await.
  • #6057: assetutil cancellation settled before the helper process exited, because stopSignal was not supplied.
  • #6060: an armed observe_web_session waited out its full window after a fatal CDP protocol failure.
  • #6078: a staging-removal failure after cancellation produced AnalysisOutputError instead of cancellation.
  • #6080: JavaScript recovery returned success after the caller aborted during final handle closure.
  • #6108: export-web-scripts ignored SIGINT, so a real interrupt left partial output without a structured result.
  • #6111: inspect-with-objdump and execute-rizin-command returned successful Evidence when SIGINT arrived during cleanup retry.
  • #6115: binary-switch cancellation was lost when retiring the previous client failed after abort.

Change and scope

Each fix is placed in the owning stage rather than at the CLI:

  • Web script export (WebScriptExportService.ts): mapExportFailure uses the exact signal.reason when the caught failure wraps it; readCapture consults regularFileCancellation for a successful retried close.
  • Native value tracing and Hopper regex search: a post-await signal check before ok.
  • Apple asset catalog: stopSignal: "SIGTERM" is passed to execFileOutput, matching its documented settle-after-exit contract.
  • CDP observation (CdpObservationSession.ts): waitForWindow also subscribes to connection.onProtocolFailure and rejects with the protocol error, releasing timers and listeners.
  • ADB bugreport (AdbProvider.ts): staging-removal failure prefers AnalysisCancelledError when the caller aborted.
  • JavaScript recovery: uses the shared completeProviderEvidence helper, the same completion check other providers use.
  • CLI (webScriptCommands.ts, reverseEngineeringCommands.ts): export-web-scripts runs under withCommandCancellation and passes the signal into the workflow; objdump and Rizin wrap their cleanup with the same late-cancellation rule as finishAnalysisCommand.ts.
  • Binary session (BinarySession.ts): a failed previous-client retirement after abort returns cancellation as the primary with the cleanup failure attached and the owner still pending.

Intentionally not included: no change to the shared ExecFileOutput settlement contract, no other execFileOutput call sites, no ADB success-path change (the shared service already converts a successful removal to cancellation), and no change to the existing CLI completion check in finishAnalysisCommand.ts.

Contribution scope: ordinary fixes within existing boundaries. No new provider or capability, and no change to target execution, injection, mutation, or protection handling. Not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: each owning workflow or provider (listed above); the CLI change is limited to forwarding the signal and projecting the already-typed cancellation.
  • Contribution scope fit and linked maintainer decision: not applicable (bug fixes within existing boundaries).
  • CLI and MCP/tool-catalog contract: export-web-scripts now exits 130 with code: cancelled on SIGINT; objdump and Rizin return code: cancelled when interrupted during cleanup. No schema or catalog change.
  • Provider, bridge, target-format, or platform compatibility: no change for successful runs. Asset catalog cancellation now waits for the assetutil child to exit; native assetutil signal behavior was not exercised.
  • Evidence, artifact, provenance, or reconstruction contract: late-cancelled results carry the completed Evidence as partialObservation; no successful Evidence is changed.
  • Target selection, authority, upstream behavior, and cleanup details: binary-session cleanup ownership is unchanged; the owner remains pending when retirement fails.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • Read existing files or captured data. (Web script export reads the caller-selected capture, as before.)
  • Launch or attach to a process. (Existing asset catalog, Hopper, and objdump/Rizin paths are touched; no new launches are added.)
  • 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 or updated: one regression per issue in existing test files: tests/boundary/filesystem/webScriptExport.test.ts (#6042, #6043), src/application/native/NativeValueTrace.test.ts (#6048), src/hopper/HopperRegexSearch.test.ts (#6049), src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts (#6057), tests/boundary/browser/cdpObservationWindowScope.test.ts (#6060), tests/boundary/providers/adb/adbBugreportPublication.test.ts (#6078), src/application/javascript/JavaScriptRecoveryService.test.ts (#6080), tests/boundary/cli/webScriptSelectionCli.test.ts (#6108), tests/boundary/cli/reverseEngineeringCommands.test.ts (#6111), tests/composition/analysis-sessions/binarySessionCleanupRetry.test.ts (#6115).
  • Base reproduction or other evidence: with the ten fixed source files temporarily restored to origin/main (01788bac8) and the new tests kept, all 11 new tests failed, each on the asserted defect: wrong or missing cause, cancelled absent, 10,012 ms versus a 5,000 ms bound (#6060), and exited marker absent when cancellation settled (#6057). The fixed files were then restored and re-verified. This was a per-file revert of shared files, not per-hunk isolation; #6042 and #6043 share WebScriptExportService.ts.
  • User-visible CLI/MCP output (if applicable): not captured as transcripts. The export-web-scripts and objdump/Rizin results are covered by boundary tests that invoke the registered CLI handlers with a spied workflow or a simulated owned result; no real SIGINT was delivered to a built binary in this PR.
  • Remaining proof gaps: real Ghidra, IDA, Hopper, Frida, and browser (Chromium/Electron) providers were not run; the CDP peer is a simulated fake; assetutil was replaced by a Node subprocess; no real SIGINT was delivered to the built export-web-scripts CLI; the full test suite was not run.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

Merge-conflict resolution at 924103383 against main (4e2816662): preserves both late-cancellation handling and caller-selected command deadlines in the Rizin CLI handler.

  • npm run test:focused selecting the ten original regression files plus tests/process-global/assetCatalogCancellationReason.test.ts and tests/boundary/cli/cliInputSchemaRequired.test.ts — exit 0, 12 files, 143 tests passed; runtime build completed successfully.
  • npm run check — exit 0 (typecheck, lint, formatting, Knip, metadata, module boundaries, architecture guards).
  • Pre-push npm run check:fast — exit 0.
  • Full suite and real-provider workflows were not run for this merge resolution.

Review follow-up at f9e77abfd (earlier bullets describe 68162fe07 and 6c4e287e6):

  • npm run test:focused -- tests/boundary/filesystem/webScriptExport.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts — exit 0, 3 files, 51 tests passed. Adds a regression for a caller-owned AnalysisCancelledError reason.
  • node scripts/run-typescript.mjs --noEmit — exit 0.
  • npx oxlint on the changed files — 0 errors.
  • Not run: the full suite.

Earlier follow-up at 68162fe07:

  • npm run test:focused -- tests/boundary/filesystem/webScriptExport.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts — exit 0, 3 files, 50 tests passed. Adds regressions for rollback failure after an interrupted write and for abort during final commit.
  • node scripts/run-typescript.mjs --noEmit — exit 0.
  • npx oxlint on the changed files — 0 errors; style warnings only.
  • npx oxfmt on the changed files — formatted.
  • Not run: the full suite.

Run in rea-worktrees/cancel-late-cleanup at commit 6c4e287e6 on base 01788bac8:

  • npm run build:cached — 3 of 3 tasks successful (exit code not captured). Two CLI and worker-dependent tests failed before this build and passed after it.
  • npx vitest run tests/boundary/filesystem/webScriptExport.test.ts src/application/native/NativeValueTrace.test.ts src/hopper/HopperRegexSearch.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/browser/cdpObservationWindowScope.test.ts tests/boundary/providers/adb/adbBugreportPublication.test.ts src/application/javascript/JavaScriptRecoveryService.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts tests/boundary/cli/reverseEngineeringCommands.test.ts tests/composition/analysis-sessions/binarySessionCleanupRetry.test.ts — exit 0, 10 files and 130 tests passed.
  • Same vitest command with the fixed sources restored to origin/main — 10 of 10 files failed (exit code not captured); all 11 new tests failed on the asserted defect (see Evidence section).
  • npm run typecheck — exit 0.
  • npx oxlint on the 20 changed files — exit 0; warnings only, in six touched source files (AdbProvider 30, BinarySession 11, CdpObservationSession 3, NativeValueTrace 2, reverseEngineeringCommands 2, JavaScriptRecoveryService 1). Each file's count is identical to its HEAD~1 version.
  • npx oxfmt --check on the 20 changed files — exit 0, all matched files formatted.
  • git commit pre-commit hook — passed.

Not run: the full suite (npm run check:pr), real-provider workflows, and platform-specific tests.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Behavior change: late-cancelled commands now report cancelled (exit 130) instead of success or a cleanup error.
  • Real Hopper/Ghidra, browser, or OS coverage: none; see Remaining proof gaps.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no new process, network, or file access; asset catalog children now receive SIGTERM on cancellation and are awaited before settlement.

Author readiness

Human owner: @agorevski

  • 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, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • 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/6143 **Author:** [@agorevski](https://github.com/agorevski) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/cancel-late-cleanup` --- ### 📝 Commits (4) - [`6c4e287`](https://github.com/morluto/rea/commit/6c4e287e663b479938c2fafb7382ff09d722a88e) fix(cancellation): preserve caller abort reasons through late finalization - [`68162fe`](https://github.com/morluto/rea/commit/68162fe07f3511fa54cf202149987a9f03478919) fix(cancellation): keep caller reasons through export rollback and commit - [`f9e77ab`](https://github.com/morluto/rea/commit/f9e77abfdde065ccd7781a22ca439693df2394f5) fix(cancellation): bind export cancellations to cleanup and caller reasons - [`9241033`](https://github.com/morluto/rea/commit/924103383ebbf64351a2cf527bf4e6036015f751) fix(merge): reconcile cancellation cleanup with command deadlines ### 📊 Changes **21 files changed** (+611 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `src/adb/AdbProvider.ts` (+6 -4) 📝 `src/application/WebScriptExportService.ts` (+32 -2) 📝 `src/application/binary/BinarySession.ts` (+10 -0) 📝 `src/application/javascript/JavaScriptRecoveryService.test.ts` (+26 -0) 📝 `src/application/javascript/JavaScriptRecoveryService.ts` (+8 -4) 📝 `src/application/native/NativeValueTrace.test.ts` (+19 -0) 📝 `src/application/native/NativeValueTrace.ts` (+6 -0) 📝 `src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts` (+48 -1) 📝 `src/artifacts/apple/AppleAssetCatalogAnalysis.ts` (+1 -0) 📝 `src/browser/CdpObservationSession.ts` (+8 -0) 📝 `src/browser/assets/PublishWebScripts.ts` (+22 -5) 📝 `src/cli/reverseEngineeringCommands.ts` (+22 -5) 📝 `src/cli/webScriptCommands.ts` (+42 -38) 📝 `src/hopper/HopperRegexSearch.test.ts` (+42 -1) 📝 `src/hopper/HopperRegexSearch.ts` (+4 -0) 📝 `tests/boundary/browser/cdpObservationWindowScope.test.ts` (+21 -0) 📝 `tests/boundary/cli/reverseEngineeringCommands.test.ts` (+14 -0) 📝 `tests/boundary/cli/webScriptSelectionCli.test.ts` (+46 -1) 📝 `tests/boundary/filesystem/webScriptExport.test.ts` (+189 -0) 📝 `tests/boundary/providers/adb/adbBugreportPublication.test.ts` (+21 -0) _...and 1 more files_ </details> ### 📄 Description <!-- PR title: type(optional-scope): imperative outcome The title becomes the squash-merge commit subject and generated changelog entry. --> ## Summary Fixes #6042 Fixes #6043 Fixes #6048 Fixes #6049 Fixes #6057 Fixes #6060 Fixes #6078 Fixes #6080 Fixes #6108 Fixes #6111 Fixes #6115 When a caller aborts during final provider, cleanup, or protocol handling, several shared workflows and CLI handlers returned success, a cleanup-derived error, or an I/O error instead of cancellation. The expected contract is `AnalysisCancelledError` carrying the exact `signal.reason`, with completed partial Evidence or cleanup state retained. This PR makes each affected path sample the caller signal after its owner has settled. ## Problem and expected behavior Smallest triggers and violated invariants, one per issue: - #6042: abort inside the first output write surfaced the internal `ArtifactReaderFailure` as the cancellation cause instead of the caller reason. - #6043: a capture close that failed once and then succeeded on retry dropped a cancellation recorded during the close. - #6048: native value tracing returned `ok` and recorded Evidence when the signal aborted just before the final provider reply was consumed. - #6049: Hopper regex search returned `ok` when the signal aborted during the matching worker's termination await. - #6057: `assetutil` cancellation settled before the helper process exited, because `stopSignal` was not supplied. - #6060: an armed `observe_web_session` waited out its full window after a fatal CDP protocol failure. - #6078: a staging-removal failure after cancellation produced `AnalysisOutputError` instead of cancellation. - #6080: JavaScript recovery returned success after the caller aborted during final handle closure. - #6108: `export-web-scripts` ignored SIGINT, so a real interrupt left partial output without a structured result. - #6111: `inspect-with-objdump` and `execute-rizin-command` returned successful Evidence when SIGINT arrived during cleanup retry. - #6115: binary-switch cancellation was lost when retiring the previous client failed after abort. ## Change and scope Each fix is placed in the owning stage rather than at the CLI: - Web script export (`WebScriptExportService.ts`): `mapExportFailure` uses the exact `signal.reason` when the caught failure wraps it; `readCapture` consults `regularFileCancellation` for a successful retried close. - Native value tracing and Hopper regex search: a post-await signal check before `ok`. - Apple asset catalog: `stopSignal: "SIGTERM"` is passed to `execFileOutput`, matching its documented settle-after-exit contract. - CDP observation (`CdpObservationSession.ts`): `waitForWindow` also subscribes to `connection.onProtocolFailure` and rejects with the protocol error, releasing timers and listeners. - ADB bugreport (`AdbProvider.ts`): staging-removal failure prefers `AnalysisCancelledError` when the caller aborted. - JavaScript recovery: uses the shared `completeProviderEvidence` helper, the same completion check other providers use. - CLI (`webScriptCommands.ts`, `reverseEngineeringCommands.ts`): `export-web-scripts` runs under `withCommandCancellation` and passes the signal into the workflow; objdump and Rizin wrap their cleanup with the same late-cancellation rule as `finishAnalysisCommand.ts`. - Binary session (`BinarySession.ts`): a failed previous-client retirement after abort returns cancellation as the primary with the cleanup failure attached and the owner still pending. Intentionally not included: no change to the shared `ExecFileOutput` settlement contract, no other `execFileOutput` call sites, no ADB success-path change (the shared service already converts a successful removal to cancellation), and no change to the existing CLI completion check in `finishAnalysisCommand.ts`. Contribution scope: ordinary fixes within existing boundaries. No new provider or capability, and no change to target execution, injection, mutation, or protection handling. Not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: each owning workflow or provider (listed above); the CLI change is limited to forwarding the signal and projecting the already-typed cancellation. - Contribution scope fit and linked maintainer decision: not applicable (bug fixes within existing boundaries). - CLI and MCP/tool-catalog contract: `export-web-scripts` now exits 130 with `code: cancelled` on SIGINT; objdump and Rizin return `code: cancelled` when interrupted during cleanup. No schema or catalog change. - Provider, bridge, target-format, or platform compatibility: no change for successful runs. Asset catalog cancellation now waits for the `assetutil` child to exit; native `assetutil` signal behavior was not exercised. - Evidence, artifact, provenance, or reconstruction contract: late-cancelled results carry the completed Evidence as `partialObservation`; no successful Evidence is changed. - Target selection, authority, upstream behavior, and cleanup details: binary-session cleanup ownership is unchanged; the owner remains pending when retirement fails. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. (Web script export reads the caller-selected capture, as before.) - [x] Launch or attach to a process. (Existing asset catalog, Hopper, and objdump/Rizin paths are touched; no new launches are added.) - [ ] 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 or updated: one regression per issue in existing test files: `tests/boundary/filesystem/webScriptExport.test.ts` (#6042, #6043), `src/application/native/NativeValueTrace.test.ts` (#6048), `src/hopper/HopperRegexSearch.test.ts` (#6049), `src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts` (#6057), `tests/boundary/browser/cdpObservationWindowScope.test.ts` (#6060), `tests/boundary/providers/adb/adbBugreportPublication.test.ts` (#6078), `src/application/javascript/JavaScriptRecoveryService.test.ts` (#6080), `tests/boundary/cli/webScriptSelectionCli.test.ts` (#6108), `tests/boundary/cli/reverseEngineeringCommands.test.ts` (#6111), `tests/composition/analysis-sessions/binarySessionCleanupRetry.test.ts` (#6115). - Base reproduction or other evidence: with the ten fixed source files temporarily restored to `origin/main` (01788bac8) and the new tests kept, all 11 new tests failed, each on the asserted defect: wrong or missing cause, `cancelled` absent, 10,012 ms versus a 5,000 ms bound (#6060), and `exited` marker absent when cancellation settled (#6057). The fixed files were then restored and re-verified. This was a per-file revert of shared files, not per-hunk isolation; #6042 and #6043 share `WebScriptExportService.ts`. - User-visible CLI/MCP output (if applicable): not captured as transcripts. The `export-web-scripts` and objdump/Rizin results are covered by boundary tests that invoke the registered CLI handlers with a spied workflow or a simulated owned result; no real SIGINT was delivered to a built binary in this PR. - Remaining proof gaps: real Ghidra, IDA, Hopper, Frida, and browser (Chromium/Electron) providers were not run; the CDP peer is a simulated fake; `assetutil` was replaced by a Node subprocess; no real SIGINT was delivered to the built `export-web-scripts` CLI; the full test suite was not run. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [ ] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Merge-conflict resolution at `924103383` against `main` (`4e2816662`): preserves both late-cancellation handling and caller-selected command deadlines in the Rizin CLI handler. - `npm run test:focused` selecting the ten original regression files plus `tests/process-global/assetCatalogCancellationReason.test.ts` and `tests/boundary/cli/cliInputSchemaRequired.test.ts` — exit 0, 12 files, 143 tests passed; runtime build completed successfully. - `npm run check` — exit 0 (typecheck, lint, formatting, Knip, metadata, module boundaries, architecture guards). - Pre-push `npm run check:fast` — exit 0. - Full suite and real-provider workflows were not run for this merge resolution. Review follow-up at `f9e77abfd` (earlier bullets describe `68162fe07` and `6c4e287e6`): - `npm run test:focused -- tests/boundary/filesystem/webScriptExport.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts` — exit 0, 3 files, 51 tests passed. Adds a regression for a caller-owned AnalysisCancelledError reason. - `node scripts/run-typescript.mjs --noEmit` — exit 0. - `npx oxlint` on the changed files — 0 errors. - Not run: the full suite. Earlier follow-up at `68162fe07`: - `npm run test:focused -- tests/boundary/filesystem/webScriptExport.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts` — exit 0, 3 files, 50 tests passed. Adds regressions for rollback failure after an interrupted write and for abort during final commit. - `node scripts/run-typescript.mjs --noEmit` — exit 0. - `npx oxlint` on the changed files — 0 errors; style warnings only. - `npx oxfmt` on the changed files — formatted. - Not run: the full suite. Run in `rea-worktrees/cancel-late-cleanup` at commit `6c4e287e6` on base `01788bac8`: - `npm run build:cached` — 3 of 3 tasks successful (exit code not captured). Two CLI and worker-dependent tests failed before this build and passed after it. - `npx vitest run tests/boundary/filesystem/webScriptExport.test.ts src/application/native/NativeValueTrace.test.ts src/hopper/HopperRegexSearch.test.ts src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts tests/boundary/browser/cdpObservationWindowScope.test.ts tests/boundary/providers/adb/adbBugreportPublication.test.ts src/application/javascript/JavaScriptRecoveryService.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts tests/boundary/cli/reverseEngineeringCommands.test.ts tests/composition/analysis-sessions/binarySessionCleanupRetry.test.ts` — exit 0, 10 files and 130 tests passed. - Same vitest command with the fixed sources restored to `origin/main` — 10 of 10 files failed (exit code not captured); all 11 new tests failed on the asserted defect (see Evidence section). - `npm run typecheck` — exit 0. - `npx oxlint` on the 20 changed files — exit 0; warnings only, in six touched source files (AdbProvider 30, BinarySession 11, CdpObservationSession 3, NativeValueTrace 2, reverseEngineeringCommands 2, JavaScriptRecoveryService 1). Each file's count is identical to its `HEAD~1` version. - `npx oxfmt --check` on the 20 changed files — exit 0, all matched files formatted. - `git commit` pre-commit hook — passed. Not run: the full suite (`npm run check:pr`), real-provider workflows, and platform-specific tests. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Behavior change: late-cancelled commands now report `cancelled` (exit 130) instead of success or a cleanup error. - Real Hopper/Ghidra, browser, or OS coverage: none; see Remaining proof gaps. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no new process, network, or file access; asset catalog children now receive SIGTERM on cancellation and are awaited before settlement. ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: @agorevski <!-- @GitHub-handle --> - [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 <!-- Draft PRs may leave pending items unchecked. Resolve material scope and authority questions before integration. --> - [x] 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. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] 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:48 +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#7158
No description provided.