Commit Graph
11209 Commits
Author SHA1 Message Date
Vincent Koc cd2f4dd985 refactor(setup): reuse unresolved registration status projection (#15742) 2026-12-02 02:38:11 +00:00
Vincent Koc d81ec9193f refactor(debian): retain one tar inventory result (#15743) 2026-12-02 02:32:53 +00:00
Vincent Koc ca0ab102ab test(javascript): share CLI and MCP Evidence checks (#15741) 2026-12-02 02:31:44 +00:00
Vincent Koc 67a4531be2 refactor(bink): share table layout results (#15736) 2026-12-02 02:18:21 +00:00
Vincent Koc a795e1a46a refactor(setup): share MCP stdio connection profiles (#15734) 2026-12-02 02:17:12 +00:00
Vincent Koc 160df1cda3 refactor(elf): share unwind-header result assembly (#15735) 2026-12-02 02:16:45 +00:00
Vincent Koc ed6f32720c test(gpu-assets): share GLB fixture envelopes (#15732) 2026-12-02 02:06:54 +00:00
Vincent Koc 15e539b939 refactor(managed): share ambiguous member projection (#15728) 2026-12-02 02:06:43 +00:00
Vincent Koc 34548945c5 refactor(apple-ips): share lossless JSON container parsing (#15730) 2026-12-02 01:58:17 +00:00
Vincent Koc b0a6081ef2 test(vsix): share the inspection report fixture (#15729) 2026-12-02 01:55:33 +00:00
Vincent Koc cacaefe8f8 refactor(api-contract): share parser heap admission (#15725)
* refactor(api-contract): share parser heap admission

* refactor(errors): centralize measured heap refusals

* test(api-contract): isolate parser heap regression
2026-12-02 01:47:46 +00:00
Vincent Koc 3c79efe719 refactor(dotnet): share partial metadata failure projection (#15723) 2026-12-02 01:33:47 +00:00
Vincent Koc 106dbf8e72 test(application): reuse inspection input refusals (#15724) 2026-12-02 01:31:18 +00:00
morluto df081bf7ac ci(test-selection): run every portable test when error classification changes (#15705)
* ci(test-selection): run every portable test when error classification changes

Boundary and acceptance tests pin the code, category and retry class a
refusal reports, but reach src/domain/analysisError* only through the
built CLI or MCP server, so PR selection never picked them. A
classification change (#15588) passed CI and left stale pins that
failed later on unrelated PRs. Treat a change to that owner as
untraceable so the plan falls back to the complete fast suite.

The rule lives in test selection rather than SHARED_BOUNDARY, because
that list also limits lane planning to a single naming lane and would
drop the four lanes that name these files.

* style(ci): format test selection
2026-12-01 20:28:53 -05:00
Vincent Koc 0cd6f5e0d4 refactor(views): reuse indexed row projection (#15721) 2026-12-02 01:23:09 +00:00
Vincent Koc 5b44553e4b refactor(plist): share extended length decoding (#15719) 2026-12-02 01:22:14 +00:00
Vincent Koc 1d0588f6f3 refactor(views): share byte-bounded item page envelopes (#15718) 2026-12-02 01:22:11 +00:00
Vincent Koc 449fef2c03 test(packages): reuse late cancellation evidence fixture (#15720) 2026-12-02 01:18:45 +00:00
Vincent Koc 1010b14e8e refactor(zip): share local record projection (#15716) 2026-12-02 01:11:22 +00:00
Vincent Koc edd86ceefb refactor(uefi): share exact name matching across views (#15714) 2026-12-02 01:08:21 +00:00
ShuaixinHuangandShuaixinHuang ba7a66b6a2 fix(analysis-view): fit managed member pages to byte budget (#15564)
* fix(analysis-view): fit managed member pages to byte budget

* fix(analysis-view): type the projected managed row shape

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-12-02 09:07:44 +08:00
Vincent Koc 31ccc8ba51 refactor(utmp): share endian profile layouts (#15713) 2026-12-02 01:06:57 +00:00
ShuaixinHuangandShuaixinHuang c06ed13ddf fix(analysis-view): return continuation for oversized batch decompile pages (#15557)
* fix(analysis-view): return continuation for oversized batch decompile pages

* test(analysis-view): check the typed batch continuation response

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-12-02 09:04:57 +08:00
Vincent Koc 35a43708bf test(resources): reuse bundle cleanup promise fixtures (#15715) 2026-12-02 01:04:41 +00:00
gensokyo-devandgensokyo-dev e2fce6bb6c fix(maven): read POMs in their declared XML encoding
The Maven reader decoded every file as strict UTF-8, so an ISO-8859-1 POM
such as Maven's own pom-encoding fixture, or a BOM-marked UTF-16 POM,
failed as "not valid UTF-8". Decode with the shared XML text decoder and
admit ISO-8859-1. A POM that declares an encoding REA does not decode is
now refused as unsupported and names that declaration.

Fixes #15664

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:04:06 +08:00
gensokyo-devandgensokyo-dev 70fc6b745b refactor(xml): let a caller admit declared ISO-8859-1 XML text
The shared XML text decoder reads UTF-8 and BOM-marked UTF-16 and refuses
other declared encodings. A caller can now also admit ISO-8859-1, read
byte for byte when the declaration says so and no byte order mark
contradicts it. Callers that pass nothing keep refusing it, and the
refusal lists the encodings the caller admits.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:04:06 +08:00
gensokyo-devandgensokyo-dev 3474dd6716 fix(artifacts): report a DDS with no payload bytes as truncated
Every DDS surface holds at least one texel, so a file that ends at its
payload offset is truncated even when the format's exact size is not
derived, such as planar video formats.

Fixes #15674

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:03:56 +08:00
gensokyo-devandgensokyo-dev ea8b79b362 fix(artifacts): derive the DDS payload size for every fixed-size DXGI format
The DXGI table listed only RGBA32, RGBA16 and RGBA8/BGRA8 formats, so a
DX10 texture in R8_UINT, R16_FLOAT, R32_FLOAT, RG8 and other single- or
two-channel formats had no expected payload size and passed the extent
check even with no pixel data. List every format with a fixed number of
bytes per texel.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:03:56 +08:00
Beqa 81adf5ff74 fix(contracts): refuse empty enhanced selector strings (#15589)
* fix(contracts): refuse empty enhanced selector strings

Empty get_call_graph, find_xrefs_to_name, trace_call_path, and
batch_decompile selectors were admitted by the schema, so agents could
reach the provider or record empty Evidence. Align them with the shared
min(1) selector rule.

* test(mcp): refresh advertised compact digests for empty selectors

The min(1) admission change updated the compact input schemas for
batch_decompile, find_xrefs_to_name, get_call_graph, and trace_call_path.
Commit the advertised-schema summaries CI printed for those tools.
2026-12-02 09:00:22 +08:00
Vincent Koc 84414182c9 refactor(browser): share scenario artifact difference formatting (#15710) 2026-12-02 00:55:55 +00:00
Vincent Koc 98c7ee53a0 refactor(mcp): share client configuration presence checks (#15708) 2026-12-02 00:54:42 +00:00
Vincent Koc c40e85a9cf test(pcap): share empty capture fixture fields (#15707) 2026-12-02 00:53:00 +00:00
Vincent Koc 330dd598d2 test(filesystem): reuse artifact file selection assertions (#15709) 2026-12-02 00:51:44 +00:00
Islam Gagiev 78243cb17d fix(artifacts): preserve pre-epoch ar member timestamps (#15502) 2026-12-02 08:48:43 +08:00
gensokyo-devandgensokyo-dev 0ff3cad247 fix(deb): read saved reports that list the triggers file
Evidence files written before triggers stopped counting as a maintainer
script still list it. Accept that name when reading so the summary view
and other readers of saved reports keep working.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 08:47:47 +08:00
2SinceJuly 57956be4c4 fix(deb): stop counting the triggers file as a maintainer script
DEB_MAINTAINER_SCRIPTS listed "triggers" alongside preinst/postinst/
prerm/postrm/config, so inspect-deb-package reported a maintainer script
for packages whose control archive ships a triggers file. Debian defines
triggers as a list of directives dpkg reads (deb-triggers(5)); it is not
an executable maintainer script. Packages like libxv1 therefore showed
one bogus entry named "triggers" with an interpreter line that does not
exist.

Drop "triggers" from the script list and stop treating it as one. Update
the fixture to ship a realistic control-archive triggers file (mode 0644,
activate-noawait directive) so the regression exercises the real shape,
and correct the parser test's script list and summary count. The docs
note that triggers is a directive list, not a maintainer script.
2026-12-02 08:47:47 +08:00
Vincent Koc 9006d17aef test(javascript): reuse package fixture file writer (#15701)
* test(javascript): reuse package fixture file writer

* test(javascript): remove unused fixture path imports
2026-12-02 00:42:49 +00:00
morluto 75474075c4 test(settings): fail analysis settings setup steps with the refusal (#15704)
* test(settings): fail analysis settings setup steps with the refusal

Setup MCP calls asserted only `isError` was not true, so a refused
setup step failed as "expected true not to be true" without the
refusal, and several setup calls were not checked at all. They now use
callOk, which fails at that step with the tool's content. Inventory
lookups no longer hide a missing substep or occurrence behind optional
chaining.

* test(settings): keep the fixture's reply checks on setup steps

callOk now also accepts a fixture's call function, so setup steps keep
the output-schema checks connectLocalToolsMcp applies to replies.
2026-12-02 00:40:31 +00:00
morluto 61f1dede46 fix(resources)!: refuse Windows names ending in a dot or space (#15653)
* fix(resources)!: refuse Windows names ending in a dot or space

Node writes files through `\\?\` paths on Windows, so a member named
`dir/name.` or `dir/space ` is created literally. Win32 path
normalization drops a trailing dot or space when other programs open
the path, so `dir\name.` reads the bytes of a sibling `dir\name`, and
`dir\space ` cannot be opened. The extraction manifest then records a
digest for a path that ordinary tools resolve to different bytes.

A Windows output tree now refuses any path segment that ends in a dot
or space with DestinationPathUnrepresentableFailure, before creating
the path, using the trailing rule isPortablePathSegment already
applies. The refusal names the cause and the next step. Reserved device
names stay accepted, since Node creates them as ordinary files.

Every writer that materializes target-derived names goes through
SafeOutputTree (extract_artifact, firmware and UEFI publication,
desktop export, environment bundles, recovered JavaScript sources, web
script export), so all of them apply the rule. Web script export
already moves an unrepresentable URL path to its isolated layout.

Fixes #15613

BREAKING CHANGE: On Windows, extract_artifact and other output-tree
writers now refuse a path with a segment ending in a dot or space,
where they used to write it. To extract the rest of such an archive on
Windows, select occurrence_ids that leave those members out, or extract
on a non-Windows host. Web script export on Windows writes such URL
paths under its isolated layout instead.

* ci: run Windows extraction name tests in the curated Windows lane
2026-12-01 19:33:46 -05:00
Vincent Koc 7851c78de1 refactor(dotnet): share assembly reference row identity (#15702) 2026-12-02 00:32:59 +00:00
morluto 925dce1ded fix(pe)!: deliver inspect_pe_imports and inspect_pe_resources within the agent result budget (#15687)
* fix(pe)!: deliver inspect_pe_imports and inspect_pe_resources within the agent result budget

Neither tool had a detail input or a summary view, so their complete
Evidence was always delivered inline: about 200-480 KB of CLI JSON for
stock kernel32.dll, shell32.dll and explorer.exe, and over 1 MB over MCP.

Both now follow the inspect_deb_package pattern. With detail omitted,
complete Evidence is returned when it fits the agent result budget, and
otherwise the retained summary with delivery facts; detail complete always
returns everything, and inspect_analysis_view evidence-json pages the
retained record. The CLI gains --detail and --evidence_output.

The imports summary carries image identity, imphash, coverage with DLL
and function counts, issue/limitation counts and one name/function_count/
delay_load row per DLL, bounded to 16 KiB of rows with an omitted count.
The resources summary carries image identity, the resource directory,
coverage, directory/resource/icon-group counts and resource counts by type
and by language, each bounded to 8 KiB of rows with an omitted count.

The byte-bounded leading-prefix rule extract_artifact's summary used is
now byteBoundedList, shared by the three summaries.

BREAKING CHANGE: inspect_pe_imports and inspect_pe_resources output is now
complete Evidence or, when detail is omitted and the Evidence exceeds the
agent result budget, the inspect_analysis_view summary with delivery facts.
Callers that need the complete record inline pass detail "complete"
(CLI --detail complete); otherwise follow delivery.next.

Fixes #15619

* test(pe): cover byte-bounded lists and named resource identities in summaries

* fix(cli): withhold an over-budget summary answer and print its paging facts

The CLI printed {summary, evidence_bundle, delivery} for over-budget Evidence without measuring it, so a summary larger than a smaller configured agent result budget was printed whole. Like MCP since #15591, the CLI now measures that answer and, when it is over the budget, prints the bundle receipt and the delivery facts marked withheld, whose next call pages the saved Evidence.
2026-12-01 19:32:41 -05:00
morluto 941af21c73 test(javascript): fix the deadline phase in the oversized bundle test (#15703)
The test derives a retained-Evidence cap from a baseline run and expects
a second run to record the same failure bytes. With a 1 ms source
deadline the timeout lands before or during the worker launch depending
on host speed; during the launch the failure also keeps the interrupted
ownership inspection, about 7 KB more on macOS. The cap then either
rejects the record or admits the whole bundle, no removal happens and
the marker read fails with ENOENT.

The publication preload can now hold a mkdtemp under a named prefix.
Both runs hold the worker's runtime directory for 20 ms, so the 1 ms
deadline, armed first, always fires before launch.
2026-12-02 00:29:51 +00:00
Vincent Koc 8c9516ae3e refactor(guidance): share documentation result formatting (#15700) 2026-12-02 00:29:31 +00:00
morluto 6bcec126c7 test(adb): link stub executables to one launched dispatcher (#15698)
* test(adb): link stub executables to one launched dispatcher

macOS checks every newly written executable on its first launch, one file
at a time for the whole host (about 150 ms each; 50 fresh stubs launched
together took 9 s). The ADB tests wrote a fresh fake adb (and Node.js tool
shims) per test, so under parallel load the first launch waited behind
every other test's stubs inside the provider's 10 s adb version probe
deadline or the test's own deadline.

writeShellStub hard-links each stub to one dispatcher the test process has
already launched; the dispatcher sources the stub's script with the stub's
own $0 and arguments. AdbProvider.test.ts drops from 38 s to 12 s alone.

* test(adb): remove the stub dispatcher at worker teardown

Forked Vitest workers skip process exit hooks, so the dispatcher
directory leaked. The test runner now removes it through the worker
cleanup it already uses for the process ownership host.
2026-12-02 00:28:46 +00:00
Vincent Koc 5b4ed4660e refactor(audit): reuse owned Kubernetes audit strings (#15699) 2026-12-02 00:25:15 +00:00
Vincent Koc 691e089197 test(interface-builder): share app bundle fixture setup (#15695) 2026-12-02 00:12:54 +00:00
morluto 51b91c873d test(artifacts): expect resource_constraint for the ZIP zstd window ceiling (#15696)
The fixed 128 MiB ZIP Zstandard window allowance refuses the read at
admission, which #15588 reports as resource_constraint. The test still
pinned partial through a ternary keyed by the fixture size.
2026-12-01 19:12:16 -05:00
Vincent Koc 5453b7bc6d refactor(views): share retained view kind admission (#15693) 2026-12-02 00:11:27 +00:00
Vincent Koc 017c2de642 refactor(pe): reuse load-config evidence range projection (#15692) 2026-12-02 00:11:00 +00:00
morluto 21a5122a9a fix(native)!: bound read_bytes to what a minimum MCP response delivers (#15583)
* fix(native)!: bound read_bytes to 1 MiB per call

read_bytes accepted any length up to Number.MAX_SAFE_INTEGER, both in the
public contract and in the Ghidra bridge request, so one call could ask a
provider to allocate and hex-encode an unbounded range before any
delivery budget applied. Admit at most 1,048,576 bytes per call: about
2 MiB of hex, inside the 10 MiB maximum agent result budget and the MCP
SDK's default 10 MiB stdio message buffer. The contract and the Ghidra
request share one MAX_READ_BYTES_LENGTH, the schema describes the bound
and how to read a longer range, and the refusal comes from input
admission before the provider runs.

Refs #8560

BREAKING CHANGE: read_bytes refuses length above 1048576 with
invalid_request on length. Read longer ranges as consecutive calls that
start at the previous address plus returned_bytes.

* fix(native): derive the read_bytes ceiling from the maximum agent result budget

The 1 MiB ceiling was a chosen number. Each byte returns as at least two
hex characters and no result can exceed MAXIMUM_AGENT_RESULT_BUDGET_BYTES,
so a read longer than half that maximum could never be delivered at any
budget. Derive MAX_READ_BYTES_LENGTH from it (5,242,880 bytes), so it
follows that ceiling instead of a separate constant.

* fix(native): size the read_bytes ceiling to a complete MCP response

MCP sends bytes_hex in both structuredContent and the text block, so a
read of N bytes needs about 4N bytes of response. The ceiling was half the
maximum agent budget, so a full read at it could not fit the default 10
MiB MCP response and failed after the provider finished. Derive it from
MINIMUM_RESPONSE_BYTES, which every server delivers, less a 64 KiB
Evidence envelope reserve, divided by four (2,605,056 bytes). The boundary
test now delivers a complete read at the ceiling.

The compact input schema drops field descriptions, so the consecutive-call
advice now lives in the tool description and the length refusal message,
from one READ_BYTES_CONTINUATION.

* refactor(limits): own the minimum MCP response size in the domain limits

nativeByteRead derives the read_bytes ceiling from the minimum MCP
response, but imported it from config, which the pure-layer boundary
forbids. Define MINIMUM_RESPONSE_BYTES with the other delivery limits in
src/domain/analysisResourceLimits.ts; the config parser, the byte-read
ceiling, the numeric-limit verifier and tests read it there.

* test(ghidra): verify read_bytes at its admitted ceiling

The real-Ghidra verifier still requested read_bytes with
Number.MAX_SAFE_INTEGER and with a length past the new ceiling, so it
stopped on input refusal.

- The boundary probe reads MAX_READ_BYTES_LENGTH, which runs past the
  probe's mapped bytes, so it still checks an explicit incomplete read,
  and refuses a length one over the ceiling.
- The large-result probe reads MAX_READ_BYTES_LENGTH through MCP and the
  CLI and checks it is delivered complete with the fixture's bytes. The
  annotation and dossier probes keep covering oversized delivery with a
  retained reference.

* test(ghidra): compare the served annotation description with its owner

The real-Ghidra boundary verifier compared annotate_native_function's
served description with the bare contract text. Since the open-target
prerequisite is appended by describeToolPrerequisite, the check failed
before reaching the read_bytes probes. Compare with the description that
owner produces from the contract and its availability.

* test(ghidra): run verifier probes under the shared command owner

The read_bytes and large-result verifier helpers launched the CLI, ps and
the compiler through promisify(execFile), outside the verifier's command
owner, so a failure or timeout could leave their children running. Pass
the native-value verifier's commands owner through verifyGhidraBoundaries,
verifyStartupCancellation and verifyGhidraLargeResults and run every
command with commands.exec. Expected-refusal checks read the owner's
VerifierCommandExitError output (snapshot.stdout.text).
2026-12-02 00:07:24 +00:00