Repository navigation
fix(cli): reject empty decompile-all targets - #7284
ducanhnguyen223 wants to merge 1 commit into
Conversation
[Low impact] The PR appears safe to merge; no actionable issues were found. Summary
Reviews (1) · Last reviewed commit: "fix(cli): reject empty decompile-all tar..." · Reviewed by Greptile |
|
TL;DR: I ran the PR's test file at draft head e14bbfd on Node 22, 24 and 26, and the new test passes with the fix and fails without it. CI and
The merge base is the commit where this branch left main. In the red run, On e14bbfd, CI and The head is 1,030 commits behind main b81da90. GitHub says the PR is mergeable, and its merge state is blocked. Not run
Test setup
Commandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/cli/decompileAllCli.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
Thank you for working on this. The issue it addresses, #7280, is already resolved on main: 25d3c72 (#9465): src/cli/decompileDirectoryCommand.ts:30 |
Summary
Fixes #7280 by rejecting an empty
decompile-alltarget before resolving it against the working directory.Problem and expected behavior
The CLI accepted
""as a target, which made path resolution select the current working directory. In the reported app-bundle case, REA analyzed the bundle executable and wrote pseudocode even though the caller supplied no path. Empty input should fail validation before resolution or export; an explicit.should continue to select the current directory.Change and scope
Use the existing
localPathStringSchemafor the command'spathargument. This rejects empty and NUL-containing local paths at the CLI boundary, before analysis or provider work. No provider, MCP, target-execution, or generated-metadata behavior changes.Evidence and regression coverage
decompile-all ""exited successfully in the reproducing setup.VALIDATION_ERRORand leaves the output directory absent; the explicit.control still exports0x1000.c.Validation performed
npm run test:focused -- tests/boundary/cli/decompileAllCli.test.ts— 2 tests passed.npm run check:fast— typecheck and lint passed.npm run format:check— passed.check:fast— passed.Author readiness
Human owner: @ducanhnguyen223
Before merge
type(scope): outcome.