rea/tests/boundary/cli
吴佳浩Alben 641a8395ee
fix(cli): refuse a JavaScript integrity policy the binary analyze lane cannot honor (#2808)
* fix(cli): refuse an integrity policy the binary analyze lane cannot honor

`analyze` declares --integrity-policy for its JavaScript lane and forwards it
only there. On a binary target the flag was accepted and then dropped:
inspect_artifact-style integrity handling does not exist on this path, and
binary_overview is a strictObject with no input at all, so the request could
never take effect and the run proceeded as if the caller had not asked.

The same branch already refuses source_paths on a binary target with a typed
AnalysisInputError, and the sibling `inspect` command refuses the flag outright,
so the refusal is the established handling here. The policy option carries a
default, so the check keys off a value that differs from the owner schema's own
default rather than the flag's presence; otherwise every binary analyze would be
refused. The default is read from the schema instead of being restated.

Verified with 5 integrity policy CLI cases, check:fast and
verify:test-discovery (1023 files) on macOS arm64, and by running the built CLI
for the no-flag, explicit-default and record-and-continue cases. The regression
case failed with the command reaching the binary lane before the change.

* fix(cli): reject explicit default integrity policies for binaries

* fix(cli): keep an omitted integrity policy absent on the binary lane

`javascriptApplicationOptions.shape.integrityPolicy` fills an omission with its
default, and `.optional()` keeps reporting that parsed value, so
`options.integrityPolicy !== undefined` was true for every `analyze <target>`
call: ordinary binary analysis was rejected before the target was even read.

List `z.undefined()` first in a union so an omitted option stays absent while
the owner still validates a supplied value, and reapply the owner's metadata so
help and `--schema` keep describing the option.

Validation: tests/boundary/cli/javascriptIntegrityPolicyCli.test.ts reports
1 failed | 5 passed without this change (the case "still routes a binary
analyze target without an integrity policy" returned invalid_request for
integrity_policy instead of reaching the target) and 6 passed with it;
`npm run check:fast` passes on macOS 26.5.1 arm64 with Node.js 24.18.0.

* fix(cli): omit integrity defaults from binary option schema

* test(ci): isolate report fixtures and declare PowerPC Java bounds

---------

Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-14 07:28:00 +08:00
..
adbCli.test.ts fix(adb): preserve device paths and prevent destination collisions 2026-10-12 05:57:35 +08:00
analysisSelectorCli.test.ts fix(ghidra): resolve file offsets in decompile (#2101) 2026-10-13 18:23:17 +08:00
analysisViewCli.test.ts feat(analysis-view): report observed query parameter names (#2982) 2026-10-14 04:00:21 +08:00
androidCliCancellation.test.ts feat(android): integrate static APK analysis with headless JADX (#738) 2026-10-06 12:46:48 +00:00
apktoolBooleanOptions.test.ts fix(apktool): accept --no-strings CLI option (#2707) 2026-10-13 16:20:03 +08:00
apktoolCli.test.ts test(cli): consolidate schema coverage and assert input refusals 2026-10-12 05:24:33 +08:00
apktoolLocaleOption.test.ts fix(apktool): read the resource locale grammar from its owner (#2738) 2026-10-13 23:51:30 +08:00
browserCli.test.ts feat(browser): attach passive tools to browsers without HTTP discovery (#2346) 2026-10-14 00:36:37 +08:00
browserCompareJsonFiles.test.ts fix(browser): bound screenshot comparison memory 2026-10-11 11:11:38 +08:00
browserInputDiagnostics.test.ts fix(cli): retain correction details across adjacent browser commands (#2294) 2026-10-13 02:55:59 +08:00
browserRedirectShapeCompleteness.test.ts fix(cli): accept JSON files for web capture and screenshot comparisons (#1397) 2026-10-09 19:29:42 -07:00
captureCleanup.test.ts test: share repeated boundary preambles to restore the jscpd gate (#2691) 2026-10-13 23:47:55 +08:00
cliCompileCache.test.ts test(cli): cache subprocess compilation within each worker 2026-10-11 18:01:32 +08:00
cliInputSchemaRequired.test.ts fix(cli): reuse firmware and web module input constraints 2026-10-12 12:37:00 +08:00
cliLogLevelConfiguration.test.ts fix(cli): report an invalid REA_LOG_LEVEL as configuration (#2140) 2026-10-12 06:07:37 -07:00
cliOptionAliases.test.ts fix(cli): preserve native option descriptions in help 2026-10-11 06:41:46 +08:00
cliOutput.test.ts fix(cli): reject unterminated output filter slices (#2315) 2026-10-13 20:04:33 +08:00
cliServeHarness.ts fix(adb): share host configuration refusals with apktool (#1954) 2026-10-12 05:09:13 +08:00
cliSetup.test.ts fix(setup): honor config roots and display terminal dry-run plans 2026-10-13 03:22:53 +08:00
cliStartupImports.test.ts perf(cli): bundle runtime entries to reduce Windows startup I/O (#1996) 2026-10-12 09:25:27 +08:00
cliToolCoverage.test.ts refactor(catalog): import CLI metadata from its owner 2026-10-10 00:49:14 +08:00
clientProfileLifecycle.test.ts fix: repair the static-check failures on the default branch (#2895) 2026-10-14 00:31:27 +08:00
clientProfiles.test.ts fix(gemini): compare consolidated allowlists through one normalizer (#2495) 2026-10-14 06:43:03 +08:00
cutterCommands.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
developmentTests.test.ts perf(ci): start source feedback early and diagnose stalled runs (#3013) 2026-10-14 06:07:08 +08:00
dispatcher.test.ts fix(cli): preserve failure semantics across full-output formats 2026-10-13 03:33:27 +08:00
dylibResolutionCli.test.ts fix(artifacts): preserve Mach-O load-command string identity (#2110) 2026-10-14 06:38:32 +08:00
electronCli.test.ts refactor!: enforce canonical evidence and provider boundaries 2026-10-09 20:18:52 +08:00
electronWrappedCallPaths.test.ts fix(javascript): retain bridge conditions on IPC joins (#2747) 2026-10-14 06:39:27 +08:00
emptyHomeStartup.test.ts fix(cli): start on Windows when USERPROFILE is empty (#2345) 2026-10-13 23:53:35 +08:00
evidenceBundleCommands.test.ts fix(io): retain cleanup ownership and honor cancellation 2026-10-12 14:12:44 +08:00
flutterCli.test.ts feat(flutter): identify Dart snapshot builds and inspect AOT payloads by pure APK parsing (#1582) 2026-10-12 22:35:55 +08:00
fridaCli.test.ts fix(frida): name the argument each Frida input error rejects (#2217) 2026-10-12 23:00:59 +08:00
gdbStartupCleanupCli.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
hopperLaunchFailureCli.test.ts fix(hopper): recover provenance-verified Spotlight exits 2026-10-14 06:19:47 +08:00
httpCaptureComparison.test.ts test(web): cover nullable HTTP captures through CDP and CLI (#1834) 2026-10-13 21:44:08 +08:00
idaRetainedCleanupCli.test.ts fix(ida): retain cleanup facts and let one-shot commands exit (#2814) 2026-10-13 22:27:26 +08:00
javascriptApplicationJsonOutput.test.ts fix(javascript): trace wrapped Electron IPC paths in large bundles (#1874) 2026-10-12 09:28:59 +08:00
javascriptApplicationProgress.test.ts fix(artifacts)!: retain cleanup owners through client shutdown 2026-10-11 04:43:02 +08:00
javascriptArtifactBomRanges.test.ts fix(javascript): preserve original BOM source coordinates (#1093) 2026-10-09 00:09:55 +08:00
javascriptArtifactTypeScriptDialect.test.ts perf(tests): consolidate TypeScript dialect producer checks 2026-10-11 13:29:50 +08:00
javascriptBundlerRuntimeScopes.test.ts fix(javascript): retain runtime scope in bundled module relationships 2026-10-11 01:36:12 +08:00
javascriptBundlerSelfReferences.test.ts fix(javascript): omit self-referential static references with disclosure (#1157) 2026-10-09 10:01:59 +08:00
javascriptIntegrityPolicyCli.test.ts fix(cli): refuse a JavaScript integrity policy the binary analyze lane cannot honor (#2808) 2026-10-14 07:28:00 +08:00
javascriptRuntimeObservationCli.test.ts refactor(javascript): group domain semantics and contracts (#907) 2026-10-07 17:16:58 +08:00
javascriptSelfImportRelationships.test.ts fix(javascript): keep TypeScript substitution out of runtime paths 2026-10-12 01:41:23 +08:00
jebCli.test.ts fix(jeb): confine an invalid REA_JEB_MCP_URL to the JEB tools (#2145) 2026-10-12 06:49:15 -07:00
jsonInputSize.test.ts perf(evidence): fuse streamed JSON token handling (#1694) 2026-10-11 12:36:35 +08:00
jsonInputStatus.test.ts fix(cli): classify JSON input permission denials 2026-10-10 03:52:35 +08:00
jsonOutput.test.ts fix(cli)!: keep a selected JSON null in --filter-output output (#2333) 2026-10-13 20:43:20 +08:00
keyedArchivePrototypeKeyCli.test.ts fix(plist): decode formatted XML dictionary keys 2026-10-12 05:57:34 +08:00
keyedArchiveXmlNestingCli.test.ts fix(apple): preflight XML plist nesting before keyed archive decoding (#2161) 2026-10-12 23:12:10 +08:00
mcpDoctorHelpCli.test.ts refactor!: enforce canonical evidence and provider boundaries 2026-10-09 20:18:52 +08:00
nativeDemangleCli.test.ts test: strengthen public input and module lookup controls 2026-10-12 11:59:23 +08:00
nativeEfficiencyComparison.test.ts test(native): verify real PE and DOS entry views 2026-10-13 00:04:00 +08:00
nativeMachoEchoedPathCli.test.ts fix(native): keep lipo path echoes out of FAT records (#2605) 2026-10-13 21:16:49 +08:00
nativePlistCli.test.ts refactor: consolidate boundary semantics and prune redundant tests 2026-10-10 05:56:01 +08:00
nativePlistPrototypeKeyCli.test.ts fix(plist): read XML plists containing a __proto__ key 2026-10-06 23:58:59 -07:00
nativePlistSelectionFailureCli.test.ts fix(native): name the CLI flag that selects another plist 2026-10-09 09:32:24 +00:00
nativeSignatureCli.test.ts fix(native): preserve literal line breaks in signing identifiers (#2107) 2026-10-13 18:22:34 +08:00
nativeUiScenarioInputCli.test.ts fix(cli): refuse scenario steps on passive native UI observation (#2712) 2026-10-13 06:59:33 -07:00
packageRunnerRegistration.test.ts fix(setup): register a stable launcher when run through bunx (#1731) 2026-10-11 19:17:15 +08:00
pcapCli.test.ts fix(pcap): name the host tool to configure in capability refusals (#2507) 2026-10-13 13:29:09 +08:00
projectedErrorStatus.test.ts refactor!: simplify runtime tools and remove replay engines (#572) 2026-10-05 21:15:04 +08:00
rawBinaryCli.test.ts feat(ghidra): support raw NMOS 6502 analysis (#2079) 2026-10-13 21:13:01 +08:00
reconstructionObligationLedgerCli.test.ts refactor(mcp): simplify evidence and workflows 2026-09-29 13:58:26 +08:00
referenceSourceDirectoryImports.test.ts fix(reference): preserve directory intent when resolving source imports (#2770) 2026-10-13 20:06:19 +08:00
referenceSourceExclusions.test.ts fix(reference)!: preserve exclusion rule provenance 2026-10-11 04:15:26 +08:00
referenceSourceImportStatus.test.ts test(cli): align reference import failure envelopes 2026-10-13 04:24:34 +08:00
referenceSourceLegacyFacts.test.ts fix(reference): report sloppy scripts, PHP, C# and enclosing Git facts (#1770) 2026-10-13 05:52:27 +09:00
referenceSourceSummary.test.ts feat(cli): summarize committed reference-source inventories (#2768) 2026-10-14 00:37:54 +08:00
referenceSourceUtf8.test.ts fix(reference): report malformed UTF-8 before import parsing 2026-10-10 01:45:00 +08:00
reverseEngineeringCommands.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
scenarioCliInputDiagnostics.test.ts fix(electron): identify each unresolved scenario path (#2279) 2026-10-13 21:15:33 +08:00
signalCleanup.test.ts feat(signals): discover installed decoders and option help (#2487) 2026-10-13 15:58:19 +09:00
skillSync.test.ts fix(cli): disable unmanaged skill synchronization 2026-10-05 23:27:46 -07:00
webScriptSelectionCli.test.ts fix(files): reject nonregular capture and JSON inputs 2026-10-10 01:49:54 +08:00
workflowInputIdentities.test.ts fix(mcp): preserve JavaScript workflow identity validation (#1366) 2026-10-10 05:11:38 +08:00