Commit Graph
11670 Commits
Author SHA1 Message Date
Vincent Koc c41d023097 test(macos): share package resource fork fixtures (#16315) 2026-12-03 10:49:15 +00:00
Vincent Koc baaabb3dfa test(cli): share accessibility comparison result checks (#16317) 2026-12-03 10:46:10 +00:00
Vincent Koc 795bb16dbc refactor(pyinstaller): share opaque PYZ result construction (#16313) 2026-12-03 10:38:46 +00:00
Vincent Koc b013a2ff28 test(cli): share analysis view request fixtures (#16314) 2026-12-03 10:36:10 +00:00
Vincent Koc e414ae0fd2 test(javascript): reuse source-to-bundle graph fixtures (#16312) 2026-12-03 10:35:29 +00:00
Vincent Koc d5ed402722 test(plist): share native CLI fixture invocations (#16310) 2026-12-03 10:30:12 +00:00
Vincent Koc 958864a2ac test(swift): share relative pointer fixtures (#16308) 2026-12-03 10:24:53 +00:00
Vincent Koc 5dd322bc9c refactor(openapi): share path operation context (#16309) 2026-12-03 10:10:42 +00:00
Vincent Koc 42799e8321 refactor(wasm): share facet view result construction (#16306) 2026-12-03 09:58:05 +00:00
Vincent Koc 517e92b267 test(dotnet): share managed artifact inspector fixtures (#16305) 2026-12-03 09:49:25 +00:00
Vincent Koc 246f63a304 test(cli): share Unicode output capture setup (#16307) 2026-12-03 09:49:21 +00:00
Vincent Koc ae36c980ff test(contracts): share advertised schema validator fixtures (#16303) 2026-12-03 09:40:04 +00:00
Vincent Koc 9a4c7b6ddf refactor(artifacts): reuse occurrence differences in comparisons (#16302) 2026-12-03 09:37:32 +00:00
Vincent Koc 77235a7fd3 test(apple): share archive CLI projection fixtures (#16304) 2026-12-03 09:35:00 +00:00
Vincent Koc b4855108d2 refactor(browser): share ordinary event digest projection (#16300) 2026-12-03 09:24:56 +00:00
0af842ad26 feat(firmware): disassemble RISC-V, MIPS32, PowerPC, and ARM64 split-immediate MMIO accesses (#15413)
* feat(firmware): disassemble RISC-V, MIPS32, PowerPC, and ARM64 split-immediate MMIO accesses

* fix(firmware): tighten SVD interval inheritance and split-immediate register tracking

* fix(firmware): bound inherited SVD block expansion and decode exact destination GPRs

* fix(firmware): clear Rs across acquire-ordered ARM64 CAS and CASP variants

* chore(mcp): sync advertised schema summary and budget projection with main

* fix(firmware): bound CMSIS-SVD numeric widths before BigInt and index expansion

* fix(firmware): keep rejected SVD addressBlocks distinct from omitted spans

* fix(firmware): bound MMIO representation growth and preserve SVD ambiguity

* perf(firmware): memoize SVD address lookups and pre-rank peripheral names

* fix(firmware): scan a whole application image by default for MMIO syntheses

On the 1.36 MB IROM segment of the MicroPython 1.24.1 ESP32-C3 image, a
default call scanned 256 KiB and kept 512 of 713 matching accesses. The
omitted rows were not in the retained Evidence, so the agent had to repeat
the call with larger controls or page by scan_offset. Defaults now scan
4 MiB and keep up to 32,768 syntheses within a 16 MiB representation
allowance, matching the literal-pool tool. Retained summary delivery still
sizes what reaches the agent. The image completes in about 1 s with 4,073
syntheses.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* refactor(firmware): use MMIO synthesis maximums as their defaults directly

The default scan, synthesis and representation constants only repeated
their maximums, which Knip reports as duplicate exports. The budgets and
the parser fallback now name the maximums.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(firmware): bound SVD match cache weight, exclude RISC-V flash, and report scan-limit stops

---------

Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 17:22:49 +08:00
Vincent Koc 753feb550d test(cli): share filtered rows command fixtures (#16301) 2026-12-03 09:21:01 +00:00
Vincent Koc 13762a3eb9 test(deb): share global PAX header fixtures (#16299) 2026-12-03 09:20:11 +00:00
Vincent Koc 827222b1fb refactor(android): share ProGuard ambiguity results (#16297) 2026-12-03 09:11:14 +00:00
Vincent Koc 2ecbb734c8 test(cli): share expected require resolution edges (#16298) 2026-12-03 09:07:45 +00:00
Vincent Koc 30a70b138b test(javascript): reuse package specifier fixture writer (#16296) 2026-12-03 09:07:12 +00:00
04d473ca0b feat(firmware): disassemble ARM and Xtensa PC-relative literal-pool MMIO loads (#14447)
* feat(firmware): disassemble ARM and Xtensa PC-relative literal-pool MMIO loads

Disassemble PC-relative literal-pool load instructions (`arm-thumb` 16-bit
LDR and 32-bit Thumb-2 LDR.W, `arm-a32` LDR, and `xtensa` L32R) from local
firmware images at an explicit `base_address` without target execution:

- Byte-granular `PoolByteBitset` suppresses forward and backward pool byte
  ranges even at `4k + 2` unaligned file offsets (`base_address` ending in 2).
- Two-pass Xtensa pool discovery preserves `L32R` alignment after leading or
  interleaved 4-byte literal pools and preserves valid `21 36 01` encodings.
- Indexed `O(log M)` CMSIS-SVD disjoint `<addressBlock>`/`<register>` matching
  with cycle-safe multi-hop `derivedFrom` resolution, `mapped_image` bounds
  precedence, exact ARMv7-M/v8-M SCS sub-blocks, and `arm-a32` SoC neutrality.
- Cooperative `setImmediate` event-loop yields with `AbortSignal` cancellation,
  complete retained Evidence with `detail: "summary"` and `inspect_analysis_view`
  (`firmware-literal-pools`), `max_svd_nodes` parameter budget, and
  field-specific `invalid_request` validation.

* fix(firmware): bound SVD and candidate memory, preserve overshadowed loads, and report required_value

* fix(firmware): resolve SVD derivedFrom chains iteratively and restore lifecycle test title

* fix(firmware): bound Xtensa trace and SVD representation memory, make Evidence cooperative, and preserve unaligned literal loads

* fix(firmware): retain completed literal-pool scans on late cancellation and avoid repeated SVD string hashing

* fix(firmware): walk SVD register clusters, sweep dense overlaps linearly, and preserve XML depth recovery

* fix(firmware): enforce profile-wide cooperative SVD cluster expansion budget and sync schema

* fix(firmware): pre-parse SVD cluster templates, inherit defaults, and keep Xtensa framing

* fix(firmware): share inherited SVD template chains and count compact arrays as single intervals

* fix(firmware): replace SVD override chain links with persistent O(log K) treap

* fix(firmware): default max_references to the representation-bounded maximum

The IROM segment of the MicroPython 1.24.1 ESP32 image resolves 35,179
literal-pool loads. A default call scanned it and then refused at 16,384
references, so the agent had to repeat the whole scan with a larger
max_references. The count is checked after scanning, and
max_representation_bytes already bounds the Evidence these rows build. The
default is now the maximum; the same image completes in 1.4 s with a 12 MB
complete result.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* refactor(firmware): use the max_references maximum as its default directly

Knip reported DEFAULT_LITERAL_POOL_MAX_REFERENCES as a duplicate export of
MAX_LITERAL_POOL_REFERENCES. The budget now names the maximum as its
default, and the provider test reads the default from the budget.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(firmware): preserve inherited SVD register widths and addressBlock spans

---------

Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 17:00:14 +08:00
Vincent Koc 37365a363e refactor(json): reuse reader failure type in public signatures (#16294) 2026-12-03 08:57:59 +00:00
Vincent Koc 4af8651f6d refactor(javascript): share container entry graph identities (#16293) 2026-12-03 08:56:13 +00:00
Vincent Koc 553288963f test(ci): share PR health fixture inputs (#16292) 2026-12-03 08:52:06 +00:00
Vincent Koc 4630d8a7dc refactor(firmware): share missing dependency gap projection (#16290) 2026-12-03 08:43:47 +00:00
Vincent Koc cf54d0af98 test(cli): share literal Evidence bundle arguments (#16291) 2026-12-03 08:41:32 +00:00
Vincent Koc 2f69bbd442 test(managed): share available metadata heap fixtures (#16289) 2026-12-03 08:40:27 +00:00
bf7646b0c7 feat(firmware): classify privileged system-register, CSR, and port-I/O instructions (#14422)
* feat(firmware): classify privileged system-register, CSR, and port-I/O instructions

Add `inspect_procedure_hardware_instructions` (`rea inspect-procedure-hardware-instructions`)
to extract and classify architectural non-MMIO hardware instructions from
`read_function_instructions` across `arm`, `arm64`, `riscv`, `xtensa`, `mips`,
`x86`, and `x86_64`.

- Parse provider `<nativeAddress>: <assembly>` lines through the shared native
  address grammar (`OBSERVED_NATIVE_ADDRESS_PATTERN` / `nativeAddressInputSchema`)
  without stripping 2-hex-letter mnemonics (`dc`) or discarding address spaces
  (`rom:0x1000`, `overlay%3Aspace:0x1000`).
- Normalize conditional A32/T32 system, coprocessor, barrier, wait, and trap
  mnemonics (`mrcne`, `mcrgt`, `mrsne`, `msreq`, `cpsie.w`, `wfene`, `wfine`,
  `sevne`, `svcne`) while preserving original disassembled mnemonics, and cover
  AArch64 `dc`/`ic`/`at`/`tlbi` maintenance operations.
- Parse complete 8-bit immediate x86 port tokens (`0x00..0xff` across `0x`,
  Intel `h`, `$`/`#`, and decimal syntax), keep register-selected `DX` ports as
  `unresolved_register`, and separate symbolic or unparsed port tokens as
  `unresolved_operand`.
- Classify zero-source RISC-V CSR set/clear pseudo-instructions (`csrsi csr, 0`,
  `csrci csr, 0`, `csrs csr, zero`, `csrc csr, x0`) as `read` consistently with
  their canonical `csrrs`/`csrrc`/`csrrsi`/`csrrci` encodings.

Refs #7955

* chore(firmware): refresh the hardware-instruction advertised schema summary

The shared Evidence output schema on main now advertises its string
patterns, so the summary recorded on the older base was stale.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

---------

Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 16:36:28 +08:00
Vincent Koc 504064c4b9 refactor(environment): share recorded list selection (#16287) 2026-12-03 08:30:44 +00:00
Vincent Koc f1c1787b8f refactor(elf): share kernel version report fields (#16286) 2026-12-03 08:28:57 +00:00
Vincent Koc 8375d83dc2 test(vsix): share main manifest fixtures (#16285) 2026-12-03 08:25:51 +00:00
Vincent Koc bfe2c7cf0c refactor(environment): share recorded-answer fallback (#16284) 2026-12-03 08:17:03 +00:00
Vincent Koc f0469700a0 refactor(go): share binary image result construction (#16283) 2026-12-03 08:15:43 +00:00
Vincent Koc eb779420bc test(dwarf): share compile-unit abbreviation fixtures (#16282) 2026-12-03 08:14:20 +00:00
Vincent Koc 6dddf4c9a8 refactor(cli): share command index insertion (#16279) 2026-12-03 08:03:59 +00:00
Vincent Koc 6f8fe529c2 refactor(vsix): share interesting-member projection (#16280) 2026-12-03 08:03:40 +00:00
Vincent Koc 7cc831fef9 test(ips): share report inspection fixtures (#16281) 2026-12-03 08:00:42 +00:00
Vincent Koc 400d282848 refactor(gradle): share variant row projection (#16277) 2026-12-03 07:55:43 +00:00
Vincent Koc 4f0f74f43b test(cli): share probe contract fixtures (#16278) 2026-12-03 07:53:01 +00:00
Vincent Koc 9192daaf36 refactor(n64): reuse cartridge CRC report fields (#16271) 2026-12-03 07:45:13 +00:00
Vincent Koc 7c88b2ea92 refactor(python): share constant summary cases (#16276) 2026-12-03 07:41:20 +00:00
Vincent Koc 8038e8e0ef test(search): share predicate input fixtures (#16275) 2026-12-03 07:37:13 +00:00
Vincent Koc ad6f2130ed refactor(desktop): share checkpoint version traversal (#16272) 2026-12-03 07:30:23 +00:00
Vincent Koc 4f5a01e7b4 test(oci): share image-layout service fixtures (#16270) 2026-12-03 07:25:59 +00:00
Vincent Koc 53afc0b14a refactor(environment): share two-value difference formatting (#16269) 2026-12-03 07:16:39 +00:00
Vincent Koc 184e3befb3 refactor(flutter): reuse ABI library result fields (#16268) 2026-12-03 07:15:40 +00:00
Vincent Koc ee85bd9b8f test(pe): share named resource fixtures (#16267) 2026-12-03 07:11:28 +00:00
Vincent Koc 100dcabeb6 refactor(javascript): reuse invalid source-map projection (#16265) 2026-12-03 07:02:28 +00:00
Vincent Koc 7c7cd6bc4a refactor(evtx): share archive result construction (#16264) 2026-12-03 07:01:38 +00:00