Commit Graph
6865 Commits
Author SHA1 Message Date
Vincent Koc ca0ab102ab test(javascript): share CLI and MCP Evidence checks (#15741) 2026-12-02 02:31:44 +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 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 449fef2c03 test(packages): reuse late cancellation evidence fixture (#15720) 2026-12-02 01:18:45 +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
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 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 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
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
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
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 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
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
morluto 4c3159568c fix(limits): report a limit requirement only when the reader knows it (#15685)
* fix(limits): report a limit requirement only when the reader knows it

OCI image layouts, SWF movies, Zstandard frame walks, LZMA streams without
a declared size, XAR TOCs, cpio archives and VSIX/NuGet metadata members
stopped at the first excess and reported that stopping counter or running
sum as the requirement. Raising the limit to it failed again one step later.

None of those inputs declares a total before the stop, so the refusal now
leaves the requirement unknown. A declared size or count (ZIP member sizes,
the ZIP entry total, SWF FileLength, an LZMA declared size) is still
reported, and VSIX/NuGet now pass every such requirement as required_value
instead of only those above the control's maximum.

Fixes #15647

* test(oci): assert descriptor limits report no requirement
2026-12-02 00:01:47 +00:00
Vincent Koc ecd7e692cf test(filesystem): share file snapshot finalization checks (#15691) 2026-12-01 23:58:26 +00:00
Vincent Koc 89fbd96bb9 test(mcp): share global registration client fixtures (#15690) 2026-12-01 23:56:40 +00:00
morluto 761dd472b1 test(bun): expect resource_constraint for the Bun module-count admission (#15686)
#15588 reports an artifact read refused by a reader limit as
resource_constraint, but the Bun module-count CLI and MCP tests still
pinned partial through a ternary the sweep missed. Main pushes skip the
portable suite, so they failed only on pull requests.
2026-12-01 23:46:42 +00:00
morluto 6b57e8e17d fix(delivery): refuse within the budget when even the summary is over it (#15591)
* fix(delivery): refuse within the budget when even the summary is over it

When complete Evidence was over the agent result budget, MCP retained it
and delivered its summary without measuring the summary. A deb package
with many ar members, for example, produced a summary larger than the
budget it was meant to fit.

Measure the summary before retaining it. When it is still over the
budget, return a resource_constraint error that carries the same
delivery facts in details.reported_limits.agent_budget: the complete
size, the budget, the retained complete Evidence ID and the
inspect_analysis_view call that pages it within the budget. Errors are
already delivered within the budget.

The CLI path, which builds its summary separately, is unchanged.

* fix(delivery): measure the delivered answer and describe the refusal

- Measure the {summary, delivery} answer MCP sends, not the summary
  alone, when deciding whether the summary fits the budget.
- The refusal's delivery note says neither the result nor its summary
  was delivered, instead of reusing the summary-delivered note.
- Offer repeating the call with detail complete only for idempotent
  tools; a call with effects is told not to repeat its completed call.
- Build all three delivery refusals in this file through one
  responseRefusal helper, and lower the resource-constraint constructor
  baseline it no longer needs.

* Merge origin/main into fix/over-budget-summary-refusal

Also lower the untyped-budget-refusal baseline for ToolResultDelivery.ts,
which now builds its refusals through one helper.

* Merge origin/main into fix/over-budget-summary-refusal

With #15638, the page delivery.next names fits the effective budget.
The deb regression now asserts the followed page is within 4,096 bytes,
and the minimum-budget paging test accepts the refusal this branch
returns when the summary answer is over the budget too, following the
same next call.

* test(firmware): select a budget the vector-table summary answer fits

The test selected the 4,096-byte minimum budget to make the complete
vector-table report over budget. At that budget the summary answer with
its delivery facts is over the budget too, so this branch now refuses
with paging facts instead. Select 12,000 bytes: above the summary
answer and below the about 18 KB complete report, so the test still
exercises summary delivery.
2026-12-01 18:46:37 -05:00
Vincent Koc 8626c4f1ac test(jadx): share java home fixtures (#15671) 2026-12-01 23:12:05 +00:00
Vincent Koc caf4550b42 test(python): share pyc code fixture construction (#15652) 2026-12-01 22:38:11 +00:00
morluto 44fbcfc787 feat(evtx)!: page event records with offset and report page facts (#15636)
* feat(evtx): page event records with offset and report page facts

inspect_evtx_archive stopped walking at max_records, so records past the first 20,000 (the newest events of a default-size Application log) could not be listed. The walk now covers every record. max_records stays a 20,000-record page bound, which limits retained Evidence. A new zero-based offset selects the first record listed. The result reports page { offset, limit, returned, total, next_offset }, and the record-limit-reached diagnostic names offset=next_offset. Coverage now describes parse loss only, so a page that leaves records out by selection is no longer partial, and chunk ending facts and endpoint checks cover records past the page.

Fixes #15612

* feat(evtx)!: qualify the file-tail offset for small and wrapped logs

The suggested tail offset is now the larger of 0 and page.total minus max_records, so a log smaller than one page gets a valid offset. File order is oldest first only in a log that has not wrapped; the guide and descriptions now say how chunks[] locates the newest records in a wrapped log.

BREAKING CHANGE: inspect_evtx_archive results now require page. Evidence saved before this change has no page, and inspect_analysis_view refuses to summarise it. Re-run inspect_evtx_archive on the log to produce current Evidence.
2026-12-01 17:15:02 -05:00
Vincent Koc a3a57ef998 test(pyinstaller): share stored PYZ member fixtures (#15643) 2026-12-01 22:13:55 +00:00
Vincent Koc 2e5147ffd2 refactor(reference): share import key ordering (#15642) 2026-12-01 22:13:32 +00:00
morluto 62e7c0b050 fix(views): size evidence-json pages to the effective agent result budget (#15638)
* fix(views): size evidence-json pages to the effective agent result budget

An over-budget delivery names inspect_analysis_view evidence-json at offset
0 as its next call. With limit omitted, a page held at most 24,576 bytes of
escaped text, sized for the 32 KiB default budget with a fixed 8 KiB
allowance for its view Evidence. Below about 32 KiB (the minimum is 4,096),
following next returned another answer over the budget.

The view service now pages an omitted limit as the largest page whose
view Evidence, measured as delivered, fits the effective budget (the
runtime override, then REA_AGENT_RESULT_BUDGET_BYTES, then the default).
A page over the budget shrinks by its measured excess and is projected
again. The MCP binding, application-execution views and the CLI pass the
launch seed they captured. A default page also never spans more code
units than the largest explicit limit, so large budgets keep fitting the
stdio frame. The fixed envelope constant and default page size are gone.

* perf(views): reuse the last window while shrinking an uncached evidence-json page
2026-12-01 17:13:14 -05:00
morluto efbb66c16a fix(errors)!: report wrong-format, missing-file and missing-Evidence refusals by their cause (#15581)
* fix(errors)!: report wrong-format, missing-file and missing-Evidence refusals by their cause

- inspect_labview_artifact refuses a file with no LabVIEW RSRC data as an
  unrecognized target (code unsupported_target, failure_kind unrecognized),
  as its format siblings do, instead of invalid_request. A PE whose
  resource tree could not be fully read is a malformed PE target.
- inspect_gpu_code_objects, inspect_model_artifact and Apktool reported a
  missing or non-regular selected file through their own copy of the
  selected-file refusal (BinaryTargetError, target_unavailable). They now
  use the shared projectSelectedArtifactFileFailure owner
  (invalid_request, conforming, with its own next step), and the copy is
  removed. The shared owner keeps the verified-symlink recovery the copy
  carried.
- A retained Evidence reference the session does not hold is
  invalid_request / invalid_input instead of evidence_integrity_mismatch.
  Altered or unauthenticated Evidence stays evidence_integrity_mismatch.

BREAKING CHANGE: error codes change for three refusals. A non-LabVIEW
file given to inspect_labview_artifact is unsupported_target (was
invalid_request). A missing or non-regular selected file for
inspect_gpu_code_objects, inspect_model_artifact or Apktool operations is
invalid_request (was target_unavailable). A missing retained Evidence
reference (details.reason "missing") is invalid_request with category
invalid_input (was evidence_integrity_mismatch / integrity_mismatch).
Callers that branch on these codes should match the new values;
details.reason, retry_class and the remediation are unchanged in meaning.

* test(model): expect the shared selected-file refusal for a missing model path

The process-global host read failure test still expected
target_unavailable for path errors on a model file. Those are now the
shared selected-file input refusal.

* fix(resources): name a rejected symlink in the shared selected-file refusal

The GPU and model readers' copy of the selected-file refusal said the
path was a symbolic link; the shared owner reported only ELOOP, so
rejectedSymlinkRecovery failed once they moved to it. Use the rejected
symlink's own message, and keep the errno message for every other
selected-path refusal.

* docs(errors): describe missing references and closure members as the caller's selection

The comment above RESOURCE_SNAPSHOT_NOT_APPLICABLE still said a missing
Evidence reference stays an integrity failure. Missing references,
including retained sources and closure members, are invalid_request; only
altered or unauthenticated Evidence stays an integrity failure.
2026-12-01 17:11:08 -05:00
morluto a5bf175e06 fix(artifacts)!: report reader admission limits as resource_constraint (#15588)
* fix(artifacts)!: report reader admission limits as resource_constraint

An artifact read refused by a reader limit (artifact_limits.*) or a
release-fixed allowance was code partial, which the error contract
reserves for a result cut short by a delivery or decode limit. The
read was refused at admission, so it is now resource_constraint, like
every other admission limit. The retry class is unchanged: change_first
when the limit can be raised, never when it cannot. A limit without
admission facts, such as a parser budget, stays partial.

The reader's own recovery, which names the parameter, its supported
range and the next step, and the reader_limit fact are unchanged.

Refs #15323

BREAKING CHANGE: artifact refusals with details.reason "limit" and a
details.reader_limit or fixed allowance report code and category
resource_constraint instead of partial. Match resource_constraint, or
read details.reason and details.reader_limit, which are unchanged.

* fix(errors): catalogue each artifact admission limit with the retry it returns

The catalogue listed one row for reader limits and fixed allowances with
change_first, though a fixed allowance and a reader limit already at its
maximum return never, and the release-fixed row still said partial.
List the raisable reader limit, the reader limit at its maximum and the
release-fixed allowance as separate rows, and test each row against the
error it projects.
2026-12-01 17:10:56 -05:00
morluto 0f1bedc65a fix(packages): report the declared ZIP entry total in entry-count refusals (#15634)
* fix(packages): report the declared ZIP entry total in entry-count refusals

inspect_vsix_package and inspect_nuget_nupkg reported the stopping counter
(max_entries + 1) as the requirement, so retrying with it failed one entry
later each time. The end-of-central-directory record declares the total
before enumeration; zipDirectoryRecords now carries that total with each
record, and the VSIX, NuGet and artifact ZIP readers report it as the
requirement (artifact_limits.zip.member_count now reports required_value).

inspect_pe_imports said the image "declares" max + 1 descriptors or
functions. Those tables are null-terminated and declare no total, so the
refusal now says the count is above the allowance and leaves the total
unknown.

Refs #15608

* test(zip): cover the ZIP64 entry total in member-count refusals
2026-12-01 16:35:49 -05:00
morluto 05a9e8fb66 fix(desktop): recognize unpacked resources/app Electron applications (#15632)
* fix(desktop): recognize unpacked resources/app Electron applications

Electron loads an application from resources/app.asar, resources/app or
resources/default_app.asar. The desktop path convention recognized only the
ASAR names, so VS Code and GitHub Desktop, which ship an unpacked
resources/app folder, got no Electron candidate and only .NET probes for the
managed helpers they bundle.

The convention owner now reports the Electron application layout and its
depth for both forms. inspect_desktop_application emits an
electron-app-directory-convention fact for resources/app/package.json, adds it
to the Electron candidate and offers analyze_javascript_application on the
folder. Electron application probes are now application priority, so bundled
managed or native helpers no longer lead next_probes. Release exposure reads
the layout folder from the same convention, so an unpacked build names its
fuse host like an ASAR build.

* fix(desktop): derive Electron probes before bundled managed helpers

A bundled managed helper with its own .runtimeconfig.json, such as Git
Credential Manager in GitHub Desktop, is application priority too. Its probe
was derived first, so the stable priority sort still put it ahead of the
Electron application. Derive the Electron candidate and probes first.
2026-12-01 16:35:04 -05:00
morluto 3ff4a50481 fix(artifacts/ar): list members recorded under absolute paths (#15631)
lib.exe records the absolute object path it was given, such as
C:\build\Release\decode.obj, as the member name. The ar reader passed
that name to the shared path validator, which rejects absolute names,
so every such member was dropped and a static library built this way
looked empty with unknown coverage.

An absolute member name names a build-host location, not archive
structure. The reader now lists it under its last component, as
`llvm-ar x` writes it, keeps the recorded name in source_path, and adds
one reader-level limitation counting such members. Coverage stays
complete. A last component that is itself unsafe (empty, `.`, `..`)
is still refused and counted as before.

The absolute-name rule now has one owner in ArtifactPaths:
absoluteArtifactPathBasename classifies drive-absolute and POSIX-rooted
names, and normalizeArtifactPath uses it for its refusal.

Fixes #15618
2026-12-01 21:20:51 +00:00
Vincent Koc c3dbd0f1e4 test(fixtures): share unsigned LEB128 encoding (#15630) 2026-12-01 21:20:18 +00:00
morluto 5b5d66dcfc fix(evtx): treat zero-filled slots after the declared chunks as unused (#15621)
Logs exported with wevtutil epl keep all-zero 64 KiB slots after the chunks the file header declares. The inventory diagnosed each as invalid-chunk, added chunk-count-mismatch and reported partial coverage although every record was read. Following libevtx and omerbenamram/evtx, an all-zero slot past the declared count is now unused space. A nonzero slot there, and a zero slot inside the declared count, are still diagnosed.

Fixes #15611
2026-12-01 16:11:42 -05:00
Vincent Koc 90c07a92d7 test(javascript): share worker source fixtures (#15606) 2026-12-01 20:24:45 +00:00
Vincent Koc 980e1ddfd8 test(uefi): reuse NVRAM GUID encoding fixture (#15602) 2026-12-01 20:05:16 +00:00
Vincent Koc ba5d56dcfc test(gpu): reuse CUDA resource fixtures (#15594) 2026-12-01 19:37:23 +00:00
Vincent Koc 5d7a3422ae test(setup): reuse Windows npm shim fixtures (#15587) 2026-12-01 19:20:35 +00:00
Vincent Koc 14971020db refactor(dwarf): reuse file inspection evidence (#15585) 2026-12-01 19:08:26 +00:00
morluto 6991e735a2 test: require a matcher for every toThrow assertion (#15577)
A bare toThrow() or rejects.toThrow() passes on any error, including one
from a broken fixture or a refusal for the wrong reason. The suite's 429
bare sites now assert the specific refusal, so turn on
vitest/require-to-throw-message as an error to keep it that way.

Tighten the one site added since (malformed TOML now asserts smol-toml's
line and column). The two sites whose refusal cannot be observed outside
Linux or without a native capture bound keep a bare matcher with a
disable comment saying why.
2026-12-01 14:03:47 -05:00
morluto 65499cd329 fix(call-graph)!: report each node's coverage limits once, in relationship_coverage (#15582)
get_call_graph copied each node's relationship coverage into the node's
limitations: a partial coverage's limitations, an unknown coverage's
reason (including the synthesized "Provider did not report relationship
coverage."), and its diagnostics. Every ok node therefore repeated what
its relationship_coverage already said, which costs tokens on every node
of a large graph.

A node now keeps limitations only for the provider's own caveats that no
coverage classified, when the provider reported no relationship coverage.
Graph-wide limitations are unchanged.

BREAKING CHANGE: get_call_graph nodes no longer repeat
relationship_coverage limitations, reason or diagnostics in their
limitations field. Read relationship_coverage for a node's coverage
limits; node limitations now hold only unclassified provider caveats.
2026-12-01 14:03:38 -05:00
Vincent Koc 7c02d53b1f test(dos): share padded MZ image fixture (#15575) 2026-12-01 18:27:39 +00:00
morluto a69837647b test: fix false-pass assertions, consolidate suites, and close coverage gaps (#15519)
* test: fix false-pass assertions, consolidate suites, and close coverage gaps

* test: finish signal-0, unchecked close_binary, and vacuous .every() audit

* test(registration): run shared capture inside test so child inherits scaled deadline

* test(artifacts): bind final verification fault to reader source and post-read phase
2026-12-01 18:10:12 +00:00