Commit Graph
1113 Commits
Author SHA1 Message Date
morluto c4fa5b475c fix(cli)!: accept only the documented kebab-case option spelling (#14204)
* fix(cli)!: accept only the documented kebab-case option spelling

REA's argv parser kept incur's second spelling of every option: the
camelCase schema key (`--maxRows`) bound like the documented
`--max-rows`, although help, completion and manifests list only the
kebab-case form. That hidden alias let wrong spellings survive in the
guides.

The parser now binds only the documented flag. A schema key spelling,
including its `--no-` negation, fails as a typed `flag_spelling`
failure rendered as PARSE_ERROR that names the documented flag:
"Unknown flag: --maxRows. Did you mean --max-rows?". Completion no
longer resolves camelCase option names. The sensitive-value scan still
treats `--sensitiveValue` as a declaration so its value stays redacted
from the refusal.

Guides, the inspect-api-contract option description and tests now use
the kebab-case flags.

BREAKING CHANGE: camelCase option spellings such as `--maxRows` or
`--dryRun` are refused; use the kebab-case flag that `--help` lists.

* test(cli): exercise invalid dry-run values with the documented flag spelling

The invalid dry-run cases in strictPositionals and cliSetup appended
--dryRun=false as a later valid override. The parser now refuses that
schema key spelling before it validates the dry-run value, so each case
failed on flag spelling and never checked that a later override cannot
hide an earlier invalid value. The override is now --dry-run=false, and
each case asserts the dry-run failure message, so a spelling refusal can
no longer satisfy it.

The --dryRun=abc case in cliSetup's malformed-value list is removed: it
was the --dry-run=abc case under a spelling the parser now refuses
before reading the value, and argvParser.test.ts owns that refusal.

* test(cli): keep one public case for the flag spelling refusal

cliOptionAliases repeated argvParser's three token shapes (bare, inline
value, negation) through the full CLI. The parser test owns those shapes
and asserts the structured flag_spelling failure with its flag and
documented spelling; the CLI keeps one case for the documented
PARSE_ERROR projection, whose message is part of the CLI contract.

The camel-case sensitive-value case also dropped its trailing
--no-<literal> token: the spelling refusal stops parsing before it, so
the token no longer exercised anything.
2026-11-23 19:36:23 -05:00
morluto e39b56fc5d fix(tests): narrow markdown-it attributes to strings in doc link checks (#14217)
Token.attrGet returns string | number | null, so the link checks added in
#14207 failed typecheck on main. Keep only string href values before
matching them.
2026-11-23 19:15:02 -05:00
morluto 6adcf85fc8 test(docs): check doc facts structurally instead of pinning prose (#14207)
Derive the CI example's Node pin from .nvmrc, match the workflow link by its parsed destination instead of its link text, and replace hard-coded Persian and Malayalam headings with a check that every in-page README fragment resolves to a rendered heading or HTML anchor. Drop skill-install prose assertions already covered by byte equality with the generated skill.
2026-11-23 18:09:39 -05:00
morluto 6dadd30fb6 fix(javascript): route directories by JavaScript input presence and name directory-capable operations (#14186)
* fix(javascript): refuse directories without JavaScript inputs and name directory-capable operations

`analyze <dir>` routed every non-bundle directory to the static JavaScript
lane, which reported an all-zero Electron summary as success for native
build output. The JavaScript lane now owns that applicability decision from
its complete inventory: when coverage is complete and no JavaScript, HTML,
package.json, source map, or nested ASAR input exists, it returns a typed
unsupported_target refusal naming inspect_desktop_application,
audit_release_exposure, inspect_artifact, and open_binary. Incomplete
coverage or unavailable files of unknown kind stay unknown and proceed.

The directory_requires_file refusal no longer claims to come from
open_binary when another operation (inspect, inspect-artifact) admitted the
target, and it names the directory-capable operations instead of only the
JavaScript lane.

* fix(javascript): keep empty directories analyzable and report routing facts for non-JavaScript ones

Owner decision on #14186: an empty directory is "nothing to analyze", not
"unsupported". The JavaScript lane now classifies application-input
presence once, in the domain owner of its file facts
(javaScriptApplicationInputPresence): present, empty, absent, or unknown.

- empty (complete traversal, no non-directory entries): analysis succeeds
  as before and the graph carries an explicit "No JavaScript inputs were
  found" limitation naming the next operations.
- absent (complete traversal, entries but no JavaScript, HTML,
  package.json, source map, or nested ASAR): the typed unsupported_target
  refusal now carries bounded diagnostics from the inventory the lane
  already read: inventoried_entries, entries_by_format, json_files and
  native_addon_files. No paths are retained.
- unknown (incomplete traversal or unavailable file of unknown kind) and
  present: unchanged analysis.

Reverts the fixture edits that added package.json to empty directories.
2026-11-23 18:00:43 -05:00
morluto 75c733acb4 fix(examples): pin the CI example to the current REA release (#14201)
The GitHub Actions example pinned rea-agents 6.7.0 and its test
hard-coded the same string, so the pin went stale silently across
three releases. Pin 6.10.1 and derive the test's expected version from
package.json, so a release bump fails the test until the example is
updated. Stop naming a fixed version in the CI analysis guide.
2026-11-23 17:58:02 -05:00
morluto 609b58b109 perf(debugger): stop repeating command results as raw_result (#14146)
* perf(debugger): stop repeating command results as raw_result

GDB console/startup, Rizin debug, Cutter and reverse-engineering command
Evidence set rawResult to a copy of result, contrary to the raw_result
contract. Every interactive debugger reply therefore carried its records
and output twice. Omit rawResult where no distinct provider
representation exists; tests assert the same facts on normalized_result.

Closes #14145

* test(debugger): assert command results on normalized_result in remaining suites

The composition, CLI delivery, acceptance and MCP suites still read
command output through raw_result, and one fixture built a parent
Evidence record that repeated its result as raw_result. They now assert
the same fields on normalized_result and that raw_result is null.
2026-11-23 17:55:57 -05:00
gensokyo-devandgensokyo-dev 3cfbe81509 test(analysis-view): cover compressed-size inventory ordering
The ordering test selected only declared_size, so an implementation that
ignored order_by.field still passed. Add an archive whose repetitive text
is declared larger but compresses smaller than incompressible bytes, and
assert both orders with the directory's unknown size last.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-24 02:54:49 +08:00
gensokyo-devandgensokyo-dev 386d294f90 feat(analysis-view): order inventory occurrences by size before paging
Finding the largest files in an archive meant reading every occurrence
and sorting client-side, which for a jar of 28,671 entries is tens of
megabytes of rows. Add order_by with field declared_size or
compressed_size and an ascending or descending direction. Selected rows
are ordered before paging; unknown sizes, such as directories, come last in
either direction and ties keep inventory order. The container's own "."
row carries its size, so the description points at path_globs ["**"] to
rank only its entries.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-24 02:54:49 +08:00
gensokyo-devandgensokyo-dev dba72f1277 feat(analysis-view): select inventory occurrences by path glob
Questions about one directory of a large archive, such as the native
libraries under lib/ in an APK or the classes of one package in a jar,
required paging every occurrence, because occurrences could be selected
only by exact path, ID or kind. Add path_globs, which match whole recorded
logical paths: * and ? stay within one segment, a ** segment spans zero or
more segments (or everything below when last), other characters are
literal and case-sensitive, and the container's own "." row never matches.
Several globs union, then intersect with the other selectors, so one call
returns, for example, every file at the archive root or below assets/.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-24 02:54:49 +08:00
gensokyo-devandgensokyo-dev e128a69c2f feat(analysis-view): select inventory occurrences by artifact kind
Finding the native addons in an application archive meant paging every
inventory occurrence (about 1 KB each) or reading the complete inspection,
because occurrences could be selected only by exact path, ID or entry kind.
Add artifact_kinds, which matches the recorded artifact kind exactly and
intersects with the other selectors, so one call returns, for example,
every native-addon occurrence with selected fields.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-24 00:08:10 +08:00
morluto b565f787cb refactor(cli/server): break remaining module-layer cycles (#14013)
* refactor(cli,server): break remaining module-layer cycles

* fix(ci): follow relocated CLI entry points

* refactor: remove retired internal reader exports
2026-11-23 00:58:01 -05:00
morluto ac10dc0bc7 test(macho): consolidate native path framing proofs (#13926) 2026-11-23 03:50:39 +00:00
morluto 35d72ad77f refactor(cli): extract contractCliSchemaProjection and contractCliDocumentDescription (#13871) 2026-11-23 02:47:10 +00:00
morluto 9ec23ad03b feat(frida): add optional limit and offset paging to list_frida_processes (#13854)
* feat(frida): add optional limit and offset paging to list_frida_processes

Closes #13853

* fix(frida): stabilize paged process discovery

* docs(frida): scope paging claims to shipped discovery
2026-11-23 02:28:45 +00:00
morluto cc5df28644 refactor: prune 5 redundant single-call wrapper modules (#13807)
* refactor: prune 5 redundant single-call wrapper modules

* chore(ci): remove deleted providerEnvironment.ts from Stryker and CI scope configs

* fix(ci): retarget provider environment mutation coverage
2026-11-23 02:25:46 +00:00
morluto 4707f45ac2 refactor(cli): extract routedContractCommand from contractCommand (#13837)
Closes #13836
2026-11-23 01:52:47 +00:00
morluto 6848409879 refactor(ports): unify 4 misplaced request ports into RequestAnalysisPort and deduplicate PcapAnalysisService (#13816) 2026-11-23 01:42:41 +00:00
RRFZ c1cef729c9 perf(parsers): replace quadratic trailing-quantifier regexes with linear edge scans (#13757)
* perf(parsers): replace quadratic trailing-quantifier regexes with linear edge scans

* test(har): assert response.bodySize in zero negative-exponent lexeme test
2026-11-23 01:11:05 +00:00
morluto 3c5c6522b5 refactor(cli): extract contractDocumentCommand from contractCommand (#13782) 2026-11-23 01:07:14 +00:00
morluto f3ff526f28 refactor(cli): extract contractCliDescriptionTypes from contractCliDescription (#13729)
* refactor(cli): extract contractCliDescriptionTypes from contractCliDescription

* refactor(cli): remove type re-export shim and migrate callers directly

* docs(cli): align contract projection comments
2026-11-23 00:29:37 +00:00
morluto 2532adda84 perf(cli/server/dotnet): single-pass --token-count JSON, indexed CLI command lookup, single status parse, and direct loops (#13631)
* perf(cli/server/dotnet): single-pass --token-count JSON, indexed CLI command lookup, single status parse, and direct loops

* fix(cli): admit JSON token counting before retaining output
2026-11-22 22:13:50 +00:00
morluto 08f6365e9f perf(application/cli): reuse CapabilityInventory map, avoid BinarySessionStatus deep-clone, and cache admitsOmission (#13552)
* perf(application/cli): reuse CapabilityInventory map, avoid BinarySessionStatus deep-clone, and cache admitsOmission

* fix(cli): preserve schema validation for omitted fields
2026-11-22 15:21:26 -05:00
morluto d1857543f3 fix(setup): verify the effective OpenCode project launcher (#13538) 2026-11-22 18:45:31 +00:00
morluto 933cd8382c test(evidence): consolidate public bundle delivery and import checks (#13543) 2026-11-22 18:39:19 +00:00
morluto 0eaea650c0 fix(evidence): reject unknown fields in comparison record pairs (#13523) 2026-11-22 17:56:50 +00:00
morluto b6ffec43ad refactor(artifacts): reuse the positional reader for iNES prefixes (#13481)
* refactor(artifacts): reuse the positional reader for iNES prefixes

* test(ghidra): verify Java timeout after doctor settles

* test(ghidra): join Java fixture teardown after failed assertions

* test(hopper): prepare native ownership before late-handoff deadlines
2026-11-22 17:55:15 +00:00
morluto edbb844e6b perf(cli): decouple guided-workflows and comparison commands from applicationToolContracts (#13448)
* perf(cli): decouple guided-workflows and comparison commands from applicationToolContracts

* perf(cli): register comparison commands lazily and assert applicationToolContracts startup isolation
2026-11-22 15:53:39 +00:00
morluto 787b5aafb9 perf(cli/mcp): decouple analysis view contracts and defer tshark PATH probes (#13316)
* perf(cli,mcp): decouple analysisViewResult/session contracts from CLI paths and defer tshark PATH probes

* test(cli): separate one-shot import suites from catalog startup
2026-11-22 14:54:02 +00:00
morluto 3f83c87201 perf(cli): decouple lazy CLI startup from AnalysisView, session contracts, and MCP registration (#13435)
* perf(cli): decouple lazy CLI startup from AnalysisView, session contracts, and MCP registration

* test(cli): use bundled CLI runs for heavy startup positive controls
2026-11-22 09:29:07 -05:00
morluto 365bbd9008 fix(javascript): preserve abrupt destructuring boundaries (#13433)
* fix(javascript): preserve abrupt destructuring boundaries

* test(javascript): consolidate destructuring Evidence trace checks

* fix(javascript): evaluate computed nullish receivers
2026-11-22 14:21:09 +00:00
RRFZ 0451a8688d fix(cli): complete inline option values (#13366)
* fix(cli): complete inline option values

* fix(cli): reassemble Bash words before completing options
2026-11-22 09:09:27 -05:00
morluto 375483b6b3 perf(mcp/cli): skip unused output schema projection, error deep-clones, and startup z.toJSONSchema (#13426)
* perf(mcp/cli): skip unused output schema projection, error deep-clones, and startup z.toJSONSchema

Addresses #13354, #13275, #13302.

* refactor(contracts): share advertised input dialect traversal and rules
2026-11-22 09:08:37 -05:00
morluto ac3f83f0f2 fix(exports): bind provider caveats to accepted observations (#13430)
* fix(exports): bind provider caveats to accepted observations

* test(exports): consolidate directory export contract checks
2026-11-22 14:00:41 +00:00
morluto 8925ec461e test(apple): consolidate dylib resolution contract checks (#13424) 2026-11-22 13:37:28 +00:00
morluto 255a585c0a fix(doctor): report startup timeouts independently of launcher discovery (#13420) 2026-11-22 13:27:28 +00:00
morluto 5b2bc6c43d fix(desktop): explain unavailable dconf descriptor paths (#13391) 2026-11-22 11:01:35 +00:00
morluto 0b62db4d63 fix(desktop): keep automatically named checkpoints distinct (#13387) 2026-11-22 10:53:22 +00:00
morluto 6154c610a6 test(managed): exercise both comparison snapshot admissions (#13384) 2026-11-22 05:27:57 -05:00
RRFZ 9a6ee71886 fix(cli): reject nonnumeric output slice bounds (#13344) 2026-11-22 03:54:12 -05:00
RRFZ d4f78cb592 fix(cli): preserve explicit null output (#13342) 2026-11-22 03:53:17 -05:00
b57671cb42 feat(evidence): find direct referrers by linked Evidence ID (#11709)
* feat(evidence): find direct referrers by linked Evidence ID

* docs(evidence): record real APK referrer verification

---------

Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-22 16:30:29 +08:00
morluto 38bc4fe907 perf(cli): keep single-command discovery lazy and skip throwaway Zod parses (#13254)
* perf(cli): keep single-command discovery lazy and skip throwaway Zod parses

* fix(cli): test all five lazy discovery flags and update loading guide
2026-11-22 03:14:21 -05:00
Afloat a16669ab2a feat(evidence): paginate retained evidence discovery summaries (#9084)
* feat(evidence): paginate retained evidence discovery summaries

Let callers page summary metadata in canonical Evidence ID order without loading record payloads into the response. Keep filter and link totals global to all matches and preserve the unpaged response for existing clients.

* test(evidence): use the supported compact schema profile

* docs(evidence): explain the summary pagination request default

* test: align verification fixtures with current public contracts

Keep the production changes from upstream and update the verification consumers that still asserted their retired contracts:

- assert unknown workflow identity structurally and retain the bounded provider caveats;
- observe the process capture's partial-error delivery while preserving live cleanup ownership assertions;
- use the package's declared imports in the isolated release controller;
- refresh the replay card digest after the Evidence subject identity migration;
- use the supported compact Kimi profile while testing case-insensitive environment keys;
- assert each public interface's own capture issue path.

These are shared test and verifier compatibility repairs. The evidence summary pagination and config-printer feature changes remain separate.

* test: observe the session close result in Kuna retry coverage

* test: follow the persisted DOL snapshot target identity

* test: align CLI and progress fixtures with shared owners

Reuse the core registrar for decompile-all instead of registering it twice
after upstream #11680. Assert the outer MCP start/completion notifications
separately from provider cleanup progress introduced by #11637, retaining
cleanup, rate, timeout, cancellation, and evidence assertions.

* docs: link CLI paging guidance to its canonical contract
2026-11-22 15:42:02 +08:00
hhang e35780d042 fix(native): refresh bundle provenance on reopen 2026-11-22 15:41:50 +08:00
hhang b8995f8148 feat(native): retain Apple bundle executable provenance 2026-11-22 15:41:50 +08:00
hhang c1943f196c fix(javascript): account for active nullish pattern defaults 2026-11-22 13:38:40 +08:00
hhang 8ae636b6ab fix(javascript): preserve uncertainty after nullish patterns 2026-11-22 13:38:40 +08:00
morluto 11a75a5c19 fix(guidance): direct workflow errors to the scoped inventory (#13321)
* fix(guidance): direct workflow errors to the scoped inventory

* fix(mcp): type the progressive catalog registration boundary
2026-11-22 04:26:57 +00:00
morluto a06e04b4df fix(cli): preserve doctor routing with empty output values (#13262)
* fix(cli): preserve doctor routing with empty output values

* fix(cli): keep configuration precedence before malformed readiness commands
2026-11-22 02:12:45 +00:00
morluto 2dfe4754ac test(cli): consolidate MCP registration admission and policy checks (#13264)
* test(cli): consolidate MCP registration admission and policy checks

* test(cli): assert MCP registration option facts without fixed prose
2026-11-21 20:59:51 -05:00