* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive (#13835)
* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive
Closes#13834
* fix(nuget): check artifact stability after format rejection
* refactor(kuna): extract KunaSingleFunctionCache from KunaSessionClient (#13863)
Closes#13862
* perf(har): reuse normalized Base64 for retained response bodies (#13847)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
* refactor(application): migrate 7 standalone format services onto executeArtifactInspection (#13861)
Closes#13860
* refactor: prune 5 redundant single-call wrapper modules (#13807)
* refactor: prune 5 redundant single-call wrapper modules
* chore(ci): remove deleted providerEnvironment.ts from Stryker and CI scope configs
* fix(ci): retarget provider environment mutation coverage
* refactor(application): migrate 3 remaining artifact services onto executeArtifactInspection (#13867)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager (#13823)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager
* refactor(rizin): remove unused evidence imports
* fix(ci): follow extracted Rizin evidence in mutation checks
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills (#13865)
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills
Closes#13864
* docs: name the current provider operation runner
* feat(frida): add optional limit and offset paging to list_frida_processes (#13854)
* feat(frida): add optional limit and offset paging to list_frida_processes
Closes#13853
* fix(frida): stabilize paged process discovery
* docs(frida): scope paging claims to shipped discovery
* refactor(application): unify 5 pass-through analysis services into ProviderOperationService (#13856)
Closes#13855
* refactor(cli): extract contractCommandRunners from contractCommand (#13869)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name (#13858)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name
Closes#13857
* fix(tools): preserve xref discovery coverage in paged results
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services (#13873)
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services
* test(adb): verify feature and service paging guidance
* refactor(cli): extract contractCliSchemaProjection and contractCliDocumentDescription (#13871)
* fix(dwarf): reject PE long section names when PointerToSymbolTable is zero (#13889)
* perf(macho): streamline legacy rebase run marking (#13881)
* perf(erlang): stream BEAM IFF inspection over FileHandle (#13886)
* perf(erlang): stream BEAM IFF inspection over FileHandle
* fix(erlang): retain only decoded BEAM code headers
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient (#13879)
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient
* refactor(kuna): remove stale session evidence imports
* fix(objc): preserve class import reader failures (#13892)
* refactor(server): extract desktop build tool bindings (#13891)
* refactor(server): collapse inspect bindings and extract desktopBuildToolBindings
* fix(mcp): restore contract-checked inspect bindings
* fix(macho): preserve legacy bind stream bounds and target scope (#13874)
* fix(macho): preserve legacy bind stream bounds and target scope
* fix(macho): report unresolved legacy bind targets in coverage
* test(macho): consolidate legacy bind target coverage
* perf(pe): stream PE certificates over FileHandle (#13884)
* perf(pe): stream PE certificates over FileHandle
* fix(pe): share certificate table admission across readers
* perf(apple-ips): stream Mach-O join headers over FileHandle (#13894)
* perf(apple-ips): stream Mach-O join headers over FileHandle
* fix(apple-ips): retain only verified Mach-O joins
* perf(objc): streamline exact class identity projection (#13897)
* perf(pe): stream PE resource inspection over FileHandle (#13899)
* perf(pe): stream PE resource inspection over FileHandle
* fix(pe): bound streamed icon-group reads and restore lifetime coverage
* perf(swift): streamline symbol inventory classification (#13902)
* perf(apk-signature): stream APK signature inspection over FileHandle (#13877)
* perf(apk-signature): stream APK signature inspection over FileHandle
* fix(apk-signature): preserve bounded reads and file identity
* fix(apk-signature): handle deflate EOF and repair verifier bounds
* fix(apk-signature): recognize internal pipeline cancellation at EOF
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle (#13896)
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle
* fix(release-exposure): share and bound PE CodeView parsing
* refactor(server): simplify contractToolBindings types and handler dispatch (#13912)
* perf(macho): streamline slice selection diagnostics (#13905)
* fix(macho): preserve retained magic from valid FAT ranges (#13910)
* perf(pe): stream PE load-config inspection over FileHandle (#13901)
* perf(pe): stream PE load-config inspection over FileHandle
* fix(pe): admit empty section tables and batch TLS callback reads
* perf(elf): stream ELF note inspection over FileHandle (#13904)
* perf(elf): stream ELF note inspection over FileHandle
* fix(elf): validate full header extents and reuse aliased note reads
* fix(macho): keep header reads inside declared slices (#13913)
* perf(v8): stream V8 code cache inspection over FileHandle (#13907)
* fix(macho): correct encryption range VM mapping (#13918)
* perf(elf): stream kernel module inspection over FileHandle (#13917)
* perf(elf): stream kernel module inspection over FileHandle
* test(elf): exercise streamed kernel module reads and finalization
* refactor(providers): share offlineArtifactFailureDialect across offline providers (#13921)
* test(macho): consolidate fixed header and extent proofs (#13919)
* perf(macho): bound positional command string probes (#13925)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks (#13882)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks
* fix(mcp): keep deferred runtime cleanup out of protocol close
* test(mcp): verify materialized runtime hooks close once
* fix(cli): defer artifact AnalysisView loading until requested
* test(macho): consolidate native path framing proofs (#13926)
* perf(elf): stream ELF dependency inspection over FileHandle (#13915)
* perf(elf): stream ELF dependency inspection over FileHandle
* fix(elf): share dependency hash parsing and bound string reads
* perf(elf): reuse cached prefixes for short dependency names
* refactor(server): extract debugger and instrumentation tool bindings (#13909)
* refactor(server): extract debugger and instrumentation tool bindings
* test(server): track extracted debugger bindings in reverse tools coverage
* fix(cli): defer artifact AnalysisView loading until requested
(cherry picked from commit e58fda3f26)
* refactor(macho): use binary facts for native diagnostic admission (#13929)
* perf(macho): streamline native export inventory merging (#13932)
* perf(elf): stream ELF debug-link inspection over FileHandle (#13928)
* perf(elf): stream ELF debug-link inspection over FileHandle
* perf(elf): reuse section name bytes across debug-link readers
* perf(pe): stream PE import inspection over FileHandle (#13924)
* perf(pe): stream PE import inspection over FileHandle
* perf(pe): reuse import read windows and cover positional boundaries
* fix(elf): preserve load segment range diagnostics
* test(macho): consolidate lipo field and native slice proofs (#13937)
* perf(elf): stream ELF unwind-range inspection over FileHandle (#13931)
* perf(elf): stream ELF unwind-range inspection over FileHandle
* fix(elf): bound unwind name retention and refill frame metadata
* test(macho): make slice cancellation and cleanup ordering deterministic (#13944)
* test(macho): make slice cancellation and cleanup ordering deterministic
* test(macho): join slice reads before restoring test spies
* refactor(providers): adopt offlineArtifactFailureDialect in BEAM, V8, NuGet, and LNK providers (#13936)
* refactor(providers): adopt offlineArtifactFailureDialect in BEAM, V8, NuGet, and LNK providers
* fix(nuget): let integrity and cancellation fall through to classifyProviderFailure
* perf(macho): defer segment geometry until lazy metadata needs it (#13949)
* test(macho): consolidate classic and modern dylib encoding proofs (#13952)
* perf(native): stream binary hardening inspection over FileHandle for ELF, PE, and Mach-O (#13934)
* perf(native): stream binary hardening inspection over FileHandle for ELF, PE, and Mach-O
* fix(native): bound hardening note and symbol reads
* test(native): verify bounded hardening reads through positional readers
* refactor(server): extract browser, Electron, and JavaScript runtime tool bindings (#13939)
* refactor(server): extract browser, Electron, and JavaScript runtime tool bindings
* test(ci): select browser checks for extracted bindings
* refactor(providers): adopt offlineArtifactFailureDialect in PE, ELF, and Apple IPS providers (#13954)
* test(macho): consolidate lazy payload reuse and capacity proofs (#13958)
* refactor(artifacts): extract source-map detection and occurrence path helpers from ReleaseExposureReader (#13961)
* perf(elf): stream kernel build-config inspection over FileHandle (#13942)
* perf(elf): stream kernel build-config inspection over FileHandle
* fix(elf): reuse kernel marker windows and report compressed input limits
* fix: preserve kernel config identity on cleanup failure
* test(macho): consolidate command framing and admission proofs (#13964)
* test(macho): consolidate command framing and admission proofs
* test: assert Mach-O command failure facts
* perf(dwarf): stream DWARF compile-unit inspection over FileHandle for ELF, PE, and Mach-O (#13948)
* perf(dwarf): stream DWARF compile-unit inspection over FileHandle for ELF, PE, and Mach-O
* fix: bound positional DWARF reads and share Mach-O selection
* test: verify positional Mach-O command admission
* refactor(providers): adopt offlineArtifactFailureDialect in NativeInitializers, Go, Rust, and ElfUnwind providers (#13966)
* refactor(providers): adopt offlineArtifactFailureDialect in BinaryHardeningProvider and PeBinaryFailure (#13970)
* refactor(server): extract session, investigation, and workflow tool bindings (#13968)
* perf(ntfs): stream MFT record decoding in O(recordBytes) memory (#13957)
* perf(ntfs): stream MFT record decoding in O(recordBytes) memory
* fix: resolve streamed MFT links through bounded positional reads
* refactor(providers): adopt offlineArtifactFailureDialect in KernelBuildConfigProvider (#13973)
* refactor(adb): extract read-only shell inspection operations from AdbProvider (#13975)
* refactor(elf): remove obsolete debug-link buffer parsers (#13971)
* perf(native): stream PE and ELF export-table inspection over FileHandle (#13951)
* perf(native): stream PE and ELF export-table inspection over FileHandle
* fix: share export interpretation across buffered and positional reads
* refactor(providers): adopt offlineArtifactFailureDialect in DwarfUnitsProvider (#13977)
* perf(elf): read only needed debug-link section bytes (#13980)
* refactor(providers): adopt offlineArtifactFailureDialect in NativeExportsProvider (#13982)
* feat(analysis-view): page retained UEFI firmware maps
Add the uefi-firmware view for inspect_uefi_firmware Evidence. The summary returns volume, file and section counts with FFS type, section type and volume depth tallies. Pages select volumes, files, sections, unknown regions, integrity records and PSP tables or candidates. Files match exact GUIDs, user-interface names, type names and owning volume; sections match their owning file and type. Rows keep the original flattened index plus the offset and source stream that extraction targets.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(uefi)!: summarize firmware inspection by default over MCP
A complete map of a 4 MiB OVMF image is about 514 KB of structured content, which exceeds client result limits. MCP inspect_uefi_firmware now retains the complete map and returns its summary unless the caller passes detail complete. An optional view returns the first uefi-firmware page in the same call; later pages use inspect_analysis_view. The one-shot CLI command still returns complete Evidence.
BREAKING CHANGE: MCP callers that need every volume, file and section inline must pass detail: "complete" to inspect_uefi_firmware.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(firmware): describe UEFI summaries and views
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(rust): stream Rust binary inspection over FileHandle for ELF, PE, Mach-O, and WebAssembly (#13979)
* perf(rust): stream Rust binary inspection over FileHandle for ELF, PE, Mach-O, and WebAssembly
* fix(rust): bound positional dependency and name reads
* refactor(rust): reuse strict UTF-8 validation
* fix(elf): retain verified debug-link evidence through descriptor finalization (#13986)
* refactor(elf): prune superseded whole-buffer parseKernelBuildConfig wrapper (#13996)
* refactor(dwarf): prune superseded whole-buffer locateDwarfSections wrapper (#13993)
* refactor(elf): retire obsolete note buffer parsers (#13995)
* fix(gpu): mark conflicting CUDA shared sections partial and clear register provenance (#13963)
* refactor(artifacts): extract bounded member I/O helpers from ReleaseExposureReader (#13990)
* refactor(adb): extract package and app lifecycle operations from AdbProvider (#13988)
* refactor(server): extract offline inspection tool bindings from serviceToolBindings (#13984)
* refactor(elf): retire the obsolete unwind buffer parser (#14007)
* refactor(uninstall): extract registration-removal and item-collapse helpers from Uninstall (#14006)
* refactor(rizin): extract NUL-frame reader and wait helpers from RizinDebugSessionManager (#14001)
* refactor(rizin): extract NUL-frame reader and wait helpers from RizinDebugSessionManager
* fix(ci): track extracted Rizin frame helpers
* refactor(native): extract NativeAotPeImage from nativeAotPe (#13998)
* chore(guards): declare desktop build-computer entries and clear the entry baseline (#14011)
* perf(go): stream Go binary inspection over FileHandle for ELF, PE, and Mach-O (#14003)
* perf(go): stream Go binary inspection over FileHandle for ELF, PE, and Mach-O
* fix(go): share parsing and bound positional string reads
* perf(go): reuse target reads under the scan budget
* refactor: remove internal re-export shims and guard against new ones (#14009)
* refactor: remove internal re-export shims and guard against new ones
* fix(ci): catch namespace module re-exports
* perf(elf): reuse proven symbol suffixes in unwind lookup (#14014)
* refactor(cli/server): break remaining module-layer cycles (#14013)
* refactor(cli,server): break remaining module-layer cycles
* fix(ci): follow relocated CLI entry points
* refactor: remove retired internal reader exports
* fix(ci): track configuration inputs across cached checks (#14015)
* fix(ci): close static-check cache gaps and prune stale settings (#14017)
* fix(ci): close static-check cache gaps and prune stale settings
* chore(ci): remove unused Actionlint runner label
* fix(ci): rerun TODO scans against the host interpreter
* fix(elf): retain verified artifact reports through descriptor finalization
* test(elf): assert retained reports during descriptor finalization
* refactor(elf): retire the test-only dependency buffer driver
* test(elf): join the paused dependency parser on failure
* refactor(elf): consolidate kernel module checks on positional reads
* fix(elf): preserve kernel config framing and location provenance (#14021)
* perf(elf): bound kernel module signature digest reads (#14024)
* fix(elf): retain verified kernel reports through descriptor finalization (#14022)
* refactor(go): consolidate native parser checks on positional reads (#14027)
* feat(uefi): record the owning FFS file of extracted payloads
Each published extraction file now names the FFS file whose body or section produced it, with its GUID, user-interface name, type and logical path. Decoded streams resolve through their carrier section. Callers no longer need to match output paths against a separate inspection to find which driver a file belongs to.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): page retained UEFI extraction manifests
Add the uefi-extraction view for extract_uefi_firmware Evidence. The summary returns file, byte, derivation and gap counts, source, media-type and gap-kind tallies, and a bounded preview of the first published files. Pages select files by exact media type, source and owning FFS GUID, name or type, in publication or size order, plus derivations and gaps by kind. Counts and the size order are built once per retained report.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(uefi)!: summarize firmware extraction by default over MCP
A whole-image extraction of a 4 MiB OVMF image lists 560 files in about 553 KB of structured content, which exceeds client result limits. MCP extract_uefi_firmware now retains the complete manifest and returns its summary unless the caller passes detail complete. Targeted extractions fit in the summary's file preview. An optional view returns the first uefi-extraction page in the same call; later pages use inspect_analysis_view. The one-shot CLI command still returns complete Evidence.
BREAKING CHANGE: MCP callers that need every published file inline must pass detail: "complete" to extract_uefi_firmware.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(firmware): describe UEFI extraction summaries and owners
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(uefi): attribute a refused output directory to output_directory
An existing output directory was reported as an invalid path issue, which points callers at the firmware image instead of the directory they chose. Route destination refusals through outputDirectoryAdmissionRefusal, as firmware extraction already does.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(go): reject contradictory module coverage in retained views (#14029)
* fix(go): retain verified reports through descriptor finalization (#14026)
* perf(analysis-view): page unfiltered Go and Rust metadata directly (#14030)
* refactor(rust): consolidate binary parser checks on positional reads (#14033)
* feat(native): report the stored RVA of PE exports
PE export rows reported only the preferred-base virtual address, which the parser derives from the export-address-table RVA. Callers asking for an RVA had to recover the image base through other tools. Each row now carries the RVA as the slot stores it; a forwarder's RVA locates its forwarder string.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): filter native exports and ELF dependencies by name prefix
Retained native-exports and elf-dependencies views matched only exact names, so counting the exports or imports in one namespace meant paging every row. Add name_prefixes to the exports collection and to every named elf-dependencies collection. A prefix filter combines with exact names, and coverage.total counts every match, so limit 1 returns a count. ELF export prefixes follow the exact-name identity rules: non-ASCII names compare their UTF-8 bytes, and names that are not valid UTF-8 never match. The tool descriptions now name the filter.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(native): describe export RVAs and name-prefix views
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(analysis-view): read older UEFI extraction Evidence and drop filter-count ceilings
extract_uefi_firmware rows gained a required ffs_file, so extraction Evidence saved before that field failed to parse in retained views. The field is now optional when reading: the extractor still always records it, and an unrecorded owner matches no owner filter. UEFI view filters also capped each list at 64 values without a format, protocol or resource reason; overlapping filters cannot be split into separate requests without miscounting, so the cap is removed. MCP input-element admission still bounds every request.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(python): validate marshal coverage and consolidate pyc tests (#14036)
* perf(rust): reuse the Wasm section probe for custom name lengths (#14035)
* refactor(process): share the abortable command-turn wait between GDB and Rizin (#14042)
* fix(erlang): require complete positional BEAM reads (#14045)
* fix(rust): retain verified reports through descriptor finalization (#14034)
* test(process): consolidate symlink snapshot captures (#14051)
* fix(domain): make partial count switches exhaustive for typed lint (#14048)
Deep static checks on main fail typed lint (switch-exhaustiveness-check) in three counting switches introduced by recent single-pass summary refactors. Name the unmatched 'none' basis explicitly and give the graph/AST switches a documented default.
* refactor(server): extract ForwardingTransport base class for MCP Transport wrappers (#14050)
* fix(devicetree): validate retained report ranges and coverage (#14066)
* fix(ci): fall back to Ubuntu Azure archive in recorded-crash container (#14061)
The Ubuntu 24.04 recorded-crash container repeatedly timed out at 150s refreshing APT indexes from archive.ubuntu.com and security.ubuntu.com on main. Split Noble's 150s refresh budget into a 75s initial attempt followed by a 75s retry against http://azure.archive.ubuntu.com/ubuntu (matching ubuntu-archive's Noble Azure fallback while keeping http:// before ca-certificates is installed), and leave Debian unchanged at 150s.
* fix(erlang): retain verified BEAM reports through descriptor finalization (#14062)
* perf(uefi): skip verified erased padding in NVRAM scans (#14069)
* test(uefi): consolidate volume ownership and checksum proofs (#14070)
* fix(ci): run type-aware lint on changed files in fast PRs (#14068)
* fix(v8): preserve verified code cache results and require exact payload reads (#14067)
* refactor(config): return Result for ConfigurationError in IdaConfiguration and KiloClientLocation (#14053)
* refactor(config): return Result for ConfigurationError in IdaConfiguration and KiloClientLocation
* fix(config): return Kilo file-probe failures through Result
kiloGlobalLocation returned inline-configuration failures as Result but kept
throwing the shared probe's ConfigurationError, and kiloLayeredLocation no
longer caught it: an unreadable Kilo folder rejected resolveSupportedClients
for every client instead of staying a Kilo row failure. Convert probe
failures at the same Result boundary and register the counted catch.
Validation: a new boundary test (regular file at Kilo's config root) fails
without the fix and passes with it; kiloClientLocation, clientLifecycle,
mcpAddClientLifecycle and registration catalog suites pass; check:fast
passes.
* fix(ida): preserve the size rejection when descriptor close fails
The 64 KiB rejection became a completed outcome holding a rejected Result,
so the cleanup-failure handler replaced it with generic close guidance.
Read the rejection from the completed outcome when composing the cleanup
error, covering both the admission and growth size checks. Restore the
close spy leaked by the existing denial test, which the new cases exposed.
Validation: a new it.each denies close after each size check, asserts the
64 KiB message plus retained-cleanup release, and fails without the fix;
the IdaConfiguration suite and check:fast pass.
* refactor(uefi): exercise only the framed LZMA worker (#14072)
* fix(uefi): preserve verified source identity through descriptor finalization (#14073)
* refactor(config): return Result from resolveKiloRegistrationWorktree (#14055)
* refactor(config): return Result from resolveKiloRegistrationWorktree
* test(config): cover Kilo worktree resolution results
* perf(views): page exact Playwright trace index hits directly (#14031)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
* refactor(domain): compose cleanup dependencies through analysisErrorCleanup helpers (#14064)
* refactor(domain): compose cleanup dependencies through analysisErrorCleanup helpers
* fix(kuna): honor completed project cleanup when wrapping failures
* refactor(domain): one ByteSource representation for streaming parsers (#14044)
* refactor(domain): one ByteSource representation for streaming parsers
* refactor(nuget): adopt ByteSource across NuGet and APK parsers (#14047)
refactor(nuget,apk): adopt ByteSource and drop the NuGet in-memory parse branch
* test(elf): remove obsolete byte source fixture declarations
* refactor: centralize owned finalization and configuration failures (#14071)
* refactor(config): propagate typed configuration failures
* refactor(lifecycle): centralize completion and cancellation
* fix(config): preserve Hermes YAML edit refusal guidance
* fix(reference): preserve file cleanup when directory enumeration fails (#14081)
Directory enumeration can list a file and then fail with EIO. If that
file read is cancelled and its close fails, replacing the cancelled
result with success dropped the still-open file. Keep the directory
read failure primary and merge the file's remaining resource into both
cleanup-combination returns.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* fix(ci): bind timing evidence to its workflow attempt (#14080)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* fix(ci): trace test dependencies through static template imports (#14079)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* fix(ci): retain cache generations per restore version (#14084)
* fix(ci): retain cache generations per restore version
* test(ci): align inherited Mach-O assertion with main
---------
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
* fix(ci): use retry start times in PR health reporting (#14085)
* fix(ci): use retry start times in PR health reporting
* test: cover the reviewed CI boundary cases
---------
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
* perf(javascript): reuse completed CommonJS module-source queries
Static and semantic analysis ask whether the same callee or receiver is a CommonJS module object or require delegate at the same read site several times; a minified 1.9 MB webpack main bundle repeated about half of its 92,374 queries. Once member-mutation facts are complete, an identical query reuses its answer and re-records the resource limits the first walk reached. The answers are cleared with the semantic value caches and require-delegate writes, which every state change that can alter them already invalidates. The same bundle runs 48,447 walks instead of 92,374, and static and semantic results are unchanged on all 43 sources of the measured application.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): skip captured-selection normalization without captures
Most loader sources carry no captured selections, yet normalization allocated a map and sorted an empty array for each one before returning nothing. Return that result directly.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): build loader context keys without JSON serialization
Every module-source work item serialized its read site and capture boundaries to JSON to key its context. Build the same key by concatenation; absent and null positions still share a key, and absent captures still differ from an empty capture list.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): reuse preload-discovery static checkpoints in the normal pass
When any .js source belongs to a module package, preload discovery statically analyzes every source and the normal pass analyzes each one again. The worker now keeps the complete static checkpoint discovery computed, keyed by container, path, text digest, package type, precision and member-mutation allowance, and the normal pass of the same source writes that checkpoint instead of recomputing it. Static analysis is deterministic for those inputs, so the parent reads, validates and charges byte-identical facts. A discovered preload whose package type changes, a source discovery could not checkpoint, and a replaced worker all recompute. Retained checkpoints are consumed once and bounded to one eighth of the worker's V8 heap limit.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): park the worker after preload-discovery allowance refusals
A scoped worker closed instead of parking after any failed analysis, so one member-mutation refusal during preload discovery discarded the process and every static checkpoint it retained. Discovery skips such a source and the normal pass analyzes and reports it again, and the worker reports the refusal while staying healthy. A discovery checkout whose failures are all member-mutation refusals now parks if canReuse still holds. Other failures, and any failure in a normal analysis, still close the worker.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): keep the worker reusable after a final discovery refusal
The worker's reuse state cleared its last failure only on success, so a
member-mutation refusal of the last discovered source still closed the
worker and discarded every retained static checkpoint. The worker now
owns the recoverable-refusal rule, and the scope uses the same predicate.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(javascript): skip checkpoint encoding without reuse capacity
Runtimes without a reported heap limit (Bun) retain nothing, yet discovery
still encoded every complete checkpoint before checking capacity. Check the
remaining capacity first.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): select inventory occurrences by artifact kind
Finding the native addons in an application archive meant paging every
inventory occurrence (about 1 KB each) or reading the complete inspection,
because occurrences could be selected only by exact path, ID or entry kind.
Add artifact_kinds, which matches the recorded artifact kind exactly and
intersects with the other selectors, so one call returns, for example,
every native-addon occurrence with selected fields.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): select retained JavaScript facts by property value
javascript-facts selected observations only by location and node kind, so
reading one operation of an IPC channel set meant paging every channel
observation of the file. Add where.properties: each listed key must be
retained with one of its JSON scalar values. A missing key or non-scalar
value never matches, and repeated keys must all hold.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): count distinct retained JavaScript fact values
Counting the distinct IPC channels of one operation meant paging every
observation, each with its full Evidence, and deduplicating by hand; real
clients miscounted send channels on a large Electron app. Add the
javascript-fact-groups view: with the javascript-facts selectors and
group_by property names, it returns each distinct combination with its
observation and node counts, ordered by canonical JSON, and its total. A
missing key stays omitted, distinct from a retained null such as an
unresolved dynamic channel. The analyze_javascript_application description
names the IPC grouping.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(analysis-view): qualify javascript-fact-groups readback to scalar values
where.properties selects only present JSON scalar values, so a group over
array, object or missing values cannot be read back through it. Say so in
the group_by description and the workflow guide, and assert the exact node
count of a repeated channel in the MCP test.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(ghidra): scan defined data for selective string search instead of materializing inventory (#14101)
search_strings now scans getDefinedData directly when the string inventory has not been built, matching before allocating StringFacts and retaining only matches in STRING_ORDER. Sessions that only search no longer pay full inventory materialization and retention in the bridge JVM heap; list operations still build the cached inventory as before.
Refs #13292, #13355. Verified: ghidraBridgeSources (11 tests), javac against Ghidra jars, check:fast, and a real Ghidra 12.2 + JDK 25 probe asserting search-before-list equals search-after-list for regex and insensitive literal queries. No wire or result-order change.
* perf(ghidra): scan procedures for selective search without retaining inventory (#14103)
search_procedures now builds procedure entries without populating procedureInventory when it has not been built yet (buildProcedures extracted from procedures()), so a search-only session does not retain the full procedure inventory in the bridge JVM. Cached path, name index, order (PROCEDURE_ORDER) and matched_aliases output are unchanged. Companion to the search_strings scan in #14101; together they apply the DDIA rule of materializing inventories only for repeated list access, not for one ad-hoc search.
Refs #13355, #13299. Verified: javac against Ghidra 12.2 jars, ghidraBridgeSources 11 tests, and a real Ghidra 12.2 + JDK 25 probe asserting search-before-list deep-equals search-after-list (7 procedure matches, 12 procedures).
* refactor(frida): make inspectStatus async and load the view service lazily (#14108)
FridaInstrumentationService was the last application service statically importing AnalysisViewService for a conditional summary branch, because inspectStatus was synchronous. It is now async (its only production caller, debuggerToolBindings, already runs it inside an async handler), loads AnalysisViewService dynamically only when detail=summary, and otherwise imports only the retention check. Tests updated to await the six call sites; no behavior change.
Refs #13275. Verified: FridaInstrumentationService tests (37), check:fast. Stacks cleanly with #14102, which moves the retention import to AnalysisViewRetention.ts; resolve by taking that import line if both land.
* fix(ida): extend verifier admission check deadline to 90s
The admission check spawns scripts/verify-real-ida.mjs, which imports the
full dist graph before reaching the early admission errors. Under CI shard
load that exceeded the 10s command deadline and failed Test shard (5/12)
on main, while the same sha passed the scheduled run. The sibling verifier
observations check already uses 90s for the same script.
* perf(search): derive literal candidates from regex alternations (#14106)
* perf(search): derive literal candidates from regex alternations
extractRequiredRegexLiteral previously returned undefined for every alternation, so regex search_strings/search_procedures with alternatives paged full IDA inventories and transferred full Hopper inventories for Node-side matching. It now computes, for top-level and required-group alternations, the longest literal every branch guarantees (longest common substring of each branch's required runs) and returns it as the provider candidate; Node still verifies the full ECMAScript regex on candidates, so the candidate remains a zero-false-negative prefilter. A branch-common segment floats inside each branch and is never joined to neighbouring literals.
Refs #13353. Verified: regexLiteralCandidate tests (including the /u and /iu zero-false-negative corpus with new alternation patterns), IdaOperationRunner tests, HopperRegexSearch tests, check:fast with architecture guards.
* fix(search): require two code points for alternation candidates
A single shared code point (e.g. matched|absent -> a) matches nearly every value, so alternation-derived candidates now require at least two code points to be worth a provider round trip; shorter commons fall back to full inventory as before. Single-branch literals keep existing behavior. HopperRegexSearch routing tests pass unchanged.
* fix(search): bound alternation candidate extraction work and nesting
Long disjoint alternatives could spend hundreds of thousands of substring probes on the calling thread, and nested alternation groups recursed once per nesting level. Cap total probes (falling back to the full inventory past the budget) and cap alternation recursion depth, abandoning only the over-deep branch. Tests cover 2000-deep nesting and 1024-char disjoint alternatives.
* refactor(application): move AnalysisViewRetention to a light module and defer view loading in services (#14102)
* refactor(application): move AnalysisViewRetention to a light module and defer view loading in services
AnalysisViewRetention and requireAnalysisViewRetention moved from AnalysisViewService (which pulls the 1.3 MB analysis-view result graph) into AnalysisViewRetention.ts, which depends only on error and Evidence port types. All type-only consumers now import the light module. ApkSignature, Il2cpp and Reverse services load AnalysisViewService dynamically only on the detail=summary branch, and executeArtifactInspection checks retention readiness through the light module and loads the view service only after a successful inspection. No behavior or wire change.
Refs #13275, #13940. Verified: check:fast (typecheck, lint, architecture guards), 93 source tests (AnalysisViewService, Il2cpp, ApkSignature, Reverse), cliStartupImports 10/10 on pinned Node 24.22.1, knip clean. Remaining static importers (ArtifactComparisonEvidence, environment build/state, Frida sync inspectStatus, server bindings) still block a full chunk split and stay in #13275.
* fix(application): recheck cancellation after lazy view imports and guard static view links
An abort arriving while the dynamic AnalysisViewService import was pending still recorded and returned a successful summary. ArtifactInspectionExecution, ApkSignature, Il2cpp and Reverse now recheck the signal after the import (retaining the complete Evidence as the cancelled partial observation) before projecting. Add a counted architecture guard so static AnalysisViewService imports in application services cannot return silently; the baseline records only the known synchronous helpers and Frida path tracked in #14112.
* perf(tests): supervise direct vitest scripts through run-exclusive on POSIX (#14104)
* perf(tests): supervise direct vitest scripts through run-exclusive on POSIX
test:run, test:with-build, test:boundary, test:mcp, test:acceptance, test:integration, test:coverage and test:verbose invoked vitest directly, so an interrupted run could orphan detached provider children outside the owned process group. They now go through scripts/run-vitest.mjs, which wraps Vitest in run-exclusive --unlocked on non-Windows platforms (mirroring run-development-tests.mjs) and invokes Vitest directly on Windows, where source tests must not require the built Job Object artifact. Watch and CI shard scripts are unchanged.
Refs #13357. Verified: launcher smoke run (4 tests passed), check:fast, knip.
* fix(tests): forward stop signals from the vitest launcher to its child
The launcher ignored SIGINT/SIGTERM when wrapped, so a signal sent only to its PID left Vitest and its descendants running. It now always forwards to the child (run-exclusive can only forward signals it receives itself) and reports the tracked signal's exit code (143/130) deterministically. Verified with a manual probe: SIGTERM to the launcher PID during a 60s fixture test exits 143 with the tree stopped; launcher smoke run passes. A nested-supervisor in-process test proved environmentally unstable (the inner Vitest main is killed under nested run-exclusive supervisors) and was not landed.
* perf(contracts): prune only over-depth schema branches instead of reducing whole schemas (#14107)
* perf(contracts): prune only over-depth schema branches instead of reducing whole schemas
A schema whose inlined form exceeded the depth-10 advertised limit fell back to reduceToShallowProperties for the entire tool, erasing enums and nested validation on all root properties. pruneSchemaBeyondDepth now replaces only sub-schemas past the prune depth with type-preserving placeholders (every replacement widens acceptance, so canonical server-side validation is unchanged), and both input and output compaction keep the pruned form as inline when it fits bytes, depth and dialect checks. Two compactInputSchema tests that pinned depth-forces-reduction now pin the pruned-inline contract with the same Ajv/dialect safety assertions.
Refs #13302. Verified: compactInputSchema, compactOutputSchema, toolSchemaMetadata, advertisedInputExamples (59 tests), check:fast, docs:check.
* docs(contracts): refresh advertised schema summary for pruned-inline compaction
Pruned-inline schemas retain patterns (digest, Evidence id and text patterns) that whole-schema reduction dropped on 13 tools; regenerate the committed catalog summary with npm run verify:advertised-schemas -- --update-summary and re-verify clean.
* fix(contracts): make deep-schema pruning widening-safe
Walk schema positions instead of raw JSON, preserve declared integer types, keep branches that fit, return no pruned schema under not/oneOf where widening can reject valid values, and recheck output byte budgets. Add regression coverage for closed objects, unsafe combinators, fitting enums, and nullable integers; refresh advertised summaries.
* fix(contracts): keep untyped deep schemas unconstrained when pruned
Inferring object from properties or array from items narrows an untyped schema, which accepts every JSON value; the placeholder is now always unconstrained when no type is declared. Add an Ajv regression accepting null and nested values through a pruned untyped branch.
* test(contracts): assert pruned untyped schemas at depth 8
The regression accepted values that never reached the replaced node, so
it stayed green for an object placeholder and did not distinguish
branch pruning from whole-schema reduction. Assert the empty schema at
depth 8 and accept null there.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* docs(github): require reported verification and factual docs in PR template (#14130)
* docs(github): require reported verification and factual docs in PR template
Record the maintainer checks for running needed validation, limiting
comments to constraints and decisions, and keeping documentation factual.
Mirror that guidance in AGENTS.md where it was not already stated.
* docs(github): assign the PR checklist to the author
Rename Before merge so the PR author completes it before requesting
review, and point the draft-PR note at that section.
* docs(github): confirm root cause and engineering rules on PRs
Add a few author-checklist items for the root cause, owning-boundary
interpretation, retained cleanup facts, and REA_ limit settings.
* docs(github): attest engineering rules in the PR template only
Restore AGENTS.md to main and phrase the new author-checklist items
as author attestations, including hardcoded limits rather than every limit.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* chore(deps): update MCP TypeScript SDK to 2.4.0 (#14129)
* chore(deps): update MCP TypeScript SDK to 2.4.0
Bump @modelcontextprotocol/server and @modelcontextprotocol/client (and core transitively) from 2.3.1 to 2.4.0, the current v2 release; the legacy @modelcontextprotocol/sdk package line (1.x) is not used. Regenerate package metadata. Notable upstream changes checked against REA usage: no x-mcp-header annotations are used, output schema ids are urn: URIs accepted by the new Ajv fast-uri, and REA does not unwrap structuredContent.result. The 2025-11-25 structuredContent wrapping change for meta-id output schemas is client-visible and noted for release notes.
Verified: check:fast, DeferredEvidenceMcpServer + toolOutputReferences suites (53 tests), deferredRuntime + serverLifecycleMcp boundary suites (41 tests), and a stdio initialize/tools/list probe on all profiles after a clean build.
* fix(contracts): keep compact output unions when the SDK stamps an object root
MCP SDK 2.4.0 treats a $ref union of objects as an object and stamps
type:object before tools/list. Compact reduction then dropped that union
and advertised an empty property bag. Reduce each alternative's root
shape instead, and advertise widened oneOf branches as anyOf so
overlapping branches still accept canonical results. guided_workflows
already declared that object root and had the same empty advertisement.
Refresh the advertised catalog summaries for guided_workflows,
read_guidance_section, and search_guidance.
* chore(licenses): refresh the MCP SDK 2.4.0 dependency inventory
Regenerate licenses/npm-dependencies.txt with the license inventory
script. Update the three runtime notice identities from the lockfile
after checking each 2.4.0 archive integrity and LICENSE text; those
license bodies are unchanged. The notice fingerprint matches the
generator.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* feat(javascript): add semantic_analysis structure-only mode to analyze_javascript_application (#14117)
* feat(javascript): add semantic_analysis structure-only mode to analyze_javascript_application
On large Electron apps the default analysis runs full semantic analysis per file (364 s measured in #14100) although first questions are application-graph facts. semantic_analysis: structure-only returns static and application-graph facts without semantic IR, graph content or traces: the worker purpose protocol gains structure-only (full static checkpoint, semantic phase skipped, no semantic result budget consumed), adoption records the mode once as a limitation, and Evidence parameters record the selection. Default complete behavior is unchanged.
Closes#14116. Verified: javascriptArtifactReconstruction, electronApplicationAnalysis and javascriptApplicationService suites (75 tests incl. new structure-only e2e), worker server/schema tests, check:fast, docs:check, advertised schema summary regenerated.
* test(javascript): assert semantic relations in the structure-only test
* fix(javascript): record structure-only semantic coverage as incomplete and retain refusal facts
Structure-only files now record a semantic unavailable reason so graph coverage cannot claim complete examination (comparisons will not report skipped bindings as removed), member-mutation refusal checkpoints cross for structure-only as they do for complete analysis, and the e2e control asserts real semantic content under the default.
* docs(javascript): document semantic_analysis and expose --semantic-analysis
The owning reconstruction guide now describes the complete default, what structure-only returns and skips, and how to follow up with complete analysis of selected sources. The CLI projection declares the field so --semantic-analysis <complete|structure-only> is accepted with the contract enum.
* fix(javascript): record structure-only application coverage as partial
Structure-only omits source-module and export-binding nodes. The
application graph now reports partial coverage with a null omission
count, so a comparison of an unchanged application treats those
bindings as unknown rather than removed.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* perf(browser): fetch source maps with bounded lookahead and in-order admission (#14115)
* perf(browser): fetch source maps with bounded lookahead and in-order admission
fetchWebSourceMaps awaited each map's full fetch-decode cycle before starting the next, so bundles with dozens of external maps paid serial round trips. Responses now start with a lookahead of 4 (approved origins only, never past the operation deadline), while every budget (URL bytes, retained bytes, decoded records), deadline check and decode still happens strictly in request order inside fetchOne, so item order, inclusion under output limits and limitations are unchanged. A started prefetch that is never admitted is cancelled in teardown, and abort/deadline paths route through fetchOne so retained-cleanup ownership (SourceMapPendingFetch) is preserved.
Closes#14109. Verified: WebSourceMapFetcher tests 31 passed (30 existing unchanged plus a new out-of-order-completion proof asserting overlap >1 and request-order admission), check:fast.
* fix(browser): abort and bind cleanup for unadmitted source-map prefetches
Teardown now aborts the operation controller before removing deadline/caller controls, and every started-but-unadmitted prefetch is settled and bound to the returned result: pending-fetch cleanup becomes the retained failure (or a secondary failure on an existing error), and unread prefetched responses are cancelled with cleanup failures tracked. The lookahead test now gates six requests to prove the four-fetch cap.
* fix(browser): pipeline source-map fetches without speculative or reordered requests
Start each request's fetch after its budget reservation and deadline checks pass, and start the next fetch only when the current body is read and the next failure reservation still fits. Redirect chains and host-observable request order stay sequential; the next fetch overlaps only the current decode. Sibling binding now ignores teardown-abort artifacts and binds only genuinely incomplete cleanup. Boundary suites (49 tests) and unit suite (31) pass unchanged in their budget and redirect assertions.
* fix(browser): retain sibling source-map cleanup on teardown
Cancellation that stops admission at the first map left later lookahead
fetches owning unread responses. Teardown skipped stored failures and
recorded the rest only as secondary notes, so the returned error could
report cleanup complete while those resources were still owned.
Await every started prefetch and merge its live cleanup through the
existing cleanup-composition helpers, preserving remaining resources.
* fix(browser): keep caller cancellation through source-map cleanup
Unused-prefetch teardown chose success before its cleanup wait and after
the caller abort listener was removed. Recheck the caller signal after
that wait so a cancel during a successful release stays a cancellation,
while an existing failure keeps its cleanup owners.
Cover unused-prefetch release, mixed redirect and prefetch cleanup, and
cancellation during release with structured cleanup facts.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* fix(gpu): name an unreadable shared section instead of a bare null count (#14133)
Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
* perf(process): pool regex workers across match calls (#14114)
* perf(process): pool regex workers across match calls
matchRegexValues spawned a fresh worker_threads Worker per call (~10.5 ms measured, vs ~0.9 ms pooled for a trivial match on 1-5k candidates). Workers are now pooled by heap class (max 4, 10 s idle reap, unref'd while idle): the worker protocol is message-driven, a worker is reused only after a clean matched/invalid-pattern reply, and deadline, abort, error, exit or malformed replies retire it so a stuck pattern can never poison the pool. Queueing for a busy pool counts toward the caller's deadline. Results, heap and deadline errors, and cancellation semantics are unchanged.
Closes#14110. Verified: RegexMatcher + RegexMatcherReply + boundary regexMatcher + HopperRegexSearch + IdaOperationRunner tests (91+15), check:fast, and a 15-call benchmark (10.5 ms -> 0.9 ms per call).
* test(process): use the admitted deadline source spelling in the pool test
* fix(process): enforce queue deadlines, reclaim idle regex workers, and await retirement
Address pooled-worker review findings: the matching deadline now starts before pool acquisition (queue waiters expire and expired jobs are never posted), idle workers of another heap class are reclaimed instead of blocking a changed heap setting, queued worker startup failures reject into the normal Cannot-start path, and non-clean outcomes await worker termination before returning so close() cannot finish while matching work lives. Add RegexMatcherPool.test.ts with a construction-counting fake worker proving reuse across clean calls and termination-before-return plus replacement after a deadline.
* fix(process): allocate regex workers through one capacity path
Acquisition retired an idle worker and spawned directly, bypassing waiter order: retirement served an older waiter into the freed slot and acquisition then spawned a fifth worker. Acquisition now only takes an idle match or enqueues, and serveRegexWaiters owns every spawn/reclaim decision in waiter order. Add a mock-pool regression proving a fifth queued search deadlines at four constructions.
* fix(process): reclaim incompatible regex workers on one path
Keep a stopping worker counted until terminate settles, and let release
ask the shared allocator so a different heap does not wait out the idle
reap. A failed stop stays owned and is recorded beside the match error.
* fix(process): mark background regex-worker stops and release test gates
Typed lint rejects an unmarked beginStopRegexWorker promise, so the
allocator's fire-and-forget stops are explicit. Pool tests release held
workers in finally, including when an assertion fails first.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* perf(mcp): serve compact output schemas from the build-recorded catalog (#14121)
* perf(mcp): serve compact output schemas from the build-recorded catalog
The compact output profile forced the eager runtime: full server composition plus runtime schema compaction measured at ~700 ms init + ~421 ms first tools/list, vs ~125 ms deferred for the default profile. The catalog recorder now also records bounded compact output advertisements per tool at build time; the deferred server serves them verbatim (new recorded presentation kind, canonical validation unchanged on calls), main admits the compact profile to the deferred path, and catalogs recorded before this field fall back to eager. Measured after: compact init 118 ms + list 7 ms at the same ~672 KB payload.
Refs #13275. Verified: DeferredEvidenceMcpServer tests (17), check:fast, build:cached, and a stdio probe comparing default/compact/hot-cold initialize and tools/list timings and bytes.
* fix(mcp): align compact deferred listings with the recorded catalog
Deferred compact startup used the off-profile catalog digests, so the first
tool call rejected the runtime. Select the digest for the configured output
profile.
Recorded output presentation skipped compaction for every listed schema.
Track which tools have a build-recorded advertisement and compact live
registrations, including discover_tools.
The recorder stored a contract projection. Legacy clients receive that
projection after the SDK stamps or wraps a non-object root and REA compacts
the listing. Record that listed schema.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs(mcp): describe recorded compact startup
Compact stdio startup serves the recorded catalog, including compact output
when that catalog has compact schemas. A compact profile whose catalog has
none falls back to eager composition. Initial-target, HTTP, family-scoped
hot/cold, and source runs without recorded artifacts stay eager.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* feat(analysis-view): select inventory occurrences by path glob
Questions about one directory of a large archive, such as the native
libraries under lib/ in an APK or the classes of one package in a jar,
required paging every occurrence, because occurrences could be selected
only by exact path, ID or kind. Add path_globs, which match whole recorded
logical paths: * and ? stay within one segment, a ** segment spans zero or
more segments (or everything below when last), other characters are
literal and case-sensitive, and the container's own "." row never matches.
Several globs union, then intersect with the other selectors, so one call
returns, for example, every file at the archive root or below assets/.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis-view): order inventory occurrences by size before paging
Finding the largest files in an archive meant reading every occurrence
and sorting client-side, which for a jar of 28,671 entries is tens of
megabytes of rows. Add order_by with field declared_size or
compressed_size and an ascending or descending direction. Selected rows
are ordered before paging; unknown sizes, such as directories, come last in
either direction and ties keep inventory order. The container's own "."
row carries its size, so the description points at path_globs ["**"] to
rank only its entries.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(analysis-view): match inventory path globs without backtracking
Globs compiled to regular expressions in which every * became another
overlapping [^/]* group, so a selector such as *a*a*a*a*a*a*a*a*b took
polynomial time in the name length to reject a long run of a's, and
selection runs synchronously before paging. Match each segment with the
two-pointer wildcard algorithm, which keeps one retry point and bounds
work to pattern length times segment length, and resolve ** segments with
a reachability pass over path segments. Matching semantics, including
code-point ?, literal metacharacters and a trailing ** needing one segment,
are unchanged.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(analysis-view): cover compressed-size inventory ordering
The ordering test selected only declared_size, so an implementation that
ignored order_by.field still passed. Add an archive whose repetitive text
is declared larger but compresses smaller than incompressible bytes, and
assert both orders with the directory's unknown size last.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(adb): report macOS ownership preparation failures as typed host prerequisites (#14140)
Since adb runs under owned supervision, a failed macOS ownership helper
build reached the adb version probe as an unreadable result, so one broken
toolchain failed all of binary_session. adb now reports the shared
ownership_preparation failure that apktool, JADX and Ghidra report, and its
availability probe turns it into runtime_unavailable.
When the host refuses the helper's compiler for capacity (EMFILE), that
retryable constraint now stays primary over the helper root it could not
remove, which remains a retained cleanup dependency.
The four providers build the preparation error through one owner,
ownershipPreparationError, next to the availability check that reads it.
Fixes#13943
Co-authored-by: Anurag Singh <211784907+Anurag-5ingh@users.noreply.github.com>
* test(ida): decode the Hex-Rays query line without importing site (#14144)
The decoder asserts empty stderr, but -I still imports site, so a host
sitecustomize that writes to stderr failed the test. The decoder needs
only ast, json and sys; -S removes the dependency on host site setup.
* docs(i18n): standardize Vietnamese translations for guides and common terms (#14141)
* docs(i18n): standardize Vietnamese translations for guides and common terms
* docs(i18n): address review feedback on verification claims and analysis guidance
* fix(javascript): report no loader call in a program that names no CommonJS loader (#14191)
Two loader queries answer "unknown" when they exhaust their alias
budget, and callers report that as a require reference. Ordinary calls
such as node.getClientRects() were reported as dynamic requires in
programs that contain no loader at all, and on dense bundles those walks
dominated the static phase.
Every loader identity these queries recognize is rooted in a name the
program must contain (require, module, a mainModule member, the module
builtin, process used as a value, or global code) or in a bundler
factory binding. One pass over the syntax establishes whether a program
names any of them. When it names none, both queries answer without
walking.
Closes#14190
* perf(javascript): merge data-effect traversals and look up callable kinds (#14149)
Configuration, request and boundary candidates were each collected by a
whole-program traversal that rebuilt the same callable and ancestor
stacks, followed by two more for defaults and response consumers. The
three independent collectors now share one traversal and the two that
read their results share another.
Callable ownership is asked of every node on entry and exit in about a
dozen passes. It is now one lookup by node type, derived from Babel's
Function and Class aliases, instead of a chain of type guards.
Refs #14147
* chore: ignore the .claude agent directory like other local agent tooling (#14194)
Agent worktrees under .claude/worktrees carry their own .oxlintrc.json.
oxlint discovers it as a nested configuration and rejects it, so lint,
check:fast and the pre-push hook fail for the whole checkout. .codex,
.devin and .factory are already ignored for git and lint; .claude was
not.
* docs(verification): remove dated records that nothing cites (#14196)
Delete 54 dated verification records and companion JSON files that no
document, script, test or sidebar entry references. Keep the records
that live docs cite as evidence, the script-produced release-exposure
record, and the JSON companions those records link to. Move the one
record a test reads as data into tests/fixtures/javascript beside its
consumer. Git history retains every removed record.
Claude-Session: https://claude.ai/code/session_01TBh3FSTJTdVSc2DntiwVY7
* docs(guides): correct native and platform guide flags, host limits and stale notes (#14198)
* docs(guides): correct host requirements and prune change notes in runtime, web, data guides (#14197)
docs(guides): correct host and runtime claims and prune change notes
Correct sigrok, firmware and SQLite host/runtime requirements and a v8 CLI
flag, remove consumer-migration and historical asides, and drop duplicated
sentences in the JavaScript, web, runtime, data, firmware and signals guides.
* perf(debugger): stop repeating command results as raw_result (#14146)
* perf(debugger): stop repeating command results as raw_result
GDB console/startup, Rizin debug, Cutter and reverse-engineering command
Evidence set rawResult to a copy of result, contrary to the raw_result
contract. Every interactive debugger reply therefore carried its records
and output twice. Omit rawResult where no distinct provider
representation exists; tests assert the same facts on normalized_result.
Closes#14145
* test(debugger): assert command results on normalized_result in remaining suites
The composition, CLI delivery, acceptance and MCP suites still read
command output through raw_result, and one fixture built a parent
Evidence record that repeated its result as raw_result. They now assert
the same fields on normalized_result and that raw_result is null.
* fix(examples): pin the CI example to the current REA release (#14201)
The GitHub Actions example pinned rea-agents 6.7.0 and its test
hard-coded the same string, so the pin went stale silently across
three releases. Pin 6.10.1 and derive the test's expected version from
package.json, so a release bump fails the test until the example is
updated. Stop naming a fixed version in the CI analysis guide.
* docs(development): route first contact by parsed facts and split admission limits from delivery budgets (#14193)
* docs(development): route first contact by parsed facts and split admission limits from delivery budgets
Add first-contact routing rules, provider-neutral selector semantics,
address-space naming, once-per-session caveats, sibling-reader parser
sharing and target-versus-request error categorization to the tool
design guide. Replace the unpaged-by-default rule with bounded summaries
backed by retained Evidence, and distinguish refusing admission limits
from non-refusing delivery budgets. Add public-corpus checks to the
testing guide and tighten the audit and workflow sections.
* docs(development): bind mutable-state cursors to a revision and limit retryable to idempotent retries
* docs(development): share parsing, not admission policy, across sibling readers
Sibling readers of one format need different amounts of the same header,
so they share the parser and structural checks while each operation keeps
its own required fields and admission policy. Align the AGENTS.md limits
rule with the admission-limit and delivery-budget split.
* fix(javascript): route directories by JavaScript input presence and name directory-capable operations (#14186)
* fix(javascript): refuse directories without JavaScript inputs and name directory-capable operations
`analyze <dir>` routed every non-bundle directory to the static JavaScript
lane, which reported an all-zero Electron summary as success for native
build output. The JavaScript lane now owns that applicability decision from
its complete inventory: when coverage is complete and no JavaScript, HTML,
package.json, source map, or nested ASAR input exists, it returns a typed
unsupported_target refusal naming inspect_desktop_application,
audit_release_exposure, inspect_artifact, and open_binary. Incomplete
coverage or unavailable files of unknown kind stay unknown and proceed.
The directory_requires_file refusal no longer claims to come from
open_binary when another operation (inspect, inspect-artifact) admitted the
target, and it names the directory-capable operations instead of only the
JavaScript lane.
* fix(javascript): keep empty directories analyzable and report routing facts for non-JavaScript ones
Owner decision on #14186: an empty directory is "nothing to analyze", not
"unsupported". The JavaScript lane now classifies application-input
presence once, in the domain owner of its file facts
(javaScriptApplicationInputPresence): present, empty, absent, or unknown.
- empty (complete traversal, no non-directory entries): analysis succeeds
as before and the graph carries an explicit "No JavaScript inputs were
found" limitation naming the next operations.
- absent (complete traversal, entries but no JavaScript, HTML,
package.json, source map, or nested ASAR): the typed unsupported_target
refusal now carries bounded diagnostics from the inventory the lane
already read: inventoried_entries, entries_by_format, json_files and
native_addon_files. No paths are retained.
- unknown (incomplete traversal or unavailable file of unknown kind) and
present: unchanged analysis.
Reverts the fixture edits that added package.json to empty directories.
* fix(sqlite): state the runtime requirement in supported-runtime terms (#14206)
The capability reason, worker failure, tool description and skill
reference told users to run Node.js 24.15 or newer, below the 24.22.1
and 26.12.1 floors REA itself requires. Keep the gate on the native
DatabaseSync.limits API floor, and say instead that every supported
Node.js 24.x and 26.x runtime provides it and Node.js 22.x does not.
* docs: tighten format pages and correct stated limits (#14199)
* docs: tighten format pages and correct stated limits
Restructure the GPU code object, UnityFS, IL2CPP, model, Rust and
hardening pages for scanning, state the Rust input and report limits
as overridable defaults, replace an IL2CPP jq round trip with the
--evidence-bundle query, and remove change narratives.
* docs(model): separate the big-endian v2 and unknown-version GGUF refusals
Only unknown versions report the raw version bytes and both UINT32
interpretations with byte order unknown; big-endian v2 is recognised and
refused with its own message.
* docs: tighten contributor guidance and prune duplicated skill text (#14203)
* docs: tighten contributor guidance and prune duplicated skill and verification text
Link AGENTS.md to the CONTRIBUTING.md owners for scope, issues and pull
requests, remove change narratives from the development guides, add a
verification-record retention rule, and route format-specific skill
entries to tool descriptions and guides instead of restating them.
* chore(skill): regenerate the Cursor plugin skill copy
The skill source was trimmed in this PR; regenerate the tracked Cursor
plugin copy with scripts/generate-cursor-plugin-skill.mjs so the
documentation check's freshness test passes.
* fix(javascript): answer an over-budget member-mutation query by escaping whole objects (#14153)
* fix(javascript): answer an over-budget member-mutation query by escaping whole objects
Member-mutation analysis enumerates alias states with exact member paths
for each query. On a dense alias cluster one query can schedule tens of
thousands of states, so a handful of queries spent the whole per-source
allowance and the source was refused: a 328 KB Vite and React bundle was
refused at any allowance.
Each query now has a state budget derived from
semantic_precision.alias_selections. A query that outgrows it is answered
again as an escape of the whole value and of every value a write stored
into it. An escape covers every effect below it, so the answer is a
superset of the exact one; the alias-selections limit is recorded.
Bindings an abandoned query walked are remembered so later queries that
reach them collapse without spending their budget first.
Refs #14150
* perf(javascript): record a collapsed member-mutation query without a site
A collapsed query escaped whole objects at its own call site, so every
collapsed query walked the same dense alias cluster again. An escape that
names no site may precede any read, which readers already treat as
unknown timing. Its alias states then do not depend on the query that
reached them, and a later collapsed query stops at whatever an earlier
one covered.
Refs #14150
* fix(javascript): queue collapsed escapes instead of starting a walk per alias
A collapsed query started a nested walk for every alias reached through
a projection, so a long chain of projected aliases nested one call per
link and overflowed the call stack, where the exact walk follows the
same links through its queue. An escape walk now queues the whole-object
escape as another state.
* test(docs): check doc facts structurally instead of pinning prose (#14207)
Derive the CI example's Node pin from .nvmrc, match the workflow link by its parsed destination instead of its link text, and replace hard-coded Persian and Malayalam headings with a check that every in-page README fragment resolves to a rendered heading or HTML anchor. Drop skill-install prose assertions already covered by byte equality with the generated skill.
* style(tests): format the SQLite acceptance test (#14209)
#14206 updated an expectation in this file without formatting it, so
format:check fails on main and on every branch built from it.
* perf(javascript): share one lexical index between static and semantic analysis (#14148)
* perf(javascript): share one lexical index between static and semantic analysis
The static and semantic phases each built a private semantic state for
the same parsed program, so definitions, ambient writes and
member-mutation facts were derived twice per file.
Sharing the state requires separating what it holds. Index facts are
shared. Memoized query results are declared through one owner so a new
consumer or index step starts without them. Observations (resource
limits and returned-reference widenings) are recorded per derivation:
index steps record into the index's own log and each consumer starts
from that log, so the semantic phase reports exactly what a private
index would have.
The worker builds one index per parsed file and the semantic phase
continues from it when its resolution mode matches the static phase.
Refs #14147
* fix(javascript): let a shared lexical index continue only one semantic phase
The semantic phase appends its module links and callable facts to the
state it continues from, so a second phase from the same index reported
each import link twice. Admission is now consumed by the first phase and
a second is rejected like any other index that does not match.
* perf(ghidra): retain literal search candidates only when filtering narrows them (#14143)
* perf(ghidra): retain literal search candidates only when filtering narrows them
The Ghidra bridge folds ASCII exactly, so a case-insensitive literal
search with an ASCII-foldable pattern already returns its matches.
Attaching the unnarrowed reply as rawResult repeated the full match list
in every default search_strings/search_procedures response and Evidence
record. Retain it, with the candidate limitation, only when Unicode
filtering removed a row or secondary name.
Closes#14142
* docs(ghidra): state when a literal search retains raw candidates
The native investigation guide still said every case-insensitive literal
search puts bridge candidates in raw_result. It now states the
condition. A test covers the case where filtering removes only a matched
secondary name, which keeps every procedure but must still retain the
candidates.
* fix(hopper): name xrefs when a selector resolves outside every procedure (#14188)
* fix(hopper): name xrefs when a selector resolves outside every procedure
The bridge collapsed every procedure-selector miss into "No procedure
exists at the requested address", even when the caller passed a name
that Hopper resolved to an import slot or data label. The TypeScript
error then attached one fixed remediation that mixed CLI and MCP
spellings and recommended list_names, which has no CLI command.
The bridge now reports how the selector resolved (symbol, address,
cursor, or unresolved name) with the resolved address. HopperRemoteError
derives its remediation and related operations from those facts: a
resolved non-procedure symbol names xrefs on its address, and the
remediation names contract operations only so each adapter renders its
own spelling through related_operations.
Fixes#14165
* test(hopper): parse selector diagnostics through the bridge wire contract
The procedure-selection regression cast the bridge diagnostic to never
and projected it directly, so the selector-resolution schema never ran.
It now frames each diagnostic as an NDJSON reply and parses it with the
Hopper reply envelope, covers a cursor outside every procedure, and
requires malformed selector resolutions to fail as protocol errors.
* fix(javascript): record the collapsed-query resource limit on observations (#14220)
#14153 added a collapsed member-mutation query that recorded its
resource limit on state.valueResourceLimits. #14148, merged after it,
moved that set under state.observations, so the line failed typecheck
and threw at runtime when a query exceeded its state budget.
* fix(tests): narrow markdown-it attributes to strings in doc link checks (#14217)
Token.attrGet returns string | number | null, so the link checks added in
#14207 failed typecheck on main. Keep only string href values before
matching them.
* fix(artifacts): route native images to static readers and name their architecture (#14189)
* fix(artifacts): route native images to static readers and name their architecture
inspect_artifact sent every PE, ELF and Mach-O root straight to
open_binary (PE first to inspect_managed_artifact, whatever its CLI
header) and left architecture null on every inventory node and on the
inspection subject, although the header parsers already know the CPU.
Inventory classification now returns the header's CPU family with the
format, from the same ELF, Mach-O and PE record parsers target admission
uses, so each thin image node (including universal slices and archive
members) names its architecture; an undecoded machine stays null, and a
universal container node names none. When the inventory root is the
open target's own bytes, its Evidence subject carries the architecture
target admission parsed, as it already carried the selection.
Native next probes now list the provider-free readers for the format
before open_binary: PE imports, exports, load config, resources,
hardening and release exposure; ELF dependencies, exports, hardening and
release exposure; Mach-O inspect_macho, inspect_signature, hardening and
release exposure. inspect_managed_artifact leads only when the PE
declares a CLI header, is omitted when it declares none, and stays a
conditional probe for directory members whose declaration is unknown.
The PE hypothesis that inventory cannot tell managed from native is kept
only for that unknown case.
Fixes#14157
* fix(artifacts): keep native readers for executables that carry a package
An executable whose contents inventory as an embedded package (Godot
PCK, PyInstaller, Node SEA, Deno, Bun or a .NET single-file bundle) is
also a native image. Previously inspection proposed only the package
reader and hid the native side.
The inspection now takes the native image facts that target admission
parsed for the root's own bytes, not only the PE CLI-header flag. When
inventory reads those bytes as a package, the package reader comes
first, then the carrier's static readers, then open_binary.
A probe names exactly one operation, so the static readers cannot be
grouped into one entry without changing the advertised schema. They
stay separate rows and share one short rationale, because each tool's
description already says what it reads. Each format's reader list is
now a table.
* fix(artifacts): bind a deep provider for managed PEs only at a native boundary
A PE declaring a CLI header recommended open_binary with generic
function-level advice, so pure managed assemblies were steered to a
deep native provider. Its rationale again requires managed inspection
to report a native or mixed boundary, and a PE whose header is unknown
states the same condition.
* test(artifacts): assert universal slice inventory per host and prune probe snapshots
The universal Mach-O test assumed slice inventory on every host, but the
slice reader runs native lipo and is skipped off macOS, so it failed on the
Linux test shards and portable tests. The test now selects the host platform
through a HostPlatform mock: the slice inventory case runs only on a macOS
host, and the other-host case asserts unknown container coverage with only
the file occurrence on every host. Both keep the selected-slice subject
architecture and static reader order.
Pruning in the probe tests:
- Merge the ARM64 PE, ELF and Mach-O single-image probe tests into one
parameterised case that asserts subject and root-node architecture, the
complete static reader list, and that open_binary is the only probe beyond
artifact bytes.
- Remove the Deno carrier ordering case from the native image probe test;
the Deno CLI acceptance test covers the same three carriers through the
public workflow and now asserts the same ordering and authority facts.
- Replace full next-probe arrays in the Bun, Deno, dotnet-bundle and
PyInstaller CLI/MCP tests with a shared carrier assertion: package readers
lead, the carrier's format reader is present, and open_binary is last and
the only non-artifact-bytes probe. The per-format reader list stays owned
by the native image probe test.
Malformed-header (undecoded machine), unknown architecture and package
subject identity coverage are unchanged.
* fix(wasm): state the accepted WABT release range from its owning constant (#14205)
* fix(wasm): state the accepted WABT release range from its owning constant
`WabtRelease.ts` admits caller-supplied WABT `>=1.0.42 <1.1.0`, but the
`inspect_wasm_artifact` description, the capability inventory
remediation and the WASM static-inspection guidance said "WABT 1.0.42",
and a source comment and the WASM guide claimed managed downloads stay
pinned, although REA downloads no WABT.
The accepted range and the caller-facing release line now live in the
domain beside `WABT_VERSION`, so the contract description, inventory
remediation, error guidance and adapter messages all render the same
"WABT >=1.0.42 <1.1.0 (verified with 1.0.42)". The download claim is
removed, and the guides and skill source state the range.
* docs(wasm): state the accepted WABT release range in one owning guide section
The bundled WABT README still required an exact 1.0.42 banner while the
guide and supported-targets table stated the admitted range. Keep the range
in the WASM guide's Configure WABT section and link to it from the README
and the supported-targets table; the README keeps the verified release,
source commit and archive digest.
* test(wasm): derive WABT version assertions from the owning constants
Assert the verified release and caller-facing release line through
WABT_VERSION and WABT_RELEASE_LINE, and drop the literal range pin that the
owner-level admission boundary checks already cover.
* test(wasm): type the WABT version probe fixture by its owning type
Deriving expected_version from WABT_VERSION in an untyped literal widened
it to string; annotate the fixture as WabtVersionProbe instead.
* fix(pwntools)!: report a per-call input ceiling as its producer_limits parameter (#14208)
* docs: correct, re-verify and prune getting-started, provider and reference pages
Re-verify the macOS arm64 native decompiler build, the m68k lane and the
RISC-V lane on Ghidra 12.2, check RISC-V language facts against the 12.2
SLEIGH sources, document the verify:ghidra demangler prerequisite, remove
duplicated IDA and mcp add paragraphs, prune release-history narratives and
the stale 6.4.0 registry checkpoint, clarify Godot carrier classification,
correct the packet-summary and SQLite host rows, and say in the
inspect-binary-layout CLI description that it is ELF-only on Linux x64.
* docs(reference): add a canonical producer_limits section
Derive the accepted fields and defaults per operation from the producer
limit schemas and describe how an exhausted budget reports its per-call
control.
* docs(reference): split producer_limits defaults by operation and document the pwntools exceptions
Field and decoder discovery reject input_bytes, and packet field search
defaults output_bytes to 32 MiB. For pwntools, diagnostic_bytes bounds
combined stdout and stderr while output_bytes bounds the reply file, and
an oversized input reports the pwntools.max_input_bytes setting limit
rather than the producer_limits parameter shape.
* fix(pwntools)!: report a per-call input ceiling as its producer_limits parameter
When producer_limits.input_bytes set the pwntools admission ceiling for a
call, an oversized input reported the registered pwntools.max_input_bytes
setting limit with update_mode "parameter" attached. Every other
producer budget reports the parameter shape, and AGENTS.md asks for the
limit of the control that stopped the work. Report producer_limits.input_bytes
with applies_at "next_call" and, as its default, the ceiling that applies
when the field is omitted. Setting, launch and built-in ceilings keep the
setting shape. Remove the reference exception this made obsolete.
BREAKING CHANGE: for a request-sourced pwntools input ceiling,
details.limit is now a control_kind "parameter" limit instead of a
setting limit carrying setting, source, update_mode and scope fields.
* fix(cli)!: accept only the documented kebab-case option spelling (#14204)
* fix(cli)!: accept only the documented kebab-case option spelling
REA's argv parser kept incur's second spelling of every option: the
camelCase schema key (`--maxRows`) bound like the documented
`--max-rows`, although help, completion and manifests list only the
kebab-case form. That hidden alias let wrong spellings survive in the
guides.
The parser now binds only the documented flag. A schema key spelling,
including its `--no-` negation, fails as a typed `flag_spelling`
failure rendered as PARSE_ERROR that names the documented flag:
"Unknown flag: --maxRows. Did you mean --max-rows?". Completion no
longer resolves camelCase option names. The sensitive-value scan still
treats `--sensitiveValue` as a declaration so its value stays redacted
from the refusal.
Guides, the inspect-api-contract option description and tests now use
the kebab-case flags.
BREAKING CHANGE: camelCase option spellings such as `--maxRows` or
`--dryRun` are refused; use the kebab-case flag that `--help` lists.
* test(cli): exercise invalid dry-run values with the documented flag spelling
The invalid dry-run cases in strictPositionals and cliSetup appended
--dryRun=false as a later valid override. The parser now refuses that
schema key spelling before it validates the dry-run value, so each case
failed on flag spelling and never checked that a later override cannot
hide an earlier invalid value. The override is now --dry-run=false, and
each case asserts the dry-run failure message, so a spelling refusal can
no longer satisfy it.
The --dryRun=abc case in cliSetup's malformed-value list is removed: it
was the --dry-run=abc case under a spelling the parser now refuses
before reading the value, and argvParser.test.ts owns that refusal.
* test(cli): keep one public case for the flag spelling refusal
cliOptionAliases repeated argvParser's three token shapes (bare, inline
value, negation) through the full CLI. The parser test owns those shapes
and asserts the structured flag_spelling failure with its flag and
documented spelling; the CLI keeps one case for the documented
PARSE_ERROR projection, whose message is part of the CLI contract.
The camel-case sensitive-value case also dropped its trailing
--no-<literal> token: the spelling refusal stops parsing before it, so
the token no longer exercised anything.
* docs: correct, re-verify and prune getting-started, provider and reference pages (#14202)
* docs: correct, re-verify and prune getting-started, provider and reference pages
Re-verify the macOS arm64 native decompiler build, the m68k lane and the
RISC-V lane on Ghidra 12.2, check RISC-V language facts against the 12.2
SLEIGH sources, document the verify:ghidra demangler prerequisite, remove
duplicated IDA and mcp add paragraphs, prune release-history narratives and
the stale 6.4.0 registry checkpoint, clarify Godot carrier classification,
correct the packet-summary and SQLite host rows, and say in the
inspect-binary-layout CLI description that it is ELF-only on Linux x64.
* docs(reference): add a canonical producer_limits section
Derive the accepted fields and defaults per operation from the producer
limit schemas and describe how an exhausted budget reports its per-call
control.
* docs(reference): split producer_limits defaults by operation and document the pwntools exceptions
Field and decoder discovery reject input_bytes, and packet field search
defaults output_bytes to 32 MiB. For pwntools, diagnostic_bytes bounds
combined stdout and stderr while output_bytes bounds the reply file, and
an oversized input reports the pwntools.max_input_bytes setting limit
rather than the producer_limits parameter shape.
* docs(reference): say that pwntools memory failures carry no producer limit (#14221)
Both the structured resource-limit reply and the reserved memory exit omit
details.limit, because an allocation failure does not prove that
producer_limits.address_space_bytes was exhausted. The reference promised
the parameter limit for every pwntools budget failure.
* fix(errors): refuse malformed target bytes as a target, not invalid input (#14195)
* fix(errors): refuse malformed target bytes as a target, not invalid input
parseFailureAnalysisError is the shared owner that turns a byte-format
parser's ParseFailure into a public refusal. It mapped malformed and
truncated bytes to an AnalysisInputError on the path field. The envelope
then reported invalid_request, with inspect_input_contract recovery and
"correct the listed fields". The arguments were valid; the target bytes
were the problem. Readers that wrap the ParseFailureError in an
ArtifactReaderFailure, and ArtifactOperationError reason=malformed, were
classified the same way.
Add AnalysisMalformedTargetError. It keeps the parser's kind, format,
detail, offset and field, and projects as unsupported_target with
details.format_failure. Its recovery is to choose another operation or a
well-formed copy of the target. Route both parser entry points through it
and reclassify ArtifactOperationError reason=malformed. Argument and
selection errors (missing files, directories, symlinks, JSON arguments)
stay invalid_request.
Fixes#14170
* docs(maven): describe duplicate variant names as malformed metadata
Duplicate Gradle variant names go through malformedInput, which now
reports unsupported_target with details.format_failure: malformed.
Point the earlier statement at that section instead of the old
invalid_format code.
* test(errors): expect malformed-target refusals from CLI byte-format readers
Truncated IPS, ELF, PE and shortcut bytes now project as unsupported_target with format_failure=malformed. Update the CLI acceptance cases that still expected invalid_request.
* fix(errors): keep a cancelled read a cancellation whatever its abort reason
projectOwnedArtifactInputFailure read the reader failure's cause without
checking the reader's own reason. A cancelled read carries the caller's
opaque abort reason as that cause, so aborting with a ParseFailureError
turned the cancellation into a non-retryable malformed-target refusal
before the shared cancellation projection ran. Only a reader whose own
reason is malformed or truncated now yields a malformed target.
The ELF dependency checkpoint cancellation test now also aborts with a
parser failure as the reason, through the public provider read.
* test(pe): expect malformed-target refusals from the PE filesystem boundaries
Short non-PE bytes now refuse the target rather than the request field.
The missing-file, directory, symlink and child-path controls keep their
caller-input expectations.
* fix(elf): refuse malformed ELF note bytes as a target, not invalid input
inspect_elf_notes shared this PR's root cause: its parser reported
structural violations as a reader "format" failure, which the shared
stable-artifact projection treats as a request-field error, so truncated
or non-ELF bytes still returned invalid_request. The parser now raises
malformed or truncated ParseFailureErrors, which the shared projection
reports as a malformed target with format_failure and format facts.
Consumers that interpreted the old reader reason now use the parser's
facts: debug-link build-id observation keys on ParseFailureError kinds,
and binary hardening drops its rewrap of note-parser format failures
into BinaryFormatFailure, which the parser's own failure supersedes.
* test(errors): own the byte readers' malformed-target projection in one CLI table
The PR repeated the same malformed -> unsupported_target mapping in a
dedicated CLI test per command and again in each provider's filesystem
boundary test. The stable-artifact parser-failure CLI table now owns it:
every byte reader it covers (now including ELF dependencies, debug link,
unwind ranges and native initializers) refuses a truncated ELF header as
a malformed target with operation, path, format_failure, retained file
identity and no argument recovery.
Removed as redundant with that table: the truncated or non-ELF/non-PE
CLI tests for ELF debug link, dependencies, unwind ranges and notes,
native initializers, and PE imports and certificates; and the
malformed-file blocks in thirteen filesystem boundary tests, which keep
their directory, symlink, missing-file and child-path controls. Format
specific refusals (a truncated IPS body, a wrong shortcut CLSID, DWARF
units) keep their own tests, as do the owner tests in
parseFailureAnalysisError and ArtifactOperationFailure.
* test(errors): expect malformed target bytes as unsupported_target in acceptance tests
The first full acceptance run of this PR found five expectations still
asserting invalid_request for target-byte failures: the timing test's
truncated ELF, a truncated DTB, duplicate Rust dependency JSON, and PE32
and PE64 load-config images without an MZ header. Assert the
unsupported_target code, with format_failure malformed where the
non-MZ PE path matches the already-updated PE imports test.
* fix(artifacts): recognize standalone formats and route them to their readers (#14192)
* fix(artifacts): route native images to static readers and name their architecture
inspect_artifact sent every PE, ELF and Mach-O root straight to
open_binary (PE first to inspect_managed_artifact, whatever its CLI
header) and left architecture null on every inventory node and on the
inspection subject, although the header parsers already know the CPU.
Inventory classification now returns the header's CPU family with the
format, from the same ELF, Mach-O and PE record parsers target admission
uses, so each thin image node (including universal slices and archive
members) names its architecture; an undecoded machine stays null, and a
universal container node names none. When the inventory root is the
open target's own bytes, its Evidence subject carries the architecture
target admission parsed, as it already carried the selection.
Native next probes now list the provider-free readers for the format
before open_binary: PE imports, exports, load config, resources,
hardening and release exposure; ELF dependencies, exports, hardening and
release exposure; Mach-O inspect_macho, inspect_signature, hardening and
release exposure. inspect_managed_artifact leads only when the PE
declares a CLI header, is omitted when it declares none, and stays a
conditional probe for directory members whose declaration is unknown.
The PE hypothesis that inventory cannot tell managed from native is kept
only for that unknown case.
Fixes#14157
* fix(artifacts): recognize standalone formats and route them to their readers
inspect_artifact refused SQLite databases, Windows shortcuts, CPython
pyc files, flattened devicetrees and UEFI NVRAM variable-store volumes
as unsupported binary formats with no next probe, although dedicated
REA tools read each of them. The shared recognizer table, which target
admission and inventory classification both walk, had no entry for
them, and the UEFI admission probe required an FFS2/FFS3 volume even
though the UEFI inventory reader already retains other volumes.
Add sqlite, windows-shortcut, python-pyc and devicetree as artifact
formats recognized by their owners' detectors:
- The SQLite header moves to src/domain/sqliteFormat.ts. Desktop state
detection now uses it too.
- The ShellLinkHeader size, LinkCLSID and GUID formatting move from
the shortcut parser to src/domain/windows/windowsShortcutHeader.ts.
- A pyc must carry a pinned CPython magic. CR LF framing alone is not
enough.
- A devicetree's header must pass the devicetree header parser after
FIT has declined it. A malformed header is refused with its reason.
UEFI admission now accepts any aligned, checksum-valid firmware volume.
Inspection routes each format to its reader as an artifact-bytes next
probe: inspect_sqlite_database, inspect_windows_shortcut,
inspect_python_pyc, inspect_devicetree and inspect_uefi_firmware. The
reader is named once, in the domain inspection projection. Formats no
recognizer claims still refuse as before; their raw inventory is #14151.
Fixes#14174
* fix(artifacts): keep native readers for executables that carry a package
An executable whose contents inventory as an embedded package (Godot
PCK, PyInstaller, Node SEA, Deno, Bun or a .NET single-file bundle) is
also a native image. Previously inspection proposed only the package
reader and hid the native side.
The inspection now takes the native image facts that target admission
parsed for the root's own bytes, not only the PE CLI-header flag. When
inventory reads those bytes as a package, the package reader comes
first, then the carrier's static readers, then open_binary.
A probe names exactly one operation, so the static readers cannot be
grouped into one entry without changing the advertised schema. They
stay separate rows and share one short rationale, because each tool's
description already says what it reads. Each format's reader list is
now a table.
* test(targets): add vocabulary fixtures for the standalone artifact formats
The sqlite, windows-shortcut, python-pyc and devicetree target formats
had no TargetFixtures entry, so the exhaustive fixture map failed to
typecheck and the persistence and projection cases never covered them.
* fix(artifacts): bind a deep provider for managed PEs only at a native boundary
A PE declaring a CLI header recommended open_binary with generic
function-level advice, so pure managed assemblies were steered to a
deep native provider. Its rationale again requires managed inspection
to report a native or mixed boundary, and a PE whose header is unknown
states the same condition.
* test(artifacts): narrow the subject to a file before reading its format
* test(artifacts): assert universal slice inventory per host and prune probe snapshots
The universal Mach-O test assumed slice inventory on every host, but the
slice reader runs native lipo and is skipped off macOS, so it failed on the
Linux test shards and portable tests. The test now selects the host platform
through a HostPlatform mock: the slice inventory case runs only on a macOS
host, and the other-host case asserts unknown container coverage with only
the file occurrence on every host. Both keep the selected-slice subject
architecture and static reader order.
Pruning in the probe tests:
- Merge the ARM64 PE, ELF and Mach-O single-image probe tests into one
parameterised case that asserts subject and root-node architecture, the
complete static reader list, and that open_binary is the only probe beyond
artifact bytes.
- Remove the Deno carrier ordering case from the native image probe test;
the Deno CLI acceptance test covers the same three carriers through the
public workflow and now asserts the same ordering and authority facts.
- Replace full next-probe arrays in the Bun, Deno, dotnet-bundle and
PyInstaller CLI/MCP tests with a shared carrier assertion: package readers
lead, the carrier's format reader is present, and open_binary is last and
the only non-artifact-bytes probe. The per-format reader list stays owned
by the native image probe test.
Malformed-header (undecoded machine), unknown architecture and package
subject identity coverage are unchanged.
* test(artifacts): fold the SQLite routing case into the standalone format table
The SQLite case asserted the same format, subject and single artifact-bytes
probe as the table above it and differed only in how the file is created.
Each table row now creates its own input, so the SQLite database joins the
table. The resembling-pyc refusal case is unchanged.
* fix(desktop): generate the exported reader's SQLite header from its owner
The exported Python reader kept its own SQLite header literal after
SQLITE_HEADER gained a shared owner. Generate it from that owner, as the
template already does for ZIP_SIGNATURES. Desktop fixtures that only need
a SQLite file now build it from the same constant; format-detection tests
and the tests that run the generated Python keep the literal header as an
independent check of the owner and the generated code.
* test: assert structured facts instead of incidental wording (#14222)
Replace recovery and message substring checks with the limit, reported_limits, recovery, diagnostics and issue-path facts that drive the behaviour. Derive WABT banners, pwntools, WASM, Go, model and PE section-name allowances from their owning constants, and drop obsolete-phrase bans that a structured assertion now covers.
* fix(errors)!: split reader path refusals from malformed target bytes (#14225)
ArtifactReaderFailure("format") covered two different facts: target
bytes that violate their format, and a selected path that is not a
regular file. The shared selected-file projections
(projectOwnedArtifactInputFailure and classifyProviderFailure's file
step) mapped both to invalid_request with an invalid_format path
issue, so corrupt BEAM files and PE certificate table bodies were
reported as caller argument errors.
Split the reason at its producers:
- Path-kind refusals now use the existing "path" selection reason:
regular-file admission, the stable root, directory, ZIP, ASAR and
PyInstaller entries, dyld inputs, the UEFI flash source and extract
occurrence selection. They stay invalid_request.
- The BEAM parser and the PE certificate table parser raise the format
owner's ParseFailureError (malformed or truncated, format "beam" or
"pe-certificate-table"). A short file that does not start with FOR1
is malformed, not truncated. A PKCS#7 name encoding the decoder does
not implement is unsupported, not malformed.
- Short reads inside an admitted range (kernel module, kernel build
config, ELF unwind ranges) are integrity read-coverage failures,
because the file changed during the read.
- Internal contract breaks (stream chunk size, a non-Buffer keyed
archive chunk) are invariant violations; an impossible descriptor
byte count is an I/O failure.
The shared projections now treat only "path" as a selection error.
They take the malformed-target facts from the reader failure's own
parseFailure, which artifactParseFailure sets once from the owner's
ParseFailureError and rebuilt failures keep through primaryFacts.
ArtifactOperationError carries the same facts, so inspect_artifact
refusals (for example Android boot images) now include
details.format_failure, format, offset and field. Android boot entry
planning raises the format owner's malformed failure, and the
redundant shortcut and API-contract format branches are removed.
BREAKING CHANGE: callers that parse `code` see unsupported_target
instead of invalid_request for malformed or truncated bytes from
inspect_erlang_beam and from the inspect_pe_certificates certificate
table body. Truncated reads of a file that changed during
inspect_kernel_module, inspect_kernel_build_config and
inspect_elf_unwind_ranges now report artifact_changed. inspect_artifact
malformed and truncated refusals gain details.format_failure and
details.format. Existing fields are unchanged.
* fix(errors)!: refuse corrupt managed, IL2CPP and universal Mach-O bytes as a malformed target (#14224)
Three formats had their own error mappers that still reported a selected
file's corrupt bytes as an invalid_format path issue (invalid_request):
managedInspectionInputFailure, Il2cppMetadataProvider and the Mach-O slice
selection mappers. Each now projects its format owner's own failure through
AnalysisMalformedTargetError at the path of the file whose bytes are at fault.
- Managed PE/CLI: a broken rule is a malformed pe-cli target with the
reader's scope and offset; unsupported-metadata and unsupported-signature
are unsupported targets; resource limits stay with their producer.
- Universal Mach-O: the container reader raises a ParseFailure once
(malformed, truncated where it measured the end, unsupported from the
container's own category), and requireSelectedNativeImage(FromReader)
project it at the universal file's path. An unknown or ambiguous
architecture stays invalid_request on the architecture field.
SliceSelectionInput.pathField is removed.
- IL2CPP: metadata and binary format failures each name their own file. A
binary that parses but does not link to the metadata is a link conflict:
invalid_request with invalid_value issues on both path and binary_path,
no input-contract recovery, and the partial observation keeps both file
identities. Neither file is called malformed.
BREAKING CHANGE: inspect_managed_artifact, inspect_managed_members,
inspect_managed_native_boundaries, compare_managed_members,
inspect_il2cpp_metadata, inspect_go_binary, inspect_rust_binary,
inspect_dwarf_units and inspect_native_initializers report corrupt or
truncated target bytes as code unsupported_target with details.path,
format, format_failure and reason instead of invalid_request with an
invalid_format issue. IL2CPP link conflicts list both path and binary_path
with reason invalid_value instead of one invalid_format binary_path issue.
* fix(tests): expect the path reason for a FIFO root and a symlinked ZIP (#14242)
#14225 moved both refusals to ArtifactReaderFailure("path") at their
producers (StableRootArtifact and the ZIP source admission). The two tests
still expected "format" and fail on main.
* fix(errors)!: align unsupported-signature status and split invalid-method-token at its producer (#14230)
* fix(managed)!: report an unsupported signature as partial metadata, not malformed
The refusal path already treats `unsupported-signature` as a valid form
outside decoder coverage, but `managedMetadataFailureStatus` still called
it malformed. One predicate, `isManagedCoverageGap`, now owns that split
for both the refusal and the inventory status.
Value retention no longer reads the inventory status: one value's
unsupported signature is still retained locally, while a budget or an
unsupported metadata layout still stops the whole read.
BREAKING CHANGE: when a managed reader stops on `unsupported-signature`,
`metadata.status` is `partial` (was `malformed`) in managed artifact,
member and native-boundary inspection, and the artifact
`classification.status` is `managed` (was `malformed`). The field names
and enum members are unchanged.
* fix(il2cpp)!: refuse a reused or non-MethodDef token as malformed metadata
`invalid-method-token` covered two facts. A MethodDef row reused within
one image, or a token that is not a nonzero MethodDef row, is in the
metadata's own records; a row past the module's method pointers is a
disagreement between two files that both parse.
The metadata reader now checks each image's tokens while reading link
facts and raises `invalid-method-definition-token`, which the provider
already refuses as a malformed target at the metadata's path. The linker
keeps `invalid-method-token` for the cross-file range check only and drops
its own duplicate scan.
BREAKING CHANGE: a duplicate or non-MethodDef method token found while
linking is `unsupported_target` with `details.path` the metadata file,
`details.format` `il2cpp-metadata`, `details.format_failure` `malformed`
and `details.reason` starting `invalid-method-definition-token:` (was an
`invalid_request` link conflict naming `path` and `binary_path` with
reason `invalid-method-token`). A token past the module's method
pointers keeps the conflict and the `invalid-method-token` reason.
* fix(gpu)!: dispatch AMDGPU note metadata on the declared ELF ABI (#14244)
* fix(gpu)!: dispatch AMDGPU note metadata on the declared ELF ABI
inspect_gpu_code_objects read every AMDGPU ELF note under the HSA schema,
so a well-formed PAL-ABI code object was reported malformed ("no valid
kernel array") while the same object without metadata was unsupported.
The AMD ELF metadata owner now reads EI_OSABI once and selects the note
schema from it. HSA (64) keeps the existing kernel path. PAL (65) decodes
amdpal.pipelines into a new amd_pal_metadata object field during kernel
analysis: the version, and per pipeline its name, type, API, API shader
stages with their hardware mapping, and each hardware stage's entry point,
entry point symbol, SGPR/VGPR/AGPR counts, wavefront size, LDS and scratch
sizes. PAL register maps use unsigned integer keys, which the MessagePack
reader now admits for that schema only. Mesa3D (66) and unrecognized ABIs
are unsupported with their e_flags target and unexamined notes. Corrupt PAL
MessagePack or container shapes remain malformed.
BREAKING CHANGE: amd_target_metadata gains required os_abi and abi fields,
GPU objects gain a nullable amd_pal_metadata field, and PAL-ABI objects
report complete, partial or unsupported instead of malformed.
Fixes#14154
* chore(gpu): regenerate the inspect_gpu_code_objects advertised schema summary
The objects view fields selector derives from the GPU object schema, so the new amd_pal_metadata field changes the advertised input compact schema.
* fix(gpu): bound AMDGPU note expansion per code object and refuse binary maps
The decoded-value allowance is now shared across all of a code object's notes, so PAL pipeline facts expanded during discovery stay bounded. MessagePack binary values are no longer accepted as maps for PAL pipelines, stages or HSA kernel and argument rows.
* fix(tests): expect #14225's reader reasons in the boundary tests (#14238)
* fix(tests): expect the path reason for non-file directory entries
#14225 changed DirectoryArtifactReader to refuse a non-file entry with the
path reason instead of format, but this boundary test still expected
format, so it fails on main's Windows lanes.
* fix(tests): expect #14225's reader reasons in the remaining boundary tests
#14225 moved non-regular inputs (a FIFO inventory root, a symlinked ZIP,
a non-regular or substituted dylib) to the path reason, impossible
descriptor byte counts to io, and invalid chunk sizes to an internal
invariant violation, but these tests still expected format, so main's
shards 6, 8, 10, 11 and 12 and the portable and Windows lanes fail.
* fix(zip): account apksigner alignment padding before the APK Signing Block (#14232)
* fix(zip): account apksigner alignment padding before the APK Signing Block
Signed release APKs pad the member region with zero bytes so the APK
Signing Block starts on a 4 KiB boundary. The member-region account
counted that pad as unaccounted bytes, so ZIP listing coverage was
unknown for ordinary apksigner output.
An all-zero range under 4 KiB that ends at a well-formed, 4 KiB-aligned
signing block is now accounted as padding. A non-zero byte, an
unaligned block or a zero run with no signing block stays unaccounted.
Fixes#14178
* fix(zip): prefer the descriptor layout that leaves signing-block padding
An empty member's zero sizes match both the 16-byte and the 24-byte data
descriptor layouts. When the 24-byte layout is followed only by
apksigner alignment padding, the first-match 16-byte choice left more
than 4 KiB for the padding check, so valid padding stayed unaccounted.
The descriptor search now also prefers a layout whose remainder is that
padding.
* fix(release-exposure)!: omit checks that cannot apply to the detected formats (#14240)
* fix(release-exposure)!: omit checks that cannot apply to the detected formats
audit-release-exposure always returned all 15 checks. On a single PE it
reported Mach-O hardened runtime and the Android manifest as not_assessed,
and the four Electron fuse checks as not_applicable, each with a next probe
for another format. Agents following those probes would run Mach-O,
Android, or Electron tools on a Windows image.
The report now omits a check that cannot apply and names it in
coverage.inapplicable_checks. Applicability comes from the reader's format
facts: native image formats, the target kind, embedded package formats,
and whether a native image may have gone unread. A check stays whenever a
member it could apply to may be unread. checks and inapplicable_checks
always split the fixed table, in order, and the report schema enforces it.
On a public x64 SDL2.dll the JSON report drops from 10,451 to 6,256 bytes.
BREAKING CHANGE: release-exposure checks no longer use the not_applicable
status, and summary.by_status has no not_applicable count. A check that
cannot apply is absent from checks and listed in
coverage.inapplicable_checks.
Fixes#14163
* fix(release-exposure): keep format checks when a package may hold them
A selected executable that embeds a package, such as a .NET bundle or
PyInstaller archive, may store native images and other members that the
audit does not read. Applicability ignored those for executables, so a PE
bundle with a packaged Mach-O helper lost macho.hardened_runtime and its
inspect_signature probe.
Unread or packaged native images and embedded packages now keep the
Mach-O, native hardening and Android checks for every target kind. Direct
schema cases cover duplicate, overlapping, missing and reordered splits.
* fix(release-exposure): decide native applicability from unread members, not package presence
A fully read ASAR or other package with no native member regained native.hardening, macho.hardened_runtime and android.manifest, because any embedded package format counted as an unread member. Applicability now follows nativeImagesMayBeUnread, which already covers native images stored inside a package that went unread. Android stays limited to directory and file selections.
* fix(doctor)!: emit each check once and classify passing checks healthy (#14251)
* fix(doctor)!: emit each check once and classify passing checks healthy
Audit-wide doctor reports copied every check into both scope_checks and
checks. The audit-wide report now has no scope_checks, since every check
in checks is in scope. Explicit scopes keep scope_checks.
The CLI treated an unhealthy report like an error payload, so
--filter-output and the token count for a filtered selection were ignored
when healthy was false. An unhealthy report is now a completed result
for output controls. The exit status stays 1, and the JSONL and
full-output envelopes still mark it failed.
The provider check port typed classification as a failure class for every
check, so Ghidra, IDA, JADX and Kuna attached unsupported_host,
config_drift or runtime_failure to passing rows in providerInspections.
DoctorProviderCheck is now a union: a passing check is healthy with no
code, and only a failing check carries a failure class.
JADX and Kuna reported their not-configured state with the remediation
text as the reason, so detail repeated remediation. The reason now states
the observation (REA_JADX_MCP_JAR or REA_KUNA_COMMAND is not set).
BREAKING CHANGE: audit-wide doctor reports omit scope_checks; read
checks. Passing providerInspections checks report classification
"healthy".
Fixes#14166Fixes#14200
* fix(doctor): filter unhealthy reports in full output and keep repairs
--filter-output still skipped an unhealthy report under --full-output,
because the envelope's failure payload was chosen before the filter. The
completed-report decision now has one owner in writeResult: it selects
from the report first and uses the selection as the envelope's error, so
the envelope keeps ok: false. JSON Lines keeps its documented framing of
a classified failure as one whole error record.
Shortening the JADX and Kuna not-configured reasons left their analysis
errors without a repair step, because those errors copied only the
reason. They now pass the configuration owner's existing remediation
(jadxFailureRemediation and the Kuna configuration remediation) as the
remediation action.
The installation guide now limits the healthy-classification statement
to provider checks and names the registration_environment exception.
* fix(kuna): accept a remediation action on capability gaps
* fix(cli): keep an unhealthy report failed when its selection drops the verdict
Under --full-output, the selected value doubled as the failure marker, so a selection that was missing (an audit-wide report has no scope_checks) made the envelope report ok: true. writeResult now decides failureReported before selection and uses the selection only as the payload. A missing or verdict-free selection keeps ok: false, and an invalid filter is still reported as a filter error.
* fix(macho)!: report a FAT header or table cut off by the file's end as truncated (#14233)
* fix(macho)!: report a FAT header or table cut off by the file's end as truncated
The universal Mach-O container reader measured the file's size but
reported a FAT header shorter than 8 bytes as malformed, and a FAT table
that runs past the file's end as not FAT at all. Callers could not tell a
cut-off download from corrupt bytes.
readFatContainerHeader now returns a typed truncated state carrying the
measured file size and the length the header or table needs. A CAFEBABE
count that reads as a JVM class version stays not FAT, because a short
class file is not evidence of a universal file. Universal image
selection, the native container reader and the lipo-selected slice
resolver raise that fact as a truncated ParseFailure with an extent, and
the malformed-target projection reports it as details.available_bytes and
details.required_bytes. Complete but corrupt FAT data (zero count,
overlapping slices, slices inside the table) stays malformed.
BREAKING CHANGE: inspect_go_binary, inspect_rust_binary,
inspect_dwarf_units, inspect_native_initializers,
inspect_native_dispatch_metadata, the IL2CPP binary readers and the
macOS provider's lipo-selected slice reads now report a FAT header or
table cut off by the file's end with details.format_failure "truncated"
(previously "malformed", or an unsupported or not-universal result for a
table past the end), plus details.available_bytes and
details.required_bytes.
* test(macho): type every format-owner row with its asserted format failure
* chore(lint): warn instead of failing on long test functions (#14274)
Test files had max-lines-per-function as an error at 150 lines while
production code only warns at 100. Long test functions are often
legitimate table-driven or fixture-heavy cases, so report them as
warnings at the same 150-line threshold. The file-level max-lines limit
for test files is unchanged.
* test: prune redundant and superseded tests (#14271)
* test: prune redundant and superseded tests
Remove two boundary copies of the zstd.max_frames section-name refusal for
binary hardening and ELF unwind ranges. The public MCP frame-allowance test
already checks both operations; it now also asserts the setting's minimum
and maximum, which the copies carried.
Drop the trailing inspect-managed-members malformed-bytes check from the
managed comparison CLI test. The shared parser-failure CLI table covers that
projection for every managed reader.
Index the GPU ELF fixture's section-name offsets once instead of searching
the string table per section. The SHN_XINDEX fixture has 65,539 sections, so
the per-row search was quadratic. The generated bytes are identical.
* test: bound the GPU fixture's section-name suffix index
Indexing every suffix of every section name made a 65,536-byte name cost
quadratic work. Index only suffixes up to 256 bytes and search the table
directly for longer names; both give the first occurrence the per-row
search used, so the generated bytes are unchanged.
* fix(snapshot): replay every one-shot Ghidra read and say when a live result cannot replay (#14249)
* fix(snapshot): replay every one-shot Ghidra read and say when a live result cannot replay
One-shot CLI --snapshot replayed only Ghidra decompile: the documentless
exception was limited to procedure_pseudo_code, and DirectAnalysis passed
the one-shot context only for that operation. Every read-only Ghidra
query of the call's own Program now records its replay entry, keyed as
before by target identity, provider profile, operation and parameters.
Providers that declare their results live (Hopper, IDA, Kuna) still run
every call. With --snapshot, their result now carries a limitation that
says it was saved but cannot replay, and why.
Fixes#14182
* fix(snapshot): disclose unsaved function, workflow and skipped replay entries
The not-saved notice covered only direct observations, and only by
policy. rea function and composed workflows now report it too, and the
notice also follows what recording will actually keep: a result with
reference truncation or classifications, a full cache without this
query, or a session whose metadata write invalidated its snapshot. The
cache answers that question from the same predicate its record uses.
* fix(snapshot): word composed-command notices for recomposition and unwritten snapshots
decompile-all and trace-native-ui-action never write the snapshot, so
their notice now says nothing was recorded. Other composed commands say
the answer is composed again on repeat, starting the provider only for
source reads the snapshot lacks. The snapshot write and the notice share
one set of unwritten commands.
* feat(desktop)!: recognise native releases and rank application probes first (#14264)
* feat(desktop)!: recognise native releases and rank application probes first
inspect-desktop-application returned nothing for native Qt or SDL
releases, gave Godot candidates no probe, and listed every BCL facade of
a self-contained .NET release as an equal inspect_managed_artifact probe.
- A native candidate names the shallowest main executables when no
other runtime is recognised. Its PE probes are inspect_pe_imports and
inspect_pe_resources.
- Component markers name Qt, SDL, wxWidgets, GTK and the MSVC runtime
from the files a release ships.
- Each Godot pack carrier gets an inspect_artifact probe.
- Probes carry a priority. Assemblies with a matching runtimeconfig,
deps.json or pdb come first, and runtime facades are counted once in
deferred_probes instead of probed one by one.
BREAKING CHANGE: the desktop application result adds the native family,
the ui-framework and runtime-library component categories, new probe
operations, a required probe priority and deferred_probes.
Fixes#14173
Refs #14179
* fix(desktop): select Godot packs with open_binary, summarize deferred probes and match Unix wxWidgets names
inspect_artifact reads the active target and takes no path, so a Godot
pack probe now selects its carrier with open_binary and names
inspect_artifact as the follow-up, as the ASAR probe does. The default
summary carries deferred_probes, the release-audit fixtures include the
field, and the wxWidgets marker accepts libwx_*.so and .dylib names.
* fix(desktop): read Unix mains without host executable marking and describe resource probes accurately
Windows cannot mark ELF or Mach-O files executable, so the reader also
reads headers of Contents/MacOS entries and extensionless root files.
The inspect_pe_resources probe now describes the resource-tree inventory
it returns.
* feat(cli): add list-procedures to produce function-matching inventories (#14241)
* feat(cli): add list-procedures to produce function-matching inventories
match-native-functions accepts only list_procedures Evidence, and no CLI
command produced it. Expose the list_procedures contract as
rea list-procedures, with complete or summary-plus-bundle delivery, and
name that producer when the matcher refuses another record such as a
filtered search_procedures result.
Fixes#14185
* test(cli): assert the bundled inventory keeps its fixture rows
* fix(pe)!: share one loader-equivalent PE header owner across static readers (#14253)
* fix(pe)!: share one loader-equivalent PE header owner across static readers
Resources and certificates now admit headers through readPeImage, and
resources map RVAs through the shared file-backed mapping. The owner reads
the optional header at fixed offsets, caps data directories at 16, and lets
a PE signature at e_lfanew override a DOS relocation table. Export, import,
TLS and resource directories are read at their RVA whatever Size declares.
Disregarded declarations are reported in header_anomalies.
BREAKING CHANGE: import and delay-import walks continue to the null
descriptor past a short directory Size instead of stopping with a
malformed_entry issue, and inspect-pe-resources reports an unsupported
optional-header magic as unsupported_target.
* fix(pe): keep valid DOS relocation tables owning e_lfanew
Only a relocation table that describes no DOS load module yields e_lfanew
to a PE signature; update MZ/PE conformance to the shared owner.
* fix(pe): walk resource trees within file-backed bytes and cite TLS reads
The resource walk is bounded by the file-backed run from the directory RVA
rather than its Size, and a Size that ends before the bytes walked is a
directory_size_below_structure anomaly. The TLS result carries
structure_location for the structure read past a short Size, and Evidence
cites it.
* test(pe): use a resource cycle as damage now that a short Size is read
* fix(pe): read resource trees past an oversized Size and keep damaged MZ headers malformed
An oversized resource Size is reported without requiring its unused bytes
to map. A Windows-header candidate is malformed when the DOS module is also
invalid, and the guide states that a valid DOS relocation table owns
e_lfanew.
* feat(artifacts): report declared DDS, GLB, KTX and KTX2 headers and regions (#14248)
* feat(artifacts): report declared DDS, GLB, KTX and KTX2 headers and regions
Recognize DDS (including the DX10 extension), GLB, KTX 1.1 and KTX 2.0
by their header signatures and inventory them as containers. The root
format metadata carries the declared header facts. Each declared byte
region is a member that is hashed, classified and extractable: the DDS
payload; GLB JSON and BIN chunks and BIN-stored images; KTX key/value
data and mip levels; and KTX2 DFD, KVD, SGD and levels.
Nothing is decoded. A DDS payload is checked against the size derived
from its dimensions, mips, faces, layers and block size. Disagreeing
extents are reported in extent_check with unknown coverage rather than
refused, and regions past the end of the file are dropped, not clipped.
Structural header faults refuse as malformed input with the format and
offset.
Part of #14155
* fix(gpu-assets): bound GLB chunks and keep unexamined regions unknown
- Stop the GLB chunk walk at 1,024 chunks with unknown coverage.
- Refuse a GLB chunk that crosses the declared length, or a chunk table
that stops short of a physically present declared end, as malformed.
- Report coverage unknown when GLB images were not all listed: past the
image allowance, an unparsed JSON chunk, or an unresolved bufferView.
- Leave the DDS payload size unknown when rows are padded to a declared
pitch or more than 32 mip levels are declared, instead of deriving it
from different dimensions.
* fix(gpu-assets): report GLB images in URI-backed buffers as external
Only buffers[0] without a uri is the GLB BIN chunk. An image whose
bufferView sits in a buffer with a uri, or an image named by uri, is
stored outside the file; it was counted as an unresolved image and made
coverage unknown. Such images are now counted in external_images and
leave coverage complete; only views that resolve to no buffer stay
unknown.
* fix(gpu-assets): report KTX2 level-index failures at file offsets
The 64-bit level-index fields were read from a buffer that starts at file
offset 80, but an unsafe value reported its index-relative position.
The reader now takes the buffer's file base and reports base plus
position, so every failure offset is a file offset.
* fix(gpu-assets): count a GLB image as external only for a URI string
An image or buffer whose uri is present but not a string, and an image
with neither a uri nor a bufferView, were counted in external_images and
left coverage complete without an established source. Only a URI string
now marks a source external; other sources stay unresolved and keep
coverage unknown.
* fix(artifacts): report S-record data after the final count (#14260)
* fix(artifacts): reject stale S-record data counts
* docs(artifacts): explain the final S-record count check
* fix(artifacts): retain data beyond the final S-record count
---------
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* fix(limits)!: make the IL2CPP pointer index adjustable and require owned refusal limits (#14243)
* fix(limits): make the IL2CPP pointer index adjustable and name ELF note budgets in details.limit
inspect_il2cpp_metadata accepts max_native_index_bytes (default 1 GiB,
needs binary_path) for the estimated ELF virtual pointer index. The index
refusal now carries its own limit name (virtual-pointer-index-bytes) and a
details.limit naming the parameter, its effective value, default and range,
instead of a fixed ceiling with no override. The binary file allowance and
the loader's fixed capacities are unchanged.
inspect_elf_notes and inspect_elf_debug_link refusals for max_file_bytes,
the decoded section-name budget and max_entries now set details.limit. One
domain-owned bounds object per operation feeds both the schema and the limit.
Two guards keep new in-code refusal limits owned:
- scripts/verify/fixed-ceilings.mjs (run by npm run lint) requires every
fixedAllowanceOptions, fixedProducerInputAllowance,
artifactFixedLimitFailure or inline fixedAllowance declaration to be
listed in fixed-ceiling-registry.json with its class (format, protocol,
representation, derived, forwarding, or pending with an issue) and reason,
and fails on stale entries.
- The untyped-budget-refusal architecture guard counts refusals whose only
recovery is an authored remediationAction, with a shrink-only baseline.
Fixes#14175
Part of #14234
BREAKING CHANGE: an inspect_il2cpp_metadata refusal at the ELF pointer index
reports reported_limits.boundary "virtual-pointer-index-bytes" and
details.limit for max_native_index_bytes, and no longer carries a
details.refusal fixed_ceiling.
* fix(limits): track IL2CPP's remaining fixed allowances with the native readers
* fix(limits): run the authored-only refusal count from lint, where TypeScript is installed
The architecture guards run before npm ci in CI and must stay
dependency-free, so the AST-based count moves into fixed-ceilings.mjs with
its own shrink-only baseline and --shrink-baselines.
* fix(limits): register producer and native wrapper ceilings by the allowance they name
fixedProducerInputAllowance names its allowance in its second argument, and
fixedNativeAllowance forwards its first, so the guard now reads each helper's
allowance argument and checks the callers of both.
* fix(limits): delete the authored-only baseline when its last count is removed
reconcileBaselineFile returns delete once no count remains, but the
verifier ignored it and the next run read the file unconditionally, so
--shrink-baselines could not finish. An absent baseline now reads as empty
and shrinking removes the file.
* fix(limits): record the advertised IL2CPP input schema with max_native_index_bytes
* test: run repeated CLI formatting capacity pairings in process (#14279)
The acceptance matrix started 22 CLI processes for 11 presentations and two
outcomes, most of which repeat the same recovery. Keep one real process per
encoder boundary (encodeLines, encode, YAML stringify, Markdown), presentation
owner (terminal, full envelope, token count and window) and outcome, plus the
SIGPIPE case. Check every presentation and outcome pairing in process through
createCliResultOutput, including the full-envelope, YAML and Markdown facts.
* perf(artifacts): decide the FAT header once per classified stream
The classification probe decided the FAT header for the finished stream
size but kept it only when it parsed. Content classification then decided
it again from the same prefix and size, so every stream starting with
0xCAFEBABE, including each JVM class file, ran the class-file check twice.
Classification evidence now carries the finished header for every outcome,
with the slice headers beside it, and the classifier and root slice reader
use that decision.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(artifacts): reuse the streamed XML plist verdict when classifying
The classification probe already scans every stream for an XML plist
prolog while it retains the prefix. Content classification discarded that
verdict and scanned the retained prefix again with a fresh probe, so each
entry paid for two decodes of its first chunk.
Classification evidence now carries the probe's verdict, and the
single-buffer `hasXmlPlistSignature` wrapper, which only that second scan
used, is removed. The probe also stops once the prolog scanner rejects:
fatal-decoder validation and byte accounting cannot change a rejection.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(resources): refuse non-ASAR Pickle prefixes without building errors
The ASAR signature probe runs on every classified stream, and almost
every stream is not an archive. Its extent parser returned each refusal as
a new ArtifactReaderFailure, capturing a stack trace only for the probe to
discard it and record a refusal reason.
The parser now returns a refusal tag. Header admission, the one caller
that reports the refusal, builds the same failure and message from it.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(go): expect loader-equivalent PE header facts in the MZ diagnostics (#14293)
#14253 made the static PE readers read the optional header at its fixed
offsets and admit a declared directory count below 16, as the Windows
loader does. The Go MZ diagnostic fixtures still expected the older
refusals, so inspect_go_binary MCP and CLI diagnostics failed on main.
A short SizeOfOptionalHeader with an unknown magic at the fixed offset
is now an unsupported optional header, and a PE declaring one data
directory is admitted and keeps its build information, which the MCP
test now asserts.
* fix(tests): damage Deno PE resource framing the loader-equivalent reader reads
#14253 walks resource trees at their RVA whatever the directory Size
declares, so shrinking Size no longer made the 65,535-language table
malformed and the case reported the entry allowance instead. Point the
type directory's entry at a language directory outside the file-backed
resource bytes: its header cannot be read, which the reader reports as
malformed before counting rows against the allowance.
* test(go): check build information in a one-directory PE32 fixture (#14303)
* test(pe): distinguish unsupported DOS input from truncated input (#14302)
* ci: measure portable runner time for recorded selection predictions (#14304)
* ci: validate workflow anchors with actionlint 1.7.12 (#14298)
* ci: wait for static checks before broad PR test shards (#14299)
* ci: validate workflow anchors with actionlint 1.7.12
* ci: wait for static checks before broad PR test shards
* ci: record affected-test predictions above the live cutoff (#14300)
* ci: compare frozen selections with observed test failures (#14301)
* chore(deps): bump markdownify from 1.2.3 to 1.2.4 in /website (#14227)
Bumps [markdownify](https://github.com/matthewwithanm/python-markdownify) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/matthewwithanm/python-markdownify/releases)
- [Commits](https://github.com/matthewwithanm/python-markdownify/compare/1.2.3...1.2.4)
---
updated-dependencies:
- dependency-name: markdownify
dependency-version: 1.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump rcssmin from 1.2.2 to 1.3.0 in /website (#14229)
Bumps [rcssmin](https://github.com/ndparker/rcssmin) from 1.2.2 to 1.3.0.
- [Changelog](https://github.com/ndparker/rcssmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rcssmin/compare/1.2.2...1.3.0)
---
updated-dependencies:
- dependency-name: rcssmin
dependency-version: 1.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(ci): retry recorded crash dependency acquisition without stale index cache (#14076)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* ci: publish the portable build cache only for selected consumers (#14307)
* ci: run the verified actionlint release binary (#14309)
* chore(deps): bump pyyaml from 6.0.3 to 6.0.4 in /website (#14228)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.4/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.3...6.0.4)
---
updated-dependencies:
- dependency-name: pyyaml
dependency-version: 6.0.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor(views): reuse invalid-view results and row selectors (#14314)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: hhang <17309584214@163.com>
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ShuaixinHuang <1836656514@qq.com>
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
Co-authored-by: 吴佳浩Alben <35291372+XiaoBinGan@users.noreply.github.com>
Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
Co-authored-by: Anurag Singh <iamchauhan9616@gmail.com>
Co-authored-by: Anurag Singh <211784907+Anurag-5ingh@users.noreply.github.com>
Co-authored-by: Truong Giang <truonggiang.axyl@gmail.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* origin/main:
chore(deps): bump rcssmin from 1.2.2 to 1.3.0 in /website (#14229)
chore(deps): bump markdownify from 1.2.3 to 1.2.4 in /website (#14227)
ci: compare frozen selections with observed test failures (#14301)
ci: record affected-test predictions above the live cutoff (#14300)
ci: wait for static checks before broad PR test shards (#14299)
ci: validate workflow anchors with actionlint 1.7.12 (#14298)
ci: measure portable runner time for recorded selection predictions (#14304)
test(pe): distinguish unsupported DOS input from truncated input (#14302)
test(go): check build information in a one-directory PE32 fixture (#14303)
fix(tests): damage Deno PE resource framing the loader-equivalent reader reads
test(go): expect loader-equivalent PE header facts in the MZ diagnostics (#14293)
perf(resources): refuse non-ASAR Pickle prefixes without building errors
perf(artifacts): reuse the streamed XML plist verdict when classifying
perf(artifacts): decide the FAT header once per classified stream
#14253 walks resource trees at their RVA whatever the directory Size
declares, so shrinking Size no longer made the 65,535-language table
malformed and the case reported the entry allowance instead. Point the
type directory's entry at a language directory outside the file-backed
resource bytes: its header cannot be read, which the reader reports as
malformed before counting rows against the allowance.
#14253 made the static PE readers read the optional header at its fixed
offsets and admit a declared directory count below 16, as the Windows
loader does. The Go MZ diagnostic fixtures still expected the older
refusals, so inspect_go_binary MCP and CLI diagnostics failed on main.
A short SizeOfOptionalHeader with an unknown magic at the fixed offset
is now an unsupported optional header, and a PE declaring one data
directory is admitted and keeps its build information, which the MCP
test now asserts.
The ASAR signature probe runs on every classified stream, and almost
every stream is not an archive. Its extent parser returned each refusal as
a new ArtifactReaderFailure, capturing a stack trace only for the probe to
discard it and record a refusal reason.
The parser now returns a refusal tag. Header admission, the one caller
that reports the refusal, builds the same failure and message from it.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
The classification probe already scans every stream for an XML plist
prolog while it retains the prefix. Content classification discarded that
verdict and scanned the retained prefix again with a fresh probe, so each
entry paid for two decodes of its first chunk.
Classification evidence now carries the probe's verdict, and the
single-buffer `hasXmlPlistSignature` wrapper, which only that second scan
used, is removed. The probe also stops once the prolog scanner rejects:
fatal-decoder validation and byte accounting cannot change a rejection.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
The classification probe decided the FAT header for the finished stream
size but kept it only when it parsed. Content classification then decided
it again from the same prefix and size, so every stream starting with
0xCAFEBABE, including each JVM class file, ran the class-file check twice.
Classification evidence now carries the finished header for every outcome,
with the slice headers beside it, and the classifier and root slice reader
use that decision.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
The acceptance matrix started 22 CLI processes for 11 presentations and two
outcomes, most of which repeat the same recovery. Keep one real process per
encoder boundary (encodeLines, encode, YAML stringify, Markdown), presentation
owner (terminal, full envelope, token count and window) and outcome, plus the
SIGPIPE case. Check every presentation and outcome pairing in process through
createCliResultOutput, including the full-envelope, YAML and Markdown facts.
* fix(limits): make the IL2CPP pointer index adjustable and name ELF note budgets in details.limit
inspect_il2cpp_metadata accepts max_native_index_bytes (default 1 GiB,
needs binary_path) for the estimated ELF virtual pointer index. The index
refusal now carries its own limit name (virtual-pointer-index-bytes) and a
details.limit naming the parameter, its effective value, default and range,
instead of a fixed ceiling with no override. The binary file allowance and
the loader's fixed capacities are unchanged.
inspect_elf_notes and inspect_elf_debug_link refusals for max_file_bytes,
the decoded section-name budget and max_entries now set details.limit. One
domain-owned bounds object per operation feeds both the schema and the limit.
Two guards keep new in-code refusal limits owned:
- scripts/verify/fixed-ceilings.mjs (run by npm run lint) requires every
fixedAllowanceOptions, fixedProducerInputAllowance,
artifactFixedLimitFailure or inline fixedAllowance declaration to be
listed in fixed-ceiling-registry.json with its class (format, protocol,
representation, derived, forwarding, or pending with an issue) and reason,
and fails on stale entries.
- The untyped-budget-refusal architecture guard counts refusals whose only
recovery is an authored remediationAction, with a shrink-only baseline.
Fixes#14175
Part of #14234
BREAKING CHANGE: an inspect_il2cpp_metadata refusal at the ELF pointer index
reports reported_limits.boundary "virtual-pointer-index-bytes" and
details.limit for max_native_index_bytes, and no longer carries a
details.refusal fixed_ceiling.
* fix(limits): track IL2CPP's remaining fixed allowances with the native readers
* fix(limits): run the authored-only refusal count from lint, where TypeScript is installed
The architecture guards run before npm ci in CI and must stay
dependency-free, so the AST-based count moves into fixed-ceilings.mjs with
its own shrink-only baseline and --shrink-baselines.
* fix(limits): register producer and native wrapper ceilings by the allowance they name
fixedProducerInputAllowance names its allowance in its second argument, and
fixedNativeAllowance forwards its first, so the guard now reads each helper's
allowance argument and checks the callers of both.
* fix(limits): delete the authored-only baseline when its last count is removed
reconcileBaselineFile returns delete once no count remains, but the
verifier ignored it and the next run read the file unconditionally, so
--shrink-baselines could not finish. An absent baseline now reads as empty
and shrinking removes the file.
* fix(limits): record the advertised IL2CPP input schema with max_native_index_bytes
* feat(artifacts): report declared DDS, GLB, KTX and KTX2 headers and regions
Recognize DDS (including the DX10 extension), GLB, KTX 1.1 and KTX 2.0
by their header signatures and inventory them as containers. The root
format metadata carries the declared header facts. Each declared byte
region is a member that is hashed, classified and extractable: the DDS
payload; GLB JSON and BIN chunks and BIN-stored images; KTX key/value
data and mip levels; and KTX2 DFD, KVD, SGD and levels.
Nothing is decoded. A DDS payload is checked against the size derived
from its dimensions, mips, faces, layers and block size. Disagreeing
extents are reported in extent_check with unknown coverage rather than
refused, and regions past the end of the file are dropped, not clipped.
Structural header faults refuse as malformed input with the format and
offset.
Part of #14155
* fix(gpu-assets): bound GLB chunks and keep unexamined regions unknown
- Stop the GLB chunk walk at 1,024 chunks with unknown coverage.
- Refuse a GLB chunk that crosses the declared length, or a chunk table
that stops short of a physically present declared end, as malformed.
- Report coverage unknown when GLB images were not all listed: past the
image allowance, an unparsed JSON chunk, or an unresolved bufferView.
- Leave the DDS payload size unknown when rows are padded to a declared
pitch or more than 32 mip levels are declared, instead of deriving it
from different dimensions.
* fix(gpu-assets): report GLB images in URI-backed buffers as external
Only buffers[0] without a uri is the GLB BIN chunk. An image whose
bufferView sits in a buffer with a uri, or an image named by uri, is
stored outside the file; it was counted as an unresolved image and made
coverage unknown. Such images are now counted in external_images and
leave coverage complete; only views that resolve to no buffer stay
unknown.
* fix(gpu-assets): report KTX2 level-index failures at file offsets
The 64-bit level-index fields were read from a buffer that starts at file
offset 80, but an unsafe value reported its index-relative position.
The reader now takes the buffer's file base and reports base plus
position, so every failure offset is a file offset.
* fix(gpu-assets): count a GLB image as external only for a URI string
An image or buffer whose uri is present but not a string, and an image
with neither a uri nor a bufferView, were counted in external_images and
left coverage complete without an established source. Only a URI string
now marks a source external; other sources stay unresolved and keep
coverage unknown.
* fix(pe)!: share one loader-equivalent PE header owner across static readers
Resources and certificates now admit headers through readPeImage, and
resources map RVAs through the shared file-backed mapping. The owner reads
the optional header at fixed offsets, caps data directories at 16, and lets
a PE signature at e_lfanew override a DOS relocation table. Export, import,
TLS and resource directories are read at their RVA whatever Size declares.
Disregarded declarations are reported in header_anomalies.
BREAKING CHANGE: import and delay-import walks continue to the null
descriptor past a short directory Size instead of stopping with a
malformed_entry issue, and inspect-pe-resources reports an unsupported
optional-header magic as unsupported_target.
* fix(pe): keep valid DOS relocation tables owning e_lfanew
Only a relocation table that describes no DOS load module yields e_lfanew
to a PE signature; update MZ/PE conformance to the shared owner.
* fix(pe): walk resource trees within file-backed bytes and cite TLS reads
The resource walk is bounded by the file-backed run from the directory RVA
rather than its Size, and a Size that ends before the bytes walked is a
directory_size_below_structure anomaly. The TLS result carries
structure_location for the structure read past a short Size, and Evidence
cites it.
* test(pe): use a resource cycle as damage now that a short Size is read
* fix(pe): read resource trees past an oversized Size and keep damaged MZ headers malformed
An oversized resource Size is reported without requiring its unused bytes
to map. A Windows-header candidate is malformed when the DOS module is also
invalid, and the guide states that a valid DOS relocation table owns
e_lfanew.
* feat(cli): add list-procedures to produce function-matching inventories
match-native-functions accepts only list_procedures Evidence, and no CLI
command produced it. Expose the list_procedures contract as
rea list-procedures, with complete or summary-plus-bundle delivery, and
name that producer when the matcher refuses another record such as a
filtered search_procedures result.
Fixes#14185
* test(cli): assert the bundled inventory keeps its fixture rows
* feat(desktop)!: recognise native releases and rank application probes first
inspect-desktop-application returned nothing for native Qt or SDL
releases, gave Godot candidates no probe, and listed every BCL facade of
a self-contained .NET release as an equal inspect_managed_artifact probe.
- A native candidate names the shallowest main executables when no
other runtime is recognised. Its PE probes are inspect_pe_imports and
inspect_pe_resources.
- Component markers name Qt, SDL, wxWidgets, GTK and the MSVC runtime
from the files a release ships.
- Each Godot pack carrier gets an inspect_artifact probe.
- Probes carry a priority. Assemblies with a matching runtimeconfig,
deps.json or pdb come first, and runtime facades are counted once in
deferred_probes instead of probed one by one.
BREAKING CHANGE: the desktop application result adds the native family,
the ui-framework and runtime-library component categories, new probe
operations, a required probe priority and deferred_probes.
Fixes#14173
Refs #14179
* fix(desktop): select Godot packs with open_binary, summarize deferred probes and match Unix wxWidgets names
inspect_artifact reads the active target and takes no path, so a Godot
pack probe now selects its carrier with open_binary and names
inspect_artifact as the follow-up, as the ASAR probe does. The default
summary carries deferred_probes, the release-audit fixtures include the
field, and the wxWidgets marker accepts libwx_*.so and .dylib names.
* fix(desktop): read Unix mains without host executable marking and describe resource probes accurately
Windows cannot mark ELF or Mach-O files executable, so the reader also
reads headers of Contents/MacOS entries and extensionless root files.
The inspect_pe_resources probe now describes the resource-tree inventory
it returns.
* fix(snapshot): replay every one-shot Ghidra read and say when a live result cannot replay
One-shot CLI --snapshot replayed only Ghidra decompile: the documentless
exception was limited to procedure_pseudo_code, and DirectAnalysis passed
the one-shot context only for that operation. Every read-only Ghidra
query of the call's own Program now records its replay entry, keyed as
before by target identity, provider profile, operation and parameters.
Providers that declare their results live (Hopper, IDA, Kuna) still run
every call. With --snapshot, their result now carries a limitation that
says it was saved but cannot replay, and why.
Fixes#14182
* fix(snapshot): disclose unsaved function, workflow and skipped replay entries
The not-saved notice covered only direct observations, and only by
policy. rea function and composed workflows now report it too, and the
notice also follows what recording will actually keep: a result with
reference truncation or classifications, a full cache without this
query, or a session whose metadata write invalidated its snapshot. The
cache answers that question from the same predicate its record uses.
* fix(snapshot): word composed-command notices for recomposition and unwritten snapshots
decompile-all and trace-native-ui-action never write the snapshot, so
their notice now says nothing was recorded. Other composed commands say
the answer is composed again on repeat, starting the provider only for
source reads the snapshot lacks. The snapshot write and the notice share
one set of unwritten commands.
* test: prune redundant and superseded tests
Remove two boundary copies of the zstd.max_frames section-name refusal for
binary hardening and ELF unwind ranges. The public MCP frame-allowance test
already checks both operations; it now also asserts the setting's minimum
and maximum, which the copies carried.
Drop the trailing inspect-managed-members malformed-bytes check from the
managed comparison CLI test. The shared parser-failure CLI table covers that
projection for every managed reader.
Index the GPU ELF fixture's section-name offsets once instead of searching
the string table per section. The SHN_XINDEX fixture has 65,539 sections, so
the per-row search was quadratic. The generated bytes are identical.
* test: bound the GPU fixture's section-name suffix index
Indexing every suffix of every section name made a 65,536-byte name cost
quadratic work. Index only suffixes up to 256 bytes and search the table
directly for longer names; both give the first occurrence the per-row
search used, so the generated bytes are unchanged.
Test files had max-lines-per-function as an error at 150 lines while
production code only warns at 100. Long test functions are often
legitimate table-driven or fixture-heavy cases, so report them as
warnings at the same 150-line threshold. The file-level max-lines limit
for test files is unchanged.
* fix(macho)!: report a FAT header or table cut off by the file's end as truncated
The universal Mach-O container reader measured the file's size but
reported a FAT header shorter than 8 bytes as malformed, and a FAT table
that runs past the file's end as not FAT at all. Callers could not tell a
cut-off download from corrupt bytes.
readFatContainerHeader now returns a typed truncated state carrying the
measured file size and the length the header or table needs. A CAFEBABE
count that reads as a JVM class version stays not FAT, because a short
class file is not evidence of a universal file. Universal image
selection, the native container reader and the lipo-selected slice
resolver raise that fact as a truncated ParseFailure with an extent, and
the malformed-target projection reports it as details.available_bytes and
details.required_bytes. Complete but corrupt FAT data (zero count,
overlapping slices, slices inside the table) stays malformed.
BREAKING CHANGE: inspect_go_binary, inspect_rust_binary,
inspect_dwarf_units, inspect_native_initializers,
inspect_native_dispatch_metadata, the IL2CPP binary readers and the
macOS provider's lipo-selected slice reads now report a FAT header or
table cut off by the file's end with details.format_failure "truncated"
(previously "malformed", or an unsupported or not-universal result for a
table past the end), plus details.available_bytes and
details.required_bytes.
* test(macho): type every format-owner row with its asserted format failure
* fix(doctor)!: emit each check once and classify passing checks healthy
Audit-wide doctor reports copied every check into both scope_checks and
checks. The audit-wide report now has no scope_checks, since every check
in checks is in scope. Explicit scopes keep scope_checks.
The CLI treated an unhealthy report like an error payload, so
--filter-output and the token count for a filtered selection were ignored
when healthy was false. An unhealthy report is now a completed result
for output controls. The exit status stays 1, and the JSONL and
full-output envelopes still mark it failed.
The provider check port typed classification as a failure class for every
check, so Ghidra, IDA, JADX and Kuna attached unsupported_host,
config_drift or runtime_failure to passing rows in providerInspections.
DoctorProviderCheck is now a union: a passing check is healthy with no
code, and only a failing check carries a failure class.
JADX and Kuna reported their not-configured state with the remediation
text as the reason, so detail repeated remediation. The reason now states
the observation (REA_JADX_MCP_JAR or REA_KUNA_COMMAND is not set).
BREAKING CHANGE: audit-wide doctor reports omit scope_checks; read
checks. Passing providerInspections checks report classification
"healthy".
Fixes#14166Fixes#14200
* fix(doctor): filter unhealthy reports in full output and keep repairs
--filter-output still skipped an unhealthy report under --full-output,
because the envelope's failure payload was chosen before the filter. The
completed-report decision now has one owner in writeResult: it selects
from the report first and uses the selection as the envelope's error, so
the envelope keeps ok: false. JSON Lines keeps its documented framing of
a classified failure as one whole error record.
Shortening the JADX and Kuna not-configured reasons left their analysis
errors without a repair step, because those errors copied only the
reason. They now pass the configuration owner's existing remediation
(jadxFailureRemediation and the Kuna configuration remediation) as the
remediation action.
The installation guide now limits the healthy-classification statement
to provider checks and names the registration_environment exception.
* fix(kuna): accept a remediation action on capability gaps
* fix(cli): keep an unhealthy report failed when its selection drops the verdict
Under --full-output, the selected value doubled as the failure marker, so a selection that was missing (an audit-wide report has no scope_checks) made the envelope report ok: true. writeResult now decides failureReported before selection and uses the selection only as the payload. A missing or verdict-free selection keeps ok: false, and an invalid filter is still reported as a filter error.
* fix(release-exposure)!: omit checks that cannot apply to the detected formats
audit-release-exposure always returned all 15 checks. On a single PE it
reported Mach-O hardened runtime and the Android manifest as not_assessed,
and the four Electron fuse checks as not_applicable, each with a next probe
for another format. Agents following those probes would run Mach-O,
Android, or Electron tools on a Windows image.
The report now omits a check that cannot apply and names it in
coverage.inapplicable_checks. Applicability comes from the reader's format
facts: native image formats, the target kind, embedded package formats,
and whether a native image may have gone unread. A check stays whenever a
member it could apply to may be unread. checks and inapplicable_checks
always split the fixed table, in order, and the report schema enforces it.
On a public x64 SDL2.dll the JSON report drops from 10,451 to 6,256 bytes.
BREAKING CHANGE: release-exposure checks no longer use the not_applicable
status, and summary.by_status has no not_applicable count. A check that
cannot apply is absent from checks and listed in
coverage.inapplicable_checks.
Fixes#14163
* fix(release-exposure): keep format checks when a package may hold them
A selected executable that embeds a package, such as a .NET bundle or
PyInstaller archive, may store native images and other members that the
audit does not read. Applicability ignored those for executables, so a PE
bundle with a packaged Mach-O helper lost macho.hardened_runtime and its
inspect_signature probe.
Unread or packaged native images and embedded packages now keep the
Mach-O, native hardening and Android checks for every target kind. Direct
schema cases cover duplicate, overlapping, missing and reordered splits.
* fix(release-exposure): decide native applicability from unread members, not package presence
A fully read ASAR or other package with no native member regained native.hardening, macho.hardened_runtime and android.manifest, because any embedded package format counted as an unread member. Applicability now follows nativeImagesMayBeUnread, which already covers native images stored inside a package that went unread. Android stays limited to directory and file selections.
* fix(zip): account apksigner alignment padding before the APK Signing Block
Signed release APKs pad the member region with zero bytes so the APK
Signing Block starts on a 4 KiB boundary. The member-region account
counted that pad as unaccounted bytes, so ZIP listing coverage was
unknown for ordinary apksigner output.
An all-zero range under 4 KiB that ends at a well-formed, 4 KiB-aligned
signing block is now accounted as padding. A non-zero byte, an
unaligned block or a zero run with no signing block stays unaccounted.
Fixes#14178
* fix(zip): prefer the descriptor layout that leaves signing-block padding
An empty member's zero sizes match both the 16-byte and the 24-byte data
descriptor layouts. When the 24-byte layout is followed only by
apksigner alignment padding, the first-match 16-byte choice left more
than 4 KiB for the padding check, so valid padding stayed unaccounted.
The descriptor search now also prefers a layout whose remainder is that
padding.
* fix(tests): expect the path reason for non-file directory entries
#14225 changed DirectoryArtifactReader to refuse a non-file entry with the
path reason instead of format, but this boundary test still expected
format, so it fails on main's Windows lanes.
* fix(tests): expect #14225's reader reasons in the remaining boundary tests
#14225 moved non-regular inputs (a FIFO inventory root, a symlinked ZIP,
a non-regular or substituted dylib) to the path reason, impossible
descriptor byte counts to io, and invalid chunk sizes to an internal
invariant violation, but these tests still expected format, so main's
shards 6, 8, 10, 11 and 12 and the portable and Windows lanes fail.
* fix(gpu)!: dispatch AMDGPU note metadata on the declared ELF ABI
inspect_gpu_code_objects read every AMDGPU ELF note under the HSA schema,
so a well-formed PAL-ABI code object was reported malformed ("no valid
kernel array") while the same object without metadata was unsupported.
The AMD ELF metadata owner now reads EI_OSABI once and selects the note
schema from it. HSA (64) keeps the existing kernel path. PAL (65) decodes
amdpal.pipelines into a new amd_pal_metadata object field during kernel
analysis: the version, and per pipeline its name, type, API, API shader
stages with their hardware mapping, and each hardware stage's entry point,
entry point symbol, SGPR/VGPR/AGPR counts, wavefront size, LDS and scratch
sizes. PAL register maps use unsigned integer keys, which the MessagePack
reader now admits for that schema only. Mesa3D (66) and unrecognized ABIs
are unsupported with their e_flags target and unexamined notes. Corrupt PAL
MessagePack or container shapes remain malformed.
BREAKING CHANGE: amd_target_metadata gains required os_abi and abi fields,
GPU objects gain a nullable amd_pal_metadata field, and PAL-ABI objects
report complete, partial or unsupported instead of malformed.
Fixes#14154
* chore(gpu): regenerate the inspect_gpu_code_objects advertised schema summary
The objects view fields selector derives from the GPU object schema, so the new amd_pal_metadata field changes the advertised input compact schema.
* fix(gpu): bound AMDGPU note expansion per code object and refuse binary maps
The decoded-value allowance is now shared across all of a code object's notes, so PAL pipeline facts expanded during discovery stay bounded. MessagePack binary values are no longer accepted as maps for PAL pipelines, stages or HSA kernel and argument rows.
* fix(managed)!: report an unsupported signature as partial metadata, not malformed
The refusal path already treats `unsupported-signature` as a valid form
outside decoder coverage, but `managedMetadataFailureStatus` still called
it malformed. One predicate, `isManagedCoverageGap`, now owns that split
for both the refusal and the inventory status.
Value retention no longer reads the inventory status: one value's
unsupported signature is still retained locally, while a budget or an
unsupported metadata layout still stops the whole read.
BREAKING CHANGE: when a managed reader stops on `unsupported-signature`,
`metadata.status` is `partial` (was `malformed`) in managed artifact,
member and native-boundary inspection, and the artifact
`classification.status` is `managed` (was `malformed`). The field names
and enum members are unchanged.
* fix(il2cpp)!: refuse a reused or non-MethodDef token as malformed metadata
`invalid-method-token` covered two facts. A MethodDef row reused within
one image, or a token that is not a nonzero MethodDef row, is in the
metadata's own records; a row past the module's method pointers is a
disagreement between two files that both parse.
The metadata reader now checks each image's tokens while reading link
facts and raises `invalid-method-definition-token`, which the provider
already refuses as a malformed target at the metadata's path. The linker
keeps `invalid-method-token` for the cross-file range check only and drops
its own duplicate scan.
BREAKING CHANGE: a duplicate or non-MethodDef method token found while
linking is `unsupported_target` with `details.path` the metadata file,
`details.format` `il2cpp-metadata`, `details.format_failure` `malformed`
and `details.reason` starting `invalid-method-definition-token:` (was an
`invalid_request` link conflict naming `path` and `binary_path` with
reason `invalid-method-token`). A token past the module's method
pointers keeps the conflict and the `invalid-method-token` reason.