Commit Graph
7063 Commits
Author SHA1 Message Date
Vincent Koc d086ce5d41 test(ci): share docs and code scope expectations (#16853) 2026-12-05 06:12:25 +08:00
Vincent Koc 48fc7116fb test(views): share retained view success projection (#16846) 2026-12-05 05:36:40 +08:00
Vincent Koc 78853792fb test(mcp): verify canonical EVM detail guidance (#16843) 2026-12-05 05:04:31 +08:00
ShuaixinHuangandShuaixinHuang ee76d1a05a fix(browser): compare saved captures without a CDP provider (#16756)
* fix(browser): compare saved captures without a CDP provider

* fix(browser): align offline comparison callers and discovery

* test(browser): assert offline comparisons in catalog presentation

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-12-04 15:29:52 -05:00
Vincent Koc 0ad9672589 refactor(views): share oversized singleton paging (#16832) 2026-12-05 04:07:34 +08:00
Vincent Koc f413042977 test(deno): share extraction fixture arguments (#16825) 2026-12-05 03:35:49 +08:00
Vincent Koc 3b690f6523 test(sqlite): share row assertion projection (#16817) 2026-12-05 03:01:49 +08:00
Vincent Koc 819ecf1ad4 fix(test): verify retained worker checkpoints on cancellation (#16815) 2026-12-05 02:47:54 +08:00
Vincent Koc 0e70592b33 test(apple): share Interface Builder bundle fixture requests (#16802) 2026-12-05 01:37:39 +08:00
Eliran Zachandmorluto 33b2763423 feat(artifacts): inspect PlayStation PS-X EXE headers (#16251)
* feat(artifacts): inspect PlayStation PS-X EXE headers

A file starting with the PS-X EXE magic is inventoried as psx-exe. Root
metadata reports the initial PC and GP, the text, data and BSS ranges,
the stack base and offset with the initial SP, the region marker and
its licensed region, and whether the file length agrees with 0x800 plus
the declared text size. header.bin and text.bin are stored ranges;
text.bin carries its load address and holds only the bytes present.

A file shorter or longer than the declared text, or a text size that is
not a whole number of 2048-byte sectors, leaves coverage unknown with
the offset involved. A file that ends inside the header is refused as
truncated with the offset where it ends. Nothing is executed.

* fix(artifacts): read PS-X EXE fields through BinaryReader and match regions exactly

A region marker such as constructor matched an inherited property of the
region table, so the metadata held a function and inventory failed when
it was cloned. Regions now come from a Map. Header words are read
through BinaryReader instead of a local decoder. The fixture writes
literal offsets with distinct non-zero values, including data and a
stack offset, and the guide says inventory reads the members to hash
them.

* fix(artifacts): validate PS-X file sizes and name the omitted text member

* test(artifacts): extract PS-X EXE members in the reader test

* style(artifacts): format the PS-X reader test

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-12-04 17:31:34 +00:00
Eliran Zachandmorluto d28ee2b639 feat(model): inspect PyTorch checkpoints and pickle opcodes statically (#16257)
* feat(model): inspect PyTorch checkpoints and pickle opcodes statically

inspect_model_artifact now reads PyTorch ZIP checkpoints, legacy torch.save
files and protocol 2-5 pickle streams without unpickling. A bounded static
walker (protocols 0-5) reports each stream's protocol and opcode counts and
every GLOBAL, STACK_GLOBAL, INST, OBJ, REDUCE, NEWOBJ, BUILD and EXT reference
with its offset, marking callables outside PyTorch's tensor-rebuild allow-list
as observations of what loading would import or call.

ZIP checkpoints report their archive prefix, version, byteorder and
serialization records and each referenced data/<key> storage; legacy files
locate every storage in the file. State-dict tensors get dtype, shape, byte
span and parameter counts, and names when one unshared key path reaches them.
Malformed opcodes, truncation and memo misuse are target failures with their
offset; max_pickle_opcodes and max_pickle_memo_entries bound the walk.

Refs #3652

* fix(model): address pickle walker and PyTorch interpretation review findings

- push APPENDS/ADDITEMS values one at a time instead of spreading them
- replace an equal key on SETITEM(S), as unpickling does
- refuse a FRAME longer than the remaining stream as truncated
- decode BINUNICODE with surrogatepass and validate raw-unicode-escape text
- unwrap _rebuild_parameter chains iteratively
- resolve tensor key paths once per node and charge names before building them
- inventory every storage persistent ID and require its storage bytes
- bound archive records in the MCP summary with record_count and records_omitted

* fix(model): bound pickle integers, ZIP names and keep partial facts

- validate but do not convert protocol 0 integers beyond an exact long; refuse inexact memo keys
- decode STRING with Python's escape rules, keeping unknown escapes
- fill the format peek before classifying the file
- read PyTorch ZIPs under the session member count with a bounded metadata read, charging names as they are listed
- retain completed pickle facts before full-file hashing
- mark tensor coverage partial when a rebuild call cannot be read

* fix(model): keep Python string identity and bound dict-key work

- record the exact code point sequence of strings holding Python surrogates, so distinct keys stay distinct
- build each key's identity once per node, so a reused memoized key is not rebuilt per write
- decode raw-unicode-escape text in bounded batches instead of one fragment per backslash run
- keep the first equal key when SETITEM replaces its value

* fix(model): scan raw-unicode-escape text in one pass

Measure each backslash run once instead of retrying a regular expression from every backslash, and build output without a per-escape list.

* fix(model): keep GGUF partial tensor data offsets non-null

* fix(model): bound pickle tensor counts and validate FLOAT operands

* fix(model): bound shared tensor work and read expanded views

* fix(model): format the pickle changes and drop the unused ModelFormat type

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-12-04 17:10:56 +00:00
Eliran Zachandmorluto 73582aa342 feat(native): identify Nim, Zig, GHC, OCaml and D toolchains (#16252)
* feat(native): identify Nim, Zig, GHC, OCaml and D toolchains

Add identify_native_toolchain, a static, read-only reader that reports
whether a local ELF, PE or thin or universal Mach-O image was built by
Nim, Zig, Haskell (GHC), OCaml or D, including stripped images without
a DWARF producer.

The reader searches a bounded part of the selected image for a fixed
table of runtime symbol names, runtime messages, mangled names, source
paths and producer strings, and returns each observed marker with its
file offset, section or segment, matched text and occurrence count.
Data sections are searched before bytes outside sections and before
instruction sections, so a bounded scan reaches strings first;
coverage reports the bytes examined.

The verdict is derived from the listed markers only: a language needs
two distinct markers, one strong. Conflicting, too few or no markers
give unknown, and a version is reported only when a marker states it.

* perf(native): order toolchain scan ranges in linear time

Intersect instruction sections with the bytes outside data sections in one pass, so an image with tens of thousands of sections does not take quadratic time before the scan starts.

* fix(native): bound stated toolchain versions and describe scan order

Track distinct versions per marker in a Set and list at most eight,
counting the rest in versions_omitted, so an image with many version
strings costs constant time per match and a bounded result. A candidate
reports a version only when exactly one was stated.

Describe max_scan_bytes and examined_bytes as a total in scan order
rather than a prefix from the image start, and place the chunk-boundary
test's marker across an actual read boundary.

* fix(native): keep every stated toolchain version in the report

* fix(native): bound stated toolchain version bytes before keeping them

* feat(native): make the stated version budget a per-call control

* fix(native): give no larger-limit retry once a toolchain control is at its maximum

* fix(native): do not match toolchain markers on truncated runs

* fix(native): keep exact markers on a final run at the image end

* style(native): format the toolchain changes

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-12-04 12:09:21 -05:00
Eliran Zachandmorluto 208b81d724 feat(artifacts): inspect Game Boy and GBA ROM headers (#16249)
* feat(artifacts): inspect Game Boy and GBA ROM headers

Game Boy and Game Boy Color images (game-boy-rom) are claimed when at
least the first 24 bytes of the boot logo at 0x104 match, the half every
boot ROM compares. Root metadata reports the entry code and its JP
target, full or top-half logo match, title and manufacturer code, CGB
and SGB flags, mapper and features, declared ROM and RAM sizes,
destination, licensee codes, version, and declared and computed header
and global checksums. The global checksum is summed over the file in
bounded reads.

Game Boy Advance images (gba-rom) are claimed from an ARM branch at 0,
the fixed 0x96 at 0xB2, and the boot logo or a matching complement
check. Root metadata reports the entry branch target, logo match, title,
game and maker codes, fixed value, unit and device type, version, the
complement check, and the multiboot fields when that layout could apply.

Both serve header.bin and program.bin as stored ranges. Logos are
compared by SHA-256 digest, so no logo bytes are carried. Checksum,
logo and size disagreements leave coverage unknown; a header cut short
is refused as truncated with the offset where the file ends.

* fix(artifacts): keep missing GBA multiboot fields unknown and pin checksum vectors

A GBA file that ends inside the multiboot fields reported boot_mode and
slave_id as zero. They are now null, with a limitation naming where the
file ends. The Game Boy reader charges artifact_limits.expanded_bytes
from the file size before it sums the file for the global checksum.
Checksum tests now use hand-derived vectors instead of copying the
parser's own result.

* refactor(artifacts): read Game Boy and GBA header fields through BinaryReader

The GBA parser decoded words with a local reader that read missing bytes
as zero. Both parsers now read header fields through BinaryReader, as the
tool-design guide requires, after their length checks. The fixtures write
literal offsets instead of the parsers' field constants, and the guides
say inventory reads the stored members to hash them.

* fix(artifacts): read documented GB size codes and MBC4, refuse truncated GBA headers

* style(artifacts): format the handheld ROM test

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-12-04 12:08:57 -05:00
Vincent Koc 6d3b582215 test(guards): share optional-fact default assertions (#16757) 2026-12-04 22:52:50 +08:00
Vincent Koc b7104bec93 test(artifacts): reuse the ESP flash MCP inventory reader (#16753) 2026-12-04 22:30:11 +08:00
Vincent Koc 7e77b39e0f test(ci): share static artifact listing fixtures (#16746) 2026-12-04 22:05:20 +08:00
Vincent Koc 1dd7550819 refactor(tests): reuse the devicetree CLI evidence reader (#16744) 2026-12-04 21:46:42 +08:00
Vincent Koc 3f11e2057f test(limits): share single-source discovery fixtures (#16739) 2026-12-04 21:20:39 +08:00
Vincent Koc 76fb4f1850 test(sqlite): share short-lived database fixtures (#16737) 2026-12-04 21:18:55 +08:00
Vincent Koc 1e1d1b3f93 test(sourcemaps): share flat source map fixtures (#16726) 2026-12-04 20:47:42 +08:00
Vincent Koc b44301c323 test(artifacts): share comparison change matchers (#16722) 2026-12-04 20:39:51 +08:00
Vincent Koc ab4b20aa9b test(cli): reuse the JSON schema command fixture (#16710) 2026-12-04 20:00:09 +08:00
Vincent Koc fb131b6cc9 test(ci): share repository reads in required-lane fixtures (#16707) 2026-12-04 19:41:17 +08:00
Vincent Koc 94d95ca520 test(ci): share completed-job fixture pages (#16700) 2026-12-04 19:22:25 +08:00
Vincent Koc 598436f0ad test(cli): share reference source link expectations (#16695) 2026-12-04 18:50:18 +08:00
allisaid 2f83551fb5 test(unknowns): verify duplicate recovery facts over MCP 2026-12-04 17:49:39 +08:00
Saim Shafique 9071a418b7 fix(cli): base the array repeat hint on the field description 2026-12-04 17:35:20 +08:00
Saim Shafique 77b43be692 fix(cli): say array options repeat per value in help 2026-12-04 17:35:20 +08:00
Vincent Koc c4a076c07c test(harmony): share deterministic inventory projection fixture (#16671) 2026-12-04 17:07:17 +08:00
Anurag Singh ba5b0ae225 test(asar): cover unreadable packed members in coverage 2026-12-04 17:06:37 +08:00
Anurag Singh 3741beeafc fix(asar): report bytes outside every packed member as unknown coverage
The ASAR reader declared complete coverage after listing the header's
members, even when bytes after the header belonged to no packed member:
bytes after the last member, gaps between members, or the declared range
of a member that cannot be read. Coverage is now unknown in those cases,
with a limitation giving the unaccounted bytes, their range count and the
first offset. Unpacked members need no packed bytes.

The gap measurement the wxapkg reader used moves to a shared
unaccountedBytes helper that both readers call.

Closes #16588
2026-12-04 17:06:37 +08:00
Vincent Koc f7642e8363 test(mcp): share full completion page fixtures (#16668) 2026-12-04 16:54:41 +08:00
Vincent Koc 38dfd56d13 test(conformance): share invalid fixture expectation pairs (#16650) 2026-12-04 16:01:25 +08:00
Vincent Koc 7815ed620c test(cli): share byte entropy discovery fixtures (#16640) 2026-12-04 15:34:34 +08:00
Vincent Koc 235bd94871 test(cli): share delimited selection fixture arguments (#16639) 2026-12-04 15:33:19 +08:00
Vincent Koc 64cbcb7662 test(ci): share empty history selection expectation (#16636) 2026-12-04 15:26:07 +08:00
Vincent Koc 2cb23ab6fc test(zcode): share registration status fixture reads (#16629) 2026-12-04 15:09:32 +08:00
Vincent Koc 98f5910898 test(release): share workflow step command fixtures (#16618) 2026-12-04 14:37:50 +08:00
Vincent Koc c150d7ec66 test(managed): share structured MCP test calls (#16615) 2026-12-04 14:24:24 +08:00
Vincent Koc 941f9d3074 test(setup): share Vibe registration status fixtures (#16605) 2026-12-04 13:40:33 +08:00
Vincent Koc d15290ff9a test(javascript): share terminal progress failure fixtures (#16602) 2026-12-04 13:36:03 +08:00
Vincent Koc 58567ee986 test(jadx): share DEX static value fixtures (#16596) 2026-12-04 13:17:23 +08:00
Vincent Koc defa25eb7e test(javascript): reuse the export shape parser fixture (#16590) 2026-12-04 12:57:04 +08:00
Vincent Koc 275ad75606 test(desktop): share package owner fixture replies (#16586) 2026-12-04 12:39:44 +08:00
hhangandhhang 0a71a25e4d fix(tar): recognize gzip archives with long comments (#16188)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-12-04 04:28:45 +00:00
Vincent Koc d4114d7030 test(firmware): share synthetic extraction fixture requests (#16572) 2026-12-04 11:55:10 +08:00
Vincent Koc 8e7fa410de test(artifacts): reuse Apple application inventory fixtures (#16569) 2026-12-04 11:40:27 +08:00
Vincent Koc 6aa3ae45b1 test(cli): share default parser export comparison fixtures (#16550) 2026-12-04 11:05:11 +08:00
Vincent Koc a7e38b20b5 test(cli): share complete model inspection arguments (#16547) 2026-12-04 10:50:25 +08:00
Vincent Koc 1fb434f637 test(mcp): share the analysis settings ASAR fixture (#16545) 2026-12-04 10:49:43 +08:00