Commit Graph
794 Commits
Author SHA1 Message Date
morluto 055c3cda4a fix(amdgpu): report the metadata limit actually reached (#12586)
fix(gpu): distinguish AMD metadata nesting and value limits
2026-11-19 23:55:34 +00:00
morluto 57d1d7ca5e fix(uefi): preserve parser coverage and source evidence (#12539)
* fix(uefi): report malformed volume extension metadata

* fix(uefi): preserve parser coverage and source evidence

* fix(uefi): bound inventory and tighten parser framing

* refactor(uefi): reuse shared byte formatting in diagnostics

* fix(uefi): accept extended sections at the compact size marker
2026-11-19 22:34:06 +00:00
ShuaixinHuangandShuaixinHuang 28f227a24e test(hopper): synchronize the first reconnect probe client (#12546)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
2026-11-19 17:24:34 -05:00
ShuaixinHuangandShuaixinHuang d06d6a6110 fix(ci): preserve UEFI decoder reachability in Knip (#12545)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
2026-11-19 17:24:01 -05:00
bartman081523andmorluto d380dc2409 feat(uefi): add pure-TypeScript UEFI firmware analysis tools (#12342)
* feat(uefi): add pure-TS UEFI firmware volume/FFS parser with inspect/extract tools

Add a dependency-free rea-uefi provider that maps AMI/Aptio flash images:
- inspect_uefi_firmware: aligned _FVH discovery, volume-relative FFS walking,
  guided section/compression classification, conservative PSP-directory probing,
  embedded-volume rescan and leftover-region classification; incremental SHA-256
  and explicit integrity notes.
- extract_uefi_firmware: whole-image/volume/FFS-file/section extraction with
  LZMA-custom/LZMAF86 and AMD-zlib decoding, SafeOutputTree staging, derivations
  and extraction_gaps.
- UefiArtifactReader + 'uefi' format wiring across inventory/domain/contracts
  so parsed volumes and extracted PE32/TE files hand off to deep-provider
  analysis (open_binary -> Ghidra).

* feat(uefi): add inspect_uefi_nvram for AMI NVRAM variable stores

Add a pure-TypeScript tool that maps the vendor AMI NVRAM variable stores
(factory-default "StdDefaults" and peers) inside a flash image:
- scan the raw image for NVAR entry chains ("NVAR" + u16 total size +
  u32 attribute 0x8[23]FFFFFF + state + NUL-terminated name + data),
- recurse into a container entry whose data is itself an NVAR chain, so the
  StdDefaults setup variables surface as depth/parent_offset rows,
- report attributes, state, data range, SHA-256 and trailing padding per entry.

Verified against B550 AORUS Elite V2 FId: one StdDefaults store at 0x37090 with
the 11 expected nested variables (Setup, PlatformLang, AMITSESetup, XhciDID,
GcSensorVarName, PCI_COMMON, SioSetupData, UsbSupport, NetworkStackVar,
SecureBootSetup, Setup). Exposed as MCP tool and inspect-uefi-nvram CLI command.

* fix(uefi): address review on checksums, compression, guided sections, NVRAM bounds

- FFS file checksum: verify the two's-complement invariant (payload sum +
  stored byte == 0 mod 256) instead of comparing sums, and encode the correct
  complement in the fixture builder.
- Compression sections (type 0x01): use the 9-byte header and classify EFI
  standard compression instead of 'none', so extraction reports a gap rather
  than publishing compressed bytes as a raw section.
- GUID-defined sections: derive GUID/data-offset/attributes from the parsed
  common header size (compact or extended) and reject out-of-range payload
  offsets.
- AMI NVRAM: bound recursive chains to the enclosing container's data end and
  report partial coverage when a valid nested chain is cut by max_depth.

* fix(uefi): bound decode memory, serialize operations, enforce deadline, mark truncation

- LZMA worker: enforce max_output_bytes while decoding through a bounded output
  sink, so an oversized stream is rejected during expansion instead of after a
  full decompression plus a second Buffer copy.
- Provider: serialize admitted operations (the promised single decode-worker
  lane must not become one worker per overlapping call) and apply one
  whole-request deadline that covers every decode stage, not a fresh per-stream
  timer. close() drains the queue and the resource scope.
- Scan: track truncated sections of known type and report coverage partial
  instead of complete when a section declares more bytes than are present.

* fix(uefi): cancellable queue, timeout surfacing, availability and reader omissions

- Queue: check the caller signal before enqueue and when a job reaches the head,
  and race the queued promise against abort so a cancelled wait returns
  immediately instead of blocking behind the active request.
- Deadline: track the internal deadline and return AnalysisTimeoutError instead
  of the AnalysisCancelledError that runOwnedCommand reports for any external
  abort, preserving the real failure reason for CLI/MCP callers.
- CapabilityInventory: treat inspect_uefi_nvram like the other bundled rea-uefi
  tools so discovery does not demand Unblob for it.
- UefiArtifactReader: report image truncation through onOmission so inventory
  coverage reflects the unread suffix even when no volume was found.

* fix(uefi): limit early cancellation to unstarted jobs and preserve timeout cleanup

- #raceWithAbort only returns early for jobs that have not started; once a
  request is running, await it so worker cleanup and completed output are
  preserved instead of being discarded by a bare cancellation.
- Reclassify a deadline-induced cancellation as AnalysisTimeoutError while
  keeping its cause and cleanup observations, and never override a different
  primary failure.

* docs(licenses): record UEFI decoder dependency notices

* fix(uefi): preserve stream provenance and bound firmware analysis

* feat(uefi): decode LZMAF86 guided sections

* fix(uefi): validate publication before commit and order decoder cleanup

* fix(uefi): preserve unsupported volumes and extraction gaps

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 21:19:35 +00:00
David Muñoz Reyandmorluto cd3590c8ee feat(artifacts): inspect NES 2.0 container headers and regions (#10674)
* feat(artifacts): inspect NES 2.0 container headers and regions

Problem: the iNES lane refused every header whose byte 7 bits 2-3 select
NES 2.0, so NES 2.0 cartridges could not be inventoried, extracted or
reconstructed even though their file layout extends classic iNES.

Fix: the single iNES-family header parser now reads NES 2.0 alongside
classic iNES. It reports the 12-bit mapper, submapper, 12-bit and
exponent-multiplier PRG/CHR sizes, declared PRG/CHR RAM and NVRAM sizes,
CPU/PPU timing, console type with Vs. System and extended console codes,
miscellaneous ROM count and default expansion device in a "nes-2.0"
header variant; classic headers keep their exact serialization. Regions
add one prg.bin/chr.bin for exponent sizes and misc-rom.bin for the bytes
after CHR-ROM when miscellaneous ROMs are declared. Oversized
declarations (with exact totals, including exponent sizes beyond safe
integers), nonzero unused header bits, empty PRG-ROM and declared but
absent miscellaneous ROM bytes are refused through the existing format
error. Nested byte classification now admits NES 2.0 through the same
parser. The reader limitation, tool description, guide and skill
reference now state that UNIF remains unsupported and that RAM, timing
and console values are declarations.

Validation: new synthetic NES 2.0 unit cases fail on the base (15 of 24)
and pass after the change; focused boundary and acceptance iNES suites
(75 tests) pass, including NES 2.0 inventory, extraction, reconstruction
and compiled CLI inspection; npm run check:fast passes.

Refs morluto/rea#2072

* test(artifacts): extract an exponent-sized NES 2.0 ROM area

Review follow-up for NES 2.0 headers.

The exponent-multiplier case stopped at parseInesLayout, and the
extraction test used counted ROM units, so prg.bin and chr.bin from
an exponent-sized area never went through the reader or extraction.
A boundary case now builds a NES 2.0 file with a 2^10 * 3 byte PRG-ROM
area beside one counted 8 KiB CHR-ROM unit. It checks the header omits
the PRG unit count, the source offsets of prg.bin and chr/000.bin,
the verified reconstruction order, and that the extracted regions
match the original bytes exactly.

Tests: tests/boundary/filesystem/inesArtifact.test.ts passes (38).

* refactor(artifacts): read NES header bytes through one helper

The NES 2.0 declaration added a sixth raw Buffer read to
inesContainer.ts. On current main the architecture guard allows five
there, so the merged tree failed Static checks. iNES and NES 2.0
declarations and the format probe now read header bytes through one
headerByte helper. The file has one raw read, and its counted baseline
drops from 5 to 1 through --shrink-baselines.

Tests: inesContainer domain tests (24) and the NES boundary and
acceptance tests (76) pass. architecture-guards, format:check and
check:ci:fast pass on the branch merged with main.

* refactor(artifacts): report iNES header failures through ParseFailure

Review follow-up: the NES 2.0 declaration added plain-string failures.
The iNES-family parser now returns Result<_, ParseFailure> with its
kind and where it was found:
- malformed: a missing signature, a dirty legacy header, an empty
  PRG-ROM area, reserved NES 2.0 bits or an invalid file extent;
- truncated: a short header, a short payload, or declared
  miscellaneous ROM with no bytes;
- unsupported: UNIF or another header variant, with undecoded content.
The detail text is unchanged.

The format registry refuses with the detail, and the iNES reader and
root classifier translate the failure at their boundary into the
existing format ArtifactReaderFailure, with the ParseFailureError as
its cause.

Tests: the refusal table now asserts each failure's kind and format
as well as its detail. iNES domain and recognition tests, NES boundary
and acceptance tests (76), architecture-guards, format:check and
check:ci:fast pass on the branch merged with main.

* fix(artifacts): preserve NES header declarations and iNES evidence

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 20:49:33 +00:00
7fd50eb361 fix(zstd): share exact-frame Zstandard decoding across ELF and OTA (#12416)
* fix(zstd): share exact-frame Zstandard decoding across ELF and OTA

Walk RFC 8878 frames once so ELF sections, Android OTA REPLACE_ZSTD, and GPU payloads reject truncated headers, blocks, checksums, and trailing bytes on every supported Node runtime. Bound that walk with the runtime zstd.max_frames setting.

* fix(zstd): keep frame output tight and report GPU frame-cap refusals

Copy each Node 22 frame off its decoder chunk before the next frame is decoded. Map a GPU zstd.max_frames refusal through the resource-limit contract instead of a provider failure.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): keep frame-cap refusals and bad seeds out of malformed results

Project zstd.max_frames through one resource-limit helper for ELF notes, DWARF, GPU, and artifact reads. An invalid REA_ZSTD_MAX_FRAMES seed stays a configuration failure, and frame-header tests cover content size, window, dictionary id, and RLE blocks.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield GPU frame decoding so cancellation can land

The frame-by-frame fallback awaits a caller pause before each data frame. GPU yields and checks the read signal there, so a many-frame payload does not finish before a disconnect is observed.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): advertise the frame cap and keep strict GPU decode cancellable

List every operation that enforces zstd.max_frames, including GPU, DWARF, and ELF notes. The strict sequence uses the async decoder and checks the caller signal again after it returns, and a single output buffer is not copied a second time.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): refresh analysis-setting schemas and GPU frame-cap projection

Regenerate the advertised input summaries for inspect_analysis_settings and update_analysis_settings. GPU inventory now throws the projected zstd.max_frames resource limit from payload decode and #retainFailure, so the adjustable setting survives the public failure.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* style(gpu): format the frame-cap projection throw

oxfmt keeps the zstd.max_frames throw in #retainFailure on one line so CI format:check matches the local formatter.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield after the last frame-by-frame GPU decode

The fallback returned success in the same turn as the final synchronous frame, so a queued abort was still invisible to the caller's signal check. Pause once more before that success, matching the strict sequence.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield ELF, OTA, and DWARF frame decoding on the caller signal

The synchronous frame loop ignored abort signals owned by inspect_elf_notes, inspect_dwarf_units, and Android OTA partition reads. Those callers now use the cooperative decoder and yield before Zstandard work, and 32-frame cancellations cover each path.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): observe cancellation during structural parsing

* fix(zstd): project section-name frame caps at the ELF directory boundary

readElfDirectoryFromBuffer now requires the caller's operation and throws the adjustable zstd.max_frames resource limit. Hardening, unwind, and the other directory consumers keep that typed refusal instead of an adapter or I/O error.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): preserve optional ELF evidence when frames are capped

* fix(zip): validate Zstandard members through frame completion (#12461)

fix(zip): require complete Zstandard member frames

* fix(elf): yield hardening section name decoding

* fix(elf): yield section names for unwind and export reads

* fix(zstd): yield ELF directory reads that already own a cancellation signal

Hardening, unwind, initializers, exports, kernel modules, debug link, and Android JNI now read section names through the cooperative directory when their caller has a signal. Readers with no signal stay synchronous.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(elf): share one initializer directory and retain its snapshot

* fix(android): reuse the admitted JNI ELF directory

* fix(elf): retain optional debug candidate evidence through cooperative decoding

* fix(zstd): yield ELF section names for Go, Rust, and IL2CPP

These inspections already own an abort signal. Their ELF directory read now uses the cooperative container decoder so a queued cancellation can land during a many-frame section-name table.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(elf): recognize compressed kernel modules before ELF decoding

The cooperative module reader decoded the bytes as ELF before the container check, so gzip, xz, and zstd modules became malformed images. The compression check now returns the unsupported-container report first.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* refactor(elf): classify each container once before reading it

* fix(il2cpp): preserve admission order during cooperative linking

* fix(elf): reuse section-name decoding in debug-link comparison (#12472)

* style(elf): format updated section-reader test calls

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 19:45:26 +00:00
4491c84c82 fix(node-sea): bound duplicate blob verification work (#11736)
* fix(node-sea): bound duplicate blob verification work

* test(mcp): observe cleanup failures at their current delivery boundary

* fix(mcp): preserve workflow completion progress through delivery

* test(setup): keep the Windows Kimi profile fixture on a supported profile

The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.

The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.

Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.

* test(ci): restore verifier and MCP contract regressions

* test(captures): assert adapter-owned input issue field names

* fix(ghidra): avoid Java probes for missing installations

* test(ghidra): drop duplicate absent-installation coverage

Merging main reapplied the #11732 case beside the copy already on main.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(node-sea): assert duplicate-blob refusal without stdout prose

The CLI coverage already checks the truncated code and limit details.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: g0at <50488370+g1at@users.noreply.github.com>
Co-authored-by: IvenKooLab <276572622@qq.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 11:25:23 -05:00
morluto e59b4f6faa fix(android): validate vendor ramdisk table before capacity (#12395)
fix(android): validate vendor ramdisk table framing before capacity
2026-11-19 15:22:42 +00:00
ShuaixinHuangandShuaixinHuang 3fdda4e1a1 test(hopper): synchronize silent reconnect expiry assertions (#12374)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 14:37:18 +00:00
morluto 1e5956a587 fix(artifacts): verify FAT identities before Bun and Node SEA claims (#12288)
* fix(artifacts): verify FAT identities before Bun and Node SEA claims

* fix(node-sea): bound thin Mach-O header reads to their slice

* fix(bun): exclude rejected FAT slices from trailer fallback
2026-11-19 11:51:55 +00:00
3d460d1e0c fix(godot): keep PCK members within the pack data region (#12269)
* fix(godot): keep PCK members within the pack data region

* fix(godot): reserve the complete PCK header extent

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 11:41:37 +00:00
morluto b406649be0 fix(managed): require unique Module rows with ambiguous string heaps (#12277)
Apply the Module row cardinality check before interpreting either the nil or nonzero name index in a conflicting #Strings layout.
2026-11-19 11:19:07 +00:00
morluto a4bf59f661 fix(managed): preserve Module identity with an unresolved name (#12265)
Admit exact string heap aliases and retain independent Module row facts for distinct declarations. Bind the optional partial row to the same scope checks as named Module Evidence.
2026-11-19 06:08:59 -05:00
morluto ae8fb57ef0 fix(managed): preserve duplicate GUID stream ambiguity (#12217)
* fix(managed): preserve duplicate GUID stream ambiguity

* fix(managed): preserve ambiguous metadata stream declarations (#12226)

Use one stream declaration owner for heap and table diagnostics. Keep user strings and row-layout uncertainty separate from independent PE/CLI observations.

* test(managed): separate heap entries from cache behavior

* fix(managed): preserve duplicate blob heap ambiguity (#12258)

Resolve #Blob in the shared stream layout. Preserve nil references and independent facts without emitting unsupported keys, signatures or hashes.
2026-11-19 03:49:34 -05:00
morluto 140ccddc11 fix(managed): keep checked row reads under the managed cursor (#12204) 2026-11-19 05:26:47 +00:00
ShuaixinHuangandShuaixinHuang 2b21cada51 test(devicetree): protect 64-bit reservation words (#11809)
test(devicetree): qualify reservation oracle on current parser boundary

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 00:13:06 -05:00
ShuaixinHuangandShuaixinHuang a3714e6fe2 test(fit): verify wide addresses with U-Boot producer fixtures (#12028)
* test(fit): preserve producer addresses above 2^53

* test(fit): compare producer bytes independently of compression

* test(fit): require all producer storage modes

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 00:13:00 -05:00
ShuaixinHuangandShuaixinHuang 6825ce707a test(model): verify safetensors ranges with Rust producer fixtures (#12030)
test(model): qualify safetensors storage with a Rust oracle

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 00:12:55 -05:00
ShuaixinHuang 08a1ec850b test(protobuf): qualify scalar interpretations with a Python oracle (#12038) 2026-11-19 00:12:45 -05:00
ShuaixinHuang 3329d6da95 test(browser): protect PNG scanline filter reconstruction (#12050) 2026-11-19 00:12:41 -05:00
ShuaixinHuang e70c4c963a test(pe): qualify large icon declarations with real producers (#12051) 2026-11-19 00:12:36 -05:00
2SinceJuly 075bf61b22 test(gpu): protect CUDA 0x2000 LZ4 payload identity (#10339)
* test(gpu): protect CUDA 0x2000 LZ4 payload identity

CUDA LZ4 entries were decodable through the shared block decoder, but no
public workflow selected a 0x2000 entry and checked the retained PTX bytes.
The fixture builder offered only none/zstd/legacy, so the profile dispatch in
readCudaFatbinary had no decoded-payload control.

Add an lz4 fixture profile backed by a single literal sequence, extend the
existing boundary matrix to it, and add boundary plus CLI/MCP regressions that
assert compression_id, decoded size, retained PTX text and the decoded digest.
A malformed decoded-length control covers the rejection path. Temporarily
disabling the 0x2000 profile selection makes all three new cases fail.

Verified with npm run check:fast and the GPU boundary, acceptance, inventory
and LZ4 suites (161 passed). No native liblz4 or CUDA compiler is required.

* style(gpu): apply repository formatting

* test(gpu): follow the shared CLI session rename in the code-object test

Upstream #10412 removed runFileCli from the CLI fixture and moved every
acceptance test onto the file-level shared process (cli.run). Rebasing
onto current main left this new LZ4 assertion calling the deleted helper,
so the whole file failed with a ReferenceError and the shared worker was
torn down for the rest of the suite.
2026-11-19 00:12:31 -05:00
ShuaixinHuang ce0e3b3b9e test(python): pin CPython code-object equality controls (#12040) 2026-11-19 00:10:24 -05:00
ShuaixinHuang ca5676cee6 test(qlog): pin recovery packet-number spaces (#12039) 2026-11-19 00:10:19 -05:00
ShuaixinHuang 9766c93518 test(elf): protect GCC unique export bindings (#12049) 2026-11-19 00:10:15 -05:00
ShuaixinHuang 89f2b50100 test(native): guard i386 REL initializer word truncation (#12048) 2026-11-19 00:10:11 -05:00
ShuaixinHuang b0b03258f2 test(artifacts): guard LZ4 long-distance content identity (#12036) 2026-11-19 00:10:06 -05:00
ShuaixinHuangandmorluto 3fae997886 fix(desktop): reject invalid build screenshot encodings (#12179)
* fix(desktop): reject invalid build screenshot encodings

* fix(desktop): finish screenshot admission review

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 05:08:14 +00:00
ShuaixinHuang af20de3509 feat(native): resolve RISC-V ELF initializer pointers (#12109) 2026-11-18 19:45:05 -05:00
ShuaixinHuangandShuaixinHuang 229fc6aae8 fix(ci): synchronize CDP handshake and attach deadlines (#12110)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-18 19:23:46 -05:00
RRFZ 2076b7bf88 refactor(desktop): inject HostFileReader port into build solve and witness (#11880)
refactor(desktop): inject HostFileReader port into build solve and witness workflows
2026-11-18 19:22:40 -05:00
morluto 21829964ef fix(kuna): recover explicit direct-call destinations (#12106)
* fix(kuna): recover explicit direct-call destinations

* fix(kuna): preserve call evidence on decompile failure
2026-11-18 19:07:02 -05:00
e3713bea60 feat(rust): read cargo-auditable dependencies from WebAssembly modules (#5069)
* feat(rust): read cargo-auditable dependencies from WebAssembly modules

cargo-auditable embeds the same zlib-compressed `.dep-v0` JSON in a
WebAssembly custom section for wasm32 targets, but inspect_rust_binary
rejected every module as an unsupported target because only ELF, PE and
thin Mach-O containers were recognized.

Walk the section framing of version 1 core modules to locate the
`.dep-v0` custom-section payload and the data section, where rustc keeps
its constant /rustc/<hash>/ paths. Rust lookups now read one
format-neutral layout, so native and WebAssembly images share a single
dependency-section owner. WebAssembly declares no container word size, so
`bits` is null for that format only; the Evidence subject format is
`file`, as for inspect_wasm_artifact.

Truncated sections, invalid LEB128 sizes, custom-section names that run
past their section or are not UTF-8, duplicate `.dep-v0` sections and a
second data section are malformed. Components, such as wasm32-wasip2
output, embed core modules and are refused as unsupported, like universal
Mach-O containers, rather than inspected through one selected module.

* fix(rust): bound the WebAssembly section walk

The WebAssembly reader visited every section synchronously, and the format
sets no section count. A 256 MiB input of three-byte custom sections with
empty names walked about 89 million sections and held the event loop for
about 7.4 seconds, delaying cancellation and other MCP requests; empty type
sections took about 1.9 seconds.

Refuse a module with more than 65,536 sections with a typed cpu resource
constraint that reports maximum_wasm_sections, as the Go header search
reports its work budget. Producer output holds a few dozen sections, and the
same inputs are now refused within tens of milliseconds.

* fix(rust): accept WebAssembly Evidence in retained dependency views

Retained Rust views compared the parent subject with a Mach-O-only format
mapping, so WebAssembly Evidence, whose subject format is file, was refused
as a different artifact. The report domain now owns the subject format next
to the architecture mapping, and the service and the view both use it. The
real CLI/MCP view workflow now also covers a WebAssembly module.

* fix(rust): name the WebAssembly section-walk allowance in recovery

Fixed-allowance recovery mapped every Rust resource other than capacity and
transport to the parser allowance, so the section-walk refusal said host
memory does not raise it. Each Rust resource now maps to its own allowance,
and the cpu bound is a fixed work allowance. The MCP error contract test
checks that the refusal is not retryable and names that allowance.

* fix(rust): require WebAssembly container facts in reports

The report schema tied a null word size to WebAssembly, but it accepted a
wasm report that named a native architecture or big-endian byte order, and
a native report that named the wasm architecture. Retained views parse
imported Evidence with this schema, so such a contradictory report was
accepted. The architecture is now wasm exactly when the container is
WebAssembly, and a WebAssembly report must be little-endian.

* docs(rust): record the WebAssembly dependency-metadata feature

Feature work now carries a spec, plan and task list under docs/specs.
This adds that record for reading cargo-auditable metadata from
WebAssembly core modules and indexes it. The record states that it was
written during review and lists the verification that remains open.

* fix(rust): bind section names to containers and share the LEB128 reader

The report schema accepted a dependency section name that does not belong
to the report's container, such as a WebAssembly report naming the Mach-O
section. rustDependencySectionName now owns that name for the reader and
the schema, which refuses a mismatch for every container.

The WebAssembly reader decoded section sizes with its own loop. It now
uses the shared readLeb128, and an integer cut off by the end of the file
is truncated rather than malformed.

* fix(rust): classify a cut-off WebAssembly integer by its boundary

The reader called an unfinished LEB128 integer truncated whenever its
limit equalled the file length. A name length cut off inside the final
section was therefore truncated, and the same bytes followed by another
section were malformed. Each caller now states whether the file or the
enclosing section bounds the integer.

* fix(rust): report a duplicate WebAssembly dependency section first

The section walk kept two .dep-v0 matches but walked on, so a module with
two dependency sections and more than 65,536 sections after them was
refused for the section bound instead of the duplicate it had already
established. The walk now ends at the second match.

* test(rust): assert WebAssembly container facts instead of limitation prose

The CLI acceptance test matched an English limitation sentence. It now
checks format, architecture, bits and byte order on the parsed report.

* fix(rust): state container word size as 32 | 64 | null

Output contract: inspect_rust_binary bits, including the summary view, is
32 | 64 | null. Null is valid only for WebAssembly and is not a number.
ELF, PE and Mach-O reports stay 32 or 64. The schema description, guide,
feature record and skill state that, and CLI renderers keep null instead
of substituting a word size.

---------

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-18 18:29:31 -05:00
00a3f4d2b9 fix(process): preserve Darwin snapshot and cleanup failures (#12100)
* fix(process): preserve Darwin opening snapshot failures

* fix(process): retain the exact Darwin helper cleanup owner

Transfer the failed helper-root capability across repeated prepare failures. Reuse that same owner for retirement and reader close so stale cleanup cannot remove a replacement helper.

Co-authored-by: Anandumv <anandumv@gmail.com>
Co-authored-by: nextjohnp7 <nextjohnp7@gmail.com>

* test(process): isolate retained cleanup and compiler acknowledgements

---------

Co-authored-by: Anandumv <anandumv@gmail.com>
Co-authored-by: nextjohnp7 <nextjohnp7@gmail.com>
2026-11-18 17:34:25 -05:00
Ahmedandmorluto dc6799d488 fix(android): report method disassembly failure as unavailable body (#12090)
* fix(android): report method disassembly failure as unavailable body

Catch JADX bridge get_method_body failures in inspectMethod and project as an unavailable body with disassembly_failed marker, avoiding generic execution_failure with irrelevant rea doctor remediation.

Fixes #10482

* fix(android): preserve method identity when disassembly is unavailable

* fix(android): retain method identity when smali generation fails

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 15:23:34 -05:00
ShuaixinHuangandShuaixinHuang 0db5f93df6 fix(protobuf): preserve descriptor string identity (#11834)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-18 14:59:49 -05:00
ShuaixinHuangandShuaixinHuang 1290ab401c fix(elf): resolve extended symbol section references (#11924)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-18 14:58:29 -05:00
ShuaixinHuangandmorluto f7849cad3f fix(elf): require sizes for declared Android RELR tables (#12067)
* fix(elf): require sizes for declared Android RELR tables

* test(android): allow JNI relocation cases without RELR aliases

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 11:35:39 -05:00
sunfleeting f93a8db72d fix(cli): use canonical option flags in llms manifests (#11928)
The --llms-full manifest and discovery table rendered raw object keys
(--blockSize), which disagreed with command help (--block-size). Reuse
optionFlagName so manifests emit the same canonical flags as help, and
update the two CLI parity goldens. Adds a boundary test asserting both
surfaces agree on canonical flag names.
2026-11-18 10:57:01 -05:00
David Muñoz Rey 93bf4df3e4 test(inspector): spell Node discovery targets as Node reports them (#10663)
* test(inspector): spell Node discovery targets as Node reports them

The fake V8 Inspector gave Node-type targets a percent-encoded WHATWG file
URL, while Node's /json/list reports `file://` plus the raw pathname with
quotes and backslashes replaced by underscores. The product reads that
channel literally, so a TMPDIR containing a space or percent sign named a
pathname that did not exist and the target stayed unresolved: the
Inspector cancellation test and "includes targets outside the old caller
root filter" failed on unrelated assertions.

Add nodeDiscoveryTargetUrl to the fake and use it where a resolved Node
target location is asserted. The underscore case stays with
createNodeDiscoveryTempDirectory.

Validation: 69 inspector/browser/MCP/acceptance test files, 1168/1168
passing under TMPDIR spellings with an underscore, a space, a percent sign
and none; check:fast passes.

Refs morluto/rea#9996

* test(inspector): pin special-character Node discovery spellings

Review follow-up for Node discovery target URLs.

Neither caller gave nodeDiscoveryTargetUrl an explicit special-character
path, so spaces and percent signs were exercised only when TMPDIR
happened to contain them. A boundary case now lists two targets in one
discovery root. "with space %41.js" is reported literally and resolves
to its file. 'with "quote".js' is reported with underscores and stays
an unresolved, unverifiable file location.

Tests: tests/boundary/inspector/javascriptRuntimeObservation.test.ts
passes (31).

* test(inspector): spell the consolidated target listing as Node reports it

main folded the test this branch had respelled into "lists all
connectable targets on the selected endpoint across directories", which
still built its two discovery targets with pathToFileURL. Under a
temporary directory with a space or a percent sign those targets came
back unresolved and the file-location assertions failed.

Build them with nodeDiscoveryTargetUrl, as the rest of this branch does.
2026-11-18 10:48:59 -05:00
ShuaixinHuangandShuaixinHuang 932afbeec5 fix(pe): map import hints independently of names (#11817)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-18 10:47:30 -05:00
ShuaixinHuangandmorluto 2f6773cbc7 fix(ci): synchronize build-computer cancellation tests (#12042)
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 10:04:06 -05:00
morluto 25784cd4e7 fix(ci): refresh CLI decimal schema goldens 2026-11-18 10:02:07 -05:00
ShuaixinHuang 32b2020571 fix(elf): recover pointers from Android APS2 relocation tables (#12047) 2026-11-18 09:42:00 -05:00
morluto 39e8403306 fix(cli): show --json in global help (#12058) 2026-11-18 08:54:35 -05:00
morluto da5ff5e7a7 test(webmcp): consolidate passive discovery coverage
Exercise exact replay ownership, malformed declarations and frame scope, transient recovery, and canonical schema evidence through shared CDP captures. Remove unused fake modes.
2026-11-18 08:43:07 -05:00
morluto 005a61cf4c test(browser): consolidate navigation timeline coverage
Share observations across redirect response and fragment cases while retaining the wire checks for caller cancellation, final URL identity, and ordered lifecycle events.
2026-11-18 08:43:07 -05:00
morluto 8412ce74ff fix(ci): synchronize build computer cancellation tests 2026-11-18 08:13:07 -05:00
morluto caedefa00d test(browser): consolidate CDP and source map coverage
Use shared captures to verify discovery, document identity, screenshot recovery, and source map evidence and cleanup across varied responses. Remove redundant tests and unused fixture controls.
2026-11-18 03:51:31 -05:00