Repository navigation
fix(cli): cancel routed JavaScript analysis in rea analyze - #1156
Merged
Merged
Conversation
`rea analyze PATH` routes a JavaScript directory or ASAR to the same static analysis as `rea analyze-javascript-application`, but it passed no signal and was not wrapped in withCommandCancellation. On SIGINT the process was killed with no output (signal SIGINT, empty stdout). The dedicated command returns a typed `cancelled` result and exits 130. The #1098 review raised this route. Decide the route first. A JavaScript target now runs exactly like the dedicated command: cancellation wraps logging, so the cancelled exit code is not replaced by the logged failure status. The binary route is unchanged and keeps its own SIGINT handling in runDirectAnalysis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 9, 2026
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
) `rea analyze PATH` routes a JavaScript directory or ASAR to the same static analysis as `rea analyze-javascript-application`, but it passed no signal and was not wrapped in withCommandCancellation. On SIGINT the process was killed with no output (signal SIGINT, empty stdout). The dedicated command returns a typed `cancelled` result and exits 130. The morluto#1098 review raised this route. Decide the route first. A JavaScript target now runs exactly like the dedicated command: cancellation wraps logging, so the cancelled exit code is not replaced by the logged failure status. The binary route is unchanged and keeps its own SIGINT handling in runDirectAnalysis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
rea analyze PATHroutes a JavaScript directory or.asar(with no--provider,--snapshotor--target-format) to the same static analysis asrea analyze-javascript-application. That route passed noAbortSignaland was not wrapped inwithCommandCancellation. The #1098 review raised this ("Propagate cancellation through the routed analyze command"), and it was still unaddressed onmain.I reproduced it by sending SIGINT at the first
rea_progressline, the same scenario asjavascriptCancellationCli.test.ts:rea analyze-javascript-application <dir> --json{"code":"cancelled",…}rea analyze <dir> --json(before)SIGINTrea analyze <dir> --json(after){"code":"cancelled",…}Change
analyzecommand now picks its route before running. The routing condition is unchanged, moved intoroutesToJavaScriptAnalysis.withCommandCancellationwrapslogCliCommand, so the cancelled exit code 130 is not replaced by the logged failure status of 1, which would happen if the wrapping were reversed.runDirectAnalysis.Verification
tests/acceptance/applications/javascriptCancellationCli.test.tsnow runs the SIGINT case through bothanalyze-javascript-applicationandanalyze. Theanalyzecase fails onmain.analyzecommand,coreBinaryCommandsoranalyze-javascript-application: 72 passed.npm run check:fastrea analyze <js-dir>without SIGINT still returns the analysis Evidence, andrea analyze /bin/lsstill takes the provider route.No real Hopper or Ghidra verification was run. The binary route those providers use is unchanged.
🤖 Generated with Claude Code