* refactor(errors): compose multi-part provider cleanup failures through one owner
CdpBrowserProvider, CdpElectronProvider, FridaInstrumentationManager and
PlaywrightBrowserScenarioProvider each built the same composite by hand: a
ProviderCleanupError listing the parts' resources, an AggregateError cause,
and bindCleanupDependencies over the parts. providerCleanupErrorFromFailures
in src/domain/analysisErrorCleanup.ts now owns that composition. `causes`
keeps non-AnalysisError failures in the aggregate cause without making them
own completion, as the CDP providers did; `message` keeps the aggregate
messages Frida and Playwright used.
Tests: helper unit tests, new close-composition tests for both CDP providers,
and a Playwright test with two failed cleanup retries. They pass on the base
revision and on this change, and fail when the helper drops the dependency
binding, the extra causes or the message.
Lowers the cleanup-dependency-binding baseline to 43 files / 73 sites.
Refs #11859
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* style(test): format the Playwright cleanup test with oxfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(errors): assert cleanup composition facts instead of reason prose
Follows docs/development/testing.md: the close-composition tests now check
provider, operation, resources, aggregate causes and completion, not the
explanatory reason or aggregate message. A harmless wording change passes;
a lost binding, lost cause or wrong operation still fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Anant Mandanka <anant.mandanka@renaissancejewel.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Route the 26 raw Buffer reads in GgufHeader and the 2 in
SafetensorsHeader through BinaryReader. Add u8, i8, i16, i32, i64,
f32 and f64 accessors to BinaryReader, with the same range checks as
u16/u32/word, since GGUF metadata stores signed and floating scalars.
Every migrated site reads an exact-size buffer from
ModelHeaderReader.take(), so outputs and errors are unchanged.
Shrink the raw-buffer-read baseline from 102 files / 711 sites to
100 / 683.
Refs #11865
Move the CUDA fatbinary, Clang offload bundle, CCOB, AMDGPU metadata
and inventory reads in src/gpu onto BinaryReader and drop the four
files from the raw-buffer-read baseline. GpuSource.read already admits
every range, so refusals are unchanged.
Refs #11865
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(erlang): disclose BEAM bytes trailing the declared FOR1 form
A conformant FOR1 container sizes its form to the whole file, so bytes
past the form end are an unexamined appended or corrupt region. The
inspector decoded chunks only within the form but still reported
coverage.status "complete" with no mention of the surplus, so a caller
could not distinguish a clean BEAM from one carrying foreign trailing
bytes.
Compute the trailing byte count, report coverage.status "partial" with a
trailing_bytes field, and append a limitation naming the form end and the
unexamined count. Clean containers stay "complete" with trailing_bytes 0.
* fix(erlang): reparse retained BEAM Evidence without the trailing-bytes field
Evidence retained by a build predating coverage.trailing_bytes has no such
property, and projectErlangBeamView reparses that record with the strict
erlangBeamSchema. A required field rejected those records with an input error
before any summary or page could render, breaking the offline retained-Evidence
flow even for clean files.
Default coverage.trailing_bytes to 0 so historical records reparse while every
new parse still emits the concrete count and preserves each record's stored
status.
* fix(erlang): keep retained BEAM trailing coverage unknown, not zero
Defaulting coverage.trailing_bytes to 0 manufactured a "no trailer" reading for
Evidence retained before the field existed, even when its retained bounds
(artifact.bytes versus form.location.bytes) prove a trailer. Make the field
optional so a pre-field record reparses as unknown instead of a fabricated
zero, while every new parse still emits the concrete count.
* fix(erlang): admit chunk extents before applying count limits
* docs(erlang): explain trailing BEAM coverage
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* refactor(ntfs): decode attributes within their declared values
* refactor(ntfs): bound USN journal record reads (#12216)
refactor(ntfs): bound USN record fields with BinaryReader
* fix(desktop): reject split ZIP volume metadata
Refs #12137
* refactor(zip): read Zip64 disk fields through BinaryReader
* fix(desktop): validate ZIP extra fields before selection
Refs #12146
* fix(desktop): keep bounded ZIP pairing compatible with Python 3.9
* fix(desktop): retain exact counts in bounded Zip64 views
* fix(desktop): follow the declared Zip64 directory frame
* fix(desktop): recognize empty ZIP state views (#12163)
* fix(desktop): recognize empty ZIP state views
(cherry picked from commit 263b25bd34)
* fix(desktop): reuse empty ZIP admission for wrapped documents
* refactor(zip): share the local-header signature with desktop state
---------
Co-authored-by: wunianze666-netizen <wunianze666@gmail.com>
* test(zip): inherit the portable ZIP count deadline
---------
Co-authored-by: wunianze666-netizen <wunianze666@gmail.com>
* refactor(zip): read EOCD and trailing archive fields via BinaryReader
* perf(domain): avoid subarray allocations in BinaryReader and prefilter EOCD scan
Check field bounds via a private helper and read 16-, 32-, and 64-bit
integers directly from BinaryReader.bytes by offset instead of slicing
via range(), and skip non-0x50 bytes before full signature comparison
in zipEndOfCentralDirectoryCandidates.
* perf(zip): scan EOCD signature candidates with Buffer.lastIndexOf
Jump directly between 4-byte EOCD signatures with Buffer.lastIndexOf
instead of probing every byte in JavaScript, preserving reverse
candidate order, earliest-offset bounds, and zero-copy Uint8Array views.
* perf(zip): bound EOCD lastIndexOf scan to the 65557-byte tail window
Slice a zero-copy tail view starting at earliest before calling
Buffer.lastIndexOf so exhausting zipEndOfCentralDirectoryCandidates on
large archives never scans bytes before the maximum comment window.
* refactor(kernel): eliminate remaining record predicate copies and compose cleanup dependencies through shared owner
* fix(firmware,tests): remove unused cleanup import and align CI shard and CLI registration tests
* refactor(parsers): state duplicate-member policies and bring parser-json-parse to 0
* fix(domain): return duplicate members as a parseJsonWithDuplicatePolicy failure
* refactor(evm): name the worker request byte limit constant
Migrate the remaining 2 direct AnalysisCancelledError constructions onto cancelledBy and the remaining 14 process-snapshot stdout/stderr copy sites onto capturedProviderOutput, burning down both architecture-guard baselines to zero.
* feat(errors): carry related parameters and operations and derive CLI flags and commands
* fix(cli,errors): preserve operation-selector flags in CLI hints and clarify snapshot load/save