[GH-ISSUE #4717] [Bug] Flutter cancellation during successful snapshot cleanup loses completed observations #2462

Closed
opened 2026-10-17 21:05:05 +00:00 by bsakaguchi · 2 comments
Owner

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

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Evidence, artifacts, or reconstruction

Observed behavior

identify-flutter-build and inspect-dart-aot return typed cancellation without their completed inspection facts when SIGINT arrives during successful first snapshot-root cleanup. On each tested build, each command reproduced this in three out of three controlled interruptions through the public CLI launcher. Every interrupted process exited 130 and returned cancelled with cleanup: "complete", but omitted details.partial_observation. Each command's initial control and subsequent retry returned successful Evidence for the same input. The cancellation classification itself is correct.

Reproduction

  1. Prepare the source revision listed below with its pinned toolchain, npm ci and npm run build:cached. From the checkout root, create a disposable working directory and this small APK from the repository's authored inert AOT fixture. No target code runs.
REA_ROOT="$PWD"
NODE="$(command -v node)"
work="$(mktemp -d)"
mkdir -p "$work/fixture-home"
cat > "$work/create-fixture.mjs" <<'JS'
import { pathToFileURL } from 'node:url';
import { createRequire } from 'node:module';
import { writeFile } from 'node:fs/promises';
const root=process.cwd(), require=createRequire(`${root}/package.json`);
const { aotFixtureImage }=await import(pathToFileURL(`${root}/src/flutter/FlutterBuild.fixture.ts`));
const { ZipWriter, Uint8ArrayReader, Uint8ArrayWriter }=await import(pathToFileURL(require.resolve('@zip.js/zip.js')));
const writer=new ZipWriter(new Uint8ArrayWriter(),{useWebWorkers:false});
await writer.add('lib/arm64-v8a/libapp.so',new Uint8ArrayReader(aotFixtureImage()));
await writeFile(process.argv[2],await writer.close());
JS
env -i HOME="$work/fixture-home" PATH="$(dirname "$NODE"):/usr/bin:/bin" \
  "$NODE" "$work/create-fixture.mjs" "$work/sample.apk"
  1. Save this cleanup timing hook. It intercepts only Flutter snapshot roots directly under the invocation's isolated temporary directory. It waits for actual SIGINT delivery before continuing real filesystem removal. It does not replace provider results or fabricate an abort signal.
cat > "$work/cleanup-hook.mjs" <<'JS'
import fs from 'node:fs/promises';
import assert from 'node:assert/strict';
import { basename, dirname, resolve } from 'node:path';
import { syncBuiltinESMExports } from 'node:module';
const remove=fs.rm;
fs.rm=async function(path,options) {
  if (dirname(resolve(String(path)))!==resolve(process.env.TMPDIR) || !basename(String(path)).startsWith('rea-flutter-')) return remove.call(this,path,options);
  process.stderr.write('cleanup-enter\n');
  if (process.env.INTERRUPT_CLEANUP==='1') {
    assert(process.listenerCount('SIGINT')>0);
    await new Promise((done,reject)=>{
      const timeout=setTimeout(()=>reject(new Error('SIGINT not delivered')),2000);
      process.once('SIGINT',()=>{clearTimeout(timeout);done();});
      process.kill(process.pid,'SIGINT');
    });
    process.stderr.write('sigint-delivered\n');
  }
  await remove.call(this,path,options);
  await assert.rejects(fs.access(path),{code:'ENOENT'});
  process.stderr.write('cleanup-removed\n');
};
syncBuiltinESMExports();
JS
  1. Run both commands with controls, three interruptions and a retry. Keep shell errexit disabled for the expected interrupt statuses. The observed verification used a Python subprocess runner with captured stdout/stderr and a 30-second timeout per invocation; this shell loop expresses the same public invocations.
for command in identify-flutter-build inspect-dart-aot; do
  for mode in control interrupt-1 interrupt-2 interrupt-3 retry; do
    case_root="$work/$command-$mode"
    mkdir -p "$case_root/home" "$case_root/tmp"
    interrupt=0
    case "$mode" in interrupt-*) interrupt=1 ;; esac
    env -i PATH="$(dirname "$NODE"):/usr/bin:/bin" \
      HOME="$case_root/home" TMPDIR="$case_root/tmp" \
      INTERRUPT_CLEANUP="$interrupt" \
      "$NODE" --import "$work/cleanup-hook.mjs" \
      "$REA_ROOT/scripts/rea.mjs" "$command" "$work/sample.apk" \
      --json --full-output > "$case_root/stdout.json" 2> "$case_root/stderr.txt"
    printf '%s %s exit=%s\n' "$command" "$mode" "$?"
  done
done
  1. Observe that all six interrupted responses for that build omit partial observations. All ten invocations for that build print cleanup-enter and cleanup-removed; interrupted invocations also print sigint-delivered. Every invocation-specific temporary directory is empty after settlement. There is no injected removal failure or cleanup retry in the failing case.

  2. Install the published package separately and repeat step 3 with the same APK and timing hook, separate case directories, and REA_ROOT pointing to the installed package root. The source checkout supplies the authored fixture for both builds. This verification ran twenty invocations in total, including twelve interruptions.

npm install --prefix "$work/release-runtime" --no-audit --no-fund rea-agents@6.5.0
REA_ROOT="$work/release-runtime/node_modules/rea-agents"
# Repeat step 3, using case_root="$work/release-$command-$mode".

Expected behavior

Continue to report typed cancellation when SIGINT arrives before the response, and retain completed inspection facts under details.partial_observation. The lifecycle contract requires cancellation checks after awaited cleanup and retention of collected observations. Flutter explicitly checks cancellation after cleanup. Completion of parsing does not establish an earlier cancellation cutoff or justify returning ordinary success.

Impact and scope

The interrupted response loses already-computed target and library identity, snapshot hashes and ABI facts; AOT inspection also loses snapshot sections and string-pool observations. The source APK is unchanged and successful retries recover these facts. The timing hook produced the failure in 3/3 interruptions per command per build; natural incidence is unmeasured. Runtime verification covers both public CLI commands on Darwin arm64. The shared provider/service also backs MCP, but MCP cancellation delivery was not exercised and no delivery to an already-cancelled client is claimed.

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: A bounded late-interruption case discards completed inspection facts in twelve public CLI outcomes, while controls and retries succeed and input bytes remain available.
  • Workaround status: available
  • Workaround basis: Rerunning each same offline inspection without SIGINT returned successful Evidence after its three interrupted attempts.

REA version

Fresh main source build at 8a2a1a2b8b, package version 6.5.0. Separately installed published npm package rea-agents@6.5.0, confirmed as both the registry latest and the latest GitHub release rea-agents-6.5.0. Both launchers printed 6.5.0 for --version.

Runtime and platform

Node v24.18.0; npm 11.16.0; macOS 27.0.1, arm64. Every invocation used a fresh isolated HOME and TMPDIR with client configuration overrides absent. No external engine was needed.

Target and artifact context

An authored APK with one lib/arm64-v8a/libapp.so entry built from the repository's synthetic ELF64 fixture. Its library is 9744 bytes and carries four snapshot symbols, two agreeing snapshot headers with hash 65817c30a78bb44c3dc3771876b6010a, and an inert URI/token pool. Identification correctly reports partial coverage because libflutter.so is absent; AOT inspection reports complete structural and pool coverage in the controls. The provider only parses these bytes.

Interface

CLI

Earliest failure stage

Cleanup, cancellation, or lifecycle

Relevant output or evidence

  • Expected source: The tested main revision's lifecycle contract requires retained observations under typed cancellation. Its docs/testing.md:214-237 explicitly includes temporary-root removal and provider-boundary retention; docs/flutter-analysis.md:121-131 explicitly checks cancellation after cleanup. The release changelog also promises completed Evidence and partial-observation retention when analysis or cleanup fails.
  • Failure source: src/flutter/FlutterBuildProvider.ts:600-625. Successful execution is assigned before awaited cleanup; the final cancellation error omits the completed observation.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

The public launcher command in step 3 returned the following relevant fields in each interrupted identification response and exited 130. AOT responses matched apart from their operation name.

{
  "ok": false,
  "error": {
    "code": "cancelled",
    "category": "cancelled",
    "details": {
      "operation": "identify_flutter_build",
      "cleanup": "complete"
    }
  }
}

partial_observation is absent. The real removal hook checked ENOENT after each successful removal. All twenty invocation-specific temporary directories were empty. Both commands' controls and retries returned the expected hash from two snapshot records; AOT controls also returned all four sections, two package URIs, two Dart URIs and two identifier tokens.

  • Shared workflow evidence: src/application/ProviderOperationExecution.ts:57 returns provider errors before Evidence assembly; its successful-return path retains Evidence on a late abort at lines 82-91. The provider's thinner error bypasses that retention.
  • Existing regression scope: tests/boundary/filesystem/flutterBuildProvider.test.ts:327 already requires cancellation during final Flutter cleanup, but asserts classification without requiring retained facts.

Typed outcome or recovery expected

With the same scoped interruption, retain exit 130, cancelled and actual completed cleanup, while including the completed Flutter observation under details.partial_observation with its target identity, normalized facts, provenance and original coverage limitations. The identical noninterrupted controls must remain successful. Returning ordinary success or suppressing cancellation would not restore the contract. No stored or already-published Evidence deletion is alleged.

Analysis or suspected cause

Source-derived reasoning: the provider replaces its completed AnalysisExecution with a new cancellation error after owned cleanup. Because that error carries no partial observation, the shared service returns it before it can assemble the corresponding Evidence. The public reproduction preserves the real parser, provider, service, signal handler, removal and output projection; only removal timing is controlled.

Additional context

Issue #4640 concerns success-shaped Flutter JSON after SIGINT during a later cleanup retry, following a first removal failure. This reproduction uses successful first cleanup and correctly reports cancellation but loses facts. Issue #4683 concerns analogous EVM observation loss, not Flutter. Its owner comment describes a source repair and explicitly leaves supported-host/public-SIGINT verification outstanding. Issue existence alone is not evidence of maintainer acceptance; the expectation here follows the pinned repository's lifecycle and Flutter contracts. All-state issue/PR searches for Flutter cleanup, cancellation and SIGINT found these related reports and no same Flutter successful-first-cleanup observation-loss report.

Originally created by @coygeek on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4717 ### Before submitting - [X] I searched the open and closed issues for a related report. - [X] I removed credentials, tokens, private paths, and sensitive target data. ### Area Evidence, artifacts, or reconstruction ### Observed behavior `identify-flutter-build` and `inspect-dart-aot` return typed cancellation without their completed inspection facts when SIGINT arrives during successful first snapshot-root cleanup. On each tested build, each command reproduced this in three out of three controlled interruptions through the public CLI launcher. Every interrupted process exited 130 and returned `cancelled` with `cleanup: "complete"`, but omitted `details.partial_observation`. Each command's initial control and subsequent retry returned successful Evidence for the same input. The cancellation classification itself is correct. ### Reproduction 1. Prepare the source revision listed below with its pinned toolchain, `npm ci` and `npm run build:cached`. From the checkout root, create a disposable working directory and this small APK from the repository's authored inert AOT fixture. No target code runs. ```sh REA_ROOT="$PWD" NODE="$(command -v node)" work="$(mktemp -d)" mkdir -p "$work/fixture-home" cat > "$work/create-fixture.mjs" <<'JS' import { pathToFileURL } from 'node:url'; import { createRequire } from 'node:module'; import { writeFile } from 'node:fs/promises'; const root=process.cwd(), require=createRequire(`${root}/package.json`); const { aotFixtureImage }=await import(pathToFileURL(`${root}/src/flutter/FlutterBuild.fixture.ts`)); const { ZipWriter, Uint8ArrayReader, Uint8ArrayWriter }=await import(pathToFileURL(require.resolve('@zip.js/zip.js'))); const writer=new ZipWriter(new Uint8ArrayWriter(),{useWebWorkers:false}); await writer.add('lib/arm64-v8a/libapp.so',new Uint8ArrayReader(aotFixtureImage())); await writeFile(process.argv[2],await writer.close()); JS env -i HOME="$work/fixture-home" PATH="$(dirname "$NODE"):/usr/bin:/bin" \ "$NODE" "$work/create-fixture.mjs" "$work/sample.apk" ``` 2. Save this cleanup timing hook. It intercepts only Flutter snapshot roots directly under the invocation's isolated temporary directory. It waits for actual SIGINT delivery before continuing real filesystem removal. It does not replace provider results or fabricate an abort signal. ```sh cat > "$work/cleanup-hook.mjs" <<'JS' import fs from 'node:fs/promises'; import assert from 'node:assert/strict'; import { basename, dirname, resolve } from 'node:path'; import { syncBuiltinESMExports } from 'node:module'; const remove=fs.rm; fs.rm=async function(path,options) { if (dirname(resolve(String(path)))!==resolve(process.env.TMPDIR) || !basename(String(path)).startsWith('rea-flutter-')) return remove.call(this,path,options); process.stderr.write('cleanup-enter\n'); if (process.env.INTERRUPT_CLEANUP==='1') { assert(process.listenerCount('SIGINT')>0); await new Promise((done,reject)=>{ const timeout=setTimeout(()=>reject(new Error('SIGINT not delivered')),2000); process.once('SIGINT',()=>{clearTimeout(timeout);done();}); process.kill(process.pid,'SIGINT'); }); process.stderr.write('sigint-delivered\n'); } await remove.call(this,path,options); await assert.rejects(fs.access(path),{code:'ENOENT'}); process.stderr.write('cleanup-removed\n'); }; syncBuiltinESMExports(); JS ``` 3. Run both commands with controls, three interruptions and a retry. Keep shell `errexit` disabled for the expected interrupt statuses. The observed verification used a Python subprocess runner with captured stdout/stderr and a 30-second timeout per invocation; this shell loop expresses the same public invocations. ```sh for command in identify-flutter-build inspect-dart-aot; do for mode in control interrupt-1 interrupt-2 interrupt-3 retry; do case_root="$work/$command-$mode" mkdir -p "$case_root/home" "$case_root/tmp" interrupt=0 case "$mode" in interrupt-*) interrupt=1 ;; esac env -i PATH="$(dirname "$NODE"):/usr/bin:/bin" \ HOME="$case_root/home" TMPDIR="$case_root/tmp" \ INTERRUPT_CLEANUP="$interrupt" \ "$NODE" --import "$work/cleanup-hook.mjs" \ "$REA_ROOT/scripts/rea.mjs" "$command" "$work/sample.apk" \ --json --full-output > "$case_root/stdout.json" 2> "$case_root/stderr.txt" printf '%s %s exit=%s\n' "$command" "$mode" "$?" done done ``` 4. Observe that all six interrupted responses for that build omit partial observations. All ten invocations for that build print `cleanup-enter` and `cleanup-removed`; interrupted invocations also print `sigint-delivered`. Every invocation-specific temporary directory is empty after settlement. There is no injected removal failure or cleanup retry in the failing case. 5. Install the published package separately and repeat step 3 with the same APK and timing hook, separate case directories, and `REA_ROOT` pointing to the installed package root. The source checkout supplies the authored fixture for both builds. This verification ran twenty invocations in total, including twelve interruptions. ```sh npm install --prefix "$work/release-runtime" --no-audit --no-fund rea-agents@6.5.0 REA_ROOT="$work/release-runtime/node_modules/rea-agents" # Repeat step 3, using case_root="$work/release-$command-$mode". ``` ### Expected behavior Continue to report typed cancellation when SIGINT arrives before the response, and retain completed inspection facts under `details.partial_observation`. The lifecycle contract requires cancellation checks after awaited cleanup and retention of collected observations. Flutter explicitly checks cancellation after cleanup. Completion of parsing does not establish an earlier cancellation cutoff or justify returning ordinary success. ### Impact and scope The interrupted response loses already-computed target and library identity, snapshot hashes and ABI facts; AOT inspection also loses snapshot sections and string-pool observations. The source APK is unchanged and successful retries recover these facts. The timing hook produced the failure in 3/3 interruptions per command per build; natural incidence is unmeasured. Runtime verification covers both public CLI commands on Darwin arm64. The shared provider/service also backs MCP, but MCP cancellation delivery was not exercised and no delivery to an already-cancelled client is claimed. - Impact level: P2 - Assessment status: supported - Impact basis: A bounded late-interruption case discards completed inspection facts in twelve public CLI outcomes, while controls and retries succeed and input bytes remain available. - Workaround status: available - Workaround basis: Rerunning each same offline inspection without SIGINT returned successful Evidence after its three interrupted attempts. ### REA version Fresh `main` source build at 8a2a1a2b8bc698f960ab9f766f8e0722124365c4, package version 6.5.0. Separately installed published npm package `rea-agents@6.5.0`, confirmed as both the registry latest and the latest GitHub release `rea-agents-6.5.0`. Both launchers printed `6.5.0` for `--version`. ### Runtime and platform Node v24.18.0; npm 11.16.0; macOS 27.0.1, arm64. Every invocation used a fresh isolated HOME and TMPDIR with client configuration overrides absent. No external engine was needed. ### Target and artifact context An authored APK with one `lib/arm64-v8a/libapp.so` entry built from the repository's synthetic ELF64 fixture. Its library is 9744 bytes and carries four snapshot symbols, two agreeing snapshot headers with hash `65817c30a78bb44c3dc3771876b6010a`, and an inert URI/token pool. Identification correctly reports partial coverage because `libflutter.so` is absent; AOT inspection reports complete structural and pool coverage in the controls. The provider only parses these bytes. ### Interface CLI ### Earliest failure stage Cleanup, cancellation, or lifecycle ### Relevant output or evidence - Expected source: The tested main revision's [lifecycle contract](https://github.com/morluto/rea/blob/8a2a1a2b8bc698f960ab9f766f8e0722124365c4/docs/tool-design.md#own-the-lifecycle) requires retained observations under typed cancellation. Its docs/testing.md:214-237 explicitly includes temporary-root removal and provider-boundary retention; docs/flutter-analysis.md:121-131 explicitly checks cancellation after cleanup. The [release changelog](https://github.com/morluto/rea/blob/rea-agents-6.5.0/CHANGELOG.md#highlights) also promises completed Evidence and partial-observation retention when analysis or cleanup fails. - Failure source: src/flutter/FlutterBuildProvider.ts:600-625. Successful execution is assigned before awaited cleanup; the final cancellation error omits the completed observation. - Evidence provenance: observed - Local verification: reproduced - Reproduction completeness: complete The public launcher command in step 3 returned the following relevant fields in each interrupted identification response and exited 130. AOT responses matched apart from their operation name. ```json { "ok": false, "error": { "code": "cancelled", "category": "cancelled", "details": { "operation": "identify_flutter_build", "cleanup": "complete" } } } ``` `partial_observation` is absent. The real removal hook checked ENOENT after each successful removal. All twenty invocation-specific temporary directories were empty. Both commands' controls and retries returned the expected hash from two snapshot records; AOT controls also returned all four sections, two package URIs, two Dart URIs and two identifier tokens. - Shared workflow evidence: src/application/ProviderOperationExecution.ts:57 returns provider errors before Evidence assembly; its successful-return path retains Evidence on a late abort at lines 82-91. The provider's thinner error bypasses that retention. - Existing regression scope: tests/boundary/filesystem/flutterBuildProvider.test.ts:327 already requires cancellation during final Flutter cleanup, but asserts classification without requiring retained facts. ### Typed outcome or recovery expected With the same scoped interruption, retain exit 130, `cancelled` and actual completed cleanup, while including the completed Flutter observation under `details.partial_observation` with its target identity, normalized facts, provenance and original coverage limitations. The identical noninterrupted controls must remain successful. Returning ordinary success or suppressing cancellation would not restore the contract. No stored or already-published Evidence deletion is alleged. ### Analysis or suspected cause Source-derived reasoning: the provider replaces its completed `AnalysisExecution` with a new cancellation error after owned cleanup. Because that error carries no partial observation, the shared service returns it before it can assemble the corresponding Evidence. The public reproduction preserves the real parser, provider, service, signal handler, removal and output projection; only removal timing is controlled. ### Additional context [Issue #4640](https://github.com/morluto/rea/issues/4640) concerns success-shaped Flutter JSON after SIGINT during a later cleanup retry, following a first removal failure. This reproduction uses successful first cleanup and correctly reports cancellation but loses facts. [Issue #4683](https://github.com/morluto/rea/issues/4683) concerns analogous EVM observation loss, not Flutter. Its owner comment describes a source repair and explicitly leaves supported-host/public-SIGINT verification outstanding. Issue existence alone is not evidence of maintainer acceptance; the expectation here follows the pinned repository's lifecycle and Flutter contracts. All-state issue/PR searches for Flutter cleanup, cancellation and SIGINT found these related reports and no same Flutter successful-first-cleanup observation-loss report.
Author
Owner

@xu91102 commented on GitHub (Oct 17, 2026):

Independently reproduced on fresh main 509d4c8f56b0e5f65346259b2aeccbb5a8e9ba72 using the pinned Node 24.18.0 toolchain on macOS arm64 and the real compiled public CLI. Both identify-flutter-build and inspect-dart-aot completed their controls and retries successfully. Each command then reproduced twice with actual SIGINT delivery synchronized to the first snapshot-root removal: exit 130, typed cancelled, cleanup complete, but no details.partial_observation (4/4 interrupted calls). All eight invocation temp directories were empty afterward; the generated inert APK retained its original SHA-256.

The hook waits for real SIGINT delivery and performs/awaits the real successful filesystem removal; it does not substitute an operation result or inject a removal failure. No Flutter target code or engine runs. The first local probe incorrectly expected a bare Evidence document under --full-output; correcting its envelope parser exposed the results above. That harness assertion is not a product failure.

Source inspection shows the provider has already collected an AnalysisExecution, then its unconditional post-cleanup cancellation branch replaces it with an empty cancellation error before the shared CLI/MCP Evidence assembly can retain it. The correction should keep typed cancellation and the exact caller reason, preserve completed facts, and keep an existing primary or failed-cleanup outcome ahead of a later abort. The open snapshot-layout PR #3662 changes symbol selection, not this finalization branch. No upstream PR or CI is claimed; MCP cancellation delivery, Windows/Linux and real Flutter applications are not yet tested here.

The reviewed correction is now normally committed and pushed to my fork: a389379. Success and retained cancellation reuse one Evidence composer; existing parsing failures remain primary. New producer controls verify the exact caller reason, complete control-Evidence equality, and the same failed snapshot root through cleanup retry. Failed-cleanup classification is verified through the one-shot CLI finalizer; MCP cancellation delivery remains unverified.

Final affected coverage is 15 focused files /252 PASS plus5 fresh README checks (16 distinct files /257 PASS, no skips), with check/docs/discovery and independent Standards/Spec review passed. A deterministic, byte-identical APK now backs both baseline and fixed CLI matrices: baseline4/4 synchronized SIGINT interruptions lost completed facts; fixed4/4 retain the exact same-command control Evidence and exit130 after real cleanup. Normal controls and retries succeed. The earlier variable ZIP timestamp and envelope-parser harness attempts remain separate records.

Also executed the repository's matching verify:flutter lane on the official Gallery2.9.2 APK (117817550bytes; SHA-256659b5fc6a4319dfe4f117d00ad4e7ec004915ebcadcb96628797fb3544040e29), using its pinned expectations. Actual CLI/official stdio MCP parity, three ABI structural checks, exact engine labels and URI counts passed, and the input stayed unchanged. Full string-pool projections remain bounded/partial; the APK was not executed. This Gallery lane did not inject cancellation. Windows/Linux, optional plain-APK lane, live app execution and performance are unverified.

No upstream PR or upstream CI was created. The prepared branch and its validation are retained while the prior ordinary upstream creation restriction remains unresolved; no duplicate creation attempt was made.

<!-- gh-comment-id:6231384268 --> @xu91102 commented on GitHub (Oct 17, 2026): Independently reproduced on fresh main `509d4c8f56b0e5f65346259b2aeccbb5a8e9ba72` using the pinned Node 24.18.0 toolchain on macOS arm64 and the real compiled public CLI. Both `identify-flutter-build` and `inspect-dart-aot` completed their controls and retries successfully. Each command then reproduced twice with actual SIGINT delivery synchronized to the first snapshot-root removal: exit 130, typed `cancelled`, cleanup complete, but no `details.partial_observation` (4/4 interrupted calls). All eight invocation temp directories were empty afterward; the generated inert APK retained its original SHA-256. The hook waits for real SIGINT delivery and performs/awaits the real successful filesystem removal; it does not substitute an operation result or inject a removal failure. No Flutter target code or engine runs. The first local probe incorrectly expected a bare Evidence document under `--full-output`; correcting its envelope parser exposed the results above. That harness assertion is not a product failure. Source inspection shows the provider has already collected an `AnalysisExecution`, then its unconditional post-cleanup cancellation branch replaces it with an empty cancellation error before the shared CLI/MCP Evidence assembly can retain it. The correction should keep typed cancellation and the exact caller reason, preserve completed facts, and keep an existing primary or failed-cleanup outcome ahead of a later abort. The open snapshot-layout PR #3662 changes symbol selection, not this finalization branch. No upstream PR or CI is claimed; MCP cancellation delivery, Windows/Linux and real Flutter applications are not yet tested here. The reviewed correction is now normally committed and pushed to my fork: [a389379](https://github.com/xu91102/rea/commit/a3893791c6e169afbf24e67b467be5d17bcc9493). Success and retained cancellation reuse one Evidence composer; existing parsing failures remain primary. New producer controls verify the exact caller reason, complete control-Evidence equality, and the same failed snapshot root through cleanup retry. Failed-cleanup classification is verified through the one-shot CLI finalizer; MCP cancellation delivery remains unverified. Final affected coverage is 15 focused files /252 PASS plus5 fresh README checks (16 distinct files /257 PASS, no skips), with check/docs/discovery and independent Standards/Spec review passed. A deterministic, byte-identical APK now backs both baseline and fixed CLI matrices: baseline4/4 synchronized SIGINT interruptions lost completed facts; fixed4/4 retain the exact same-command control Evidence and exit130 after real cleanup. Normal controls and retries succeed. The earlier variable ZIP timestamp and envelope-parser harness attempts remain separate records. Also executed the repository's matching `verify:flutter` lane on the official Gallery2.9.2 APK (117817550bytes; SHA-256659b5fc6a4319dfe4f117d00ad4e7ec004915ebcadcb96628797fb3544040e29), using its pinned expectations. Actual CLI/official stdio MCP parity, three ABI structural checks, exact engine labels and URI counts passed, and the input stayed unchanged. Full string-pool projections remain bounded/partial; the APK was not executed. This Gallery lane did not inject cancellation. Windows/Linux, optional plain-APK lane, live app execution and performance are unverified. No upstream PR or upstream CI was created. The prepared branch and its validation are retained while the prior ordinary upstream creation restriction remains unresolved; no duplicate creation attempt was made.
Author
Owner

@XinwangTao commented on GitHub (Oct 17, 2026):

Thanks for the detailed repro — the 3/3 controlled-interruption rate makes this easy to confirm. The notable part is that the cancellation classification is correct while the already-completed inspection facts are dropped during snapshot-root cleanup; that suggests the cleanup path treats the whole pipeline as aborted instead of flushing what was already computed. Since the control run succeeds on the same input, the facts clearly exist — they are just not returned when SIGINT races with cleanup. Keeping details.partial_observation populated for cancelled runs (as this report notes) would let downstream tooling distinguish "never computed" from "computed but discarded", which seems the right contract to preserve.

<!-- gh-comment-id:6231587631 --> @XinwangTao commented on GitHub (Oct 17, 2026): Thanks for the detailed repro — the 3/3 controlled-interruption rate makes this easy to confirm. The notable part is that the cancellation classification is correct while the already-completed inspection facts are dropped during snapshot-root cleanup; that suggests the cleanup path treats the whole pipeline as aborted instead of flushing what was already computed. Since the control run succeeds on the same input, the facts clearly exist — they are just not returned when SIGINT races with cleanup. Keeping `details.partial_observation` populated for cancelled runs (as this report notes) would let downstream tooling distinguish "never computed" from "computed but discarded", which seems the right contract to preserve.
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#2462
No description provided.