Commit Graph
11651 Commits
Author SHA1 Message Date
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
Vincent Koc 3efef07859 test(json-shape): share nested property expectations (#16263) 2026-12-03 06:58:08 +00:00
Vincent Koc 167b880b6d refactor(mega-drive): share ROM region projection (#16255) 2026-12-03 06:46:57 +00:00
Vincent Koc b6ca1310ad refactor(capabilities): reuse public mode fields (#16256) 2026-12-03 06:33:14 +00:00
Vincent Koc 8eabbd1ca4 test(macho): share dylib platform fixtures (#16254) 2026-12-03 06:29:43 +00:00
morluto 47efad6c17 docs(readme): link the header showcases entry to the website (#16253) 2026-12-03 01:23:06 -05:00
morluto 1279e52ef9 docs(readme): trim header badges and lead with quick start and showcases 2026-12-03 01:18:26 -05:00
Vincent Koc a6533ca160 refactor(cli): reuse parsed completion flags (#16248) 2026-12-03 06:15:41 +00:00
morluto 7cd7f5bc85 docs(readme): replace the header link row with a website button (#16250) 2026-12-03 01:15:17 -05:00
Vincent Koc 7f72b78d47 refactor(nib): share hierarchy collection lookup (#16247) 2026-12-03 06:14:44 +00:00
Vincent Koc 7ef78a6ac0 test(dol): share BSS fixture setup (#16246) 2026-12-03 06:11:22 +00:00
Vincent Koc 103fbabb6c refactor(javascript): share graph finding source projection (#16243) 2026-12-03 06:02:12 +00:00
Vincent Koc b80a771449 refactor(media): reuse Ogg Opus page facts (#16242) 2026-12-03 06:01:02 +00:00
Vincent Koc 28dcb8478a test(rust): share binary service fixture setup (#16241) 2026-12-03 05:58:02 +00:00
Vincent Koc 618ae7fef3 refactor(macos-pkg): share XAR entry metadata projection (#16238) 2026-12-03 05:48:26 +00:00
Vincent Koc 45dc99a88f refactor(config): share Vibe TOML section writing (#16239) 2026-12-03 05:47:47 +00:00
Vincent Koc b3ad7ec381 test(mcp): share evidence server handshake setup (#16237) 2026-12-03 05:44:22 +00:00
Vincent Koc 0c37579726 refactor(cli): share output control rejection construction (#16236) 2026-12-03 05:34:33 +00:00
Vincent Koc e26fa4bedb refactor(xml): collect outermost ranges in source order (#16235) 2026-12-03 05:33:11 +00:00
Vincent Koc 01ebd15b6c test(mcp): share artifact client setup (#16234) 2026-12-03 05:30:24 +00:00