Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fd194ad8b | ||
|
|
bf34d0d2fc | ||
|
|
e802441bce | ||
|
|
e7882b34f4 | ||
|
|
9049dbaf0c | ||
|
|
7fc0b5ec9c | ||
|
|
6a05248d46 | ||
|
|
20f51d7286 | ||
|
|
6bd2b28161 | ||
|
|
d9e9fb2273 | ||
|
|
b953f96c0a | ||
|
|
fe8d0bdd36 |
@@ -83,6 +83,14 @@ names, the native API record, and value-flow summaries. Pseudocode offsets and l
|
||||
code units; use the returned `next_offset` for continuation. Provider limitations
|
||||
and unavailable facts remain explicit; the complete parent Evidence is retained.
|
||||
|
||||
`inspect_macho` on a large framework returns megabytes of imports and exports.
|
||||
Select `detail: "summary"` for slice identity, UUID and per-collection counts,
|
||||
then page rows with `view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`
|
||||
and `normalized_result.parent_evidence_id`. Facets are entrypoints,
|
||||
architectures, build_metadata, load_commands, dependencies, imports, exports,
|
||||
segments and provenance. `source_exhaustive: false` means unreturned symbols
|
||||
may exist.
|
||||
|
||||
To see which functions or Objective-C methods a Mach-O actually calls in one
|
||||
run, use `observe_native_calls` with explicit breakpoints and a bounded
|
||||
`duration_ms`/`max_events`. It launches a new process under LLDB, so the target
|
||||
|
||||
+15
-2
@@ -147,8 +147,8 @@ after target content was read.
|
||||
|
||||
## Retained application Evidence inputs
|
||||
|
||||
`analyze_javascript_application`, `inspect_binary_layout`, `inspect_artifact`, and
|
||||
`inspect_wasm_artifact` accept `detail`:
|
||||
`analyze_javascript_application`, `inspect_binary_layout`, `inspect_artifact`,
|
||||
`inspect_wasm_artifact`, and `inspect_macho` accept `detail`:
|
||||
`complete` (default) returns the complete analysis Evidence; `summary` records
|
||||
that complete Evidence in the session and returns the derived
|
||||
`inspect_analysis_view` summary Evidence instead. Its
|
||||
@@ -218,6 +218,19 @@ attempting oversized delivery, and returns the same summary with an exact
|
||||
`parent_evidence_id` for later export or facet reads. Delivery detail does not
|
||||
reach WABT or change the original source Evidence ID.
|
||||
|
||||
Completed `inspect_macho` Evidence supports a summary and
|
||||
`view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`. Facets are
|
||||
`entrypoints`, `architectures`, `build_metadata`, `load_commands`,
|
||||
`dependencies`, `imports`, `exports`, `segments`, and `provenance`; pages return
|
||||
the original rows. The summary keeps the selected slice, header fields and UUID,
|
||||
and replaces each collection with its returned count, reported total and
|
||||
`exhaustive` flag. Each page repeats the paged collection's `source_total` and
|
||||
`source_exhaustive`; exhausting a non-exhaustive collection does not establish
|
||||
that unreturned symbols are absent. Large frameworks return megabytes of
|
||||
symbols (Electron Framework: 2.5 MB of imports and exports, 3.3 KB as a
|
||||
summary), so select `detail: "summary"` on the first call. Delivery detail
|
||||
never reaches the native tools or changes the source Evidence ID.
|
||||
|
||||
`trace_application_feature`, `trace_javascript_semantics`,
|
||||
`compare_application_versions`, `compare_source_to_bundle`, and
|
||||
`compare_javascript_export_shapes` accept complete inline application Evidence
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
:robot: I have created a release *beep* *boop*
|
||||
---
|
||||
|
||||
|
||||
## [6.5.0](https://github.com/morluto/rea/compare/rea-agents-6.4.0...rea-agents-6.5.0) (2026-10-13)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **runtime:** attached fields in JavaScript runtime, browser, and Electron target discovery and inspection results may be null when discovery does not report attachment state.
|
||||
* **sourcemaps:** Browser source-map original and mapping rows expose null for unavailable source names instead of inventing an unknown-source string. New index fields are optional when reading older retained evidence.
|
||||
* **analysis:** get_call_graph normalized_result now contains { graph, limitations }; traversal-depth groups are under graph.
|
||||
* **mcp:** binary_session no longer includes server_identity.catalog.tools; tool_availability and provider capabilities use grouped facts documented in docs/mcp-contracts.md.
|
||||
|
||||
### Features
|
||||
|
||||
* add Frida instrumentation support ([#1359](https://github.com/morluto/rea/issues/1359)) ([4a4ae9b](https://github.com/morluto/rea/commit/4a4ae9b2b9712f7ac16f2d23c71b5c29b0c23d2f))
|
||||
* **analysis:** add opt-in retained inventory and WASM views ([#2122](https://github.com/morluto/rea/issues/2122)) ([58fb372](https://github.com/morluto/rea/commit/58fb372071e56da9c5df0e37593ee3f0da6b64bc)), closes [#2016](https://github.com/morluto/rea/issues/2016)
|
||||
* **android:** add opt-in package summaries and retained manifest views ([f254f5a](https://github.com/morluto/rea/commit/f254f5ac2b804b353a711264bb178f43fdf07867))
|
||||
* **browser:** inspect retained aioquic qlog JSON captures ([bb154d1](https://github.com/morluto/rea/commit/bb154d1067b0fc250452b7d468d0b0523031a16f))
|
||||
* **captures:** discover installed protocol and field definitions ([#2496](https://github.com/morluto/rea/issues/2496)) ([9c34c09](https://github.com/morluto/rea/commit/9c34c091b3b8c47f8bd18d6f0321efde2dedb92a))
|
||||
* **captures:** inspect recorded packets with bounded TShark delivery ([#2318](https://github.com/morluto/rea/issues/2318)) ([f611d8c](https://github.com/morluto/rea/commit/f611d8ce722cd36345e9ff83b9669ef2e7fe57a9))
|
||||
* **clients:** register Qoder CLI during setup ([#1572](https://github.com/morluto/rea/issues/1572)) ([1097693](https://github.com/morluto/rea/commit/109769319a4a3a5f85e8a43bb419d04aefff66a4))
|
||||
* **clients:** register Trae during setup ([#1573](https://github.com/morluto/rea/issues/1573)) ([bfa805d](https://github.com/morluto/rea/commit/bfa805decf83744bd3ecb0d1402667cf3ed5c3b2))
|
||||
* **clients:** register ZCode during setup ([#1564](https://github.com/morluto/rea/issues/1564)) ([51d6c87](https://github.com/morluto/rea/commit/51d6c87cdbf5f11eaf3cb1862befe704a81827c5))
|
||||
* **evm:** add retained interface summary delivery ([#2308](https://github.com/morluto/rea/issues/2308)) ([f76163c](https://github.com/morluto/rea/commit/f76163c2467db623f9de0bda757c9d8610ca9565)), closes [#2016](https://github.com/morluto/rea/issues/2016)
|
||||
* **fiddler:** inspect native SAZ captures ([a2d8b94](https://github.com/morluto/rea/commit/a2d8b94dd50dab8d966239dd63ab84718aa8b4b4))
|
||||
* **flutter:** identify Dart snapshot builds and inspect AOT payloads by pure APK parsing ([#1582](https://github.com/morluto/rea/issues/1582)) ([e4d3e13](https://github.com/morluto/rea/commit/e4d3e1399d9cd4932653e7015a1bf8589e56029d))
|
||||
* **ghidra:** admit bounded PSP ELF through installed Allegrex ([#1599](https://github.com/morluto/rea/issues/1599)) ([e4407db](https://github.com/morluto/rea/commit/e4407dbed5dc24851f47532f5e3d75d5627d3e7d))
|
||||
* **ghidra:** admit relocatable MIPS32r2 ELF objects ([#1950](https://github.com/morluto/rea/issues/1950)) ([290d301](https://github.com/morluto/rea/commit/290d301ec770955f313c2d48678ed0ae3b9f8a73))
|
||||
* **ghidra:** admit RISC-V ELF analysis through a pinned generic lane ([#2151](https://github.com/morluto/rea/issues/2151)) ([0baad58](https://github.com/morluto/rea/commit/0baad58e606f12a8dc6cef06253f85350378e5b1))
|
||||
* **ghidra:** admit soft-float MIPS32r2 ELF with integer-register float storage ([#1949](https://github.com/morluto/rea/issues/1949)) ([5e219de](https://github.com/morluto/rea/commit/5e219de44134d34f5a07a9cd1911fb2295bf1d88))
|
||||
* **ghidra:** admit verified MIPS16 shared ELF images ([e9fe643](https://github.com/morluto/rea/commit/e9fe6437a7da381f0aa5aa77571dcf03317122e7)), closes [#1851](https://github.com/morluto/rea/issues/1851)
|
||||
* **ghidra:** apply validated analyzer overrides before analysis ([9878bb7](https://github.com/morluto/rea/commit/9878bb7296c13c2b4838be76f6128e5fc31eda3c))
|
||||
* **go:** inspect embedded binary build metadata ([#1363](https://github.com/morluto/rea/issues/1363)) ([a1b5d51](https://github.com/morluto/rea/commit/a1b5d51a8dfb7fff6272d91270c16b95555c2643))
|
||||
* **harmony:** project HarmonyOS package inventory evidence ([#1447](https://github.com/morluto/rea/issues/1447)) ([f2150eb](https://github.com/morluto/rea/commit/f2150eb9a7ed76748238009ca6666efa52de5271))
|
||||
* **ida:** support optional native IDA Free MCP in attached mode ([#1544](https://github.com/morluto/rea/issues/1544)) ([d1aaeee](https://github.com/morluto/rea/commit/d1aaeee400e0d9911d5c53339ca3ac42dccbbba3))
|
||||
* **javascript:** analyze selected application sources ([85c1d25](https://github.com/morluto/rea/commit/85c1d2587a7d42c6e2108405c802fe7f7b046c15)), closes [#1848](https://github.com/morluto/rea/issues/1848)
|
||||
* **javascript:** recover code-split bundles from multiple inputs ([#1686](https://github.com/morluto/rea/issues/1686)) ([12c4160](https://github.com/morluto/rea/commit/12c416005f9d2abf438f4df4447972424d781b65))
|
||||
* **javascript:** resolve exact package import aliases ([#1862](https://github.com/morluto/rea/issues/1862)) ([d28b41e](https://github.com/morluto/rea/commit/d28b41ea4e93bb4c4d360a3bf2291ca83bb2b378))
|
||||
* **managed:** add retained metadata overview and pages ([#2413](https://github.com/morluto/rea/issues/2413)) ([82cfcee](https://github.com/morluto/rea/commit/82cfcee19f18b0eeae9a330ba04e0411cdf85225))
|
||||
* **managed:** select declaring types in inspect_managed_members ([a149d18](https://github.com/morluto/rea/commit/a149d183efd08b0ad7c2a35c99f2394d905621d5)), closes [#1878](https://github.com/morluto/rea/issues/1878)
|
||||
* **mcp:** add opt-in paging for retained unknown heads ([9a18251](https://github.com/morluto/rea/commit/9a18251426f891e6a24856b715ef8002ab8b9610))
|
||||
* **mcp:** derive an API surface view from retained web network captures ([#1891](https://github.com/morluto/rea/issues/1891)) ([880a603](https://github.com/morluto/rea/commit/880a603fe89db2132fd05a35b33a8c459673beda))
|
||||
* **native:** admit raw binaries with caller-supplied architecture and entry ([#1868](https://github.com/morluto/rea/issues/1868)) ([7c207c7](https://github.com/morluto/rea/commit/7c207c79512f6baa70f4ed9d7d5334ab2d62f3ac))
|
||||
* **native:** expose typed incoming references at exact addresses ([#1715](https://github.com/morluto/rea/issues/1715)) ([cdd9fe7](https://github.com/morluto/rea/commit/cdd9fe716774c9e5abd121b70e9fd5e1eb91d2b8))
|
||||
* **pcap:** add bounded capture summaries through CLI and MCP ([9581e06](https://github.com/morluto/rea/commit/9581e067ad306aab842024e47f2dd18ac8056859))
|
||||
* **server:** frame analysis-target content as untrusted data ([#1908](https://github.com/morluto/rea/issues/1908)) ([85e1242](https://github.com/morluto/rea/commit/85e124253ac93dd443be6bbcee0939d525b90d4e))
|
||||
* **setup:** register DeepSeek Harness through setup, doctor and uninstall ([#1929](https://github.com/morluto/rea/issues/1929)) ([d9d2a17](https://github.com/morluto/rea/commit/d9d2a173819ce8e2e7f09eb584ec6ff7b4ee3480))
|
||||
* **signals:** decode recordings with bounded sigrok output ([#2339](https://github.com/morluto/rea/issues/2339)) ([91b8f58](https://github.com/morluto/rea/commit/91b8f587cd495c509946e69076525eb19dc1ca65))
|
||||
* **signals:** discover installed decoders and option help ([#2487](https://github.com/morluto/rea/issues/2487)) ([4276aaf](https://github.com/morluto/rea/commit/4276aaf18bb607cdd0182280f76cf50fcd110c3c))
|
||||
* **sqlite:** inspect offline snapshots with selective evidence ([#2271](https://github.com/morluto/rea/issues/2271)) ([aeee507](https://github.com/morluto/rea/commit/aeee5074d124414239b6dd440dc79c26bcbd58a4))
|
||||
* **target:** explain static WASM inspection after native rejection ([1f17ac8](https://github.com/morluto/rea/commit/1f17ac82282dfda1ae2dc87d99e66a8a039c0259)), closes [#1852](https://github.com/morluto/rea/issues/1852)
|
||||
* **update:** update Bun global installations ([#1735](https://github.com/morluto/rea/issues/1735)) ([e4027e4](https://github.com/morluto/rea/commit/e4027e4afccc6316cd9cfc27c7b0427e66ceb91f))
|
||||
* **wasm:** add opt-in first-call summary delivery ([#2193](https://github.com/morluto/rea/issues/2193)) ([0b71453](https://github.com/morluto/rea/commit/0b7145361ec02d27260eb1f5bc0be955c9374a96))
|
||||
* **wasm:** inspect local artifacts with WABT ([#1533](https://github.com/morluto/rea/issues/1533)) ([ffaf2c1](https://github.com/morluto/rea/commit/ffaf2c12f1793c7c451e66dc09c3074544a4c086))
|
||||
* **website:** add a persistent light and dark theme switch ([4773c15](https://github.com/morluto/rea/commit/4773c152bc5f299fa682575bb8d1efea7587c7bc))
|
||||
* **website:** add multilingual editions and translation workflow ([a2d3338](https://github.com/morluto/rea/commit/a2d3338e90a3a11385e2f63bedaa9750612f8719))
|
||||
* **website:** follow the system dark mode and fix small-screen text ([#1894](https://github.com/morluto/rea/issues/1894)) ([12ee785](https://github.com/morluto/rea/commit/12ee785e5e61132898adecf9424ce6706a2e754a))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **adb:** admit canonical device states and preserve malformed output ([e1cd292](https://github.com/morluto/rea/commit/e1cd292aa6e8f5f13441d408c66126782c8dbb0d))
|
||||
* **adb:** count requested permissions that the device marks restricted ([#2359](https://github.com/morluto/rea/issues/2359)) ([15463bd](https://github.com/morluto/rea/commit/15463bdbe605b9dd11da5dbba031f99cd1ec9190))
|
||||
* **adb:** count UTF-8 bytes in logcat total_bytes ([#2212](https://github.com/morluto/rea/issues/2212)) ([ec2d251](https://github.com/morluto/rea/commit/ec2d251c0ad8382e0665546be5ec8f5f1c175962))
|
||||
* **adb:** evaluate the full activity start report ([c89972c](https://github.com/morluto/rea/commit/c89972c8777d0114566fe76a060849a18bdd2659)), closes [#2225](https://github.com/morluto/rea/issues/2225)
|
||||
* **adb:** preserve device paths and prevent destination collisions ([55b6148](https://github.com/morluto/rea/commit/55b61485e9f7568b69597eef8696ff6abfe53cfd))
|
||||
* **adb:** preserve directory identities and share byte capture ([3bdc873](https://github.com/morluto/rea/commit/3bdc8730bd98e073522bcb8ba86527be402c0cbe))
|
||||
* **adb:** preserve existing bugreport archives ([#2221](https://github.com/morluto/rea/issues/2221)) ([d80b55e](https://github.com/morluto/rea/commit/d80b55e11bc47c6f999dac7dcb8382219d65739a))
|
||||
* **adb:** reject unsafe host file names when pulling one device file ([#1962](https://github.com/morluto/rea/issues/1962)) ([1d4c4eb](https://github.com/morluto/rea/commit/1d4c4eb0308b4cb5761a91533edeb33fcfb442f2))
|
||||
* **adb:** share actionable provider configuration refusals ([c42232f](https://github.com/morluto/rea/commit/c42232f566d55fe7191763649755148c768eef9f))
|
||||
* **adb:** share host configuration refusals with apktool ([#1954](https://github.com/morluto/rea/issues/1954)) ([39418ea](https://github.com/morluto/rea/commit/39418ea173763ca55d4f116992ee903bcaeb1898))
|
||||
* align MCP archive contracts and documentation ([#2478](https://github.com/morluto/rea/issues/2478)) ([a86deec](https://github.com/morluto/rea/commit/a86deecac5fa8434a4f50482f86b0c6ab486a936)), closes [#2454](https://github.com/morluto/rea/issues/2454)
|
||||
* **analysis:** expose provider image base ([#2083](https://github.com/morluto/rea/issues/2083)) ([81cca2e](https://github.com/morluto/rea/commit/81cca2e0e3ebd98c21f41d7ad63d6a00e4cbc3f9))
|
||||
* **analysis:** preserve producer identity and partial evidence ([6fb3a34](https://github.com/morluto/rea/commit/6fb3a345fe952b8e8f59221aec993acc37ccbf31))
|
||||
* **analysis:** preserve relationship coverage across evidence and replay ([9c85114](https://github.com/morluto/rea/commit/9c8511409c0706f9979c2b68dd56aaaf9f21e191))
|
||||
* **analysis:** scope call-graph caveats to their observed relationships ([5dfb9d0](https://github.com/morluto/rea/commit/5dfb9d050c2cc44a61b183dae765bef4d22a53b7))
|
||||
* **android:** bound inline search Evidence with retained inventory provenance ([#1890](https://github.com/morluto/rea/issues/1890)) ([7a0140b](https://github.com/morluto/rea/commit/7a0140b4aa43276368058ab98826b77e040ea14f))
|
||||
* **android:** preserve decoded values and duplicate class inventories ([0677468](https://github.com/morluto/rea/commit/0677468877465c8dfbe25c72f142a7b5bc8a3212)), closes [#1978](https://github.com/morluto/rea/issues/1978)
|
||||
* **android:** preserve executable static initializer evidence ([#1876](https://github.com/morluto/rea/issues/1876)) ([efbc25f](https://github.com/morluto/rea/commit/efbc25fbea1b6ade2a284a4916644c791f83bf49)), closes [#1846](https://github.com/morluto/rea/issues/1846)
|
||||
* **android:** reject malformed UTF-8 at the JADX protocol boundary ([fe8d0bd](https://github.com/morluto/rea/commit/fe8d0bdd36fe12bc0836468d1a702a34fbdc219b))
|
||||
* **apktool:** name host requirements in configuration refusals ([#1946](https://github.com/morluto/rea/issues/1946)) ([7cdb798](https://github.com/morluto/rea/commit/7cdb7981c3612bc42bd0153fddd9c33b639918ed))
|
||||
* **apktool:** run Windows batch launchers through cmd.exe ([#1777](https://github.com/morluto/rea/issues/1777)) ([ae95e68](https://github.com/morluto/rea/commit/ae95e68ba5fa95cf2ec0453b50ffd217cabf5359)), closes [#1774](https://github.com/morluto/rea/issues/1774)
|
||||
* **apple:** decode UIKit keyed-archive outlet connections ([8d4d631](https://github.com/morluto/rea/commit/8d4d631606c701aac150cf009d3b80ae4a7ae7d5))
|
||||
* **apple:** join recognized keys from NIBArchive field maps ([#2248](https://github.com/morluto/rea/issues/2248)) ([fd985db](https://github.com/morluto/rea/commit/fd985dbc5b9435918732c0cc1825060af2a3a47e))
|
||||
* **apple:** limit already-loaded reuse to rpath dependencies ([#2292](https://github.com/morluto/rea/issues/2292)) ([60f771a](https://github.com/morluto/rea/commit/60f771a11e9889ce69cce6ad631b6b186ac742dd))
|
||||
* **apple:** preflight XML plist nesting before keyed archive decoding ([#2161](https://github.com/morluto/rea/issues/2161)) ([7711b00](https://github.com/morluto/rea/commit/7711b0000592aa80c7b0412004150313f78feabc))
|
||||
* **apple:** preserve archive signatures and metadata byte identity ([dc038d1](https://github.com/morluto/rea/commit/dc038d16bba9046afd28970de9c47f6259a43524))
|
||||
* **apple:** preserve ARM64E X1 architecture identity ([f598bab](https://github.com/morluto/rea/commit/f598bab488e38c378d69346fa3c106f9e18529ed))
|
||||
* **apple:** preserve slice identity and macOS boundary diagnostics ([#1772](https://github.com/morluto/rea/issues/1772)) ([5c29565](https://github.com/morluto/rea/commit/5c2956587a1b0d431f72e10df07a1a6363fa066c))
|
||||
* **apple:** validate build-version tool records within cmdsize ([#1784](https://github.com/morluto/rea/issues/1784)) ([817aef4](https://github.com/morluto/rea/commit/817aef406861c2ce3f87ad3c912ea6c235bcdf12))
|
||||
* **artifacts:** authenticate file subjects across provider and view boundaries ([3c57e1a](https://github.com/morluto/rea/commit/3c57e1a8b21b379fca55032d177078e1d8426e64))
|
||||
* **artifacts:** bind directory reads to captured file state ([918713a](https://github.com/morluto/rea/commit/918713af376e307ecf24d75e6a0dd9d1b544545b))
|
||||
* **artifacts:** bound archive decompression by source size ([#2144](https://github.com/morluto/rea/issues/2144)) ([c59fbf5](https://github.com/morluto/rea/commit/c59fbf5e9c3b856d042f02cb18ad4de077eaeab5))
|
||||
* **artifacts:** close mounted directory resources before DMG detach ([2260887](https://github.com/morluto/rea/commit/2260887f2092be6a3d9c79509e4ae4a3e52fce7f))
|
||||
* **artifacts:** compare leaf inventories using explicit coverage ([ed485a3](https://github.com/morluto/rea/commit/ed485a3dc8cc3a4baf8cabe01acb7aa0490b73b3))
|
||||
* **artifacts:** compare package signatures without ASCII folding ([#2069](https://github.com/morluto/rea/issues/2069)) ([75a4a14](https://github.com/morluto/rea/commit/75a4a14fa05d352762ffaefd3cd2e16515842b03))
|
||||
* **artifacts:** count a changed partial-inventory root once ([#1854](https://github.com/morluto/rea/issues/1854)) ([ee5275c](https://github.com/morluto/rea/commit/ee5275cd9fae8db64f945a0c8b59e1c19ac402c3)), closes [#1844](https://github.com/morluto/rea/issues/1844)
|
||||
* **artifacts:** distinguish Java classes from universal Mach-O ([921bb95](https://github.com/morluto/rea/commit/921bb9575505065f6cfd57b14d97d80d0f238546)), closes [#2317](https://github.com/morluto/rea/issues/2317)
|
||||
* **artifacts:** honor cancellation at the output publication boundary ([e7882b3](https://github.com/morluto/rea/commit/e7882b34f4ac4a26f903c5f49264acc2c19bb562))
|
||||
* **artifacts:** mark Windows host executables by extension ([#1823](https://github.com/morluto/rea/issues/1823)) ([91f843b](https://github.com/morluto/rea/commit/91f843bf38b0e4ec8576f41f3140488b4ee8ff32)), closes [#1819](https://github.com/morluto/rea/issues/1819)
|
||||
* **artifacts:** mark Windows launchable files as host executables ([#1824](https://github.com/morluto/rea/issues/1824)) ([e8491e0](https://github.com/morluto/rea/commit/e8491e023a255f790ae9850225084d7495e9ade0)), closes [#1819](https://github.com/morluto/rea/issues/1819)
|
||||
* **artifacts:** preserve decode coverage and cleanup ownership ([a73a55f](https://github.com/morluto/rea/commit/a73a55f53cc2b2e5b7618effe6ecb5cee6e0cee2))
|
||||
* **artifacts:** preserve emitted ZIP entry identity ([e36c82b](https://github.com/morluto/rea/commit/e36c82becdd613787bcc59903f8b5fe14eb2f105))
|
||||
* **artifacts:** preserve inventory uncertainty in application projections ([d8ceb3f](https://github.com/morluto/rea/commit/d8ceb3f276a65c181b146f68c0729ff4b6f9fa61))
|
||||
* **artifacts:** preserve physical ZIP member identities ([#1865](https://github.com/morluto/rea/issues/1865)) ([bcd350c](https://github.com/morluto/rea/commit/bcd350c365030a5d210208c0a8dc238302c43303)), closes [#1860](https://github.com/morluto/rea/issues/1860)
|
||||
* **artifacts:** preserve ZIP identities and partial managed metadata ([74d7da6](https://github.com/morluto/rea/commit/74d7da6ced0f869936ee0316b00616931b088066))
|
||||
* **artifacts:** read every ZIP package family extraction is asked to open ([#2493](https://github.com/morluto/rea/issues/2493)) ([7017c4d](https://github.com/morluto/rea/commit/7017c4d68cab49aed998283e09069d9d791e1b0b))
|
||||
* **artifacts:** reject malformed serialized keys and integer values ([9435c7a](https://github.com/morluto/rea/commit/9435c7aae279ba184937c0dfeb713fd574ba3f29))
|
||||
* **artifacts:** retain ASAR resources through cleanup failures ([eb97da3](https://github.com/morluto/rea/commit/eb97da33881e3d1472d97a7d788ee35944fb6b07))
|
||||
* **artifacts:** retry transient DMG verification refusals ([bb54082](https://github.com/morluto/rea/commit/bb540826d65316c164d2de8ba4ef10f81a8ad073))
|
||||
* **browser:** bound CDP discovery response size and lifetime ([951b095](https://github.com/morluto/rea/commit/951b095e11adf9faa9c4a27e212260060aa6b095))
|
||||
* **browser:** compare only observed HTTP response facts ([486b567](https://github.com/morluto/rea/commit/486b56724c4eaba50719177bcb9eae84d6907297))
|
||||
* **browser:** compare PNG IHDR bytes without ASCII folding ([#2099](https://github.com/morluto/rea/issues/2099)) ([fdd8f82](https://github.com/morluto/rea/commit/fdd8f826023c568937d237c2f97d855de283a9b8))
|
||||
* **browser:** exclude sensitive binary lengths from historical captures ([#2477](https://github.com/morluto/rea/issues/2477)) ([68ecf3d](https://github.com/morluto/rea/commit/68ecf3df8c666fdbe1ced8089c64340af614d1c3))
|
||||
* **browser:** isolate script URLs with empty query or fragment ([#2074](https://github.com/morluto/rea/issues/2074)) ([9b780c4](https://github.com/morluto/rea/commit/9b780c47bca039939dd5f73b78541f3ea566a7dd))
|
||||
* **browser:** keep elapsed capture timing independent of wall-clock changes ([6bd2b28](https://github.com/morluto/rea/commit/6bd2b28161411f70ed5dc72e42c2736a1aab758b))
|
||||
* **browser:** preserve attached service-worker policies and ownership ([221c856](https://github.com/morluto/rea/commit/221c85648108e9846d9920b0964dafa7f108d581))
|
||||
* **browser:** preserve body API provenance through script export ([966f7cc](https://github.com/morluto/rea/commit/966f7cc84b4a8bb0043641cb64d7a7aaf8715e05))
|
||||
* **browser:** preserve uncertainty in malformed network observations ([a8d4984](https://github.com/morluto/rea/commit/a8d4984404b611e60b88bc42289c0ba07eee4578))
|
||||
* **browser:** redact encoded declared secrets consistently ([f09bb8a](https://github.com/morluto/rea/commit/f09bb8a99773f79c7306b8799c86f856fe2c0d4b))
|
||||
* **browser:** report mismatched event family selection as unknown in capture comparison ([#2239](https://github.com/morluto/rea/issues/2239)) ([0043d9b](https://github.com/morluto/rea/commit/0043d9b134c0a353e8bf85c0bde4492275f1f720))
|
||||
* **browser:** retain effective source-map response urls ([062723e](https://github.com/morluto/rea/commit/062723e44e937c1e1df865e9ae16184b41e70ae8))
|
||||
* **browser:** retain module resolver cleanup ownership ([a82e37c](https://github.com/morluto/rea/commit/a82e37c8065cc200a0ca3e14e7c4f85e4e468580))
|
||||
* **build:** preserve LF text checkouts on Windows ([#1807](https://github.com/morluto/rea/issues/1807)) ([031d778](https://github.com/morluto/rea/commit/031d7781f0f6c99e5f14e67f56cb89a88d6af3eb))
|
||||
* **build:** preserve resource controls in strict Turbo tasks ([#1809](https://github.com/morluto/rea/issues/1809)) ([2e22330](https://github.com/morluto/rea/commit/2e223300375101558f90b6e78ef9612c55626673))
|
||||
* **build:** resolve rolldown from the npm registry in package-lock.json ([#1986](https://github.com/morluto/rea/issues/1986)) ([f889a69](https://github.com/morluto/rea/commit/f889a69fb9efe42dd0120c96ff44b4298c1c7c6c))
|
||||
* **bun:** report the real runtime and enforce worker memory budgets on Windows ([#1730](https://github.com/morluto/rea/issues/1730)) ([66c2157](https://github.com/morluto/rea/commit/66c21572defc97fe277cad49d3173bd4073d1f58))
|
||||
* **call-path:** preserve relationship coverage from analysis ([#2001](https://github.com/morluto/rea/issues/2001)) ([ed6af7e](https://github.com/morluto/rea/commit/ed6af7eb8cf052c52fec8bfdc5d509377cb30a1a))
|
||||
* **checks:** order artifact-backed lint after compilation ([0d5033a](https://github.com/morluto/rea/commit/0d5033ad12e12abe78fc3c0ba81622b410d22aa1))
|
||||
* **ci:** allow cold Chrome startup in runtime fixtures ([f941968](https://github.com/morluto/rea/commit/f941968eb1860dd41efc2a5201b35cecca42301d))
|
||||
* **ci:** ignore generated website translation staging ([#2511](https://github.com/morluto/rea/issues/2511)) ([1883149](https://github.com/morluto/rea/commit/18831491cfb5cb98abbffce0cb04dae12a90fe28)), closes [#2508](https://github.com/morluto/rea/issues/2508)
|
||||
* **ci:** stop aggregate jobs when verification is cancelled ([2e45b4d](https://github.com/morluto/rea/commit/2e45b4d7a5b3228fe8b283def6f047797561bee1))
|
||||
* **cli:** await browser scenario cleanup on interrupts ([aaeadf2](https://github.com/morluto/rea/commit/aaeadf2d4c4e3f0d0581af2dca33c5bfdc2bcb0e))
|
||||
* **cli:** normalize empty Windows profile before imports ([#2482](https://github.com/morluto/rea/issues/2482)) ([fa4b828](https://github.com/morluto/rea/commit/fa4b8288655188426222773ead2ccbdaf76334fd))
|
||||
* **cli:** preserve failure semantics across full-output formats ([570c40c](https://github.com/morluto/rea/commit/570c40cde55d31e455ef9bc484b7b908658ded58))
|
||||
* **cli:** report an invalid REA_LOG_LEVEL as configuration ([#2140](https://github.com/morluto/rea/issues/2140)) ([3159732](https://github.com/morluto/rea/commit/315973259732544a597b8b17d25c69735910e72e)), closes [#2135](https://github.com/morluto/rea/issues/2135)
|
||||
* **cli:** retain browser and Inspector input correction details ([#2230](https://github.com/morluto/rea/issues/2230)) ([916ac97](https://github.com/morluto/rea/commit/916ac97bf9f7b976982e438ceb856a9692576cb1))
|
||||
* **cli:** retain correction details across adjacent browser commands ([#2294](https://github.com/morluto/rea/issues/2294)) ([bb26622](https://github.com/morluto/rea/commit/bb266226707135ad9f181e6c3afd6af0ef62fb22))
|
||||
* **cli:** retry retained browser scenario cleanup ([4daea94](https://github.com/morluto/rea/commit/4daea941bfeeb426886f2d048aed7f3cb2dbf97b))
|
||||
* **cli:** reuse firmware and web module input constraints ([48c352b](https://github.com/morluto/rea/commit/48c352b6bfa34c820a530272cd36600158c37b1e))
|
||||
* **config:** reject NUL bytes in Hopper loader arguments ([#2474](https://github.com/morluto/rea/issues/2474)) ([a07ceae](https://github.com/morluto/rea/commit/a07ceaec36346a7c73e66efe35c8af4654029c84))
|
||||
* **contracts:** mark foreign execution and device mutation destructive ([#1904](https://github.com/morluto/rea/issues/1904)) ([0b7fc40](https://github.com/morluto/rea/commit/0b7fc40eeef03b06de08d886572c2862331d8947))
|
||||
* **contracts:** reject OS-invalid local paths in binary and artifact tools ([#1925](https://github.com/morluto/rea/issues/1925)) ([976c2c0](https://github.com/morluto/rea/commit/976c2c083eee1fdd9e89a1a720f768a6ee6df277))
|
||||
* **dev:** preserve command arguments in exclusive runners ([fd95880](https://github.com/morluto/rea/commit/fd9588089d089e7cb02d12178e34407d6f889f22)), closes [#2319](https://github.com/morluto/rea/issues/2319)
|
||||
* **docs:** synchronize disclaimer links across translations ([d864ad5](https://github.com/morluto/rea/commit/d864ad54717d92fe4b512ce1170717d9904c1f00))
|
||||
* **docs:** validate translated README website destinations ([c9136ee](https://github.com/morluto/rea/commit/c9136eef716aa8d32e0301189fbf5a511ff62d5d))
|
||||
* **domain:** preserve derived byte counts and uncertain identity ([7a2cd1e](https://github.com/morluto/rea/commit/7a2cd1ea0a63e8c44166860b7ee9c7a1aa43492b))
|
||||
* **domain:** preserve retryable capability failures through redaction ([#2494](https://github.com/morluto/rea/issues/2494)) ([d73ed6f](https://github.com/morluto/rea/commit/d73ed6fce24f6d1372c80319cd41d29d66666159))
|
||||
* **electron:** attribute unresolved paths to selected inputs ([b7169c8](https://github.com/morluto/rea/commit/b7169c8b747cbc032913b31f008a3b81c77b6219)), closes [#2272](https://github.com/morluto/rea/issues/2272)
|
||||
* **elf:** centralize fixed header validation across consumers ([34a4bb6](https://github.com/morluto/rea/commit/34a4bb6508006fa113463ef20ed799a2994e9ee8))
|
||||
* **errors:** stop recommending retries for non-retryable failures ([#1869](https://github.com/morluto/rea/issues/1869)) ([fb94d9d](https://github.com/morluto/rea/commit/fb94d9dde0ccda83ae520ac6fb22b1d283562cf3))
|
||||
* **evaluation:** authenticate delivered Evidence citations ([844fa52](https://github.com/morluto/rea/commit/844fa52772c1533f7358a71a764da780503775a3))
|
||||
* **evaluation:** share completed transcript facts across graders ([1447fd2](https://github.com/morluto/rea/commit/1447fd2f990c5d9820337dfd4b8a170f8cad17cd))
|
||||
* **evidence:** admit bundle imports across session transitions ([#2303](https://github.com/morluto/rea/issues/2303)) ([1230381](https://github.com/morluto/rea/commit/12303812a8d70f198c99c7aeb0df3aaa8166543c))
|
||||
* **evidence:** authenticate identities and retain extraction provenance ([6bae774](https://github.com/morluto/rea/commit/6bae774328724403255590aa2ddad4d7a2aa727f))
|
||||
* **evidence:** enforce managed identity and cancel bundle reads ([3bcc68c](https://github.com/morluto/rea/commit/3bcc68c037e9415c78093cb286069c1fcca6a2f8))
|
||||
* **evidence:** normalize unknown revisions and preserve mutation intent ([#1733](https://github.com/morluto/rea/issues/1733)) ([2165045](https://github.com/morluto/rea/commit/21650455a9c90a26e725c3505a3c17054cc4516c)), closes [#1723](https://github.com/morluto/rea/issues/1723) [#1724](https://github.com/morluto/rea/issues/1724)
|
||||
* **evidence:** preserve call coverage in function comparisons ([049132a](https://github.com/morluto/rea/commit/049132ab43fa962d31774f2b258c15a71217148b)), closes [#2222](https://github.com/morluto/rea/issues/2222)
|
||||
* **evidence:** preserve literal keys and response body ownership ([d1dcebc](https://github.com/morluto/rea/commit/d1dcebce2c0820469ed63e33497a14258971b710))
|
||||
* **evidence:** preserve trace uncertainty and partial provider observations ([e997085](https://github.com/morluto/rea/commit/e9970855ba16ba711816ac30212c5ca17ae085cd))
|
||||
* **evidence:** reject NUL bytes in subject and snapshot paths ([#1873](https://github.com/morluto/rea/issues/1873)) ([fa9a7e5](https://github.com/morluto/rea/commit/fa9a7e5ec026c5a4e8426f0f36c2c4555be9c9f0))
|
||||
* **evidence:** reject unsupported metadata before authentication ([acf75e6](https://github.com/morluto/rea/commit/acf75e6700ace28bb1db25e54e56673ac15e0ed3))
|
||||
* **evidence:** retain unreadable PE and Darwin process facts ([4a4d36f](https://github.com/morluto/rea/commit/4a4d36f881861bbab3c734b0dd459f805766caec))
|
||||
* **evidence:** validate closure projections and browser body coverage ([aada0ca](https://github.com/morluto/rea/commit/aada0ca8126bf14c60750a4ccd4a79667770a1e4))
|
||||
* **filesystem:** enforce symlink and decoded-text admission ([ec0b081](https://github.com/morluto/rea/commit/ec0b081371f118e6e5e042fbef3479359c672ddb))
|
||||
* **firmware:** name missing extractor dependencies in partial extraction ([#1879](https://github.com/morluto/rea/issues/1879)) ([1769417](https://github.com/morluto/rea/commit/176941700118cc33c86e07373cd6950f30548386))
|
||||
* **formats:** preserve high bits in Windows signature checks ([ac57c88](https://github.com/morluto/rea/commit/ac57c88efe64c3125850b54d3d833227e6b8ec51))
|
||||
* **frida:** name the argument each Frida input error rejects ([#2217](https://github.com/morluto/rea/issues/2217)) ([86de439](https://github.com/morluto/rea/commit/86de439ba4c9297f721abc60c715fe30fb6ff3df)), closes [#2213](https://github.com/morluto/rea/issues/2213)
|
||||
* **frida:** reject an unreadable script file before starting a session ([#2211](https://github.com/morluto/rea/issues/2211)) ([c9aecde](https://github.com/morluto/rea/commit/c9aecde580d26d4e7745c2623a4efa327a27367e))
|
||||
* **ghidra:** derive installation admission from Java property semantics ([2187e16](https://github.com/morluto/rea/commit/2187e16f149a7a7b512a4cb45d5f468cc04091fe))
|
||||
* **ghidra:** encode Java probe output as UTF-8 ([#2206](https://github.com/morluto/rea/issues/2206)) ([59be866](https://github.com/morluto/rea/commit/59be866719e8fe8ec060515044d427a3b0a57649))
|
||||
* **ghidra:** keep JVM warnings out of LaunchSupport output ([#1698](https://github.com/morluto/rea/issues/1698)) ([e20994a](https://github.com/morluto/rea/commit/e20994a8ea10609d420e958bd8a1268b0bcd8899))
|
||||
* **ghidra:** recover stale clients on same-target reopen ([#2014](https://github.com/morluto/rea/issues/2014)) ([4573e8c](https://github.com/morluto/rea/commit/4573e8cf35de822bfc5feabcc89ec3717c247c8c))
|
||||
* **ghidra:** report progress while startup is pending ([#1877](https://github.com/morluto/rea/issues/1877)) ([29d2624](https://github.com/morluto/rea/commit/29d2624b3475586356c27f518bf6b823030268fb))
|
||||
* **ghidra:** retain launcher command outcome in launch failure diagnostics ([#2011](https://github.com/morluto/rea/issues/2011)) ([d4e8ef7](https://github.com/morluto/rea/commit/d4e8ef74999666cdb735b49eb8fea367f8f86489))
|
||||
* **ghidra:** share Java properties semantics with PSP extension admission ([b953f96](https://github.com/morluto/rea/commit/b953f96c0aae27e1876c317a8f7db1d6f292b8ff))
|
||||
* **go:** accept file-backed unmapped Mach-O debug segments ([7fb097d](https://github.com/morluto/rea/commit/7fb097d72c9931dd5dfae481ad2b9d3bb6029f15))
|
||||
* honor empty URL query and fragment markers ([#2091](https://github.com/morluto/rea/issues/2091)) ([af29247](https://github.com/morluto/rea/commit/af29247a7873ba8badec204a4a59f9a2b3a880b6))
|
||||
* **hopper:** let failed one-shot commands exit while retaining a lease ([#1763](https://github.com/morluto/rea/issues/1763)) ([e8528ce](https://github.com/morluto/rea/commit/e8528cedcdfb1ca1d769304afdc353936e8e0d70))
|
||||
* **hopper:** preserve observed process failures across requests ([#1927](https://github.com/morluto/rea/issues/1927)) ([601814e](https://github.com/morluto/rea/commit/601814ed0e4a0c57d6e045da0e6cf8ee2f29bb7f))
|
||||
* **hopper:** preserve startup failures and recover denied launches ([069308b](https://github.com/morluto/rea/commit/069308bbe6d73b1d87038b43c9121658325042a9)), closes [#1808](https://github.com/morluto/rea/issues/1808)
|
||||
* **hopper:** stop Linux demo children when the REA owner exits ([#2499](https://github.com/morluto/rea/issues/2499)) ([c105391](https://github.com/morluto/rea/commit/c105391db53e2e2ab8b8624d5f3870c14aae3637))
|
||||
* **hopper:** wait for late bridges during cleanup ([#1866](https://github.com/morluto/rea/issues/1866)) ([cf7477e](https://github.com/morluto/rea/commit/cf7477eb4642bc07228fa33ccc4c87656e6e3003))
|
||||
* **ida:** declare GUI navigation for attached legacy analysis ([#1764](https://github.com/morluto/rea/issues/1764)) ([cf69207](https://github.com/morluto/rea/commit/cf692072b56903b60426e4b301b3c48fd31ee0fd)), closes [#1712](https://github.com/morluto/rea/issues/1712)
|
||||
* **ida:** preserve native coverage and verify returned values ([#2324](https://github.com/morluto/rea/issues/2324)) ([37b7550](https://github.com/morluto/rea/commit/37b7550ecc916acc8619fa72e5c05af45702733f))
|
||||
* **ida:** preserve non-x86 call edges and workflow uncertainty ([#1906](https://github.com/morluto/rea/issues/1906)) ([0ae38e1](https://github.com/morluto/rea/commit/0ae38e1e31414c67a3be09231d208f0726c035f8))
|
||||
* **ida:** recover cleanup after worker sessions are reaped ([12fa8fd](https://github.com/morluto/rea/commit/12fa8fd9f986dbd4ff58165c3ec71a46dc8a8a3b))
|
||||
* **ida:** report a procedure IDA cannot resolve as invalid input ([#1785](https://github.com/morluto/rea/issues/1785)) ([d3e9ee5](https://github.com/morluto/rea/commit/d3e9ee5505251f760666bb8e1e6c295b6d6aedb2))
|
||||
* **ida:** stop the private input of a universal Mach-O at the end of the selected slice ([#2291](https://github.com/morluto/rea/issues/2291)) ([c6acd19](https://github.com/morluto/rea/commit/c6acd19b6d842699ab807d9526dc762c743686f4))
|
||||
* **ida:** thin the selected FAT slice into the private headless input ([#2201](https://github.com/morluto/rea/issues/2201)) ([10400fd](https://github.com/morluto/rea/commit/10400fdb57e4226c5ce15af17968a664f35498ce)), closes [#2139](https://github.com/morluto/rea/issues/2139)
|
||||
* **ida:** wait out a transient busy worker health in headless sessions ([#1778](https://github.com/morluto/rea/issues/1778)) ([0bdc7a4](https://github.com/morluto/rea/commit/0bdc7a40ac171a05971b287f2aab0376e2f14358))
|
||||
* **install:** describe automatic setup and guard truncated downloads ([#1902](https://github.com/morluto/rea/issues/1902)) ([d802304](https://github.com/morluto/rea/commit/d802304c542b20bc86e22cc492718e89a8a5579b))
|
||||
* **install:** honor redirected setup diagnostics ([8b18171](https://github.com/morluto/rea/commit/8b181716aca2cb467be499cba226abfb5ae19141))
|
||||
* **io:** consolidate managed snapshots and retain cleanup ownership ([98d8470](https://github.com/morluto/rea/commit/98d8470d36cfbf7cd25820a4ed430aebae20c0c5))
|
||||
* **io:** retain cleanup ownership and honor cancellation ([d8c76b6](https://github.com/morluto/rea/commit/d8c76b629639bda4405afa9ae2f7676b694f2f10))
|
||||
* **javascript:** apply loader-owned module lookup rules ([c0904b4](https://github.com/morluto/rea/commit/c0904b4c1aabfccf2f0ab12f44960a0a1fbbbfae))
|
||||
* **javascript:** bound self-alias mutation paths that never prune ([e365f37](https://github.com/morluto/rea/commit/e365f3715f0e9856218f0b2878bfe2144c821d9a))
|
||||
* **javascript:** bound value evaluation through nested closure aliases ([#1941](https://github.com/morluto/rea/issues/1941)) ([d59ab6d](https://github.com/morluto/rea/commit/d59ab6d977d5b9376af2fdd141b4f65460bb9a9f))
|
||||
* **javascript:** centralize module syntax and separate erased type dependencies ([1b95302](https://github.com/morluto/rea/commit/1b953021eadf4cac09e20be388d79536903633b3))
|
||||
* **javascript:** distinguish file URL paths from query identity ([f43fc02](https://github.com/morluto/rea/commit/f43fc0247527aebb8efc7d9db04276fe2d489323))
|
||||
* **javascript:** follow actual receivers in nested intrinsic calls ([#1912](https://github.com/morluto/rea/issues/1912)) ([9d8e42b](https://github.com/morluto/rea/commit/9d8e42bdd6f1bf8a984da1e06e1d76a1dbb9a7ed))
|
||||
* **javascript:** follow bundler namespace interop for Electron APIs ([#1827](https://github.com/morluto/rea/issues/1827)) ([6ac5c36](https://github.com/morluto/rea/commit/6ac5c36503492d3b6da4fcf2a5dee87aff60fc8c))
|
||||
* **javascript:** honor package exports before sibling files ([3ad5782](https://github.com/morluto/rea/commit/3ad5782dfdc8864879a887dc63fef682ffeb5839))
|
||||
* **javascript:** index repeated graph observations before final sorting ([6d5d71f](https://github.com/morluto/rea/commit/6d5d71fab5e135c687f7aa2f797da19b4c2a1c1e)), closes [#1748](https://github.com/morluto/rea/issues/1748)
|
||||
* **javascript:** keep TypeScript substitution out of runtime paths ([f8513a4](https://github.com/morluto/rea/commit/f8513a42dc44451a621127f06edde5d38bc93f69))
|
||||
* **javascript:** normalize package URLs before array selection ([#1916](https://github.com/morluto/rea/issues/1916)) ([369cd3d](https://github.com/morluto/rea/commit/369cd3dfdc47709cc34d01c50f645a885c70ded7))
|
||||
* **javascript:** parse explicit CommonJS wrapper syntax ([#2475](https://github.com/morluto/rea/issues/2475)) ([6a04f92](https://github.com/morluto/rea/commit/6a04f922e16ad4d171ba0c07e32238efdaf43e2d))
|
||||
* **javascript:** preserve and resolve complete source-map URLs ([#1788](https://github.com/morluto/rea/issues/1788)) ([ce845ba](https://github.com/morluto/rea/commit/ce845ba428e9b23d6b74eae1e25e17c37532adac))
|
||||
* **javascript:** preserve execution and invocation provenance ([b8fab74](https://github.com/morluto/rea/commit/b8fab7429771bb17a7ca0297661de3c9935212af))
|
||||
* **javascript:** preserve graphs within parent capacity ([#1921](https://github.com/morluto/rea/issues/1921)) ([0485cd3](https://github.com/morluto/rea/commit/0485cd3bce29c977bae05a4fdce5436f3e3d7913)), closes [#1911](https://github.com/morluto/rea/issues/1911)
|
||||
* **javascript:** preserve import-equals declaration and export evidence ([#2062](https://github.com/morluto/rea/issues/2062)) ([86fab11](https://github.com/morluto/rea/commit/86fab11fbe000a04c0810699419e99e50476e424))
|
||||
* **javascript:** preserve loader-specific package ancestry ([9f67e44](https://github.com/morluto/rea/commit/9f67e44e5d451d705bae9a579ad9802d5c9f097c))
|
||||
* **javascript:** preserve namespace re-export relationships ([#1833](https://github.com/morluto/rea/issues/1833)) ([37a9eb9](https://github.com/morluto/rea/commit/37a9eb9d65a088209f962e5094f6bc67eacbbaf9))
|
||||
* **javascript:** preserve package and source-map boundary identity ([#1939](https://github.com/morluto/rea/issues/1939)) ([14935e4](https://github.com/morluto/rea/commit/14935e4d470be318fdee442d279d6acb7d441119))
|
||||
* **javascript:** preserve POSIX runtime path case on Windows ([#2422](https://github.com/morluto/rea/issues/2422)) ([1a1b67c](https://github.com/morluto/rea/commit/1a1b67c8885e9ff33f7a06ed2e027ebfdb83e084))
|
||||
* **javascript:** preserve TypeScript loader and dependency semantics ([e4532b5](https://github.com/morluto/rea/commit/e4532b537663026c3e5b784380eecd009c959a36))
|
||||
* **javascript:** prove namespace interop before attributing Electron APIs ([#1857](https://github.com/morluto/rea/issues/1857)) ([9b3e598](https://github.com/morluto/rea/commit/9b3e59804db71072ed023f109342f96063c57b45))
|
||||
* **javascript:** report available parent result budget in coverage limits ([#1915](https://github.com/morluto/rea/issues/1915)) ([72489a9](https://github.com/morluto/rea/commit/72489a9445299f695d793f004fed88e1bac0a557))
|
||||
* **javascript:** report JSON status for imported package manifests ([914ba83](https://github.com/morluto/rea/commit/914ba833ded5f8604345de4e4f6d306de0a38c4e))
|
||||
* **javascript:** resolve bundled exports by binding identity ([5ab0cbb](https://github.com/morluto/rea/commit/5ab0cbb48ea5a4f11542eac44479b9af48f1dabd)), closes [#2171](https://github.com/morluto/rea/issues/2171)
|
||||
* **javascript:** resolve module-relative Worker URL references ([#2104](https://github.com/morluto/rea/issues/2104)) ([653067d](https://github.com/morluto/rea/commit/653067d799591ce2b8fdc84e99c160ac17e2860f))
|
||||
* **javascript:** resolve relative ESM URLs as exact files ([783fcb0](https://github.com/morluto/rea/commit/783fcb06a4bd0444be214822fed60a3786932782))
|
||||
* **javascript:** retain completed facts through cancellation ([#1934](https://github.com/morluto/rea/issues/1934)) ([b6651cb](https://github.com/morluto/rea/commit/b6651cb99fba8fec3fd3efcb6794ae32b8a1525d))
|
||||
* **javascript:** retain guards without duplicating observed IPC calls ([42b0ed1](https://github.com/morluto/rea/commit/42b0ed126df7d5b908ac369715378d5e519051b7))
|
||||
* **javascript:** retain unbound CommonJS semantic imports ([3a17882](https://github.com/morluto/rea/commit/3a17882cc469515e562df9ecc7d154f30a5a9205))
|
||||
* **javascript:** retain wrapped isolated-world bridge exposures ([1c37914](https://github.com/morluto/rea/commit/1c37914306b3ff257d7a0360f11c9bf2a3f2cac7))
|
||||
* **javascript:** share source-map resolution and preserve path uncertainty ([3ae826c](https://github.com/morluto/rea/commit/3ae826ceba6f25b08bce50bcb51001209bc16b57))
|
||||
* **javascript:** share TypeScript emitted import resolution ([1dfb933](https://github.com/morluto/rea/commit/1dfb933e47db0156cf1cb61f28715b81e740c57b))
|
||||
* **javascript:** trace wrapped Electron IPC paths in large bundles ([#1874](https://github.com/morluto/rea/issues/1874)) ([87b9793](https://github.com/morluto/rea/commit/87b9793c53caf70a9f3a516214856899ca2d7cf8))
|
||||
* **jeb:** confine an invalid REA_JEB_MCP_URL to the JEB tools ([#2145](https://github.com/morluto/rea/issues/2145)) ([df2c08b](https://github.com/morluto/rea/commit/df2c08b546d4f40103e11b8b31dbfc3d41ee687b)), closes [#2143](https://github.com/morluto/rea/issues/2143)
|
||||
* **managed:** admit ReadyToRun images built for non-Windows hosts ([#1985](https://github.com/morluto/rea/issues/1985)) ([0d11f71](https://github.com/morluto/rea/commit/0d11f71e0dc5cf95d3bea093355f7edc09089a68))
|
||||
* **managed:** bind row budget charges to metadata identities ([#1897](https://github.com/morluto/rea/issues/1897)) ([23d50ea](https://github.com/morluto/rea/commit/23d50ea3bec186b4459d36c04854a92276accdf1)), closes [#1878](https://github.com/morluto/rea/issues/1878)
|
||||
* **managed:** bound transient CIL by decoded instruction count ([#1822](https://github.com/morluto/rea/issues/1822)) ([554cb45](https://github.com/morluto/rea/commit/554cb45f7ff967884c9d1fdf706c20803d76a6df))
|
||||
* **managed:** charge retained member facts instead of decoding bounds ([#1768](https://github.com/morluto/rea/issues/1768)) ([3078729](https://github.com/morluto/rea/commit/30787297d49bf93e67f62a9ec42f896188d57a20))
|
||||
* **managed:** charge transient CIL by decoded instructions ([554cb45](https://github.com/morluto/rea/commit/554cb45f7ff967884c9d1fdf706c20803d76a6df))
|
||||
* **managed:** decode generic, array, fnptr, and modifier signatures ([#1835](https://github.com/morluto/rea/issues/1835)) ([1f531fc](https://github.com/morluto/rea/commit/1f531fc257f71731624cbd6b595208adacf59108))
|
||||
* **managed:** distinguish .NET Standard targets from runtimes ([81dc64e](https://github.com/morluto/rea/commit/81dc64e3cd13dc8bfcac8898386717ece9721da1))
|
||||
* **managed:** honor metadata ExtraData before table decoding ([#1893](https://github.com/morluto/rea/issues/1893)) ([fb43dd9](https://github.com/morluto/rea/commit/fb43dd9716fe113effa14a03b603b72ca7d9097c))
|
||||
* **managed:** index attribute constructor owners once per layout ([#1943](https://github.com/morluto/rea/issues/1943)) ([c2cf7dc](https://github.com/morluto/rea/commit/c2cf7dcb86e11350214f82e5c51de7ca6ee3d27a))
|
||||
* **managed:** report ExportedType rows in managed member inspection ([#1828](https://github.com/morluto/rea/issues/1828)) ([ed1519d](https://github.com/morluto/rea/commit/ed1519ddee02739f57136e356786f64c7f74fed0))
|
||||
* **managed:** report malformed PE layouts as invalid input ([#2194](https://github.com/morluto/rea/issues/2194)) ([90e37f4](https://github.com/morluto/rea/commit/90e37f4152990be721784006a820a3794920213c))
|
||||
* **managed:** resolve member ownership through pointer tables ([#1886](https://github.com/morluto/rea/issues/1886)) ([a95795c](https://github.com/morluto/rea/commit/a95795c6ed3cb149e03460f4c818ad12e0c670d9))
|
||||
* **managed:** share first-match member list ownership ([#1955](https://github.com/morluto/rea/issues/1955)) ([7d92d93](https://github.com/morluto/rea/commit/7d92d93a550f3be221d7cf1da07c37ea1770e922))
|
||||
* **managed:** share first-match member ownership indexes ([52e76c5](https://github.com/morluto/rea/commit/52e76c5d39b58d1685bb5e22bd40d19524dfa2cb))
|
||||
* **managed:** validate CLI type selections with the member contract ([#2125](https://github.com/morluto/rea/issues/2125)) ([60259a9](https://github.com/morluto/rea/commit/60259a91d9a58cbd313ad7f3d321acc2deb65d2e)), closes [#2121](https://github.com/morluto/rea/issues/2121)
|
||||
* **mcp:** cancel evidence imports before session mutation ([e5699d2](https://github.com/morluto/rea/commit/e5699d23b173bbd0b68e3ab177d0b7583d6df345)), closes [#1746](https://github.com/morluto/rea/issues/1746)
|
||||
* **mcp:** express inspect_analysis_view selector constraints in the contract schema ([#1705](https://github.com/morluto/rea/issues/1705)) ([a8a9c4d](https://github.com/morluto/rea/commit/a8a9c4d8173b63fb42d343a8ca043927970ea4ce)), closes [#1695](https://github.com/morluto/rea/issues/1695)
|
||||
* **mcp:** join owned doctor shutdown without signaling saved PIDs ([7fc0b5e](https://github.com/morluto/rea/commit/7fc0b5ec9c2532bbf789d7783b7a0cab6fc054d8))
|
||||
* **mcp:** keep prompt completion within ready provider sessions ([07b36c1](https://github.com/morluto/rea/commit/07b36c148946f46b99a4ce04e55726e97d0ee03a))
|
||||
* **mcp:** keep shared optional providers open across discarded probes ([#2205](https://github.com/morluto/rea/issues/2205)) ([7c9c1eb](https://github.com/morluto/rea/commit/7c9c1ebdb77662f6276ef2f7250e7df414bd03ca)), closes [#2195](https://github.com/morluto/rea/issues/2195)
|
||||
* **mcp:** preserve target provenance on retained partial errors ([8fc2043](https://github.com/morluto/rea/commit/8fc2043eb8bcedbf34dce064f977e455438635d6))
|
||||
* **mcp:** provide native evidence paging continuation ([1449e8e](https://github.com/morluto/rea/commit/1449e8e05138bf0c86d5fe6f4c93122b4b93b2b1)), closes [#1849](https://github.com/morluto/rea/issues/1849)
|
||||
* **native:** accept universal binaries with LIB64 x86_64 slices ([#1982](https://github.com/morluto/rea/issues/1982)) ([4b653fe](https://github.com/morluto/rea/commit/4b653fe6ad1d25a2d9a69d5e93610380c0c09a34))
|
||||
* **native:** clarify Mach-O offset origins and reject partial ELF tables ([8bd5ba2](https://github.com/morluto/rea/commit/8bd5ba2d234cbd9a5bb9dd5daeaa191c3a1cad24)), closes [#1973](https://github.com/morluto/rea/issues/1973)
|
||||
* **native:** honor Mach-O chained pointer locations and library ordinals ([#1709](https://github.com/morluto/rea/issues/1709)) ([3b0ea59](https://github.com/morluto/rea/commit/3b0ea590fcc876fa017946f4cec009d653f02b38))
|
||||
* **native:** name the ownership helper prerequisite in command failures ([#2506](https://github.com/morluto/rea/issues/2506)) ([20f51d7](https://github.com/morluto/rea/commit/20f51d7286b1759e42f99c0512c73230052dda86))
|
||||
* **native:** name the retained pwntools process group in cleanup resources ([#2281](https://github.com/morluto/rea/issues/2281)) ([4303dcd](https://github.com/morluto/rea/commit/4303dcdcf68af4d71d777ffff75cbd4f17a8877d)), closes [#2274](https://github.com/morluto/rea/issues/2274)
|
||||
* **native:** preserve universal Mach-O container identity ([b38429c](https://github.com/morluto/rea/commit/b38429cb6a0de8f4bb5ae01633e24abe2d7cde46))
|
||||
* **native:** raise default PE resource entry budget to 16384 ([#1703](https://github.com/morluto/rea/issues/1703)) ([951c2aa](https://github.com/morluto/rea/commit/951c2aae3be1c357df9f23558d8c09680e64c2cb))
|
||||
* **native:** reject ambiguous otool load-command framing ([108b5f9](https://github.com/morluto/rea/commit/108b5f94254281639badd25b1f448cca35dc89a2))
|
||||
* **native:** reject required otool fields truncated before their value ([#1995](https://github.com/morluto/rea/issues/1995)) ([adde8a8](https://github.com/morluto/rea/commit/adde8a80921b199ddd7105998f3760d345b468fc))
|
||||
* **native:** retain failed command cleanup owners ([d9b4ae1](https://github.com/morluto/rea/commit/d9b4ae182d60dfd7fd5ba5bb539716413cbfdca6))
|
||||
* **native:** retain failed pwntools process and runtime cleanup ([#1708](https://github.com/morluto/rea/issues/1708)) ([11fe5a1](https://github.com/morluto/rea/commit/11fe5a13f8aee87d0c0e036a9f497407e085fe48))
|
||||
* **native:** retain signature snapshot cleanup ownership ([ebc22d9](https://github.com/morluto/rea/commit/ebc22d99d62225505c0a84f6e39823ba4ef2f829))
|
||||
* order remaining outputs independently of host locale ([#1867](https://github.com/morluto/rea/issues/1867)) ([e4ac7bb](https://github.com/morluto/rea/commit/e4ac7bbfc2f8c631ba1c60f507d85253e122d4c8))
|
||||
* **pcap:** name the host tool to configure in capability refusals ([#2507](https://github.com/morluto/rea/issues/2507)) ([bb96afd](https://github.com/morluto/rea/commit/bb96afdbe32f5318d57fcb00099191c5a7712f53))
|
||||
* **pcap:** order evidence ties by code point instead of host locale ([#2509](https://github.com/morluto/rea/issues/2509)) ([f6556ad](https://github.com/morluto/rea/commit/f6556ad2bc102d80223f5b434136f546dbd2bbab))
|
||||
* **plist:** decode formatted XML dictionary keys ([f1924cf](https://github.com/morluto/rea/commit/f1924cf9c1910d5d29d11e7bf634b51af8d738cf))
|
||||
* **process:** accept a trace identifier the comparison result can represent ([#2488](https://github.com/morluto/rea/issues/2488)) ([2c6a4fa](https://github.com/morluto/rea/commit/2c6a4fac4ff3477ac14f3d780894c5b390880607))
|
||||
* **process:** add an opt-in Swift module cache ([#2252](https://github.com/morluto/rea/issues/2252)) ([47a51b0](https://github.com/morluto/rea/commit/47a51b08f4d79f808c1b74de79c3852aa853df53))
|
||||
* **process:** aggregate incomplete trace-spec diagnostics ([857a1b7](https://github.com/morluto/rea/commit/857a1b7b04da4488db2b224c270ad78998c6b6c7))
|
||||
* **process:** align capture Evidence provider admission ([713db4d](https://github.com/morluto/rea/commit/713db4dc2665c964707cb0e937e8794cbe73534e))
|
||||
* **process:** bound retained trace ordering state ([63e796d](https://github.com/morluto/rea/commit/63e796d50ea323ae8dcfef80f86c8154bb106790))
|
||||
* **process:** cancel run-token reads during sampling ([09b6828](https://github.com/morluto/rea/commit/09b68285166bef2b7633402c8adf7eb25823b47e))
|
||||
* **process:** observe already-due trailing callbacks before settling the capture journal ([#1700](https://github.com/morluto/rea/issues/1700)) ([ed084b3](https://github.com/morluto/rea/commit/ed084b3dbb13ec9dee1adc8f5b76e784b52c00bb)), closes [#1697](https://github.com/morluto/rea/issues/1697)
|
||||
* **process:** preserve invalid runtime path selections as input errors ([cecc6ec](https://github.com/morluto/rea/commit/cecc6ecbffe84689a173d1634f342e046b0c8ceb))
|
||||
* **process:** preserve monotonic capture timing and observed wall dates ([9049dba](https://github.com/morluto/rea/commit/9049dbaf0c3df32357419f9899965df2b611f493))
|
||||
* **process:** preserve nested path identities during normalization ([#2468](https://github.com/morluto/rea/issues/2468)) ([b9ee921](https://github.com/morluto/rea/commit/b9ee921560dcf4590c2b13a1cc92c49c93e10675))
|
||||
* **process:** reject deep trace cycles without recursive expansion ([10935b7](https://github.com/morluto/rea/commit/10935b7b1136accab2a43b308ab380749da0f7ae))
|
||||
* **process:** report single empty settlement observation as unverifiable ([#2232](https://github.com/morluto/rea/issues/2232)) ([7724edb](https://github.com/morluto/rea/commit/7724edbdd3fa0acd94c8210a30dceba501fcdbe8))
|
||||
* **process:** report the Swift compiler outcome with bounded diagnostics ([#1999](https://github.com/morluto/rea/issues/1999)) ([091cb81](https://github.com/morluto/rea/commit/091cb81fc3ca2b8ec96df7a534934388a6b882cd))
|
||||
* **process:** retain owned command cleanup diagnostics ([#1907](https://github.com/morluto/rea/issues/1907)) ([38539a2](https://github.com/morluto/rea/commit/38539a2f4a522243d6fc369ae34ef30e2a2f80cc)), closes [#1856](https://github.com/morluto/rea/issues/1856)
|
||||
* **process:** return private runtime ownership at allocation ([c22111e](https://github.com/morluto/rea/commit/c22111eca2c4bc84a084f12711f405b3e7422a40))
|
||||
* **process:** use monotonic time for provider execution budgets ([d9e9fb2](https://github.com/morluto/rea/commit/d9e9fb2273543caab4eb21d896c33d462ada6971))
|
||||
* **providers:** retain native parsing and compiler failure diagnostics ([b5ededd](https://github.com/morluto/rea/commit/b5ededd0f9c28d0f696a205103066928117368ee))
|
||||
* **readiness:** validate stage evidence references once ([02cedc3](https://github.com/morluto/rea/commit/02cedc37961a5d230b134f330c148322cd04bf37))
|
||||
* **reconstruction:** resolve latest verifier observations without input-order bias ([1f7f808](https://github.com/morluto/rea/commit/1f7f808c4f3bb5eca6b13bcc71d5cceb2ace6614))
|
||||
* **reference:** report sloppy scripts, PHP, C# and enclosing Git facts ([#1770](https://github.com/morluto/rea/issues/1770)) ([7b15762](https://github.com/morluto/rea/commit/7b15762d09acf3d4ffb937f55ec1b54e7db5fbfa))
|
||||
* **reference:** verify symlink identity around target reads ([3d83135](https://github.com/morluto/rea/commit/3d8313598785359c424d7305f503cb69fc8639a6))
|
||||
* **runtime:** preserve unknown debugger attachment state ([e55ef72](https://github.com/morluto/rea/commit/e55ef7213515ba204c3d88a4487b4ee6a2773b06))
|
||||
* **screenshot:** reject invalid PNG header dimensions ([#2472](https://github.com/morluto/rea/issues/2472)) ([e74e4e9](https://github.com/morluto/rea/commit/e74e4e951bf59c42b25779b45d1c7b8dde6b618f))
|
||||
* **scripts, install:** honor test:fast "without build" promise and orient Node.js engine mismatches ([#2026](https://github.com/morluto/rea/issues/2026)) ([69e097a](https://github.com/morluto/rea/commit/69e097a8ca256ab97ee4b2883739447784a5f90e))
|
||||
* **scripts:** pass MCP callTool timeouts as request options ([#2387](https://github.com/morluto/rea/issues/2387)) ([c462a4e](https://github.com/morluto/rea/commit/c462a4ebd3a10e59253bcf38353a0914b176738b))
|
||||
* **session:** attribute selected-provider capabilities to the resolved identity ([#2013](https://github.com/morluto/rea/issues/2013)) ([2ff850d](https://github.com/morluto/rea/commit/2ff850de68dc9b05c6faf2bbfd26d56bc2d5d27c)), closes [#2009](https://github.com/morluto/rea/issues/2009)
|
||||
* **session:** invalidate snapshots before metadata write dispatch ([1c64fe3](https://github.com/morluto/rea/commit/1c64fe3eff48679c6880f42d2f0a4af46686ade7))
|
||||
* **session:** verify retained client liveness on open fast path ([e59db2f](https://github.com/morluto/rea/commit/e59db2f5deefb1c5e74f01e19631f6d75cfaa25a))
|
||||
* **setup:** configure an empty Hermes config.yaml ([#1983](https://github.com/morluto/rea/issues/1983)) ([43f9c39](https://github.com/morluto/rea/commit/43f9c39dfbdfaa6e5bc260b037a506cd1f56fe6d))
|
||||
* **setup:** honor config roots and display terminal dry-run plans ([2397137](https://github.com/morluto/rea/commit/23971376158e7815edcbe6c04a8df7c9504650dc))
|
||||
* **setup:** ignore empty home directory selections ([c339f9e](https://github.com/morluto/rea/commit/c339f9ebe7bd1f30608d6ccb7175da523dd3c485)), closes [#2325](https://github.com/morluto/rea/issues/2325)
|
||||
* **setup:** name each skill directory in the uninstall summary ([#2118](https://github.com/morluto/rea/issues/2118)) ([5190843](https://github.com/morluto/rea/commit/5190843f8f09ac17cbf79561bd1f708c509cda78)), closes [#2111](https://github.com/morluto/rea/issues/2111)
|
||||
* **setup:** name invalid client config shape errors clearly ([#2157](https://github.com/morluto/rea/issues/2157)) ([b1bf4a7](https://github.com/morluto/rea/commit/b1bf4a70d44191348ca20a91a52fb663da4daed0))
|
||||
* **setup:** name structural problems in client configurations ([#2154](https://github.com/morluto/rea/issues/2154)) ([51367ca](https://github.com/morluto/rea/commit/51367cae6f4e6ef9b9dcb28dc21fe6c92d1dd6f8)), closes [#2152](https://github.com/morluto/rea/issues/2152)
|
||||
* **setup:** pin Hopper's macOS publisher identity before install ([#2481](https://github.com/morluto/rea/issues/2481)) ([650237e](https://github.com/morluto/rea/commit/650237efb01b3c4a154799dbbedb2af1084f2312))
|
||||
* **setup:** preserve Cordis ownership across uncertain patch structure ([21eff3b](https://github.com/morluto/rea/commit/21eff3bae10f58711a35ad44f86e9f96f9bb4790))
|
||||
* **setup:** preserve current recovery snapshots and decoding failures ([f6775a3](https://github.com/morluto/rea/commit/f6775a36694a6a9c620f4248638e8056a6cbcb66))
|
||||
* **setup:** preserve skill files and report rollback failures ([c240768](https://github.com/morluto/rea/commit/c2407689cb04df082e8db0b6afa8f8d022f6bcd1))
|
||||
* **setup:** preserve unrelated Hermes YAML line formatting ([58e91e1](https://github.com/morluto/rea/commit/58e91e14bd5659dd57acbb91e56b5fc6a6963c80))
|
||||
* **setup:** register a stable launcher when run through bunx ([#1731](https://github.com/morluto/rea/issues/1731)) ([d412def](https://github.com/morluto/rea/commit/d412def7225a556e6d2140176dc9ab4bd34af0f3))
|
||||
* **setup:** remove emptied skill directories on uninstall ([#2182](https://github.com/morluto/rea/issues/2182)) ([d350357](https://github.com/morluto/rea/commit/d35035780a643e38301b8eaea03f01bb506e9df9))
|
||||
* **setup:** retain regular-file cleanup ownership through workflows ([dcfc5d4](https://github.com/morluto/rea/commit/dcfc5d403ac997c2b08bee4753e57a1a4a8a8538))
|
||||
* **setup:** retain symlinked data roots during uninstall ([#1821](https://github.com/morluto/rea/issues/1821)) ([7e2f79a](https://github.com/morluto/rea/commit/7e2f79ab45a23ab844f89fb93c9cdf202230c73f))
|
||||
* **setup:** verify independently selected skill destinations ([bb50813](https://github.com/morluto/rea/commit/bb508134efbba392a404b651d6ec05be8b7eac1e))
|
||||
* **snapshot:** bind replayed subjects to the selected target path ([c002b89](https://github.com/morluto/rea/commit/c002b89e2d8130a3c07e25e5fd604876be18c703))
|
||||
* **sourcemap:** retain named originals beside unknown source names ([83a4445](https://github.com/morluto/rea/commit/83a4445f440fab978ad9376b4260acae3f5fb189))
|
||||
* **sourcemaps:** preserve nullable source declarations ([ee50ed1](https://github.com/morluto/rea/commit/ee50ed121e38cc6e1a2ff0dc8b789f15f71c5402))
|
||||
* **target:** recognize binary plists by magic under any extension ([#2133](https://github.com/morluto/rea/issues/2133)) ([672bdea](https://github.com/morluto/rea/commit/672bdea21fd943688e081d209a993e234c45507f)), closes [#2129](https://github.com/morluto/rea/issues/2129)
|
||||
* **targets:** project invalid raw-binary loads as caller input ([#2004](https://github.com/morluto/rea/issues/2004)) ([edf4624](https://github.com/morluto/rea/commit/edf46248f2a44b4e5776518489fee09d0fc4516b))
|
||||
* **targets:** recognize Windows headers after short DOS stubs ([c9fed50](https://github.com/morluto/rea/commit/c9fed50691ae014890e91a72534773d2fb58ce44))
|
||||
* **targets:** remove path advice for format refusals ([f28f338](https://github.com/morluto/rea/commit/f28f3382836f8dd8629c25b1bf5455d29b28d41d)), closes [#1979](https://github.com/morluto/rea/issues/1979) [#1852](https://github.com/morluto/rea/issues/1852)
|
||||
* **test:** audit static Wasm and Harmony tool wording ([#1917](https://github.com/morluto/rea/issues/1917)) ([dfe3117](https://github.com/morluto/rea/commit/dfe31172ca0a090be3f40bc134f54d69c08e31d8))
|
||||
* **test:** wait for Hopper reconnect listener readiness ([#1885](https://github.com/morluto/rea/issues/1885)) ([d3e83b0](https://github.com/morluto/rea/commit/d3e83b089943e2941dace3546a068a59bd0a335e))
|
||||
* **uninstall:** label YAML configuration syntax failures correctly ([94153f1](https://github.com/morluto/rea/commit/94153f1c757e07a6d092e00903aa8b125d4a0afa))
|
||||
* **update:** resolve Bun global directories before changing cwd ([e90acae](https://github.com/morluto/rea/commit/e90acaea674f5f7f9f17ea472104afdc1422ada6))
|
||||
* **update:** share parsed client activation with maintenance ([b045df1](https://github.com/morluto/rea/commit/b045df100e1489e08a36d6ff04cea7feecf1332c))
|
||||
* **wasm:** accept unpadded WABT section rows ([#1963](https://github.com/morluto/rea/issues/1963)) ([9eee709](https://github.com/morluto/rea/commit/9eee709f0cc4064808579c225814898a475ca388))
|
||||
* **wasm:** inspect modules whose custom section names contain NUL ([#1981](https://github.com/morluto/rea/issues/1981)) ([1febc22](https://github.com/morluto/rea/commit/1febc22907f1cc8035dd1450616233121bd7f19d))
|
||||
* **wasm:** preserve debug module names in WABT output ([#1967](https://github.com/morluto/rea/issues/1967)) ([b777e5d](https://github.com/morluto/rea/commit/b777e5d4d8a7b60edad7d5c0eaa56408a4b3f610))
|
||||
* **wasm:** preserve leading BOM in custom section names ([#2102](https://github.com/morluto/rea/issues/2102)) ([abc8c6d](https://github.com/morluto/rea/commit/abc8c6dadf4f11b67de1cc2ee96bb55047416d71))
|
||||
* **wasm:** stop appending WABT remediation to unrelated runtime-root failures ([#2084](https://github.com/morluto/rea/issues/2084)) ([ea2f94d](https://github.com/morluto/rea/commit/ea2f94d4de2241306158fecdd75f96cd34566694))
|
||||
* **web:** reject NUL bytes in web tool local path inputs ([499ac18](https://github.com/morluto/rea/commit/499ac180115de7c9de3f1adc55159ffa6e9bb40e))
|
||||
* **website:** clarify translated terminology and RTL flows ([a956275](https://github.com/morluto/rea/commit/a956275d8d0249c16dad282a3fb5d7da48fb2d6f))
|
||||
* **website:** incorporate multilingual contributor refinements ([d981a58](https://github.com/morluto/rea/commit/d981a58d7f5344c3ab2117b6384aece4d1c35480))
|
||||
* **website:** prioritize getting started across language editions ([8cbd57c](https://github.com/morluto/rea/commit/8cbd57cafaf1cfacbe832bae593589cf211442ef))
|
||||
* **windows:** bring the real Windows Ghidra verifiers up to date ([#1863](https://github.com/morluto/rea/issues/1863)) ([ea40f71](https://github.com/morluto/rea/commit/ea40f717b26392000f989a8b500f6774b5e85091))
|
||||
* **windows:** preserve caller affinity only within one processor group ([#2202](https://github.com/morluto/rea/issues/2202)) ([ab62ee9](https://github.com/morluto/rea/commit/ab62ee9dcf98e4717d0b3445330f7cfdfe50c9f4))
|
||||
* **windows:** preserve transient runtime admission failures ([#2467](https://github.com/morluto/rea/issues/2467)) ([1724077](https://github.com/morluto/rea/commit/172407787f1842dedbcd27b5385177595f786ce4))
|
||||
* **windows:** retain failed native inspection ownership ([#1826](https://github.com/morluto/rea/issues/1826)) ([0b4ce83](https://github.com/morluto/rea/commit/0b4ce83618bb800627264ae6221e2e35140417b5))
|
||||
* **workflows:** retain staged output ownership and cancellation semantics ([7285e15](https://github.com/morluto/rea/commit/7285e15839a4fecf9940683699b781a60ccc4775)), closes [#1968](https://github.com/morluto/rea/issues/1968)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **browser:** parse captured module URLs once per lookup ([#1829](https://github.com/morluto/rea/issues/1829)) ([ca11162](https://github.com/morluto/rea/commit/ca11162d027a0d3e3b5a65a54825b00d5689fb80))
|
||||
* **ci:** share bytecode across fresh Apple artifact subprocesses ([ba7df3f](https://github.com/morluto/rea/commit/ba7df3f0f7ee63e6350d5fbdddc8ed945a6b141d))
|
||||
* **cli:** bundle runtime entries to reduce Windows startup I/O ([#1996](https://github.com/morluto/rea/issues/1996)) ([d93fbda](https://github.com/morluto/rea/commit/d93fbda390c6b8b2741c552bd194b50c3e08e0c1))
|
||||
* **cli:** defer command-specific analysis implementations ([a4dd4e8](https://github.com/morluto/rea/commit/a4dd4e8e8700ce350e1a0c612ebd61b91ca5e585))
|
||||
* **cli:** defer command-specific modules until dispatch ([a82d14e](https://github.com/morluto/rea/commit/a82d14e4db4dca989ffa2e7dbe78fd43551da256))
|
||||
* **domain:** avoid duplicate readiness bundle validation ([29ff887](https://github.com/morluto/rea/commit/29ff887f6558cf00c0d6392889b890ed8a702a6f))
|
||||
* **evidence:** authenticate and seal imported bundles in one pass ([b123b2e](https://github.com/morluto/rea/commit/b123b2e51cc7d6d2157525664be2df88fb1ba3bd))
|
||||
* **evidence:** fuse streamed JSON token handling ([#1694](https://github.com/morluto/rea/issues/1694)) ([13e03e9](https://github.com/morluto/rea/commit/13e03e94363a007353fcb5dfedec764de12fc927))
|
||||
* **evidence:** reuse authenticated comparisons through aggregation ([26bffb9](https://github.com/morluto/rea/commit/26bffb94bf80355c35e22a98a8fc629c6210307e))
|
||||
* **evidence:** reuse authenticated file snapshots during session import ([#1721](https://github.com/morluto/rea/issues/1721)) ([966dc3a](https://github.com/morluto/rea/commit/966dc3acde2880a0f94b2658e2a02180d505cafa))
|
||||
* **evidence:** reuse authenticated unknown mutation snapshots ([042dcaa](https://github.com/morluto/rea/commit/042dcaa1ee66f1b8668f08b193f38ab01bceaacb))
|
||||
* **flutter:** add opt-in retained AOT summary and string pages ([23de4f7](https://github.com/morluto/rea/commit/23de4f77c74dd299d45cab880c36321d802b21fe))
|
||||
* **frida:** evict captured messages without copying the whole queue ([#2628](https://github.com/morluto/rea/issues/2628)) ([6a05248](https://github.com/morluto/rea/commit/6a05248d464387c0ce4ec1577b4c1b24d3d355c7))
|
||||
* **ghidra:** compile bundle activator with bridge scripts ([#1931](https://github.com/morluto/rea/issues/1931)) ([0f4992f](https://github.com/morluto/rea/commit/0f4992fb9e5bfe1fafe75c35b7f20ad411595573))
|
||||
* **javascript:** index source-map ignore lists per leaf ([#1905](https://github.com/morluto/rea/issues/1905)) ([898d509](https://github.com/morluto/rea/commit/898d5096f94fe1ed3ea7d091455e638cc7d23bfd))
|
||||
* **javascript:** reuse collected callable identities for returns ([d3088c3](https://github.com/morluto/rea/commit/d3088c3795f6c37cb3b6aec0bb0c371dd0640ee8))
|
||||
* **javascript:** skip nested callables during fingerprint traversal ([#1871](https://github.com/morluto/rea/issues/1871)) ([097f0d5](https://github.com/morluto/rea/commit/097f0d54afceb3ce61dbaa24dd6736658d1fce06))
|
||||
* **javascript:** skip the repeated-prefix scan on first capture visits ([#1789](https://github.com/morluto/rea/issues/1789)) ([41544fb](https://github.com/morluto/rea/commit/41544fb952aef84fcf6ff5d9a5284cf2b2985053))
|
||||
* **mcp:** bundle internal modules to reduce Windows startup I/O ([76e4153](https://github.com/morluto/rea/commit/76e4153d346b14ef194222bbeef240cf8a16dc99))
|
||||
* **mcp:** compact repeated session discovery facts ([#1988](https://github.com/morluto/rea/issues/1988)) ([6395e8d](https://github.com/morluto/rea/commit/6395e8d3007d5ee453477460e7ee1c51cff76be0))
|
||||
* **mcp:** keep Playwright and type-only imports off MCP startup ([#1691](https://github.com/morluto/rea/issues/1691)) ([0ecf3f2](https://github.com/morluto/rea/commit/0ecf3f2438ec96a6b543942869808018e8d84452))
|
||||
* **mcp:** reduce Windows startup module resolution ([#1814](https://github.com/morluto/rea/issues/1814)) ([76e4153](https://github.com/morluto/rea/commit/76e4153d346b14ef194222bbeef240cf8a16dc99))
|
||||
* **native:** add opt-in Mach-O summary delivery and retained pages ([#2634](https://github.com/morluto/rea/issues/2634)) ([bf34d0d](https://github.com/morluto/rea/commit/bf34d0d2fc3cc22076f49d682e74a0b71aa1db18))
|
||||
* **native:** run independent Mach-O slice commands concurrently ([#2466](https://github.com/morluto/rea/issues/2466)) ([2c7240c](https://github.com/morluto/rea/commit/2c7240cf9d8231e16ad01de7678af9dbd01bab46))
|
||||
* **snapshot:** restore large legacy caches within live memory bounds ([092de8f](https://github.com/morluto/rea/commit/092de8f4b336b537579bd48d7d30135b7114371d))
|
||||
* **test:** batch compatible client profile lifecycles ([0153b4d](https://github.com/morluto/rea/commit/0153b4d95bdf38eddee91d5ce08181030fb955b4))
|
||||
* **test:** reuse CLI boundary worker module graphs ([f178bf1](https://github.com/morluto/rea/commit/f178bf1c00139e1b7fe2d14fcfe1f558fe08fbe2))
|
||||
* **test:** reuse the CI scope Git baseline ([ef5f9aa](https://github.com/morluto/rea/commit/ef5f9aa2d7769b32d9f88211812ae11456a88267))
|
||||
* **tests:** consolidate TypeScript dialect producer checks ([01762b1](https://github.com/morluto/rea/commit/01762b10c6a40370996e6dfa3a96ffcb27148f97))
|
||||
* **test:** share stdio analysis for comparison fixtures ([43dafb5](https://github.com/morluto/rea/commit/43dafb5abe60ee21be4f6a6b6de482cd7a5bab0a))
|
||||
* **tests:** remove timed output and synchronize browser fixtures ([693ed33](https://github.com/morluto/rea/commit/693ed332b58d05192f55b8192d2c0c4bc4f4824a))
|
||||
* **tests:** reuse stateless workflows and immutable fixtures ([5f4c7ff](https://github.com/morluto/rea/commit/5f4c7ff6df0735d5a4461b5d0e6f2e466b888be0))
|
||||
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* **evm:** bind offline analysis through a static descriptor ([ad08510](https://github.com/morluto/rea/commit/ad08510a113d7a9b8d92fb1e385757880e469869))
|
||||
* **javascript:** reuse validated source-map decoding ([f64790b](https://github.com/morluto/rea/commit/f64790bfc32db330b2be5bdff61af555a9d26067))
|
||||
* **mcp:** trust validated inputs and tighten contract fixtures ([2646150](https://github.com/morluto/rea/commit/264615059ce6c89badcc7288e8c67bb8dd1ce0dd))
|
||||
* prune obsolete provider and verification code ([e198793](https://github.com/morluto/rea/commit/e19879328a11fe38b49b6b133a8ebde908ea980e))
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
* add responsible-use disclaimer ([4a5aec8](https://github.com/morluto/rea/commit/4a5aec8ad6d54444b2a2c2313fbc506b17ff91aa))
|
||||
* **agents:** require brittleness review before resolving threads ([0365454](https://github.com/morluto/rea/commit/0365454a573eb52c7089320fd74bfd4a673b78ae))
|
||||
* **agents:** require related brittleness cleanup in bug fixes ([0d8b728](https://github.com/morluto/rea/commit/0d8b728d2470a9b51239d61986944bacaf9a8708))
|
||||
* celebrate 110,000 GitHub stars <‰ ([#2042](https://github.com/morluto/rea/issues/2042)) ([0d78c99](https://github.com/morluto/rea/commit/0d78c99c11efee66570772efe6eb88dfd0e1c694))
|
||||
* celebrate 170,000 GitHub stars <‰ ([#2462](https://github.com/morluto/rea/issues/2462)) ([9188698](https://github.com/morluto/rea/commit/91886982fccc50a9f7f31d4f320b25ffbcff35af))
|
||||
* celebrate 80,000 GitHub stars <‰ ([#1752](https://github.com/morluto/rea/issues/1752)) ([6ff4d4a](https://github.com/morluto/rea/commit/6ff4d4a0500e5f9fb7601e1c5ae5dbbd85796d91))
|
||||
* celebrate 90,000 GitHub stars <‰ ([#1858](https://github.com/morluto/rea/issues/1858)) ([5876779](https://github.com/morluto/rea/commit/5876779013726964deef748120c48f5fa0155546))
|
||||
* clarify ownership and interpretation boundaries ([64b71b1](https://github.com/morluto/rea/commit/64b71b180a88a2df1b0b61e803c1c322ee59c5e1))
|
||||
* clarify responsible use and preserve third-party notices ([#2082](https://github.com/morluto/rea/issues/2082)) ([974f11d](https://github.com/morluto/rea/commit/974f11d010570c0a18423cd1cc93e9a5203df1b6))
|
||||
* **cli:** add a managed assembly inspection workflow ([#2037](https://github.com/morluto/rea/issues/2037)) ([538f8cc](https://github.com/morluto/rea/commit/538f8cc7224dba44b728cf6c000920f911957fc4))
|
||||
* correct drift and reorganize English guides ([#2207](https://github.com/morluto/rea/issues/2207)) ([7ae3c50](https://github.com/morluto/rea/commit/7ae3c50a9d49c480035855de9fcc4484befacd92))
|
||||
* define contribution scope and simplify proposal forms ([ac6ef95](https://github.com/morluto/rea/commit/ac6ef95e12335bdc054ccaaa96c32474cf8789ea))
|
||||
* define performance priorities for analysis workflows ([#2245](https://github.com/morluto/rea/issues/2245)) ([8e00452](https://github.com/morluto/rea/commit/8e004522f232ec698c77536235853088a851e6b5))
|
||||
* **ghidra:** verified macOS arm64 native decompiler build recipe ([#2112](https://github.com/morluto/rea/issues/2112)) ([5f79c85](https://github.com/morluto/rea/commit/5f79c852af8e53a56f58266a9dcf84314c197164))
|
||||
* **ghidra:** verify and document the macOS arm64 native decompiler build ([5f79c85](https://github.com/morluto/rea/commit/5f79c852af8e53a56f58266a9dcf84314c197164))
|
||||
* **i18n:** celebrate 80,000 GitHub stars in translated READMEs ([#1758](https://github.com/morluto/rea/issues/1758)) ([953a0ce](https://github.com/morluto/rea/commit/953a0ce5bd3a8b44051eb9c16d8c9a20cad29e7c))
|
||||
* **install:** explain Claude Code upfront tool loading on third-party endpoints ([#2029](https://github.com/morluto/rea/issues/2029)) ([d024928](https://github.com/morluto/rea/commit/d0249282c64882329a6acab8f3b477552da53499)), closes [#2019](https://github.com/morluto/rea/issues/2019)
|
||||
* preserve the native guide title anchor ([#2224](https://github.com/morluto/rea/issues/2224)) ([ae41265](https://github.com/morluto/rea/commit/ae412654d5947f3841c191e92f3ad6b73d6f894b))
|
||||
* **readiness:** align required stage identifier and checks with evaluator ([#2200](https://github.com/morluto/rea/issues/2200)) ([85c5477](https://github.com/morluto/rea/commit/85c5477930d504cfd8b72334b48255d8e746a85e))
|
||||
* **readme:** remove CI badges from translations ([3298219](https://github.com/morluto/rea/commit/3298219d8cd905897ec9a96bf639602a273d4a9b))
|
||||
* **readme:** remove CI status badge ([b07e54a](https://github.com/morluto/rea/commit/b07e54a10e66319d90815313fae93350257e1655))
|
||||
* **setup:** confirm published 6.4.0 client support ([57c5aca](https://github.com/morluto/rea/commit/57c5acac2e13fd7f0e3832bc147c7ceda8c314f2))
|
||||
* shorten responsible-use notices across languages ([fa87dd2](https://github.com/morluto/rea/commit/fa87dd2aac3eaeb49875c54e93ec18c98cc92e4d))
|
||||
* sync French, Indonesian and Italian READMEs with English ([#1861](https://github.com/morluto/rea/issues/1861)) ([96547d3](https://github.com/morluto/rea/commit/96547d373fcdc672058b29774d6c634f4e9cc1bd))
|
||||
* **website:** highlight the setup guide on the homepage ([#1714](https://github.com/morluto/rea/issues/1714)) ([8be7ad4](https://github.com/morluto/rea/commit/8be7ad496c9a52a9986c4d3f6596de279b52df7e))
|
||||
|
||||
|
||||
### Tests
|
||||
|
||||
* **analysis:** verify real preset snapshot and cleanup boundaries ([#2349](https://github.com/morluto/rea/issues/2349)) ([1dd20ce](https://github.com/morluto/rea/commit/1dd20ce1ff4ab66c74350929577e753aa17a9006)), closes [#2016](https://github.com/morluto/rea/issues/2016)
|
||||
* **android:** verify duplicate class inventory behavior on empty discovery queries ([#1984](https://github.com/morluto/rea/issues/1984)) ([6611bcf](https://github.com/morluto/rea/commit/6611bcf6e86630c775c24e6afa00d7239c64e70e))
|
||||
* **apple:** consolidate keyed archive integer verification ([#1933](https://github.com/morluto/rea/issues/1933)) ([3b490a7](https://github.com/morluto/rea/commit/3b490a743fd56a8a27b1356f7b2d1284db8848ef))
|
||||
* **apple:** skip ibtool-compiled NIB tests when Xcode ibtool is unavailable ([#2070](https://github.com/morluto/rea/issues/2070)) ([7bc57e1](https://github.com/morluto/rea/commit/7bc57e1e64915a26c32f89fb53d0321193a37160))
|
||||
* **architecture:** consolidate import boundary verification ([2976fac](https://github.com/morluto/rea/commit/2976fac30d4088c1f1ba383261eb3eff5e95bce6))
|
||||
* bound CLI validation subprocess concurrency ([ff57b75](https://github.com/morluto/rea/commit/ff57b75e226028767b86aa3d4271c2c2f56342db))
|
||||
* **ci:** stabilize JADX recovery and ignore generated reports ([#1668](https://github.com/morluto/rea/issues/1668)) ([0a6b46d](https://github.com/morluto/rea/commit/0a6b46d5b0299f76c0d268f7b70395f9b6fbd68e))
|
||||
* classify filesystem and process workflows by boundary ([c2b56e3](https://github.com/morluto/rea/commit/c2b56e3e1c9619beab15de8e1f200422473caf30))
|
||||
* classify filesystem application workflows as boundaries ([804c287](https://github.com/morluto/rea/commit/804c287e441dcaa3876429f026ac89f6482f9699))
|
||||
* **cli:** align reference import failure envelopes ([8224aeb](https://github.com/morluto/rea/commit/8224aeba9dd41f29ea6f8ef7ad7efa3f45fd4a6e))
|
||||
* **cli:** cache subprocess compilation within each worker ([6bcfeb0](https://github.com/morluto/rea/commit/6bcfeb0e55a6fcc3ed586e5744f2aa1c270cac31))
|
||||
* **cli:** consolidate development runner workflow coverage ([16f5ded](https://github.com/morluto/rea/commit/16f5ded4468d7100d3640f874f33ddbaa953a787))
|
||||
* **cli:** consolidate schema coverage and assert input refusals ([beb80a0](https://github.com/morluto/rea/commit/beb80a07bafc0847600eb635e0323068a386c811))
|
||||
* **clients:** verify native Claude Code integration on Windows ([#1926](https://github.com/morluto/rea/issues/1926)) ([c32d846](https://github.com/morluto/rea/commit/c32d84622fb3952823c6cfc25c557aec08c1788c)), closes [#1923](https://github.com/morluto/rea/issues/1923)
|
||||
* **clients:** verify native Gemini CLI integration on Windows ([#1936](https://github.com/morluto/rea/issues/1936)) ([04089d5](https://github.com/morluto/rea/commit/04089d5bec11d6e0411e7c35d0168bbae63d7e7d))
|
||||
* **cli:** preserve Windows runtime paths and failure diagnostics ([79156e5](https://github.com/morluto/rea/commit/79156e5bed1d72b83ade0483246f457b337b7e59))
|
||||
* **docs:** type README drift scenarios as fixed pairs ([6e38529](https://github.com/morluto/rea/commit/6e38529333a7a0704690a087c7cb054fb7385d25))
|
||||
* **evidence:** cover workflow question whitespace normalization ([#1739](https://github.com/morluto/rea/issues/1739)) ([b2da21a](https://github.com/morluto/rea/commit/b2da21abe11ac43a4cc24b233bd52ce10995e4a1))
|
||||
* **evm:** verify real worker cancellation and cleanup recovery ([#2404](https://github.com/morluto/rea/issues/2404)) ([ae80513](https://github.com/morluto/rea/commit/ae8051302b5834322fa00cfa31c968ae74ab6ed9))
|
||||
* **evm:** verify static descriptor bindings before use ([#2427](https://github.com/morluto/rea/issues/2427)) ([4f4f6cd](https://github.com/morluto/rea/commit/4f4f6cd7b5d7a400b90772a138d7b9f942c2a556))
|
||||
* **ghidra:** require pending multi-HI16 coverage in the real MIPS relocatable lane ([#1974](https://github.com/morluto/rea/issues/1974)) ([eaf88ac](https://github.com/morluto/rea/commit/eaf88aca2af2b8ad7a277c09d0b45f6e2de8ac4a))
|
||||
* **ghidra:** restore complete installation fixtures across CI boundaries ([18d56f5](https://github.com/morluto/rea/commit/18d56f5321c3c5d5be40c19bcb0a0f2b25c2d459))
|
||||
* **hopper:** align startup fixtures with cleanup and lease contracts ([b3dec00](https://github.com/morluto/rea/commit/b3dec005bcb89b5afe6e0aa41e5251f8a3a31de7))
|
||||
* **hopper:** repair Linux demo setup and native verification ([#2638](https://github.com/morluto/rea/issues/2638)) ([141d209](https://github.com/morluto/rea/commit/141d2095f5c6faaf2d3c9b81b0f0f992cacec79c))
|
||||
* **ida:** expect direction in combined call coverage ([4dd44dd](https://github.com/morluto/rea/commit/4dd44ddf16c810c4bcaa16e0bdb3b09bfcb4e33a))
|
||||
* **javascript:** classify artifact workflows as boundary tests ([dc303a8](https://github.com/morluto/rea/commit/dc303a8ee8a2ceaae37e4da4ac4ed64035793d59))
|
||||
* **javascript:** consolidate module lookup regressions ([#2031](https://github.com/morluto/rea/issues/2031)) ([783fcb0](https://github.com/morluto/rea/commit/783fcb06a4bd0444be214822fed60a3786932782))
|
||||
* **javascript:** verify CommonJS file URL boundaries via CLI and MCP ([#2061](https://github.com/morluto/rea/issues/2061)) ([6ce5903](https://github.com/morluto/rea/commit/6ce5903e7a37252156ec847c4c8874410a4d8f3f))
|
||||
* **managed:** use the current attribute fixture contract ([6407718](https://github.com/morluto/rea/commit/6407718f3020a34cc087163492e3f9a465e2e841))
|
||||
* **mcp:** align completion checks with provider readiness ([fe4b94a](https://github.com/morluto/rea/commit/fe4b94a661054cef7603a3f07aae71f1df0a701a))
|
||||
* **mcp:** fix three MCP boundary suites on native Windows ([#2312](https://github.com/morluto/rea/issues/2312)) ([a97b713](https://github.com/morluto/rea/commit/a97b713f740932339a5f1036ad2213168c421270))
|
||||
* **mcp:** preserve coverage in unchanged function fixtures ([3ee6ff4](https://github.com/morluto/rea/commit/3ee6ff43c1696a5a5269bd4aa5de72f7e5f40627))
|
||||
* **mcp:** ready providers before live prompt completion checks ([#2137](https://github.com/morluto/rea/issues/2137)) ([621cee1](https://github.com/morluto/rea/commit/621cee192d582c87ca3d254d4cb22c9d209d3aea)), closes [#2123](https://github.com/morluto/rea/issues/2123)
|
||||
* **mcp:** reuse advertised schema in inventory check ([#2469](https://github.com/morluto/rea/issues/2469)) ([a6efa4f](https://github.com/morluto/rea/commit/a6efa4fcefeffcf5ff5310b8154988b4be30c349))
|
||||
* **native:** replay complete dylib-use provider output ([89f5e48](https://github.com/morluto/rea/commit/89f5e489adac69af2937fabc1a5ba283191d630a)), closes [#1970](https://github.com/morluto/rea/issues/1970)
|
||||
* **native:** skip the DMG EACCES diagnostic as root ([#1584](https://github.com/morluto/rea/issues/1584)) ([262efe6](https://github.com/morluto/rea/commit/262efe6c54d8f179e9f9515d96025871ae45806a))
|
||||
* **native:** skip the EACCES directory diagnostic as root ([#1394](https://github.com/morluto/rea/issues/1394)) ([40d9c7b](https://github.com/morluto/rea/commit/40d9c7b836a3aca5d589c0a65c7d02b3ea5cd36b))
|
||||
* **native:** skip the inaccessible-directory diagnostic as root ([#1900](https://github.com/morluto/rea/issues/1900)) ([d0edeec](https://github.com/morluto/rea/commit/d0edeec1009f1149956ee2a95dc5941aff8f78b5))
|
||||
* **native:** verify real PE and DOS entry views ([1770f38](https://github.com/morluto/rea/commit/1770f38cfc6cbe87491d0de8b8730c305c5cf8ea))
|
||||
* **pcap:** run the missing-path refusal only where captures are admitted ([#2510](https://github.com/morluto/rea/issues/2510)) ([1991542](https://github.com/morluto/rea/commit/1991542e59f64d46269b3ff942be77a5ff06e88f))
|
||||
* **perf:** distinguish Codex tool context and token accounting ([#2416](https://github.com/morluto/rea/issues/2416)) ([ee87111](https://github.com/morluto/rea/commit/ee87111009ace2ca4ef82c9aef09c82a37ca55f7))
|
||||
* **perf:** observe owned counters at payload completion ([ca2d15b](https://github.com/morluto/rea/commit/ca2d15b3ee965bd7ab27204cdf4b96b117d148c1))
|
||||
* **perf:** verify existing SQLite column selection on QGIS data ([#2489](https://github.com/morluto/rea/issues/2489)) ([45984a4](https://github.com/morluto/rea/commit/45984a4319c8b6dcf2b03e969fbd4330c8432394))
|
||||
* **reference:** scope cleanup faults to the owned source file ([#2430](https://github.com/morluto/rea/issues/2430)) ([eeba618](https://github.com/morluto/rea/commit/eeba61826c1cd1c7be70f011fda0537baadd4179))
|
||||
* reuse application analysis across comparison directions ([044c0a9](https://github.com/morluto/rea/commit/044c0a92d5c86faa9965669680935d4f552977b1))
|
||||
* reuse identical JavaScript analysis fixtures ([42951bb](https://github.com/morluto/rea/commit/42951bbbbe8d98ebde1783450d130fdddb5ba889))
|
||||
* reuse validators for identical MCP schemas ([85ccef3](https://github.com/morluto/rea/commit/85ccef34de1cddcf71037ccea93acdf709f94965))
|
||||
* share native keyed archive integer fixture generation ([847a1a3](https://github.com/morluto/rea/commit/847a1a3f25f69e1b3808fb0a53e5f1415a7ed058))
|
||||
* **sourcemap:** consolidate source map regressions ([#2034](https://github.com/morluto/rea/issues/2034)) ([83a4445](https://github.com/morluto/rea/commit/83a4445f440fab978ad9376b4260acae3f5fb189))
|
||||
* **sourcemaps:** assert semantic evidence and actual output admission ([bd74c7a](https://github.com/morluto/rea/commit/bd74c7af2bec952c2eea7a17feedd05e6675b719))
|
||||
* strengthen archive and resource cleanup assertions ([5ba1642](https://github.com/morluto/rea/commit/5ba1642a7d891a60493b2195e55149b0f3197fb4))
|
||||
* strengthen public input and module lookup controls ([b7f563e](https://github.com/morluto/rea/commit/b7f563e15f854061dc1507896181b7b24ac3b5f0))
|
||||
* **web:** remove duplicate path schema cases ([b5b7301](https://github.com/morluto/rea/commit/b5b73019f946e5edc0df506c9f8f4bb28afa6590))
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* balance test shards and reuse package download caches ([40b37ae](https://github.com/morluto/rea/commit/40b37aeee10e89d85ee8b7747cbdcd3ad1a34db4))
|
||||
* keep validation fresh and preserve failed-shard reports ([#2210](https://github.com/morluto/rea/issues/2210)) ([428eee0](https://github.com/morluto/rea/commit/428eee00fdd0406cdf2b734c9ea14a2bb02da279))
|
||||
* narrow native-host lane selection and reuse build caches ([#2131](https://github.com/morluto/rea/issues/2131)) ([4f46eac](https://github.com/morluto/rea/commit/4f46eac453965efde3bc782aebfeec198551afc4))
|
||||
* parallelize native verification and share test artifacts ([91f6840](https://github.com/morluto/rea/commit/91f6840c35e99e5f23612920d790a30d324ac115))
|
||||
* reduce macOS runner contention ([3f4ea32](https://github.com/morluto/rea/commit/3f4ea3218929baba0c30c2cb7eb7e7a829a1fc21))
|
||||
* reuse portable build cache in native package jobs ([8fa1175](https://github.com/morluto/rea/commit/8fa11751eaab94eaa5b8de8c1ecd143ef0066cd6))
|
||||
* reuse portable Turbo outputs across verification runs ([a00c34d](https://github.com/morluto/rea/commit/a00c34dcb155e5993bda8ad0f51bf3b13e289760))
|
||||
* summarize static checks and retain complete reports ([#2242](https://github.com/morluto/rea/issues/2242)) ([d96550f](https://github.com/morluto/rea/commit/d96550f2f61647ffa150597de73363fa90c4e169))
|
||||
|
||||
---
|
||||
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
|
||||
@@ -199,9 +199,11 @@ export class JadxMcpTransport implements Transport {
|
||||
throw new Error(`JADX MCP frame exceeds ${MAX_FRAME_BYTES} bytes`);
|
||||
this.#appendFrame(fragment, frameBytes);
|
||||
if (newline === -1) return;
|
||||
const line = this.#frameBuffer
|
||||
.subarray(0, this.#frameLength)
|
||||
.toString("utf8");
|
||||
const line = new TextDecoder("utf-8", {
|
||||
fatal: true,
|
||||
// Preserve a leading BOM so the JSON-RPC parser can reject it.
|
||||
ignoreBOM: true,
|
||||
}).decode(this.#frameBuffer.subarray(0, this.#frameLength));
|
||||
this.#frameBuffer = Buffer.alloc(0);
|
||||
this.#frameLength = 0;
|
||||
this.onmessage?.(deserializeMessage(line));
|
||||
|
||||
@@ -809,6 +809,42 @@ it("keeps an active script message bucket after its last message is evicted", as
|
||||
await manager.closeAll();
|
||||
});
|
||||
|
||||
it("retains the newest contiguous messages across repeated budget evictions", async () => {
|
||||
const { bindings, manager, started } = await startLocalAttachedSession();
|
||||
expect(started.ok).toBe(true);
|
||||
if (!started.ok) return;
|
||||
bindings.device.session.nextPayload = { index: -1 };
|
||||
const loaded = await manager.loadScript(started.value.sessionId, {
|
||||
sourceKind: "inline",
|
||||
source: "send({index: -1});",
|
||||
});
|
||||
expect(loaded.ok).toBe(true);
|
||||
const script = bindings.device.session.scripts[0];
|
||||
expect(script).toBeDefined();
|
||||
if (script === undefined) return;
|
||||
|
||||
// About 500 of these fit the 16 MiB budget, so 2,000 sends evict and
|
||||
// compact the queue several times.
|
||||
const filler = "x".repeat(32_000);
|
||||
for (let index = 0; index < 2_000; index += 1)
|
||||
script.message.emit({ type: "send", payload: { index, filler } }, null);
|
||||
|
||||
const status = manager.status(started.value.sessionId);
|
||||
expect(status?.messagesTruncated).toBe(true);
|
||||
const indexes = (status?.messages ?? []).map(
|
||||
(message) => (message as { payload: { index: number } }).payload.index,
|
||||
);
|
||||
expect(indexes.length).toBeGreaterThan(400);
|
||||
expect(indexes.at(-1)).toBe(1_999);
|
||||
expect(indexes).toEqual(
|
||||
Array.from(
|
||||
{ length: indexes.length },
|
||||
(_, offset) => 2_000 - indexes.length + offset,
|
||||
),
|
||||
);
|
||||
await manager.closeAll();
|
||||
});
|
||||
|
||||
it("serializes a final remote release against a new same-endpoint session", async () => {
|
||||
const bindings = new FakeDeviceManager();
|
||||
let enteredRemoval: (() => void) | undefined;
|
||||
|
||||
@@ -81,7 +81,9 @@ export class MachOSliceArtifactReader implements ArtifactReader {
|
||||
if (!captured.ok)
|
||||
throw new ArtifactReaderFailure(
|
||||
captured.error.reason === "cancelled" ? "cancelled" : "unavailable",
|
||||
"lipo could not enumerate universal Mach-O slices",
|
||||
captured.error.detail === null
|
||||
? "lipo could not enumerate universal Mach-O slices"
|
||||
: `lipo could not enumerate universal Mach-O slices: ${captured.error.detail}`,
|
||||
{
|
||||
cause: captured.error,
|
||||
...(captured.error.cleanupFailure === null &&
|
||||
|
||||
@@ -280,9 +280,11 @@ export class SafeOutputTree {
|
||||
}
|
||||
|
||||
/** Sync the owned output tree and prevent further writes through this instance. */
|
||||
async commit(): Promise<void> {
|
||||
async commit(signal?: AbortSignal): Promise<void> {
|
||||
this.#assertWritable();
|
||||
abortIfNeeded(signal);
|
||||
await this.#assertOwnedDirectories();
|
||||
abortIfNeeded(signal);
|
||||
// Windows has no directory fsync; file contents are already synced in write().
|
||||
if (this.platform === "win32") {
|
||||
this.#published = true;
|
||||
@@ -315,6 +317,7 @@ export class SafeOutputTree {
|
||||
);
|
||||
await output.handle.sync();
|
||||
await parent.handle.sync();
|
||||
abortIfNeeded(signal);
|
||||
this.#published = true;
|
||||
} catch (cause: unknown) {
|
||||
sync = { kind: "failed", cause };
|
||||
@@ -336,23 +339,26 @@ export class SafeOutputTree {
|
||||
closeFailure,
|
||||
this.#outputRoot,
|
||||
);
|
||||
if (sync.kind === "failed")
|
||||
throw ArtifactReaderFailure.withCleanup(
|
||||
new ArtifactReaderFailure(
|
||||
"path",
|
||||
"Could not durably sync extraction output",
|
||||
{ cause: sync.cause },
|
||||
),
|
||||
cleanup,
|
||||
);
|
||||
if (sync.kind === "failed") {
|
||||
const primary = isCancellationFailure(sync.cause)
|
||||
? sync.cause
|
||||
: new ArtifactReaderFailure(
|
||||
"path",
|
||||
"Could not durably sync extraction output",
|
||||
{ cause: sync.cause },
|
||||
);
|
||||
throw ArtifactReaderFailure.withCleanup(primary, cleanup);
|
||||
}
|
||||
throw ArtifactReaderFailure.withCleanup(closeFailure, cleanup);
|
||||
}
|
||||
if (sync.kind === "failed")
|
||||
if (sync.kind === "failed") {
|
||||
if (isCancellationFailure(sync.cause)) throw sync.cause;
|
||||
throw new ArtifactReaderFailure(
|
||||
"path",
|
||||
"Could not durably sync extraction output",
|
||||
{ cause: sync.cause },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** Remove only this operation's unsealed tree and verify absence. */
|
||||
@@ -590,6 +596,11 @@ const abortIfNeeded = (signal?: AbortSignal): void => {
|
||||
);
|
||||
};
|
||||
|
||||
const isCancellationFailure = (
|
||||
cause: unknown,
|
||||
): cause is ArtifactReaderFailure =>
|
||||
cause instanceof ArtifactReaderFailure && cause.reason === "cancelled";
|
||||
|
||||
const isAlreadyExists = (cause: unknown): boolean =>
|
||||
cause instanceof Error && "code" in cause && cause.code === "EEXIST";
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ const materializeSelection = async ({
|
||||
compareUnicodeCodePoints(left.relative_path, right.relative_path),
|
||||
);
|
||||
completed = createExtractionResult(input, inventory, selected, extracted);
|
||||
await output.commit();
|
||||
await output.commit(signal);
|
||||
return completed;
|
||||
} catch (cause: unknown) {
|
||||
const cleanupFailures = await releaseExtractionOwners(
|
||||
|
||||
@@ -91,7 +91,7 @@ export const browserScenarioCaptureData = (input: {
|
||||
network_content: input.scenario.capture.network,
|
||||
event_families: [...new Set(input.scenario.capture.events)].sort(),
|
||||
},
|
||||
duration_ms: Date.now() - input.startedAt,
|
||||
duration_ms: Math.max(0, Math.round(performance.now() - input.startedAt)),
|
||||
steps: [...input.steps],
|
||||
events,
|
||||
limitations: [
|
||||
|
||||
@@ -303,6 +303,7 @@ describe("PlaywrightBrowserScenarioProvider", () => {
|
||||
});
|
||||
expect(result.value.limitations).toContain(session.eventGaps[0]);
|
||||
});
|
||||
|
||||
it("returns an initial state and every step beyond the former action ceiling", async () => {
|
||||
const session = new FakeSession("launch");
|
||||
const provider = new PlaywrightBrowserScenarioProvider(() =>
|
||||
@@ -376,6 +377,35 @@ describe("PlaywrightBrowserScenarioProvider", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("PlaywrightBrowserScenarioProvider timing", () => {
|
||||
it("keeps capture elapsed values valid across a backward wall-clock jump", async () => {
|
||||
let wallClock = 10_000;
|
||||
vi.spyOn(Date, "now").mockImplementation(() => wallClock);
|
||||
const session = new FakeSession("launch");
|
||||
session.onPerform = () => {
|
||||
wallClock = 1;
|
||||
};
|
||||
const provider = new PlaywrightBrowserScenarioProvider(() =>
|
||||
Promise.resolve(session),
|
||||
);
|
||||
|
||||
try {
|
||||
const result = await provider.captureScenario(scenario());
|
||||
if (!result.ok) throw result.error;
|
||||
expect(wallClock).toBe(1);
|
||||
expect(Number.isInteger(result.value.duration_ms)).toBe(true);
|
||||
expect(result.value.duration_ms).toBeGreaterThanOrEqual(0);
|
||||
expect(
|
||||
result.value.steps.every(
|
||||
({ elapsed_ms }) => Number.isInteger(elapsed_ms) && elapsed_ms >= 0,
|
||||
),
|
||||
).toBe(true);
|
||||
} finally {
|
||||
vi.restoreAllMocks();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("PlaywrightBrowserScenarioProvider comparison coverage", () => {
|
||||
it("keeps quiet captures with different event families from comparing unchanged", async () => {
|
||||
const capture = async (events: readonly BrowserScenarioEventFamily[]) => {
|
||||
|
||||
@@ -172,7 +172,7 @@ const executeStep = async (input: {
|
||||
),
|
||||
});
|
||||
|
||||
const actionStartedAt = Date.now();
|
||||
const actionStartedAt = performance.now();
|
||||
session.setStep(stepIndex);
|
||||
const requestCancelled = (): boolean => signal?.aborted === true;
|
||||
let outcome: BrowserScenarioStepOutcome = {
|
||||
@@ -200,7 +200,7 @@ const executeStep = async (input: {
|
||||
stepId: action.step_id,
|
||||
action: action.action,
|
||||
...outcome,
|
||||
elapsedMs: Date.now() - actionStartedAt,
|
||||
elapsedMs: Math.max(0, Math.round(performance.now() - actionStartedAt)),
|
||||
beforeUrl,
|
||||
afterUrl: session.sanitizeUrl(session.currentUrl()),
|
||||
eventStart,
|
||||
@@ -233,7 +233,7 @@ const runScenario = async (
|
||||
): Promise<BrowserScenarioCapture> => {
|
||||
if (options.signal?.aborted === true)
|
||||
throw new BrowserObservationError(OPERATION, "cancelled");
|
||||
const startedAt = Date.now();
|
||||
const startedAt = performance.now();
|
||||
const session = await openSession(scenario, {
|
||||
...(options.signal === undefined ? {} : { signal: options.signal }),
|
||||
retainCleanup,
|
||||
@@ -250,7 +250,7 @@ const runScenario = async (
|
||||
await initialStep({
|
||||
session,
|
||||
scenario,
|
||||
elapsedMs: Date.now() - startedAt,
|
||||
elapsedMs: Math.max(0, Math.round(performance.now() - startedAt)),
|
||||
signal: options.signal,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -72,7 +72,7 @@ export const runElectronActions = async (
|
||||
): Promise<ElectronActions> => {
|
||||
const actions: ElectronActions = [];
|
||||
for (const action of input.actions) {
|
||||
const actionStartedAt = Date.now();
|
||||
const actionStartedAt = performance.now();
|
||||
const windowIndex = actionWindowIndex(action);
|
||||
let selectedWindow: Page | undefined;
|
||||
try {
|
||||
@@ -107,7 +107,10 @@ export const runElectronActions = async (
|
||||
target:
|
||||
selectedWindow === undefined ? null : `window:${String(windowIndex)}`,
|
||||
status: "completed",
|
||||
elapsed_ms: Date.now() - actionStartedAt,
|
||||
elapsed_ms: Math.max(
|
||||
0,
|
||||
Math.round(performance.now() - actionStartedAt),
|
||||
),
|
||||
error: null,
|
||||
});
|
||||
} catch (cause: unknown) {
|
||||
@@ -118,7 +121,10 @@ export const runElectronActions = async (
|
||||
target:
|
||||
selectedWindow === undefined ? null : `window:${String(windowIndex)}`,
|
||||
status: options.signal?.aborted ? "cancelled" : "failed",
|
||||
elapsed_ms: Date.now() - actionStartedAt,
|
||||
elapsed_ms: Math.max(
|
||||
0,
|
||||
Math.round(performance.now() - actionStartedAt),
|
||||
),
|
||||
error: safeActionErrorMessage(cause),
|
||||
});
|
||||
break;
|
||||
@@ -366,7 +372,7 @@ export const runWithExecutionLimits = async <Value>(
|
||||
new Promise<never>((_, reject) => {
|
||||
timer = setTimeout(
|
||||
() => reject(new BrowserObservationError(OPERATION, "timeout")),
|
||||
Math.max(1, deadline - Date.now()),
|
||||
Math.max(1, deadline - performance.now()),
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -86,7 +86,7 @@ export class PlaywrightElectronActiveProvider implements ElectronActiveObservati
|
||||
if (options.signal?.aborted === true)
|
||||
throw new BrowserObservationError(OPERATION, "cancelled");
|
||||
await prepareProcessOwnershipInspection(options.signal);
|
||||
const startupDeadline = Date.now() + STARTUP_TIMEOUT_MS;
|
||||
const startupDeadline = performance.now() + STARTUP_TIMEOUT_MS;
|
||||
paths = {
|
||||
executable: input.executable_path,
|
||||
application: input.application_path,
|
||||
@@ -101,7 +101,7 @@ export class PlaywrightElectronActiveProvider implements ElectronActiveObservati
|
||||
cwd: paths.root,
|
||||
env: safeElectronEnvironment(this.environment, runId),
|
||||
args: ["-r", hookPath, paths.application, ...input.args],
|
||||
timeout: Math.max(1, startupDeadline - Date.now()),
|
||||
timeout: Math.max(1, startupDeadline - performance.now()),
|
||||
});
|
||||
const leaderPid = application.process().pid;
|
||||
if (
|
||||
@@ -128,7 +128,7 @@ export class PlaywrightElectronActiveProvider implements ElectronActiveObservati
|
||||
const state = await runWithExecutionLimits(
|
||||
readApplicationState(application),
|
||||
undefined,
|
||||
options.signal?.aborted ? Date.now() + 5_000 : undefined,
|
||||
options.signal?.aborted ? performance.now() + 5_000 : undefined,
|
||||
);
|
||||
capture = projectElectronActiveCapture(paths, actions, state);
|
||||
outcome = options.signal?.aborted
|
||||
@@ -187,7 +187,7 @@ export class PlaywrightElectronActiveProvider implements ElectronActiveObservati
|
||||
await runWithExecutionLimits(
|
||||
application.close(),
|
||||
undefined,
|
||||
Date.now() + 5_000,
|
||||
performance.now() + 5_000,
|
||||
);
|
||||
} catch (cause: unknown) {
|
||||
closeError = cause;
|
||||
|
||||
@@ -7,7 +7,10 @@ import {
|
||||
} from "../domain/analysisErrorCore.js";
|
||||
|
||||
describe("withPlaywrightExecutionBoundary", () => {
|
||||
afterEach(() => vi.useRealTimers());
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
it("rejects work that exceeds its absolute remaining duration", async () => {
|
||||
vi.useFakeTimers();
|
||||
@@ -31,4 +34,20 @@ describe("withPlaywrightExecutionBoundary", () => {
|
||||
controller.abort();
|
||||
await expect(result).rejects.toBeInstanceOf(AnalysisCancelledError);
|
||||
});
|
||||
|
||||
it("keeps its timeout stable across a wall-clock jump", async () => {
|
||||
vi.spyOn(Date, "now")
|
||||
.mockReturnValueOnce(1_000)
|
||||
.mockReturnValue(10_000_000);
|
||||
|
||||
await expect(
|
||||
withPlaywrightExecutionBoundary(
|
||||
() =>
|
||||
new Promise<string>((resolve) =>
|
||||
setTimeout(() => resolve("done"), 5),
|
||||
),
|
||||
1_000,
|
||||
),
|
||||
).resolves.toBe("done");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,10 +19,10 @@ export const withPlaywrightExecutionBoundary = <Value>(
|
||||
let settled = false;
|
||||
let timer: ReturnType<typeof setTimeout> | undefined;
|
||||
const deadline =
|
||||
timeoutMs === undefined ? undefined : Date.now() + timeoutMs;
|
||||
timeoutMs === undefined ? undefined : performance.now() + timeoutMs;
|
||||
const scheduleTimeout = (): void => {
|
||||
if (deadline === undefined) return;
|
||||
const remaining = deadline - Date.now();
|
||||
const remaining = deadline - performance.now();
|
||||
if (remaining <= 0) {
|
||||
fail(new AnalysisTimeoutError(OPERATION, timeoutMs ?? 0));
|
||||
return;
|
||||
|
||||
@@ -133,7 +133,7 @@ export class PlaywrightScenarioSession implements BrowserScenarioSessionPort {
|
||||
const secrets = BrowserScenarioSecrets.resolve(scenario, environment);
|
||||
if (secrets === undefined)
|
||||
throw new BrowserObservationError(OPERATION, "secret_unavailable");
|
||||
const startedAt = Date.now();
|
||||
const startedAt = performance.now();
|
||||
const opening = openPlaywrightScenarioBrowser(scenario, environment, {
|
||||
signal: options.signal,
|
||||
...(options.retainCleanup === undefined
|
||||
|
||||
@@ -86,7 +86,7 @@ export const fetchWebSourceMaps = async (
|
||||
signal?.addEventListener("abort", abortFromCaller, { once: true });
|
||||
const operationSignal = operationController.signal;
|
||||
const deadlineAt =
|
||||
Date.now() + (host.timeoutMs ?? SOURCE_MAP_FETCH_TIMEOUT_MS);
|
||||
performance.now() + (host.timeoutMs ?? SOURCE_MAP_FETCH_TIMEOUT_MS);
|
||||
const budget = {
|
||||
retainedBytes: 0,
|
||||
deadlineAt,
|
||||
@@ -110,7 +110,7 @@ export const fetchWebSourceMaps = async (
|
||||
}
|
||||
const expandedBytesBeforeItem = budget.decodedRecords.expandedBytes;
|
||||
budget.decodedRecords.expandedBytes += reservation;
|
||||
if (operationSignal.aborted || Date.now() >= deadlineAt) {
|
||||
if (operationSignal.aborted || performance.now() >= deadlineAt) {
|
||||
items.push(
|
||||
emptySourceMapItem(
|
||||
request,
|
||||
@@ -789,7 +789,7 @@ const checkOperation = (
|
||||
): void => {
|
||||
if (callerSignal?.aborted === true) throw callerSignal.reason;
|
||||
if (operationSignal?.aborted === true) throw operationSignal.reason;
|
||||
if (Date.now() >= deadlineAt) throw new SourceMapDeadlineError();
|
||||
if (performance.now() >= deadlineAt) throw new SourceMapDeadlineError();
|
||||
};
|
||||
|
||||
const approvedUrl = (
|
||||
|
||||
@@ -113,7 +113,7 @@ export const publishWebScripts = async (
|
||||
options.signal,
|
||||
);
|
||||
options.signal?.throwIfAborted();
|
||||
await tree.commit();
|
||||
await tree.commit(options.signal);
|
||||
return result;
|
||||
} catch (cause: unknown) {
|
||||
if (cause instanceof SafeOutputTreeCreationFailure) tree = cause.tree;
|
||||
|
||||
@@ -175,7 +175,7 @@ export class TsharkCaptureProvider implements PacketCapturePort {
|
||||
];
|
||||
phase = "workspace";
|
||||
root = await this.createRuntime();
|
||||
this.#resources.retain(root, undefined);
|
||||
this.#resources.retain(root, undefined, operation);
|
||||
const snapshotPath = join(root.path, "capture");
|
||||
const configurationPath = join(root.path, "configuration");
|
||||
await mkdir(configurationPath, { mode: 0o700 });
|
||||
@@ -406,7 +406,7 @@ export class TsharkCaptureProvider implements PacketCapturePort {
|
||||
cause instanceof OwnedCommandFailure &&
|
||||
cause.cleanupOwner !== undefined
|
||||
)
|
||||
this.#resources.retain(root, cause.cleanupOwner);
|
||||
this.#resources.retain(root, cause.cleanupOwner, operation);
|
||||
result = err(
|
||||
this.#failure(
|
||||
cause,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -11,6 +11,7 @@ import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
import { localPathStringSchema } from "../../domain/localPath.js";
|
||||
import { toolContractMetadata } from "../toolEffects.js";
|
||||
import { requireOutputSchema } from "../toolOutputSchemaPrimitives.js";
|
||||
import { analysisDetailSchema } from "../analysisDetail.js";
|
||||
|
||||
const examples: Readonly<Record<string, Readonly<Record<string, unknown>>>> = {
|
||||
inspect_macho: {},
|
||||
@@ -94,8 +95,15 @@ export const NATIVE_TOOL_CONTRACTS = [
|
||||
),
|
||||
native(
|
||||
"inspect_macho",
|
||||
"Inspect Mach-O slices, load commands, imports, exports, dependencies, build metadata, segments, sections, permissions, and exact command provenance without launching Hopper.",
|
||||
z.object({}),
|
||||
"Inspect Mach-O slices, load commands, imports, exports, dependencies, build metadata, segments, sections, permissions, and exact command provenance without launching Hopper. Large frameworks return megabytes of symbols; detail summary retains the complete Evidence and returns slice identity with per-collection counts, then page rows with inspect_analysis_view kind macho.",
|
||||
z.object({
|
||||
detail: analysisDetailSchema
|
||||
.unwrap()
|
||||
.optional()
|
||||
.describe(
|
||||
"Omitted or complete returns the complete inspection Evidence. summary retains that complete Evidence in this session and returns its inspect_analysis_view summary; use normalized_result.parent_evidence_id for macho pages.",
|
||||
),
|
||||
}),
|
||||
),
|
||||
native(
|
||||
"inspect_signature",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import {
|
||||
artifactInventorySummaryViewResultSchema,
|
||||
machoSummaryViewResultSchema,
|
||||
managedArtifactSummaryViewResultSchema,
|
||||
} from "../domain/analysisView/analysisView.js";
|
||||
import { evidenceBundleSummarySchema } from "../domain/evidenceRecordSummary.js";
|
||||
@@ -381,7 +382,9 @@ export const nativeOutputSchemas: Readonly<Record<string, z.ZodObject>> = {
|
||||
observe_native_ui: evidenceResultOf(nativeUiResultSchema),
|
||||
capture_native_ui_scenario: evidenceResultOf(nativeUiResultSchema),
|
||||
observe_native_calls: evidenceResultOf(nativeCallObservationResultSchema),
|
||||
inspect_macho: evidenceResultOf(inspectMachoSchema),
|
||||
inspect_macho: evidenceResultOf(
|
||||
z.union([inspectMachoSchema, machoSummaryViewResultSchema]),
|
||||
),
|
||||
inspect_signature: evidenceResultOf(inspectSignatureSchema),
|
||||
inspect_plist: evidenceResultOf(inspectPlistSchema),
|
||||
list_architectures: evidenceResultOf(listArchitecturesSchema),
|
||||
|
||||
@@ -55,6 +55,13 @@ import {
|
||||
wasmViewItemSchema,
|
||||
wasmSummarySchema,
|
||||
} from "./wasmArtifactView.js";
|
||||
import {
|
||||
machoSummarySchema,
|
||||
machoViewContextSchema,
|
||||
machoViewItemSchema,
|
||||
machoViewRequestSchema,
|
||||
projectMachoView,
|
||||
} from "./machoView.js";
|
||||
import {
|
||||
projectWebNetworkCaptureView,
|
||||
captureViewRequestSchema,
|
||||
@@ -196,6 +203,7 @@ export const analysisViewRequestSchema = z.discriminatedUnion("kind", [
|
||||
nativeViewSchema,
|
||||
inventoryViewSchema,
|
||||
wasmViewRequestSchema,
|
||||
machoViewRequestSchema,
|
||||
evmViewRequestSchema,
|
||||
managedViewRequestSchema,
|
||||
androidViewRequestSchema,
|
||||
@@ -315,6 +323,7 @@ const viewResultBase = {
|
||||
"inspect_artifact",
|
||||
"inventory_artifact",
|
||||
"inspect_wasm_artifact",
|
||||
"inspect_macho",
|
||||
"inspect_evm_interface",
|
||||
"inspect_managed_artifact",
|
||||
"inspect_web_network_capture",
|
||||
@@ -364,6 +373,13 @@ export const wasmArtifactSummaryViewResultSchema = z.strictObject({
|
||||
summary: wasmSummarySchema,
|
||||
});
|
||||
|
||||
/** Exact slice identity and collection counts for Mach-O's selected delivery. */
|
||||
export const machoSummaryViewResultSchema = z.strictObject({
|
||||
...summaryViewResultBase,
|
||||
parent_operation: z.literal("inspect_macho"),
|
||||
summary: machoSummarySchema,
|
||||
});
|
||||
|
||||
/** Exact inferred-interface summary for EVM's caller-selected delivery. */
|
||||
export const evmInterfaceSummaryViewResultSchema = z.strictObject({
|
||||
...summaryViewResultBase,
|
||||
@@ -425,6 +441,7 @@ export const analysisViewResultSchema = z.discriminatedUnion("kind", [
|
||||
javascriptSummarySchema,
|
||||
inventorySummarySchema,
|
||||
wasmSummarySchema,
|
||||
machoSummarySchema,
|
||||
evmSummarySchema,
|
||||
managedSummarySchema,
|
||||
captureSummarySchema,
|
||||
@@ -487,6 +504,14 @@ export const analysisViewResultSchema = z.discriminatedUnion("kind", [
|
||||
item: wasmViewItemSchema,
|
||||
...viewResultBase,
|
||||
}),
|
||||
z.strictObject({
|
||||
kind: z.literal("macho"),
|
||||
view: machoViewRequestSchema,
|
||||
item: machoViewItemSchema,
|
||||
...viewResultBase,
|
||||
...machoViewContextSchema.shape,
|
||||
parent_operation: z.literal("inspect_macho"),
|
||||
}),
|
||||
z.strictObject({
|
||||
kind: z.literal("evm"),
|
||||
view: evmViewRequestSchema,
|
||||
@@ -583,6 +608,7 @@ export type UnsignedAnalysisView =
|
||||
"view_digest"
|
||||
>
|
||||
| Omit<Extract<AnalysisViewResult, { readonly kind: "wasm" }>, "view_digest">
|
||||
| Omit<Extract<AnalysisViewResult, { readonly kind: "macho" }>, "view_digest">
|
||||
| Omit<Extract<AnalysisViewResult, { readonly kind: "evm" }>, "view_digest">
|
||||
| Omit<Extract<AnalysisViewResult, { readonly kind: "qlog" }>, "view_digest">
|
||||
| Omit<Extract<AnalysisViewResult, { readonly kind: "pcap" }>, "view_digest">
|
||||
@@ -646,7 +672,7 @@ const unsupportedParent = (
|
||||
new AnalysisUnsupportedTargetError(
|
||||
INSPECT_ANALYSIS_VIEW_OPERATION,
|
||||
parentArtifactPath(parent),
|
||||
`Parent Evidence operation ${JSON.stringify(parent.operation)} does not support analysis views. Use completed binary layout, JavaScript application, native function, artifact inventory/inspection, WASM, EVM, managed artifact, Android package, Dart AOT, or web network capture Evidence.`,
|
||||
`Parent Evidence operation ${JSON.stringify(parent.operation)} does not support analysis views. Use completed binary layout, JavaScript application, native function, artifact inventory/inspection, WASM, Mach-O, EVM, managed artifact, Android package, Dart AOT, or web network capture Evidence.`,
|
||||
);
|
||||
|
||||
const parentArtifactPath = (parent: AnalysisViewParent): string => {
|
||||
@@ -673,6 +699,7 @@ const parentArtifactPath = (parent: AnalysisViewParent): string => {
|
||||
/** Named source owners for views that need no extra decoder or accumulator. */
|
||||
const retainedViewProjectors = new Map<string, typeof projectWasmArtifactView>([
|
||||
["inspect_wasm_artifact", projectWasmArtifactView],
|
||||
["inspect_macho", projectMachoView],
|
||||
["inspect_evm_interface", projectEvmInterfaceView],
|
||||
["inspect_managed_artifact", projectManagedArtifactView],
|
||||
["inspect_android_package", projectAndroidPackageView],
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
projectAnalysisView,
|
||||
type AnalysisViewParent,
|
||||
} from "./analysisView.js";
|
||||
|
||||
const symbol = (name: string) => ({
|
||||
name,
|
||||
address: null,
|
||||
weak: null,
|
||||
reexport: null,
|
||||
source: "libSystem",
|
||||
});
|
||||
const coverage = <T>(items: T[], exhaustive = true) => ({
|
||||
items,
|
||||
total: exhaustive ? items.length : null,
|
||||
exhaustive,
|
||||
limitations: exhaustive ? [] : ["nm output may omit stripped symbols."],
|
||||
});
|
||||
const report = {
|
||||
format: "mach-o",
|
||||
selected_architecture: { name: "arm64", container_file_offset: 0 },
|
||||
endian: null,
|
||||
word_size: 64,
|
||||
file_type: "2",
|
||||
flags: ["0x00200085"],
|
||||
uuid: "4C4C44E9-5555-3144-A1E9-D858E24A1CCE",
|
||||
entrypoints: coverage([{ file_offset: 16384 }]),
|
||||
architectures: coverage([
|
||||
{
|
||||
name: "arm64",
|
||||
cpu_type: "16777228",
|
||||
cpu_subtype: "0",
|
||||
file_offset: 0,
|
||||
size: 4096,
|
||||
alignment: 14,
|
||||
},
|
||||
]),
|
||||
build_metadata: coverage([
|
||||
{ platform: "1", minimum_os: "14.0", sdk: "15.0", tools: [] },
|
||||
]),
|
||||
load_commands: coverage([{ index: 0, kind: "LC_MAIN", fields: {} }]),
|
||||
dependencies: coverage([
|
||||
{
|
||||
path: "/usr/lib/libSystem.B.dylib",
|
||||
kind: "LC_LOAD_DYLIB",
|
||||
current_version: "1351.0.0",
|
||||
compatibility_version: "1.0.0",
|
||||
},
|
||||
]),
|
||||
imports: coverage(
|
||||
["_malloc", "_free", "_open"].map((name) => symbol(name)),
|
||||
false,
|
||||
),
|
||||
exports: coverage([symbol("__mh_execute_header")]),
|
||||
segments: coverage([
|
||||
{
|
||||
name: "__TEXT",
|
||||
vm_address: "0x100000000",
|
||||
vm_size: 16384,
|
||||
file_offset: 0,
|
||||
file_size: 16384,
|
||||
maximum_permissions: {
|
||||
read: true,
|
||||
write: false,
|
||||
execute: true,
|
||||
raw: "5",
|
||||
},
|
||||
initial_permissions: {
|
||||
read: true,
|
||||
write: false,
|
||||
execute: true,
|
||||
raw: "5",
|
||||
},
|
||||
sections: coverage([]),
|
||||
},
|
||||
]),
|
||||
provenance: [
|
||||
{
|
||||
tool: "nm",
|
||||
command: ["/usr/bin/nm", "$ARTIFACT"],
|
||||
tool_version: null,
|
||||
version_reason: "fixture",
|
||||
executable_sha256: "a".repeat(64),
|
||||
exit: { code: 0, signal: null },
|
||||
stdout_bytes: 10,
|
||||
stderr_bytes: 0,
|
||||
},
|
||||
],
|
||||
limitations: ["Imports and exports combine dyld_info and nm."],
|
||||
};
|
||||
const parent = (
|
||||
normalizedResult: unknown = report,
|
||||
subject: AnalysisViewParent["subject"] = {
|
||||
name: "tool",
|
||||
digest: { sha256: "b".repeat(64) },
|
||||
format: "mach-o",
|
||||
architecture: "arm64",
|
||||
local_path: "/bin/tool",
|
||||
},
|
||||
): AnalysisViewParent => ({
|
||||
evidenceId: `ev_${"c".repeat(64)}`,
|
||||
operation: "inspect_macho",
|
||||
normalizedResult,
|
||||
subject,
|
||||
limitations: ["Parent limitation."],
|
||||
});
|
||||
|
||||
describe("Mach-O analysis views", () => {
|
||||
it("summarizes slice identity and collection counts without rows", () => {
|
||||
const projected = projectAnalysisView(parent(), { kind: "summary" });
|
||||
if (!projected.ok) throw projected.error;
|
||||
expect(projected.value).toMatchObject({
|
||||
kind: "summary",
|
||||
parent_operation: "inspect_macho",
|
||||
artifact: { path: "/bin/tool", sha256: "b".repeat(64) },
|
||||
summary: {
|
||||
selected_architecture: { name: "arm64", container_file_offset: 0 },
|
||||
uuid: report.uuid,
|
||||
collections: {
|
||||
imports: { returned: 3, total: null, exhaustive: false },
|
||||
exports: { returned: 1, total: 1, exhaustive: true },
|
||||
segments: { returned: 1, total: 1, exhaustive: true },
|
||||
},
|
||||
provenance_count: 1,
|
||||
limitation_count: 3,
|
||||
},
|
||||
coverage: { status: "complete-within-view", examined: 10, total: 10 },
|
||||
limitations: [
|
||||
"Imports and exports combine dyld_info and nm.",
|
||||
"Parent limitation.",
|
||||
"nm output may omit stripped symbols.",
|
||||
],
|
||||
unknowns: [expect.stringContaining("exhaustive imports;")],
|
||||
});
|
||||
expect(JSON.stringify(projected.value)).not.toContain("_malloc");
|
||||
});
|
||||
|
||||
it("pages original rows with the producer's own coverage", () => {
|
||||
const first = projectAnalysisView(parent(), {
|
||||
kind: "macho",
|
||||
facet: "imports",
|
||||
offset: 1,
|
||||
limit: 1,
|
||||
});
|
||||
if (!first.ok) throw first.error;
|
||||
expect(first.value).toMatchObject({
|
||||
kind: "macho",
|
||||
item: [symbol("_free")],
|
||||
source_total: null,
|
||||
source_exhaustive: false,
|
||||
coverage: { status: "page", examined: 1, total: 3, next_offset: 2 },
|
||||
});
|
||||
expect(first.value.limitations).toContain(
|
||||
"nm output may omit stripped symbols.",
|
||||
);
|
||||
// Rows whose keys include an earlier row shape's keys stay whole.
|
||||
for (const facet of ["architectures", "segments"] as const) {
|
||||
const page = projectAnalysisView(parent(), {
|
||||
kind: "macho",
|
||||
facet,
|
||||
offset: 0,
|
||||
limit: 64,
|
||||
});
|
||||
if (!page.ok) throw page.error;
|
||||
expect(page.value.kind === "macho" && page.value.item).toEqual(
|
||||
report[facet].items,
|
||||
);
|
||||
}
|
||||
const provenance = projectAnalysisView(parent(), {
|
||||
kind: "macho",
|
||||
facet: "provenance",
|
||||
offset: 0,
|
||||
limit: 64,
|
||||
});
|
||||
if (!provenance.ok) throw provenance.error;
|
||||
expect(provenance.value).toMatchObject({
|
||||
item: report.provenance,
|
||||
source_total: 1,
|
||||
source_exhaustive: true,
|
||||
coverage: { exhausted: true, next_offset: null },
|
||||
});
|
||||
const past = projectAnalysisView(parent(), {
|
||||
kind: "macho",
|
||||
facet: "exports",
|
||||
offset: 5,
|
||||
limit: 64,
|
||||
});
|
||||
if (!past.ok) throw past.error;
|
||||
expect(past.value.coverage).toMatchObject({
|
||||
status: "empty",
|
||||
exhausted: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps a missing subject unknown instead of inventing identity", () => {
|
||||
const projected = projectAnalysisView(parent(report, null), {
|
||||
kind: "summary",
|
||||
});
|
||||
if (!projected.ok) throw projected.error;
|
||||
expect(projected.value.artifact).toEqual({ path: "", sha256: null });
|
||||
expect(projected.value.unknowns).toContain(
|
||||
"The parent has no recorded subject, so the inspected artifact path and SHA-256 are unknown.",
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects other view kinds and malformed retained results", () => {
|
||||
const wrongKind = projectAnalysisView(parent(), {
|
||||
kind: "wasm",
|
||||
facet: "exports",
|
||||
offset: 0,
|
||||
limit: 64,
|
||||
});
|
||||
if (wrongKind.ok) throw new Error("expected a view-kind refusal");
|
||||
expect(wrongKind.error).toMatchObject({
|
||||
_tag: "AnalysisInputError",
|
||||
issues: [
|
||||
{
|
||||
path: ["view"],
|
||||
message: "Mach-O inspection supports summary and macho views.",
|
||||
},
|
||||
],
|
||||
});
|
||||
const contradictory = projectAnalysisView(
|
||||
parent(report, {
|
||||
name: "tool",
|
||||
digest: { sha256: "b".repeat(64) },
|
||||
format: "elf",
|
||||
architecture: null,
|
||||
local_path: "/bin/tool",
|
||||
}),
|
||||
{ kind: "summary" },
|
||||
);
|
||||
if (contradictory.ok) throw new Error("expected a subject refusal");
|
||||
expect(contradictory.error).toMatchObject({
|
||||
issues: [{ path: ["source", "subject"] }],
|
||||
});
|
||||
const malformed = projectAnalysisView(
|
||||
parent({ ...report, imports: { items: "x" } }),
|
||||
{ kind: "summary" },
|
||||
);
|
||||
expect(malformed.ok).toBe(false);
|
||||
if (!malformed.ok) expect(malformed.error._tag).toBe("AnalysisInputError");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,247 @@
|
||||
import { z } from "zod";
|
||||
import type { AnalysisError } from "../analysisErrorBase.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import { isMachOFormat } from "../binaryTargetTypes.js";
|
||||
import { analysisInputErrorFromIssues } from "../inputIssueProjection.js";
|
||||
import { inspectMachoSchema } from "../native/nativeInspection.js";
|
||||
import { err, ok, type Result } from "../result.js";
|
||||
import {
|
||||
analysisViewInputError,
|
||||
type AnalysisViewParent,
|
||||
type AnalysisViewRequest,
|
||||
type UnsignedAnalysisView,
|
||||
} from "./analysisView.js";
|
||||
import {
|
||||
completeWithinViewCoverage,
|
||||
pageViewCoverage,
|
||||
} from "./analysisViewCoverage.js";
|
||||
|
||||
const MACHO_COLLECTIONS = [
|
||||
"entrypoints",
|
||||
"architectures",
|
||||
"build_metadata",
|
||||
"load_commands",
|
||||
"dependencies",
|
||||
"imports",
|
||||
"exports",
|
||||
"segments",
|
||||
] as const;
|
||||
type MachoCollection = (typeof MACHO_COLLECTIONS)[number];
|
||||
|
||||
/** Original inspect_macho rows; offsets count rows in the retained collection. */
|
||||
export const machoViewRequestSchema = z.strictObject({
|
||||
kind: z.literal("macho"),
|
||||
facet: z.enum([...MACHO_COLLECTIONS, "provenance"]),
|
||||
offset: z.number().int().nonnegative().default(0),
|
||||
limit: z.number().int().positive().default(64),
|
||||
});
|
||||
|
||||
const { shape } = inspectMachoSchema;
|
||||
/**
|
||||
* Union members are tried in order and plain objects drop unknown keys, so a
|
||||
* segment or architecture row would otherwise match the entrypoint row and
|
||||
* lose every field but file_offset. Exact key sets keep each page's rows whole.
|
||||
*/
|
||||
const exactRows = <Shape extends z.ZodRawShape>(
|
||||
rows: z.ZodArray<z.ZodObject<Shape>>,
|
||||
) => z.array(z.strictObject(rows.element.shape));
|
||||
export const machoViewItemSchema = z.union([
|
||||
exactRows(shape.entrypoints.shape.items),
|
||||
exactRows(shape.architectures.shape.items),
|
||||
exactRows(shape.build_metadata.shape.items),
|
||||
exactRows(shape.load_commands.shape.items),
|
||||
exactRows(shape.dependencies.shape.items),
|
||||
// Imports and exports share one row shape.
|
||||
exactRows(shape.imports.shape.items),
|
||||
exactRows(shape.segments.shape.items),
|
||||
exactRows(shape.provenance),
|
||||
]);
|
||||
|
||||
/** The producer's own coverage of the paged collection, not of this page. */
|
||||
export const machoViewContextSchema = z.strictObject({
|
||||
source_total: z.number().int().nonnegative().nullable(),
|
||||
source_exhaustive: z.boolean(),
|
||||
});
|
||||
|
||||
const collectionCountSchema = z.strictObject({
|
||||
returned: z.number().int().nonnegative(),
|
||||
total: z.number().int().nonnegative().nullable(),
|
||||
exhaustive: z.boolean(),
|
||||
});
|
||||
|
||||
/** Slice identity and per-collection counts without the collections themselves. */
|
||||
export const machoSummarySchema = z.strictObject({
|
||||
format: shape.format,
|
||||
selected_architecture: shape.selected_architecture,
|
||||
endian: shape.endian,
|
||||
word_size: shape.word_size,
|
||||
file_type: shape.file_type,
|
||||
flags: shape.flags,
|
||||
uuid: shape.uuid,
|
||||
collections: z.strictObject(
|
||||
Object.fromEntries(
|
||||
MACHO_COLLECTIONS.map((name) => [name, collectionCountSchema]),
|
||||
) as Record<MachoCollection, typeof collectionCountSchema>,
|
||||
),
|
||||
provenance_count: z.number().int().nonnegative(),
|
||||
limitation_count: z.number().int().nonnegative(),
|
||||
});
|
||||
|
||||
type MachoReport = z.output<typeof inspectMachoSchema>;
|
||||
|
||||
/** Admit a well-formed report whose recorded subject, if any, is a Mach-O. */
|
||||
const parseMachoReport = (
|
||||
parent: AnalysisViewParent,
|
||||
): Result<MachoReport, AnalysisError> => {
|
||||
const parsed = inspectMachoSchema.safeParse(parent.normalizedResult);
|
||||
if (!parsed.success)
|
||||
return err(
|
||||
analysisInputErrorFromIssues(
|
||||
"inspect_analysis_view",
|
||||
parsed.error.issues.map((issue) => ({
|
||||
...issue,
|
||||
path: ["source", "normalized_result", ...issue.path],
|
||||
})),
|
||||
{ source: { normalized_result: parent.normalizedResult } },
|
||||
{ cause: parsed.error },
|
||||
),
|
||||
);
|
||||
if (parent.subject != null && !isMachOFormat(parent.subject.format))
|
||||
return err(
|
||||
analysisViewInputError([
|
||||
{
|
||||
path: ["source", "subject"],
|
||||
reason: "invalid_value",
|
||||
message:
|
||||
"Mach-O parent Evidence subject must identify a thin or universal Mach-O.",
|
||||
},
|
||||
]),
|
||||
);
|
||||
return ok(parsed.data);
|
||||
};
|
||||
|
||||
/** Counts replace rows; every collection caveat stays in the limitations. */
|
||||
const summarizeMacho = (
|
||||
report: MachoReport,
|
||||
parentLimitations: readonly string[],
|
||||
) => {
|
||||
const limitations = uniqueSorted([
|
||||
...parentLimitations,
|
||||
...report.limitations,
|
||||
...MACHO_COLLECTIONS.flatMap((name) => report[name].limitations),
|
||||
]);
|
||||
const collections = Object.fromEntries(
|
||||
MACHO_COLLECTIONS.map((name) => [
|
||||
name,
|
||||
{
|
||||
returned: report[name].items.length,
|
||||
total: report[name].total,
|
||||
exhaustive: report[name].exhaustive,
|
||||
},
|
||||
]),
|
||||
) as Record<MachoCollection, z.output<typeof collectionCountSchema>>;
|
||||
return {
|
||||
limitations,
|
||||
returned: MACHO_COLLECTIONS.reduce(
|
||||
(sum, name) => sum + report[name].items.length,
|
||||
0,
|
||||
),
|
||||
summary: {
|
||||
format: report.format,
|
||||
selected_architecture: report.selected_architecture,
|
||||
endian: report.endian,
|
||||
word_size: report.word_size,
|
||||
file_type: report.file_type,
|
||||
flags: report.flags,
|
||||
uuid: report.uuid,
|
||||
collections,
|
||||
provenance_count: report.provenance.length,
|
||||
limitation_count: limitations.length,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/** Project retained inspect_macho Evidence without rerunning native tools. */
|
||||
export const projectMachoView = (
|
||||
parent: AnalysisViewParent,
|
||||
view: AnalysisViewRequest,
|
||||
): Result<UnsignedAnalysisView, AnalysisError> => {
|
||||
if (view.kind !== "summary" && view.kind !== "macho")
|
||||
return err(
|
||||
analysisViewInputError([
|
||||
{
|
||||
path: ["view"],
|
||||
reason: "invalid_value",
|
||||
message: "Mach-O inspection supports summary and macho views.",
|
||||
},
|
||||
]),
|
||||
);
|
||||
const parsed = parseMachoReport(parent);
|
||||
if (!parsed.ok) return parsed;
|
||||
const report = parsed.value;
|
||||
const incomplete = MACHO_COLLECTIONS.filter(
|
||||
(name) => !report[name].exhaustive,
|
||||
);
|
||||
const shared = {
|
||||
parent_evidence_id: parent.evidenceId,
|
||||
parent_operation: "inspect_macho" as const,
|
||||
parent_digest: parent.evidenceId.slice(3),
|
||||
artifact:
|
||||
parent.subject == null
|
||||
? { path: "", sha256: null }
|
||||
: {
|
||||
path: parent.subject.local_path,
|
||||
sha256: parent.subject.digest.sha256,
|
||||
},
|
||||
unknowns: [
|
||||
...(incomplete.length === 0
|
||||
? []
|
||||
: [
|
||||
`Native tools did not report exhaustive ${incomplete.join(", ")}; page exhaustion does not establish absence of unreturned rows.`,
|
||||
]),
|
||||
...(parent.subject == null
|
||||
? [
|
||||
"The parent has no recorded subject, so the inspected artifact path and SHA-256 are unknown.",
|
||||
]
|
||||
: []),
|
||||
],
|
||||
};
|
||||
if (view.kind === "summary") {
|
||||
const { summary, limitations, returned } = summarizeMacho(
|
||||
report,
|
||||
parent.limitations,
|
||||
);
|
||||
return ok({
|
||||
kind: "summary",
|
||||
view,
|
||||
...shared,
|
||||
limitations,
|
||||
summary,
|
||||
coverage: completeWithinViewCoverage(returned, returned),
|
||||
});
|
||||
}
|
||||
const source =
|
||||
view.facet === "provenance"
|
||||
? {
|
||||
items: report.provenance,
|
||||
total: report.provenance.length,
|
||||
exhaustive: true,
|
||||
limitations: [],
|
||||
}
|
||||
: report[view.facet];
|
||||
const item = source.items.slice(view.offset, view.offset + view.limit);
|
||||
return ok({
|
||||
kind: "macho",
|
||||
view,
|
||||
item,
|
||||
...shared,
|
||||
limitations: uniqueSorted([
|
||||
...parent.limitations,
|
||||
...report.limitations,
|
||||
...source.limitations,
|
||||
]),
|
||||
source_total: source.total,
|
||||
source_exhaustive: source.exhaustive,
|
||||
coverage: pageViewCoverage(view.offset, item.length, source.items.length),
|
||||
});
|
||||
};
|
||||
@@ -47,10 +47,6 @@ const validateCommitments = (
|
||||
digestProcessCommitment(
|
||||
value,
|
||||
), `manifest.${field}`, "commitment does not match its canonical value");
|
||||
require(Date.parse(manifest.started_at) <=
|
||||
Date.parse(
|
||||
manifest.completed_at,
|
||||
), "manifest.completed_at", "completion precedes start");
|
||||
};
|
||||
|
||||
const validateOrdering = (
|
||||
|
||||
@@ -176,11 +176,11 @@ export const runFirmwareCommand = async (context: {
|
||||
};
|
||||
let failure: unknown;
|
||||
try {
|
||||
const deadline = Date.now() + FIRMWARE_LIMITS.timeoutMs;
|
||||
const deadline = performance.now() + FIRMWARE_LIMITS.timeoutMs;
|
||||
while (!(await supervisor.waitForOutputClose(100))) {
|
||||
checkDiagnostics();
|
||||
if (signal.aborted) throw new AnalysisCancelledError(operation);
|
||||
if (Date.now() >= deadline)
|
||||
if (performance.now() >= deadline)
|
||||
throw new AnalysisTimeoutError(operation, FIRMWARE_LIMITS.timeoutMs);
|
||||
if (context.outputBudget !== undefined)
|
||||
await inventoryFirmwareOutput(
|
||||
|
||||
@@ -96,7 +96,7 @@ export const publishFirmwareExtraction = async (context: {
|
||||
published_bytes: files.reduce((sum, file) => sum + file.size, 0),
|
||||
});
|
||||
context.signal.throwIfAborted();
|
||||
await tree.commit();
|
||||
await tree.commit(context.signal);
|
||||
return result;
|
||||
} catch (cause: unknown) {
|
||||
if (cause instanceof SafeOutputTreeCreationFailure) tree = cause.tree;
|
||||
|
||||
@@ -83,8 +83,8 @@ interface ManagedSession extends ManagedRemoteConnection {
|
||||
readonly pid: number;
|
||||
readonly mode: "attach" | "spawn";
|
||||
readonly scripts: Map<string, ManagedScript>;
|
||||
readonly messages: JsonValue[];
|
||||
readonly messagesByScript: Map<string, JsonValue[]>;
|
||||
readonly messages: MessageFifo<CapturedMessage>;
|
||||
readonly messagesByScript: Map<string, MessageFifo<JsonValue>>;
|
||||
state: "paused" | "running" | "detached";
|
||||
targetResumeObserved: boolean;
|
||||
resumeAfterDetachPending: boolean;
|
||||
@@ -277,7 +277,7 @@ export class FridaInstrumentationManager implements FridaInstrumentationPort {
|
||||
pid,
|
||||
mode: input.mode,
|
||||
scripts: new Map(),
|
||||
messages: [],
|
||||
messages: new MessageFifo(),
|
||||
messagesByScript: new Map(),
|
||||
state: input.mode === "spawn" ? "paused" : "running",
|
||||
targetResumeObserved: false,
|
||||
@@ -373,7 +373,7 @@ export class FridaInstrumentationManager implements FridaInstrumentationPort {
|
||||
.digest("hex");
|
||||
const scriptId = randomUUID();
|
||||
const scriptName = `rea-${scriptId}`;
|
||||
managed.messagesByScript.set(scriptId, []);
|
||||
managed.messagesByScript.set(scriptId, new MessageFifo());
|
||||
let nativeScript: Script | undefined;
|
||||
const onMessage = (message: FridaMessage, data: Buffer | null): void => {
|
||||
this.#recordMessage(managed, scriptId, message, data);
|
||||
@@ -397,7 +397,7 @@ export class FridaInstrumentationManager implements FridaInstrumentationPort {
|
||||
sourceKind: source.sourceKind,
|
||||
sourcePath: source.sourceKind === "file" ? source.path : null,
|
||||
sourceSha256,
|
||||
messages: [...(managed.messagesByScript.get(scriptId) ?? [])],
|
||||
messages: managed.messagesByScript.get(scriptId)?.toArray() ?? [],
|
||||
messagesTruncated: managed.messagesTruncated,
|
||||
});
|
||||
} catch (cause: unknown) {
|
||||
@@ -517,7 +517,9 @@ export class FridaInstrumentationManager implements FridaInstrumentationPort {
|
||||
scriptId: id,
|
||||
name,
|
||||
})),
|
||||
messages: [...managed.messages],
|
||||
messages: managed.messages
|
||||
.toArray()
|
||||
.map(({ observation }) => observation),
|
||||
messagesTruncated: managed.messagesTruncated,
|
||||
};
|
||||
}
|
||||
@@ -851,30 +853,21 @@ export class FridaInstrumentationManager implements FridaInstrumentationPort {
|
||||
return;
|
||||
}
|
||||
while (
|
||||
managed.messages.length > 0 &&
|
||||
managed.messages.size > 0 &&
|
||||
managed.capturedBytes + charge > MAX_SESSION_CAPTURE_BYTES
|
||||
) {
|
||||
const removed = managed.messages.shift();
|
||||
if (removed !== undefined) {
|
||||
managed.capturedBytes -= Buffer.byteLength(JSON.stringify(removed));
|
||||
if (
|
||||
typeof removed === "object" &&
|
||||
removed !== null &&
|
||||
!Array.isArray(removed) &&
|
||||
typeof removed.script_id === "string"
|
||||
) {
|
||||
const scriptMessages = managed.messagesByScript.get(
|
||||
removed.script_id,
|
||||
);
|
||||
const index = scriptMessages?.indexOf(removed) ?? -1;
|
||||
if (scriptMessages !== undefined && index >= 0) {
|
||||
scriptMessages.splice(index, 1);
|
||||
}
|
||||
}
|
||||
managed.capturedBytes -= removed.charge;
|
||||
// Both queues are in arrival order, so the globally oldest message is
|
||||
// also the oldest one retained for its script.
|
||||
const scriptMessages = managed.messagesByScript.get(removed.scriptId);
|
||||
if (scriptMessages?.peek() === removed.observation)
|
||||
scriptMessages.shift();
|
||||
}
|
||||
managed.messagesTruncated = true;
|
||||
}
|
||||
managed.messages.push(observation);
|
||||
managed.messages.push({ observation, scriptId, charge });
|
||||
managed.messagesByScript.get(scriptId)?.push(observation);
|
||||
managed.capturedBytes += charge;
|
||||
}
|
||||
@@ -1240,3 +1233,49 @@ const providerError = (
|
||||
|
||||
const errorMessage = (cause: unknown): string =>
|
||||
cause instanceof Error ? cause.message : String(cause);
|
||||
|
||||
interface CapturedMessage {
|
||||
readonly observation: JsonValue;
|
||||
readonly scriptId: string;
|
||||
/** Serialized bytes charged against the session capture budget. */
|
||||
readonly charge: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Arrival-ordered queue whose eviction advances a head offset. A full capture
|
||||
* budget evicts on every message, and `Array#shift` would copy every retained
|
||||
* message each time.
|
||||
*/
|
||||
class MessageFifo<T> {
|
||||
#items: (T | undefined)[] = [];
|
||||
#head = 0;
|
||||
|
||||
get size(): number {
|
||||
return this.#items.length - this.#head;
|
||||
}
|
||||
|
||||
push(item: T): void {
|
||||
this.#items.push(item);
|
||||
}
|
||||
|
||||
peek(): T | undefined {
|
||||
return this.#items[this.#head];
|
||||
}
|
||||
|
||||
shift(): T | undefined {
|
||||
if (this.#head >= this.#items.length) return undefined;
|
||||
const item = this.#items[this.#head];
|
||||
this.#items[this.#head] = undefined;
|
||||
this.#head += 1;
|
||||
// Compacting once half the slots are evicted keeps eviction amortized O(1).
|
||||
if (this.#head * 2 >= this.#items.length) {
|
||||
this.#items = this.#items.slice(this.#head);
|
||||
this.#head = 0;
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
toArray(): T[] {
|
||||
return this.#items.slice(this.#head) as T[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import { parseGhidraJavaProperties } from "./GhidraJavaProperties.js";
|
||||
|
||||
/** Ghidra build whose bridge behavior this REA release verifies. */
|
||||
export const SUPPORTED_GHIDRA_VERSION = "12.1.4";
|
||||
@@ -61,7 +61,7 @@ const GHIDRA_RELEASE_PATTERN = /^(\d+)\.(\d+)(?:\.(\d+))?([-+].*)?$/u;
|
||||
export const ghidraApplicationProperties = (
|
||||
content: string,
|
||||
): GhidraApplicationProperties => {
|
||||
const parsed = parseJavaProperties(content);
|
||||
const parsed = parseGhidraJavaProperties(content);
|
||||
if (!parsed.ok)
|
||||
return {
|
||||
providerVersion: null,
|
||||
@@ -274,115 +274,3 @@ const unresolvedJavaRequirement = (
|
||||
});
|
||||
|
||||
/** Parse Java Properties.load(InputStream) syntax from its ISO-8859-1 text. */
|
||||
const parseJavaProperties = (
|
||||
content: string,
|
||||
): Result<ReadonlyMap<string, string>, string> => {
|
||||
const values = new Map<string, string>();
|
||||
for (const line of logicalPropertyLines(content)) {
|
||||
let start = 0;
|
||||
while (isPropertyWhitespace(line[start])) start += 1;
|
||||
if (start === line.length || line[start] === "#" || line[start] === "!")
|
||||
continue;
|
||||
let end = start;
|
||||
let escaped = false;
|
||||
while (end < line.length) {
|
||||
const character = line[end];
|
||||
if (
|
||||
!escaped &&
|
||||
(character === "=" ||
|
||||
character === ":" ||
|
||||
isPropertyWhitespace(character))
|
||||
)
|
||||
break;
|
||||
if (character === "\\") escaped = !escaped;
|
||||
else escaped = false;
|
||||
end += 1;
|
||||
}
|
||||
let valueStart = end;
|
||||
while (isPropertyWhitespace(line[valueStart])) valueStart += 1;
|
||||
if (line[valueStart] === "=" || line[valueStart] === ":") valueStart += 1;
|
||||
while (isPropertyWhitespace(line[valueStart])) valueStart += 1;
|
||||
const key = decodePropertyEscapes(line.slice(start, end));
|
||||
if (!key.ok) return err(key.error);
|
||||
const value = decodePropertyEscapes(line.slice(valueStart));
|
||||
if (!value.ok) return err(value.error);
|
||||
values.set(key.value, value.value);
|
||||
}
|
||||
return ok(values);
|
||||
};
|
||||
|
||||
const isPropertyWhitespace = (value: string | undefined): boolean =>
|
||||
value === " " || value === "\t" || value === "\f";
|
||||
|
||||
/** Join odd-backslash continuations while stripping leading continuation space. */
|
||||
function* logicalPropertyLines(content: string): Generator<string> {
|
||||
let physicalStart = 0;
|
||||
let logical = "";
|
||||
let continuing = false;
|
||||
while (physicalStart <= content.length) {
|
||||
let physicalEnd = physicalStart;
|
||||
while (
|
||||
physicalEnd < content.length &&
|
||||
content[physicalEnd] !== "\n" &&
|
||||
content[physicalEnd] !== "\r"
|
||||
)
|
||||
physicalEnd += 1;
|
||||
let line = content.slice(physicalStart, physicalEnd);
|
||||
let leading = 0;
|
||||
while (isPropertyWhitespace(line[leading])) leading += 1;
|
||||
const comment =
|
||||
!continuing && (line[leading] === "#" || line[leading] === "!");
|
||||
if (continuing) line = line.slice(leading);
|
||||
let continued = false;
|
||||
if (!comment) {
|
||||
let slashes = 0;
|
||||
for (
|
||||
let index = line.length - 1;
|
||||
index >= 0 && line[index] === "\\";
|
||||
index -= 1
|
||||
)
|
||||
slashes += 1;
|
||||
continued = slashes % 2 === 1;
|
||||
logical += continued ? line.slice(0, -1) : line;
|
||||
}
|
||||
if (!continued) {
|
||||
yield logical;
|
||||
logical = "";
|
||||
}
|
||||
continuing = continued;
|
||||
if (physicalEnd === content.length) break;
|
||||
physicalStart =
|
||||
content[physicalEnd] === "\r" && content[physicalEnd + 1] === "\n"
|
||||
? physicalEnd + 2
|
||||
: physicalEnd + 1;
|
||||
}
|
||||
// Properties.load still consumes the accumulated line when EOF follows a
|
||||
// continuation marker; the marker itself was already removed above.
|
||||
if (continuing) yield logical;
|
||||
}
|
||||
|
||||
const decodePropertyEscapes = (value: string): Result<string, string> => {
|
||||
let result = "";
|
||||
for (let index = 0; index < value.length; index += 1) {
|
||||
const character = value[index];
|
||||
if (character !== "\\") {
|
||||
result += character;
|
||||
continue;
|
||||
}
|
||||
const escaped = value[++index];
|
||||
if (escaped === undefined)
|
||||
return err("Trailing escape in Java properties value");
|
||||
if (escaped === "t") result += "\t";
|
||||
else if (escaped === "n") result += "\n";
|
||||
else if (escaped === "r") result += "\r";
|
||||
else if (escaped === "f") result += "\f";
|
||||
else if (escaped === "u") {
|
||||
const digits = value.slice(index + 1, index + 5);
|
||||
if (digits.length !== 4 || !/^[0-9a-f]{4}$/iu.test(digits))
|
||||
return err("Malformed Unicode escape in Java properties file");
|
||||
result += String.fromCharCode(Number.parseInt(digits, 16));
|
||||
index += 4;
|
||||
} else result += escaped;
|
||||
}
|
||||
return ok(result);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
|
||||
/** Parse Java Properties.load(InputStream) syntax from its ISO-8859-1 text. */
|
||||
export const parseGhidraJavaProperties = (
|
||||
content: string,
|
||||
): Result<ReadonlyMap<string, string>, string> => {
|
||||
const values = new Map<string, string>();
|
||||
for (const line of logicalPropertyLines(content)) {
|
||||
let start = 0;
|
||||
while (isPropertyWhitespace(line[start])) start += 1;
|
||||
if (start === line.length || line[start] === "#" || line[start] === "!")
|
||||
continue;
|
||||
let end = start;
|
||||
let escaped = false;
|
||||
while (end < line.length) {
|
||||
const character = line[end];
|
||||
if (
|
||||
!escaped &&
|
||||
(character === "=" ||
|
||||
character === ":" ||
|
||||
isPropertyWhitespace(character))
|
||||
)
|
||||
break;
|
||||
if (character === "\\") escaped = !escaped;
|
||||
else escaped = false;
|
||||
end += 1;
|
||||
}
|
||||
let valueStart = end;
|
||||
while (isPropertyWhitespace(line[valueStart])) valueStart += 1;
|
||||
if (line[valueStart] === "=" || line[valueStart] === ":") valueStart += 1;
|
||||
while (isPropertyWhitespace(line[valueStart])) valueStart += 1;
|
||||
const key = decodePropertyEscapes(line.slice(start, end));
|
||||
if (!key.ok) return err(key.error);
|
||||
const value = decodePropertyEscapes(line.slice(valueStart));
|
||||
if (!value.ok) return err(value.error);
|
||||
values.set(key.value, value.value);
|
||||
}
|
||||
return ok(values);
|
||||
};
|
||||
|
||||
const isPropertyWhitespace = (value: string | undefined): boolean =>
|
||||
value === " " || value === "\t" || value === "\f";
|
||||
|
||||
/** Join odd-backslash continuations while stripping leading continuation space. */
|
||||
function* logicalPropertyLines(content: string): Generator<string> {
|
||||
let physicalStart = 0;
|
||||
let logical = "";
|
||||
let continuing = false;
|
||||
while (physicalStart <= content.length) {
|
||||
let physicalEnd = physicalStart;
|
||||
while (
|
||||
physicalEnd < content.length &&
|
||||
content[physicalEnd] !== "\n" &&
|
||||
content[physicalEnd] !== "\r"
|
||||
)
|
||||
physicalEnd += 1;
|
||||
let line = content.slice(physicalStart, physicalEnd);
|
||||
let leading = 0;
|
||||
while (isPropertyWhitespace(line[leading])) leading += 1;
|
||||
const comment =
|
||||
!continuing && (line[leading] === "#" || line[leading] === "!");
|
||||
if (continuing) line = line.slice(leading);
|
||||
let continued = false;
|
||||
if (!comment) {
|
||||
let slashes = 0;
|
||||
for (
|
||||
let index = line.length - 1;
|
||||
index >= 0 && line[index] === "\\";
|
||||
index -= 1
|
||||
)
|
||||
slashes += 1;
|
||||
continued = slashes % 2 === 1;
|
||||
logical += continued ? line.slice(0, -1) : line;
|
||||
}
|
||||
if (!continued) {
|
||||
yield logical;
|
||||
logical = "";
|
||||
}
|
||||
continuing = continued;
|
||||
if (physicalEnd === content.length) break;
|
||||
physicalStart =
|
||||
content[physicalEnd] === "\r" && content[physicalEnd + 1] === "\n"
|
||||
? physicalEnd + 2
|
||||
: physicalEnd + 1;
|
||||
}
|
||||
// Properties.load still consumes the accumulated line when EOF follows a
|
||||
// continuation marker; the marker itself was already removed above.
|
||||
if (continuing) yield logical;
|
||||
}
|
||||
|
||||
const decodePropertyEscapes = (value: string): Result<string, string> => {
|
||||
let result = "";
|
||||
for (let index = 0; index < value.length; index += 1) {
|
||||
const character = value[index];
|
||||
if (character !== "\\") {
|
||||
result += character;
|
||||
continue;
|
||||
}
|
||||
const escaped = value[++index];
|
||||
if (escaped === undefined)
|
||||
return err("Trailing escape in Java properties value");
|
||||
if (escaped === "t") result += "\t";
|
||||
else if (escaped === "n") result += "\n";
|
||||
else if (escaped === "r") result += "\r";
|
||||
else if (escaped === "f") result += "\f";
|
||||
else if (escaped === "u") {
|
||||
const digits = value.slice(index + 1, index + 5);
|
||||
if (digits.length !== 4 || !/^[0-9a-f]{4}$/iu.test(digits))
|
||||
return err("Malformed Unicode escape in Java properties file");
|
||||
result += String.fromCharCode(Number.parseInt(digits, 16));
|
||||
index += 4;
|
||||
} else result += escaped;
|
||||
}
|
||||
return ok(result);
|
||||
};
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
import type { AnalysisError } from "../domain/analysisErrorBase.js";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import type { GhidraInstallationInspection } from "./GhidraInstallation.js";
|
||||
import { parseGhidraJavaProperties } from "./GhidraJavaProperties.js";
|
||||
|
||||
/** Installed processor code and data, distinct from REA's analysis-extension ABI. */
|
||||
export const ghidraPspExtensionSchema = z.strictObject({
|
||||
@@ -88,7 +89,7 @@ export const inspectGhidraPspExtension = async (
|
||||
throw new Error("The installed Allegrex extension has no loader JAR.");
|
||||
const hash = createHash("sha256");
|
||||
let bytesRead = 0;
|
||||
let properties = "";
|
||||
let properties = Buffer.alloc(0);
|
||||
for (const relative of files) {
|
||||
signal?.throwIfAborted();
|
||||
const path = join(root, relative);
|
||||
@@ -135,22 +136,22 @@ export const inspectGhidraPspExtension = async (
|
||||
);
|
||||
bytesRead += before.size;
|
||||
if (relative === "extension.properties")
|
||||
properties = Buffer.concat(chunks).toString("utf8");
|
||||
properties = Buffer.concat(chunks);
|
||||
} finally {
|
||||
await handle.close();
|
||||
}
|
||||
}
|
||||
// Ghidra's extension.properties version is the compatible Ghidra version,
|
||||
// not the extension release (e.g. v21.4); content identity supplies the latter.
|
||||
const property = (name: string): string => {
|
||||
const values = properties.split(/\r?\n/u).flatMap((line) => {
|
||||
const match = /^\s*([A-Za-z][A-Za-z0-9]*)\s*=\s*(.*?)\s*$/u.exec(line);
|
||||
return match?.[1] === name ? [match[2] ?? ""] : [];
|
||||
});
|
||||
if (values.length !== 1)
|
||||
throw new Error(`Allegrex extension must declare exactly one ${name}.`);
|
||||
return values[0] ?? "";
|
||||
};
|
||||
const parsedProperties = parseGhidraJavaProperties(
|
||||
properties.toString("latin1"),
|
||||
);
|
||||
if (!parsedProperties.ok)
|
||||
throw new Error(
|
||||
`Invalid Allegrex extension properties: ${parsedProperties.error}`,
|
||||
);
|
||||
const property = (name: string): string | undefined =>
|
||||
parsedProperties.value.get(name);
|
||||
if (
|
||||
property("name") !== "ghidra-allegrex" ||
|
||||
property("version") !== ghidraVersion
|
||||
|
||||
@@ -279,6 +279,6 @@ export const checkRecoveryDeadline = (
|
||||
signal?: AbortSignal,
|
||||
): void => {
|
||||
checkRecoveryCancellation(signal);
|
||||
if (Date.now() >= deadline)
|
||||
if (performance.now() >= deadline)
|
||||
throw new AnalysisTimeoutError(OPERATION, RECOVERY_LIMITS.timeoutMs);
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ it("rejects an exhausted shared execution budget before launching the next comma
|
||||
arguments: ["--version"],
|
||||
cwd: "/tmp/unused",
|
||||
environment: {},
|
||||
deadline: Date.now() - 1,
|
||||
deadline: performance.now() - 1,
|
||||
launcher: async () => {
|
||||
throw new Error("An expired budget must not launch");
|
||||
},
|
||||
@@ -52,7 +52,7 @@ it("preserves caller cancellation before acquiring an expired execution budget",
|
||||
arguments: ["--version"],
|
||||
cwd: "/tmp/unused",
|
||||
environment: {},
|
||||
deadline: Date.now() - 1,
|
||||
deadline: performance.now() - 1,
|
||||
signal: AbortSignal.abort(),
|
||||
launcher: async () => {
|
||||
throw new Error("A cancelled request must not launch");
|
||||
@@ -86,7 +86,7 @@ const commandFixture = (
|
||||
arguments: ["--version"],
|
||||
cwd: "/tmp/unused",
|
||||
environment: {},
|
||||
deadline: Date.now() + 5_000,
|
||||
deadline: performance.now() + 5_000,
|
||||
launcher,
|
||||
},
|
||||
};
|
||||
@@ -140,7 +140,7 @@ it("enforces the shared deadline while exited output streams remain open", async
|
||||
});
|
||||
try {
|
||||
await expect(
|
||||
runWakaruCommand({ ...context, deadline: Date.now() + 50 }),
|
||||
runWakaruCommand({ ...context, deadline: performance.now() + 50 }),
|
||||
).rejects.toMatchObject({
|
||||
_tag: "AnalysisTimeoutError",
|
||||
operation: "recover_javascript_sources",
|
||||
|
||||
@@ -100,7 +100,7 @@ export class WakaruProvider implements JavaScriptRecoveryPort {
|
||||
let tree: SafeOutputTree | undefined;
|
||||
let failed: { readonly cause: unknown } | undefined;
|
||||
let execution: AnalysisExecution | undefined;
|
||||
const deadline = Date.now() + RECOVERY_LIMITS.timeoutMs;
|
||||
const deadline = performance.now() + RECOVERY_LIMITS.timeoutMs;
|
||||
try {
|
||||
checkRecoveryCancellation(options?.signal);
|
||||
const engine = await resolveWakaruCommand(this.environment);
|
||||
@@ -139,7 +139,7 @@ export class WakaruProvider implements JavaScriptRecoveryPort {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
root = undefined;
|
||||
checkRecoveryDeadline(deadline, options?.signal);
|
||||
await tree.commit();
|
||||
await tree.commit(options?.signal);
|
||||
} catch (cause: unknown) {
|
||||
failed = { cause };
|
||||
}
|
||||
|
||||
+73
-73
@@ -1,6 +1,7 @@
|
||||
import { Client } from "@modelcontextprotocol/client";
|
||||
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
|
||||
import { Formatter, Help, z } from "incur";
|
||||
import { performance } from "node:perf_hooks";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { CATALOG_IDENTITY } from "./catalogIdentity.js";
|
||||
@@ -74,14 +75,15 @@ interface McpDoctorCheck {
|
||||
/** Diagnose the actual production stdio adapter with one startup-bounded SDK session. */
|
||||
export const runProductionMcpDoctor = async (options: McpDoctorOptions) => {
|
||||
const deadline =
|
||||
Date.now() + (options.deadlineMs ?? MCP_STARTUP_POLICY.doctorDeadlineMs);
|
||||
performance.now() +
|
||||
(options.deadlineMs ?? MCP_STARTUP_POLICY.doctorDeadlineMs);
|
||||
const controller = new AbortController();
|
||||
const timer = setTimeout(
|
||||
() => controller.abort(new Error("Production MCP doctor deadline expired")),
|
||||
Math.max(1, deadline - Date.now()),
|
||||
Math.max(1, Math.ceil(deadline - performance.now())),
|
||||
);
|
||||
const stderr = captureStderr();
|
||||
const transport = new TrackedStdioClientTransport({
|
||||
const transport = new OwnedStdioClientTransport({
|
||||
command: options.command,
|
||||
args: [...options.args],
|
||||
cwd: options.cwd,
|
||||
@@ -90,21 +92,20 @@ export const runProductionMcpDoctor = async (options: McpDoctorOptions) => {
|
||||
});
|
||||
transport.stderr?.on("data", stderr.append);
|
||||
const client = new Client({ name: "rea-mcp-doctor", version: "1" });
|
||||
let result: ProductionMcpDoctorResult;
|
||||
let cleanupFailure: { readonly cause: unknown } | undefined;
|
||||
try {
|
||||
await client.connect(
|
||||
transport,
|
||||
requestOptions(deadline, controller.signal),
|
||||
);
|
||||
return {
|
||||
...(await inspectProductionMcpSession(
|
||||
client,
|
||||
deadline,
|
||||
controller.signal,
|
||||
)),
|
||||
diagnostics: stderr.value(),
|
||||
};
|
||||
result = await inspectProductionMcpSession(
|
||||
client,
|
||||
deadline,
|
||||
controller.signal,
|
||||
);
|
||||
} catch (cause: unknown) {
|
||||
return {
|
||||
result = {
|
||||
healthy: false,
|
||||
adapter: "production-stdio" as const,
|
||||
server: null,
|
||||
@@ -118,14 +119,71 @@ export const runProductionMcpDoctor = async (options: McpDoctorOptions) => {
|
||||
detail: errorMessage(cause),
|
||||
},
|
||||
],
|
||||
diagnostics: stderr.value(),
|
||||
};
|
||||
} finally {
|
||||
clearTimeout(timer);
|
||||
await closeMcpChild(client, transport);
|
||||
try {
|
||||
await client.close();
|
||||
} catch (cause: unknown) {
|
||||
cleanupFailure = { cause };
|
||||
}
|
||||
try {
|
||||
// An interrupted connect can clear the client's transport reference
|
||||
// before its startup child is closed. The transport retains that child.
|
||||
await transport.close();
|
||||
} catch (cause: unknown) {
|
||||
cleanupFailure = {
|
||||
cause:
|
||||
cleanupFailure === undefined || cleanupFailure.cause === cause
|
||||
? cause
|
||||
: new AggregateError(
|
||||
[cleanupFailure.cause, cause],
|
||||
`MCP client and transport cleanup failed: ${errorMessage(cleanupFailure.cause)}; ${errorMessage(cause)}`,
|
||||
),
|
||||
};
|
||||
}
|
||||
}
|
||||
if (cleanupFailure !== undefined)
|
||||
result = {
|
||||
...result,
|
||||
healthy: false,
|
||||
checks: [
|
||||
...result.checks,
|
||||
{
|
||||
name: "cleanup",
|
||||
ok: false,
|
||||
detail: `MCP stdio cleanup failed: ${errorMessage(cleanupFailure.cause)}`,
|
||||
},
|
||||
],
|
||||
};
|
||||
return { ...result, diagnostics: stderr.value() };
|
||||
};
|
||||
|
||||
type ProductionMcpDoctorResult =
|
||||
| Awaited<ReturnType<typeof inspectProductionMcpSession>>
|
||||
| {
|
||||
readonly healthy: false;
|
||||
readonly adapter: "production-stdio";
|
||||
readonly server: null;
|
||||
readonly inventory: null;
|
||||
readonly identity: null;
|
||||
readonly request_flow: {
|
||||
readonly tool: "binary_session";
|
||||
readonly ok: false;
|
||||
};
|
||||
readonly checks: readonly McpDoctorCheck[];
|
||||
};
|
||||
|
||||
/** Join SDK-triggered and caller-triggered close calls for the same child. */
|
||||
class OwnedStdioClientTransport extends StdioClientTransport {
|
||||
#closePromise: Promise<void> | undefined;
|
||||
|
||||
override close(): Promise<void> {
|
||||
this.#closePromise ??= super.close();
|
||||
return this.#closePromise;
|
||||
}
|
||||
}
|
||||
|
||||
const inspectProductionMcpSession = async (
|
||||
client: Client,
|
||||
deadline: number,
|
||||
@@ -385,7 +443,7 @@ const isOutputFormat = (value: string | undefined): value is OutputFormat =>
|
||||
|
||||
const requestOptions = (deadline: number, signal: AbortSignal) => ({
|
||||
signal,
|
||||
timeout: Math.max(1, deadline - Date.now()),
|
||||
timeout: Math.max(1, Math.ceil(deadline - performance.now())),
|
||||
});
|
||||
|
||||
const targetFreeEnvironment = (
|
||||
@@ -428,61 +486,3 @@ const isRecord = (value: unknown): value is Readonly<Record<string, unknown>> =>
|
||||
|
||||
const errorMessage = (cause: unknown): string =>
|
||||
cause instanceof Error ? cause.message : String(cause);
|
||||
|
||||
class TrackedStdioClientTransport extends StdioClientTransport {
|
||||
spawnedPid: number | null = null;
|
||||
|
||||
override async start(): Promise<void> {
|
||||
await super.start();
|
||||
this.spawnedPid = this.pid;
|
||||
}
|
||||
}
|
||||
|
||||
const closeMcpChild = async (
|
||||
client: Client,
|
||||
transport: TrackedStdioClientTransport,
|
||||
): Promise<void> => {
|
||||
const pid = transport.spawnedPid ?? transport.pid;
|
||||
await Promise.allSettled([client.close()]);
|
||||
await Promise.allSettled([transport.close()]);
|
||||
if (pid === null || !(await processExists(pid))) return;
|
||||
await terminateProcess(pid, "SIGTERM");
|
||||
if (await waitForProcessExit(pid, 1_000)) return;
|
||||
await terminateProcess(pid, "SIGKILL");
|
||||
await waitForProcessExit(pid, 1_000);
|
||||
};
|
||||
|
||||
const terminateProcess = async (
|
||||
pid: number,
|
||||
signal: NodeJS.Signals,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
process.kill(pid, signal);
|
||||
} catch (cause: unknown) {
|
||||
if (!(cause instanceof Error && "code" in cause && cause.code === "ESRCH"))
|
||||
throw cause;
|
||||
}
|
||||
};
|
||||
|
||||
const waitForProcessExit = async (
|
||||
pid: number,
|
||||
timeoutMs: number,
|
||||
): Promise<boolean> => {
|
||||
const deadline = Date.now() + timeoutMs;
|
||||
do {
|
||||
if (!(await processExists(pid))) return true;
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 20));
|
||||
} while (Date.now() < deadline);
|
||||
return !(await processExists(pid));
|
||||
};
|
||||
|
||||
const processExists = async (pid: number): Promise<boolean> => {
|
||||
try {
|
||||
process.kill(pid, 0);
|
||||
return true;
|
||||
} catch (cause: unknown) {
|
||||
if (cause instanceof Error && "code" in cause && cause.code === "ESRCH")
|
||||
return false;
|
||||
throw cause;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ import { createReadStream } from "node:fs";
|
||||
import { realpath } from "node:fs/promises";
|
||||
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import { DarwinProcessOwnershipInspectionError } from "../process/DarwinProcessRunTokenReader.js";
|
||||
import {
|
||||
OwnedCommandFailure,
|
||||
runOwnedCommand,
|
||||
@@ -39,6 +40,7 @@ export interface NativeCommandCapture {
|
||||
export class NativeCommandFailure extends Error {
|
||||
readonly cleanupOwner: ProviderProcessSupervisor | undefined;
|
||||
readonly cleanupFailures: readonly NativeCommandCleanupFailure[];
|
||||
readonly detail: string | null;
|
||||
|
||||
constructor(
|
||||
readonly tool: string,
|
||||
@@ -58,6 +60,7 @@ export class NativeCommandFailure extends Error {
|
||||
super(`Native command ${tool} failed: ${reason}`, options);
|
||||
this.cleanupOwner = options?.cleanupOwner;
|
||||
this.cleanupFailures = options?.cleanupFailures ?? [];
|
||||
this.detail = options?.detail ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +70,8 @@ export interface NativeCommandFailureOptions extends ErrorOptions {
|
||||
readonly cleanupOwner?: ProviderProcessSupervisor;
|
||||
/** All owners still incomplete after a preflight retry blocked this command. */
|
||||
readonly cleanupFailures?: readonly NativeCommandCleanupFailure[];
|
||||
/** Host-side reason the command could not be supervised, such as a missing ownership helper compiler. */
|
||||
readonly detail?: string;
|
||||
}
|
||||
|
||||
/** One failed cleanup attempt; the runner retains `owner` until it is verified stopped. */
|
||||
@@ -310,6 +315,9 @@ export const resolveXcrunTool = async (
|
||||
...(found.error.cleanupFailures.length === 0
|
||||
? {}
|
||||
: { cleanupFailures: found.error.cleanupFailures }),
|
||||
...(found.error.detail === null
|
||||
? {}
|
||||
: { detail: found.error.detail }),
|
||||
},
|
||||
found.error.capture,
|
||||
found.error.cleanupFailure,
|
||||
@@ -449,7 +457,16 @@ const captureProcess = async (
|
||||
),
|
||||
);
|
||||
}
|
||||
return err(new NativeCommandFailure(tool, "io", null, { cause }));
|
||||
return err(
|
||||
new NativeCommandFailure(tool, "io", null, {
|
||||
cause,
|
||||
// Process supervision needs the Darwin ownership helper; its typed
|
||||
// message names the compiler or SDK prerequisite to fix.
|
||||
...(cause instanceof DarwinProcessOwnershipInspectionError
|
||||
? { detail: cause.message }
|
||||
: {}),
|
||||
}),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -966,6 +966,7 @@ const translateCommandFailure = (
|
||||
signal: failure.capture?.signal ?? null,
|
||||
stdout_bytes: failure.capture?.stdoutBytes ?? 0,
|
||||
stderr_bytes: failure.capture?.stderrBytes ?? 0,
|
||||
...(failure.detail === null ? {} : { detail: failure.detail }),
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -33,10 +33,7 @@ export type ArtifactAnalysisRuntime = Pick<
|
||||
|
||||
/** Own admission, artifact descriptors, producer cleanup and private workspaces together. */
|
||||
export class ArtifactAnalysisResources {
|
||||
readonly #artifacts: {
|
||||
readonly scope: ArtifactResourceScope;
|
||||
operation: string;
|
||||
};
|
||||
readonly #artifacts = new ArtifactResourceScope();
|
||||
readonly #pending = new Map<
|
||||
ArtifactAnalysisRuntime,
|
||||
{
|
||||
@@ -57,9 +54,7 @@ export class ArtifactAnalysisResources {
|
||||
readonly message: string;
|
||||
readonly details: Readonly<Record<string, JsonValue>>;
|
||||
},
|
||||
) {
|
||||
this.#artifacts = { scope: new ArtifactResourceScope(), operation };
|
||||
}
|
||||
) {}
|
||||
|
||||
run<T>(
|
||||
work: () => Promise<Result<T, AnalysisError>>,
|
||||
@@ -81,15 +76,8 @@ export class ArtifactAnalysisResources {
|
||||
);
|
||||
this.#busy = true;
|
||||
const running = this.#tail
|
||||
.then(() =>
|
||||
this.#artifacts.scope.run(() => {
|
||||
// Failed descriptor cleanup still belongs to the preceding request until
|
||||
// this scope has drained it and admits acquisition for the new request.
|
||||
this.#artifacts.operation = operation;
|
||||
return work();
|
||||
}),
|
||||
)
|
||||
.catch((cause: unknown) => err(this.#artifactFailure(cause)))
|
||||
.then(() => this.#artifacts.run(work))
|
||||
.catch((cause: unknown) => err(this.#artifactFailure(cause, operation)))
|
||||
.finally(() => {
|
||||
this.#busy = false;
|
||||
});
|
||||
@@ -106,23 +94,20 @@ export class ArtifactAnalysisResources {
|
||||
maximumBytes,
|
||||
signal,
|
||||
undefined,
|
||||
this.#artifacts.scope,
|
||||
this.#artifacts,
|
||||
);
|
||||
}
|
||||
|
||||
readLimits(limits: LinuxResourceLimits): Promise<LinuxResourceLimits> {
|
||||
return this.readKernelLimits(limits, this.#artifacts.scope);
|
||||
return this.readKernelLimits(limits, this.#artifacts);
|
||||
}
|
||||
|
||||
retain(
|
||||
root: ArtifactAnalysisRuntime,
|
||||
owner?: ProviderProcessSupervisor,
|
||||
operation = this.operation,
|
||||
): void {
|
||||
this.#pending.set(root, {
|
||||
owner,
|
||||
operation:
|
||||
this.#pending.get(root)?.operation ?? this.#artifacts.operation,
|
||||
});
|
||||
this.#pending.set(root, { owner, operation });
|
||||
}
|
||||
|
||||
get pendingPaths(): readonly string[] {
|
||||
@@ -266,7 +251,7 @@ export class ArtifactAnalysisResources {
|
||||
async #closeResources(): Promise<void> {
|
||||
let descriptorFailure: AnalysisError | undefined;
|
||||
try {
|
||||
await this.#artifacts.scope.close();
|
||||
await this.#artifacts.close();
|
||||
} catch (cause: unknown) {
|
||||
descriptorFailure = this.#artifactFailure(cause);
|
||||
}
|
||||
@@ -277,17 +262,14 @@ export class ArtifactAnalysisResources {
|
||||
throw analysisErrorWithCleanupFailure(
|
||||
descriptorFailure,
|
||||
cause,
|
||||
this.#artifacts.operation,
|
||||
this.operation,
|
||||
);
|
||||
throw cause;
|
||||
}
|
||||
if (descriptorFailure !== undefined) throw descriptorFailure;
|
||||
}
|
||||
|
||||
#artifactFailure(
|
||||
cause: unknown,
|
||||
operation = this.#artifacts.operation,
|
||||
): AnalysisError {
|
||||
#artifactFailure(cause: unknown, operation = this.operation): AnalysisError {
|
||||
if (cause instanceof AnalysisError) return cause;
|
||||
if (cause instanceof ArtifactReaderFailure && cause.cleanup !== undefined)
|
||||
return this.cleanupFailure(cause.cleanup, cause, undefined, operation);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { afterEach, expect, it, vi } from "vitest";
|
||||
import { ProviderStartupDeadline } from "./ProviderDeadline.js";
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
it("keeps remaining time and cancellation classification stable across wall-clock jumps", () => {
|
||||
const dateNow = vi.spyOn(Date, "now").mockReturnValue(10_000);
|
||||
const caller = new AbortController();
|
||||
const deadline = new ProviderStartupDeadline(10_000, caller.signal);
|
||||
try {
|
||||
dateNow.mockReturnValue(9_000_000_000_000);
|
||||
const remaining = deadline.remainingMs();
|
||||
expect(remaining).toBeGreaterThan(0);
|
||||
expect(remaining).toBeLessThanOrEqual(10_000);
|
||||
expect(Number.isInteger(remaining)).toBe(true);
|
||||
expect(deadline.interruption).toBeUndefined();
|
||||
caller.abort(new Error("caller stopped startup"));
|
||||
expect(deadline.interruption).toBe("cancelled");
|
||||
} finally {
|
||||
deadline.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
it("aborts a bounded wait when its real monotonic deadline expires", async () => {
|
||||
const deadline = new ProviderStartupDeadline(40);
|
||||
try {
|
||||
await expect(deadline.wait(500)).resolves.toBe("aborted");
|
||||
expect(deadline.interruption).toBe("timeout");
|
||||
expect(deadline.remainingMs()).toBe(0);
|
||||
} finally {
|
||||
deadline.dispose();
|
||||
}
|
||||
});
|
||||
@@ -42,11 +42,11 @@ export class ProviderStartupDeadline {
|
||||
) {
|
||||
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
|
||||
throw new RangeError("Provider startup timeout must be positive");
|
||||
this.#deadlineAt = Date.now() + timeoutMs;
|
||||
this.#deadlineAt = performance.now() + timeoutMs;
|
||||
this.#externalSignal = signal;
|
||||
this.#onExternalAbort = () => {
|
||||
if (this.#controller.signal.aborted) return;
|
||||
if (Date.now() >= this.#deadlineAt) {
|
||||
if (performance.now() >= this.#deadlineAt) {
|
||||
this.#interruption = "timeout";
|
||||
this.#abort(
|
||||
new DOMException("Provider startup deadline elapsed", "TimeoutError"),
|
||||
@@ -79,13 +79,13 @@ export class ProviderStartupDeadline {
|
||||
get interruption(): "cancelled" | "timeout" | undefined {
|
||||
return (
|
||||
this.#interruption ??
|
||||
(Date.now() >= this.#deadlineAt ? "timeout" : undefined)
|
||||
(performance.now() >= this.#deadlineAt ? "timeout" : undefined)
|
||||
);
|
||||
}
|
||||
|
||||
/** Milliseconds still available to the next startup phase. */
|
||||
remainingMs(): number {
|
||||
return Math.max(0, this.#deadlineAt - Date.now());
|
||||
return Math.max(0, Math.ceil(this.#deadlineAt - performance.now()));
|
||||
}
|
||||
|
||||
/** Wait for at most one polling interval under the shared deadline signal. */
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/** Keep wall-clock timestamps separate from capture-relative elapsed time. */
|
||||
export const monotonicProcessCaptureClock = (): number =>
|
||||
Math.floor(performance.now());
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
ProcessCaptureEventJournalEntry,
|
||||
RecordProcessCaptureEvent,
|
||||
} from "../../domain/process/processCapture.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
/** Mutable observation-order ledger whose writer is shared by capture producers. */
|
||||
export interface ProcessCaptureJournal {
|
||||
readonly entries: readonly ProcessCaptureEventJournalEntry[];
|
||||
@@ -55,7 +56,10 @@ export const scheduleScenarioInteractions = (
|
||||
const timer = scheduleProcessDelay(event.at_ms, () => {
|
||||
options.dispatchedEventIndexes.add(eventIndex);
|
||||
const terminal = getTerminal();
|
||||
const dispatchedAt = Math.max(0, Date.now() - started);
|
||||
const dispatchedAt = Math.max(
|
||||
0,
|
||||
monotonicProcessCaptureClock() - started,
|
||||
);
|
||||
let outcome: InteractionEvent["outcome"] = "dispatched";
|
||||
if (terminal === undefined) outcome = "target_exited";
|
||||
else {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { parseProcessScenario } from "../../domain/process/processScenario.js";
|
||||
import type { ProcessCaptureFinalization } from "../../domain/process/processCapture.js";
|
||||
import { awaitTerminalExit } from "./ProcessCaptureLifecycle.js";
|
||||
import type { ProcessTimer } from "./ProcessTimer.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
|
||||
type Delivery = ProcessCaptureFinalization["signals"][number]["delivery"];
|
||||
|
||||
@@ -79,8 +80,8 @@ const start = (
|
||||
idle_timeout_ms: 10_000,
|
||||
...scenario,
|
||||
}),
|
||||
started: Date.now(),
|
||||
lastOutput: () => Date.now(),
|
||||
started: monotonicProcessCaptureClock(),
|
||||
lastOutput: monotonicProcessCaptureClock,
|
||||
signal,
|
||||
signalTarget: fake.signalTarget,
|
||||
recordFinalization: (snapshot) => {
|
||||
|
||||
@@ -48,6 +48,7 @@ import {
|
||||
type ProcessCaptureTruncationDetails,
|
||||
} from "../../domain/process/processCaptureCoverage.js";
|
||||
import { scheduleProcessInterval, type ProcessTimer } from "./ProcessTimer.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
|
||||
import type {
|
||||
FilesystemCheckpoint,
|
||||
@@ -266,10 +267,10 @@ export const settleProcessCaptureJournal = async (
|
||||
quietMs = 25,
|
||||
maxWaitMs = 500,
|
||||
): Promise<void> => {
|
||||
const deadline = Date.now() + maxWaitMs;
|
||||
const deadline = monotonicProcessCaptureClock() + maxWaitMs;
|
||||
let observed = journal.length;
|
||||
let lastChangeAt = Date.now();
|
||||
while (Date.now() < deadline) {
|
||||
let lastChangeAt = monotonicProcessCaptureClock();
|
||||
while (monotonicProcessCaptureClock() < deadline) {
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 4));
|
||||
// A stalled event loop can leave timer and poll callbacks that were already
|
||||
// due queued behind this wake-up. Drain them before judging silence so a
|
||||
@@ -277,8 +278,8 @@ export const settleProcessCaptureJournal = async (
|
||||
await setImmediate();
|
||||
if (journal.length !== observed) {
|
||||
observed = journal.length;
|
||||
lastChangeAt = Date.now();
|
||||
} else if (Date.now() - lastChangeAt >= quietMs) return;
|
||||
lastChangeAt = monotonicProcessCaptureClock();
|
||||
} else if (monotonicProcessCaptureClock() - lastChangeAt >= quietMs) return;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -337,6 +338,12 @@ export const buildCaptureResult = (
|
||||
truncation_details: options.truncationDetails,
|
||||
limitations: [
|
||||
"The executable digest is a prelaunch file sample; matching path metadata immediately after spawn does not prove an atomic operating-system image binding.",
|
||||
...(Date.parse(options.manifest.completed_at) <
|
||||
Date.parse(options.manifest.started_at)
|
||||
? [
|
||||
"Wall-clock completion time precedes start time; elapsed capture timing is recorded separately and remains monotonic.",
|
||||
]
|
||||
: []),
|
||||
"Process trees are sampled and may omit short-lived descendants.",
|
||||
...(options.samplingPartial
|
||||
? ["Process-tree sampling ended with an incomplete observation."]
|
||||
@@ -660,7 +667,7 @@ export const observeSettlement = async (
|
||||
recordEvent("lifecycle", 1);
|
||||
return { state: "unverifiable", elapsed_ms: 0 };
|
||||
}
|
||||
const started = Date.now();
|
||||
const started = monotonicProcessCaptureClock();
|
||||
let consecutiveEmpty = 0;
|
||||
let sawLive = false;
|
||||
let deadlineReached = false;
|
||||
@@ -678,19 +685,25 @@ export const observeSettlement = async (
|
||||
[...observations.values()].some(({ state }) => state === "unverifiable")
|
||||
) {
|
||||
recordEvent("lifecycle", 1);
|
||||
return { state: "unverifiable", elapsed_ms: Date.now() - started };
|
||||
return {
|
||||
state: "unverifiable",
|
||||
elapsed_ms: monotonicProcessCaptureClock() - started,
|
||||
};
|
||||
}
|
||||
if ([...observations.values()].every(({ state }) => state === "empty")) {
|
||||
consecutiveEmpty += 1;
|
||||
if (consecutiveEmpty >= 2) {
|
||||
recordEvent("lifecycle", 1);
|
||||
return { state: "quiesced", elapsed_ms: Date.now() - started };
|
||||
return {
|
||||
state: "quiesced",
|
||||
elapsed_ms: monotonicProcessCaptureClock() - started,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
consecutiveEmpty = 0;
|
||||
sawLive = true;
|
||||
}
|
||||
deadlineReached = Date.now() - started >= settleMs;
|
||||
deadlineReached = monotonicProcessCaptureClock() - started >= settleMs;
|
||||
if (deadlineReached) break;
|
||||
await delay(50, undefined, { signal });
|
||||
}
|
||||
@@ -698,8 +711,14 @@ export const observeSettlement = async (
|
||||
// A lone empty observation proves neither liveness nor quiescence; only an
|
||||
// observed live member justifies alive_at_deadline.
|
||||
return sawLive
|
||||
? { state: "alive_at_deadline", elapsed_ms: Date.now() - started }
|
||||
: { state: "unverifiable", elapsed_ms: Date.now() - started };
|
||||
? {
|
||||
state: "alive_at_deadline",
|
||||
elapsed_ms: monotonicProcessCaptureClock() - started,
|
||||
}
|
||||
: {
|
||||
state: "unverifiable",
|
||||
elapsed_ms: monotonicProcessCaptureClock() - started,
|
||||
};
|
||||
};
|
||||
|
||||
/** Name why an attempt is unverified; a blank message never reaches the capture schema. */
|
||||
@@ -786,7 +805,10 @@ export const awaitTerminalExit = async ({
|
||||
if (finalizationStartedAt === undefined) return;
|
||||
const record: (typeof finalizationSignals)[number] = {
|
||||
signal: finalizationSignal,
|
||||
sent_at_ms: Math.round(performance.now() - finalizationStartedAt),
|
||||
sent_at_ms: Math.max(
|
||||
0,
|
||||
monotonicProcessCaptureClock() - finalizationStartedAt,
|
||||
),
|
||||
delivery: "unverified" as FinalizationDelivery,
|
||||
reason: "delivery had not settled when the record was published",
|
||||
};
|
||||
@@ -856,7 +878,7 @@ export const awaitTerminalExit = async ({
|
||||
terminal.kill("SIGKILL");
|
||||
return;
|
||||
}
|
||||
finalizationStartedAt = performance.now();
|
||||
finalizationStartedAt = monotonicProcessCaptureClock();
|
||||
attempt("SIGTERM");
|
||||
};
|
||||
terminal.onExit((exit) => {
|
||||
@@ -867,7 +889,7 @@ export const awaitTerminalExit = async ({
|
||||
const finalizationElapsedMs =
|
||||
finalizationStartedAt === undefined
|
||||
? undefined
|
||||
: Math.round(performance.now() - finalizationStartedAt);
|
||||
: Math.max(0, monotonicProcessCaptureClock() - finalizationStartedAt);
|
||||
recordEvent("lifecycle", 0);
|
||||
for (const [eventIndex, event] of scenario.events.entries()) {
|
||||
if (dispatchedEventIndexes.has(eventIndex)) continue;
|
||||
@@ -875,7 +897,10 @@ export const awaitTerminalExit = async ({
|
||||
interactions.push({
|
||||
sequence,
|
||||
scheduled_at_ms: event.at_ms,
|
||||
dispatched_at_ms: Math.max(0, Date.now() - started),
|
||||
dispatched_at_ms: Math.max(
|
||||
0,
|
||||
monotonicProcessCaptureClock() - started,
|
||||
),
|
||||
type: event.type,
|
||||
data:
|
||||
event.type === "input"
|
||||
@@ -935,14 +960,20 @@ export const awaitTerminalExit = async ({
|
||||
forceKill();
|
||||
} else if (finalizationStartedAt !== undefined) {
|
||||
if (
|
||||
performance.now() - finalizationStartedAt >=
|
||||
monotonicProcessCaptureClock() - finalizationStartedAt >=
|
||||
scenario.finalization_ms
|
||||
)
|
||||
forceKill();
|
||||
} else if (Date.now() - started >= scenario.timeout_ms) {
|
||||
} else if (
|
||||
monotonicProcessCaptureClock() - started >=
|
||||
scenario.timeout_ms
|
||||
) {
|
||||
reason = "timeout";
|
||||
terminateAtDeadline();
|
||||
} else if (Date.now() - lastOutput() >= scenario.idle_timeout_ms) {
|
||||
} else if (
|
||||
monotonicProcessCaptureClock() - lastOutput() >=
|
||||
scenario.idle_timeout_ms
|
||||
) {
|
||||
reason = "idle_timeout";
|
||||
terminateAtDeadline();
|
||||
}
|
||||
@@ -971,10 +1002,11 @@ const PROCESS_CLEANUP_VERIFICATION_INTERVAL_MS = 25;
|
||||
const verifyTokenOwnedProcessesUntilSettled = async (
|
||||
verify: () => Promise<ProcessCleanupResult>,
|
||||
): Promise<ProcessCleanupResult> => {
|
||||
const deadline = Date.now() + PROCESS_CLEANUP_VERIFICATION_GRACE_MS;
|
||||
const deadline =
|
||||
monotonicProcessCaptureClock() + PROCESS_CLEANUP_VERIFICATION_GRACE_MS;
|
||||
let result = await verify();
|
||||
while (!result.cleaned) {
|
||||
const remaining = deadline - Date.now();
|
||||
const remaining = deadline - monotonicProcessCaptureClock();
|
||||
if (remaining <= 0) return result;
|
||||
await new Promise<void>((resolve) =>
|
||||
setTimeout(
|
||||
@@ -1288,7 +1320,7 @@ export const captureTerminalFrames = (options: {
|
||||
}
|
||||
outputBytes += bytes;
|
||||
const atMs = normalizeProcessElapsedTime(
|
||||
Date.now() - options.started,
|
||||
monotonicProcessCaptureClock() - options.started,
|
||||
options.scenario.normalization.time_bucket_ms,
|
||||
);
|
||||
const normalized = normalizeProcessText(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ProcessCaptureCleanupReport } from "../../domain/process/processCapture.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
|
||||
/**
|
||||
* Progress port accepted by process capture.
|
||||
@@ -61,7 +62,7 @@ const formatProgressMessage = (
|
||||
/** Serialize observed capture status through one rate-limited reporter. */
|
||||
export const createProcessCaptureProgressTracker = (
|
||||
progress: ProcessCaptureProgress | undefined,
|
||||
now: () => number = Date.now,
|
||||
now: () => number = monotonicProcessCaptureClock,
|
||||
) => {
|
||||
const started = now();
|
||||
let completed = 0;
|
||||
|
||||
@@ -70,6 +70,7 @@ import {
|
||||
observeProcessStartIdentity,
|
||||
signalProcessWithStartIdentity,
|
||||
} from "../ProcessOwnershipObservation.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
|
||||
interface StartedCaptureRuntime {
|
||||
readonly renderer: TerminalRenderer;
|
||||
@@ -268,7 +269,7 @@ const startCaptureRuntime = async (
|
||||
options.signal,
|
||||
);
|
||||
const startedAt = new Date();
|
||||
const started = Date.now();
|
||||
const started = monotonicProcessCaptureClock();
|
||||
let lastOutput = started;
|
||||
renderer = createTerminalRenderer(
|
||||
scenario,
|
||||
@@ -296,7 +297,7 @@ const startCaptureRuntime = async (
|
||||
...options,
|
||||
terminal,
|
||||
started,
|
||||
onOutput: () => (lastOutput = Date.now()),
|
||||
onOutput: () => (lastOutput = monotonicProcessCaptureClock()),
|
||||
renderer,
|
||||
});
|
||||
scheduleScenarioInteractions({
|
||||
@@ -541,7 +542,7 @@ const completeCapture = async (options: {
|
||||
},
|
||||
{
|
||||
name: "after_settlement",
|
||||
at_ms: Math.max(0, Date.now() - runtime.started),
|
||||
at_ms: Math.max(0, monotonicProcessCaptureClock() - runtime.started),
|
||||
files: after.files,
|
||||
effects: classifyFilesystemEffects(options.before, after),
|
||||
truncated: after.truncated,
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
} from "../../domain/process/processCapture.js";
|
||||
import { execFileOutput } from "../ExecFileOutput.js";
|
||||
import { readProcessRunId } from "../ProcessOwnership.js";
|
||||
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
|
||||
const PROC_READ_CONCURRENCY = 64;
|
||||
|
||||
interface ProcessRow {
|
||||
@@ -491,7 +492,7 @@ export const startProcessSampler = (options: {
|
||||
}
|
||||
return sampleProcesses({
|
||||
rootPid,
|
||||
elapsedMs: Date.now() - started,
|
||||
elapsedMs: monotonicProcessCaptureClock() - started,
|
||||
limit: limit + 1,
|
||||
identities,
|
||||
signal: controller.signal,
|
||||
|
||||
@@ -54,6 +54,7 @@ import { silentLogger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import { registerApplicationTools } from "./registerApplicationTools.js";
|
||||
import { registerArtifactTools } from "./registerArtifactTools.js";
|
||||
import { registerNativeTools } from "./registerNativeTools.js";
|
||||
import { registerBrowserScenarioTool } from "./registerBrowserScenarioTool.js";
|
||||
import { registerBrowserTools } from "./registerBrowserTools.js";
|
||||
import { registerWebScriptTool } from "./registerWebScriptTool.js";
|
||||
@@ -107,8 +108,6 @@ import type { AdbDeviceAnalysisPort } from "../application/adb/AdbDeviceAnalysis
|
||||
import { AdbDeviceAnalysisService } from "../application/adb/AdbDeviceAnalysisService.js";
|
||||
import { createAdbDeviceAnalysisProvider } from "../composition/adb.js";
|
||||
import { registerManagedWorkflowTools } from "./registerManagedWorkflowTools.js";
|
||||
import { NATIVE_TOOL_CONTRACTS } from "../contracts/native/nativeToolContracts.js";
|
||||
import { registerEvidenceTools } from "./registerEvidenceTools.js";
|
||||
import { registerOfficialTools } from "./registerOfficialTools.js";
|
||||
import { registerGuidedPrompts } from "./registerPrompts.js";
|
||||
import { registerSessionTools } from "./registerSessionTools.js";
|
||||
@@ -725,7 +724,7 @@ const registerBinaryAnalysisTools = ({
|
||||
recordEvidence,
|
||||
withAdmittedAnalysis,
|
||||
};
|
||||
registerEvidenceTools(server, NATIVE_TOOL_CONTRACTS, evidenceOptions);
|
||||
registerNativeTools(server, { ...evidenceOptions, evidenceById });
|
||||
registerArtifactTools(server, { ...evidenceOptions, evidenceById });
|
||||
registerManagedTools(server, { ...evidenceOptions, evidenceById });
|
||||
if (session !== undefined)
|
||||
|
||||
@@ -6,7 +6,10 @@ import {
|
||||
artifactInspectionInputSchema,
|
||||
} from "../contracts/artifactToolContracts.js";
|
||||
import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
|
||||
import { summarizeRetainedAnalysis } from "../application/analysisView/AnalysisViewService.js";
|
||||
import {
|
||||
requireAnalysisViewRetention,
|
||||
summarizeRetainedAnalysis,
|
||||
} from "../application/analysisView/AnalysisViewService.js";
|
||||
import { createArtifactExtractionDestination } from "../application/artifacts/ArtifactExtractionDestination.js";
|
||||
import { ok } from "../domain/result.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
@@ -25,6 +28,10 @@ export const registerArtifactTools = (
|
||||
readonly withAdmittedAnalysis: import("./analysisAdmission.js").WithAdmittedAnalysis;
|
||||
},
|
||||
): void => {
|
||||
const retention = {
|
||||
recordEvidence: options.recordEvidence,
|
||||
evidenceById: options.evidenceById,
|
||||
};
|
||||
registerEvidenceTools(server, ARTIFACT_TOOL_CONTRACTS, {
|
||||
...options,
|
||||
parametersForExecution: (operation, parameters) => {
|
||||
@@ -37,12 +44,13 @@ export const registerArtifactTools = (
|
||||
? { ...parameters, output_root: createArtifactExtractionDestination() }
|
||||
: parameters;
|
||||
},
|
||||
preflight: (operation, parameters) =>
|
||||
operation === "inspect_artifact" && parameters.detail === "summary"
|
||||
? requireAnalysisViewRetention(operation, retention)
|
||||
: ok(null),
|
||||
projectEvidence: (operation, parameters, evidence) =>
|
||||
operation === "inspect_artifact" && parameters.detail === "summary"
|
||||
? summarizeRetainedAnalysis(evidence, {
|
||||
recordEvidence: options.recordEvidence,
|
||||
evidenceById: options.evidenceById,
|
||||
})
|
||||
? summarizeRetainedAnalysis(evidence, retention)
|
||||
: ok(evidence),
|
||||
sourceEvidence: (operation, result) =>
|
||||
operation === "inspect_artifact"
|
||||
|
||||
@@ -33,6 +33,16 @@ interface EvidenceToolRegistration {
|
||||
operation: Exclude<AnalysisOperation, "health">,
|
||||
parameters: Readonly<Record<string, JsonValue>>,
|
||||
) => Readonly<Record<string, JsonValue>>;
|
||||
/** Exclude adapter-only selections, such as delivery detail, from Evidence identity. */
|
||||
readonly parametersForEvidence?: (
|
||||
operation: Exclude<AnalysisOperation, "health">,
|
||||
parameters: Readonly<Record<string, JsonValue>>,
|
||||
) => Readonly<Record<string, JsonValue>>;
|
||||
/** Refuse an unsatisfiable delivery selection before any analysis runs. */
|
||||
readonly preflight?: (
|
||||
operation: Exclude<AnalysisOperation, "health">,
|
||||
parameters: Readonly<Record<string, JsonValue>>,
|
||||
) => Result<unknown, AnalysisError>;
|
||||
readonly projectEvidence?: (
|
||||
operation: Exclude<AnalysisOperation, "health">,
|
||||
parameters: Readonly<Record<string, JsonValue>>,
|
||||
@@ -51,6 +61,12 @@ export const registerEvidenceTools = (
|
||||
contract.name,
|
||||
toolRegistrationOptions(contract),
|
||||
async (input, context) => {
|
||||
const ready = options.preflight?.(
|
||||
contract.name,
|
||||
jsonObjectSchema.parse(input),
|
||||
);
|
||||
if (ready !== undefined && !ready.ok)
|
||||
return server.delivery.toCallToolResult(ready, contract);
|
||||
const admitted = await options.withAdmittedAnalysis(
|
||||
contract.name,
|
||||
context.mcpReq.signal,
|
||||
@@ -95,7 +111,9 @@ export const registerEvidenceTools = (
|
||||
execution.value.provider,
|
||||
{
|
||||
operation: contract.name,
|
||||
parameters,
|
||||
parameters:
|
||||
options.parametersForEvidence?.(contract.name, parameters) ??
|
||||
parameters,
|
||||
result: execution.value.result,
|
||||
...(execution.value.analysisProfile === undefined
|
||||
? {}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
|
||||
import type { EvidenceWriter } from "../application/investigation/InvestigationRecordPort.js";
|
||||
|
||||
import { NATIVE_TOOL_CONTRACTS } from "../contracts/native/nativeToolContracts.js";
|
||||
import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
|
||||
import {
|
||||
requireAnalysisViewRetention,
|
||||
summarizeRetainedAnalysis,
|
||||
} from "../application/analysisView/AnalysisViewService.js";
|
||||
import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import { ok } from "../domain/result.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import type { Logger } from "pino";
|
||||
import { registerEvidenceTools } from "./registerEvidenceTools.js";
|
||||
|
||||
/** Delivery detail selects a response shape; it never reaches the tools or Evidence identity. */
|
||||
const withoutDelivery = (
|
||||
operation: string,
|
||||
parameters: Readonly<Record<string, JsonValue>>,
|
||||
): Readonly<Record<string, JsonValue>> => {
|
||||
if (operation !== "inspect_macho") return parameters;
|
||||
const { detail: _detail, ...selected } = parameters;
|
||||
return selected;
|
||||
};
|
||||
|
||||
/** Register macOS native contracts; Mach-O inspection can deliver a retained summary. */
|
||||
export const registerNativeTools = (
|
||||
server: EvidenceMcpServer,
|
||||
options: {
|
||||
readonly logger: Logger;
|
||||
readonly activeTarget: (() => BinaryTarget | undefined) | undefined;
|
||||
readonly recordEvidence: EvidenceWriter["recordEvidence"] | undefined;
|
||||
readonly evidenceById?: EvidenceLookup | undefined;
|
||||
readonly withAdmittedAnalysis: import("./analysisAdmission.js").WithAdmittedAnalysis;
|
||||
},
|
||||
): void => {
|
||||
const retention = {
|
||||
recordEvidence: options.recordEvidence,
|
||||
evidenceById: options.evidenceById,
|
||||
};
|
||||
registerEvidenceTools(server, NATIVE_TOOL_CONTRACTS, {
|
||||
...options,
|
||||
parametersForExecution: withoutDelivery,
|
||||
parametersForEvidence: withoutDelivery,
|
||||
preflight: (operation, parameters) =>
|
||||
operation === "inspect_macho" && parameters.detail === "summary"
|
||||
? requireAnalysisViewRetention(operation, retention)
|
||||
: ok(null),
|
||||
projectEvidence: (operation, parameters, evidence) =>
|
||||
operation === "inspect_macho" && parameters.detail === "summary"
|
||||
? summarizeRetainedAnalysis(evidence, retention)
|
||||
: ok(evidence),
|
||||
});
|
||||
};
|
||||
@@ -173,7 +173,7 @@ export class SigrokRecordingProvider implements SignalRecordingPort {
|
||||
];
|
||||
phase = "workspace";
|
||||
root = await this.createRuntime();
|
||||
this.#resources.retain(root, undefined);
|
||||
this.#resources.retain(root, undefined, operation);
|
||||
const snapshotPath = join(root.path, "recording");
|
||||
const execute = async (args: readonly string[]) => {
|
||||
const output = await runOwnedCommand(
|
||||
@@ -371,7 +371,7 @@ export class SigrokRecordingProvider implements SignalRecordingPort {
|
||||
cause instanceof OwnedCommandFailure &&
|
||||
cause.cleanupOwner !== undefined
|
||||
)
|
||||
this.#resources.retain(root, cause.cleanupOwner);
|
||||
this.#resources.retain(root, cause.cleanupOwner, operation);
|
||||
result = err(
|
||||
this.#failure(
|
||||
cause,
|
||||
|
||||
@@ -26,6 +26,26 @@ class FixtureProcess extends EventEmitter implements ProviderProcessHandle {
|
||||
}
|
||||
}
|
||||
|
||||
const fixtureLauncher =
|
||||
(process: FixtureProcess): JadxLauncher =>
|
||||
async ({ runId }) => ({
|
||||
process,
|
||||
ownership: {
|
||||
runId,
|
||||
leaderPid: process.pid,
|
||||
processGroupId: process.pid,
|
||||
expectedParentPid: process.pid,
|
||||
},
|
||||
cleanup: async () => {
|
||||
process.emit("exit", 0, null);
|
||||
process.emit("close", 0, null);
|
||||
process.stdout.end();
|
||||
process.stderr.end();
|
||||
process.stdin.end();
|
||||
return { cleaned: true, signaled: false };
|
||||
},
|
||||
});
|
||||
|
||||
it("joins pending input errors before detaching the owned protocol stream", async () => {
|
||||
let completeWrite: ((cause: Error) => void) | undefined;
|
||||
const failure = new Error("owned pipe closed during cancellation");
|
||||
@@ -70,26 +90,9 @@ it("joins pending input errors before detaching the owned protocol stream", asyn
|
||||
|
||||
it("decodes split UTF-8 and newline bytes, then routes multiple complete frames", async () => {
|
||||
const process = new FixtureProcess();
|
||||
const launcher: JadxLauncher = async ({ runId }) => ({
|
||||
process,
|
||||
ownership: {
|
||||
runId,
|
||||
leaderPid: process.pid,
|
||||
processGroupId: process.pid,
|
||||
expectedParentPid: process.pid,
|
||||
},
|
||||
cleanup: async () => {
|
||||
process.emit("exit", 0, null);
|
||||
process.emit("close", 0, null);
|
||||
process.stdout.end();
|
||||
process.stderr.end();
|
||||
process.stdin.end();
|
||||
return { cleaned: true, signaled: false };
|
||||
},
|
||||
});
|
||||
const transport = new JadxMcpTransport(
|
||||
{ command: "fixture", arguments: [] },
|
||||
launcher,
|
||||
fixtureLauncher(process),
|
||||
);
|
||||
const received: JSONRPCMessage[] = [];
|
||||
transport.onmessage = (message) => received.push(message);
|
||||
@@ -98,7 +101,9 @@ it("decodes split UTF-8 and newline bytes, then routes multiple complete frames"
|
||||
const first = {
|
||||
jsonrpc: "2.0",
|
||||
id: 1,
|
||||
result: { content: [{ type: "text", text: "snow 雪 🦊" }] },
|
||||
result: {
|
||||
content: [{ type: "text", text: "snow 雪 🦊 and literal �" }],
|
||||
},
|
||||
} satisfies JSONRPCMessage;
|
||||
const second = {
|
||||
jsonrpc: "2.0",
|
||||
@@ -120,28 +125,41 @@ it("decodes split UTF-8 and newline bytes, then routes multiple complete frames"
|
||||
await transport.close();
|
||||
});
|
||||
|
||||
it("accepts a complete JSON-RPC frame at the 8 MiB boundary", async () => {
|
||||
it.each([
|
||||
["invalid UTF-8 byte", Buffer.from([0xff])],
|
||||
["truncated UTF-8 sequence", Buffer.from([0xe2, 0x82])],
|
||||
])("rejects %s in a complete JSON-RPC frame", async (_label, invalid) => {
|
||||
const process = new FixtureProcess();
|
||||
const launcher: JadxLauncher = async ({ runId }) => ({
|
||||
process,
|
||||
ownership: {
|
||||
runId,
|
||||
leaderPid: process.pid,
|
||||
processGroupId: process.pid,
|
||||
expectedParentPid: process.pid,
|
||||
},
|
||||
cleanup: async () => {
|
||||
process.emit("exit", 0, null);
|
||||
process.emit("close", 0, null);
|
||||
process.stdout.end();
|
||||
process.stderr.end();
|
||||
process.stdin.end();
|
||||
return { cleaned: true, signaled: false };
|
||||
},
|
||||
});
|
||||
const transport = new JadxMcpTransport(
|
||||
{ command: "fixture", arguments: [] },
|
||||
launcher,
|
||||
fixtureLauncher(process),
|
||||
);
|
||||
const received: JSONRPCMessage[] = [];
|
||||
const errors: Error[] = [];
|
||||
transport.onmessage = (message) => received.push(message);
|
||||
transport.onerror = (cause) => errors.push(cause);
|
||||
|
||||
await transport.start();
|
||||
process.stdout.write(
|
||||
Buffer.concat([
|
||||
Buffer.from('{"jsonrpc":"2.0","id":1,"result":{"text":"'),
|
||||
invalid,
|
||||
Buffer.from('"}}\n'),
|
||||
]),
|
||||
);
|
||||
await new Promise<void>((resolve) => setImmediate(resolve));
|
||||
await transport.close();
|
||||
|
||||
expect(received).toEqual([]);
|
||||
expect(errors).toHaveLength(1);
|
||||
expect(errors[0]?.message).toMatch(/encoded data was not valid/i);
|
||||
});
|
||||
|
||||
it("accepts a complete JSON-RPC frame at the 8 MiB boundary", async () => {
|
||||
const process = new FixtureProcess();
|
||||
const transport = new JadxMcpTransport(
|
||||
{ command: "fixture", arguments: [] },
|
||||
fixtureLauncher(process),
|
||||
);
|
||||
const received: JSONRPCMessage[] = [];
|
||||
transport.onmessage = (message) => received.push(message);
|
||||
|
||||
@@ -35,15 +35,7 @@ vi.mock("node:fs/promises", async (importOriginal) => {
|
||||
|
||||
it
|
||||
.runIf(process.platform === "linux")
|
||||
.each([
|
||||
"capture",
|
||||
"tool",
|
||||
"limiter",
|
||||
"kernel",
|
||||
"field-tool",
|
||||
"field-limiter",
|
||||
"field-kernel",
|
||||
])(
|
||||
.each(["capture", "tool", "limiter", "kernel"])(
|
||||
"retains failed %s descriptors and retries them before further acquisition and shutdown",
|
||||
async (member) => {
|
||||
const directory = await createTestTempDirectory("rea-capture-descriptor-");
|
||||
@@ -75,17 +67,12 @@ it
|
||||
},
|
||||
() => PrivateRuntimeRoot.create({ parent: directory }),
|
||||
);
|
||||
const discovery = member.startsWith("field-");
|
||||
const resource = discovery ? member.slice(6) : member;
|
||||
const operation = discovery
|
||||
? "inspect_packet_fields"
|
||||
: "inspect_packet_capture";
|
||||
cleanup.path =
|
||||
resource === "capture"
|
||||
member === "capture"
|
||||
? path
|
||||
: resource === "tool"
|
||||
: member === "tool"
|
||||
? command
|
||||
: resource === "limiter"
|
||||
: member === "limiter"
|
||||
? limiter
|
||||
: "/proc/self/limits";
|
||||
cleanup.denied = true;
|
||||
@@ -97,55 +84,24 @@ it
|
||||
cleanup.path = "";
|
||||
});
|
||||
const service = new PacketCaptureService(provider);
|
||||
const first = discovery
|
||||
? await service.inspectFields({ query: "usb" })
|
||||
: await service.inspect({ path, fields: ["frame.number"] });
|
||||
const first = await service.inspect({ path, fields: ["frame.number"] });
|
||||
expect(first).toMatchObject({
|
||||
ok: false,
|
||||
error: {
|
||||
cleanupIncomplete: true,
|
||||
cleanupResources: [cleanup.path],
|
||||
operation,
|
||||
},
|
||||
error: { cleanupIncomplete: true, cleanupResources: [cleanup.path] },
|
||||
});
|
||||
expect(cleanup.handles).toHaveLength(1);
|
||||
expect(cleanup.handles[0]?.fd).toBeGreaterThanOrEqual(0);
|
||||
const launchCount = launches;
|
||||
expect(
|
||||
await service.inspect({ path, fields: ["frame.number"] }),
|
||||
).toMatchObject({
|
||||
ok: false,
|
||||
error: { cleanupIncomplete: true, operation },
|
||||
});
|
||||
).toMatchObject({ ok: false, error: { cleanupIncomplete: true } });
|
||||
expect(cleanup.handles).toHaveLength(1);
|
||||
expect(launches).toBe(launchCount);
|
||||
let closingOperation = operation;
|
||||
if (discovery) {
|
||||
cleanup.denied = false;
|
||||
const recovered = await service.inspect({
|
||||
path,
|
||||
fields: ["frame.number"],
|
||||
});
|
||||
expect(recovered.ok).toBe(true);
|
||||
expect(cleanup.handles.every((handle) => handle.fd === -1)).toBe(true);
|
||||
expect(launches).toBeGreaterThan(launchCount);
|
||||
cleanup.denied = true;
|
||||
expect(
|
||||
await service.inspect({ path, fields: ["frame.number"] }),
|
||||
).toMatchObject({
|
||||
ok: false,
|
||||
error: { cleanupIncomplete: true, operation: "inspect_packet_capture" },
|
||||
});
|
||||
expect(cleanup.handles.at(-1)?.fd).toBeGreaterThanOrEqual(0);
|
||||
closingOperation = "inspect_packet_capture";
|
||||
}
|
||||
await expect(provider.close()).rejects.toMatchObject({
|
||||
cleanupIncomplete: true,
|
||||
operation: closingOperation,
|
||||
});
|
||||
cleanup.denied = false;
|
||||
await provider.close();
|
||||
expect(cleanup.handles[0]?.fd).toBe(-1);
|
||||
expect(cleanup.handles.every((handle) => handle.fd === -1)).toBe(true);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -11,9 +11,6 @@ import { PrivateRuntimeRoot } from "../../../src/process/PrivateRuntimeRoot.js";
|
||||
import { spawnOwnedProviderProcess } from "../../../src/process/ProviderProcess.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { createDeferred } from "../../fixtures/binarySession.js";
|
||||
import { Cli } from "incur";
|
||||
import { registerCaptureCommands } from "../../../src/cli/captureCommands.js";
|
||||
import { silentLogger } from "../../../src/logger.js";
|
||||
|
||||
// A command-boundary simulator: real process ownership/filesystem, not real TShark coverage.
|
||||
const fixture = async (mode = "ok", failCleanup = false) => {
|
||||
@@ -628,34 +625,3 @@ it("retains completed discovery on late cancellation and cleanup failure", async
|
||||
await f.service.close();
|
||||
}
|
||||
});
|
||||
|
||||
it("preserves discovery resource ownership through CLI shutdown retries", async () => {
|
||||
const f = await fixture("cleanup", true);
|
||||
const cli = Cli.create("discovery-cleanup", { sync: false });
|
||||
registerCaptureCommands(cli, silentLogger, {}, f.service);
|
||||
let stdout = "";
|
||||
try {
|
||||
await cli.serve(
|
||||
["inspect-packet-fields", "--query", "usb", "--format", "json"],
|
||||
{
|
||||
stdout: (text) => {
|
||||
stdout += text;
|
||||
},
|
||||
exit: () => {},
|
||||
},
|
||||
);
|
||||
expect(JSON.parse(stdout)).toMatchObject({
|
||||
code: "cleanup_incomplete",
|
||||
details: {
|
||||
diagnostics: {
|
||||
cleanup_error: {
|
||||
details: { operation: "inspect_packet_fields" },
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
} finally {
|
||||
f.allowCleanup();
|
||||
await f.service.close();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -191,12 +191,9 @@ describe.skipIf(process.platform === "win32")(
|
||||
it.each([
|
||||
["name=other\nversion=12.1.3\n", "does not match"],
|
||||
["name=ghidra-allegrex\nversion=12.1.4\n", "does not match"],
|
||||
[
|
||||
"name=ghidra-allegrex\nversion=12.1.3\nversion=12.1.3\n",
|
||||
"exactly one version",
|
||||
],
|
||||
["name=ghidra-allegrex\nversion=12.1.\\uZZZZ\n", "Unicode escape"],
|
||||
])(
|
||||
"rejects incompatible or ambiguous extension metadata %s",
|
||||
"rejects mismatched or malformed extension metadata %s",
|
||||
async (properties, reason) => {
|
||||
const { root } = await installation();
|
||||
await writeFile(join(root, "extension.properties"), properties);
|
||||
@@ -504,3 +501,38 @@ describe.skipIf(process.platform === "win32")(
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
describe.skipIf(process.platform === "win32")(
|
||||
"PSP extension property syntax",
|
||||
() => {
|
||||
it.each([
|
||||
{
|
||||
form: "escaped key and value with colon separator",
|
||||
properties: "n\\u0061me : ghidra-allegrex\nver\\u0073ion=12.1.3\n",
|
||||
},
|
||||
{
|
||||
form: "continued key and value lines",
|
||||
properties: "name=ghidra-\\\n allegrex\nversion=12.1.\\\n 3\n",
|
||||
},
|
||||
{
|
||||
form: "duplicate keys use the last value",
|
||||
properties:
|
||||
"name=wrong\nname=ghidra-allegrex\nversion=12.1.4\nversion=12.1.3\n",
|
||||
},
|
||||
])(
|
||||
"accepts Java Properties $form and hashes raw bytes",
|
||||
async ({ properties }) => {
|
||||
const { root } = await installation();
|
||||
const canonical = await inspectGhidraPspExtension(root, "12.1.3");
|
||||
const latin1Properties = Buffer.from(
|
||||
`${properties}author=caf\u00e9\n`,
|
||||
"latin1",
|
||||
);
|
||||
await writeFile(join(root, "extension.properties"), latin1Properties);
|
||||
const extension = await inspectGhidraPspExtension(root, "12.1.3");
|
||||
expect(extension.id).toBe("ghidra-allegrex");
|
||||
expect(extension.sha256).not.toBe(canonical.sha256);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -10,6 +10,8 @@ const injectedFilesystemFailures = vi.hoisted(() => ({
|
||||
closeNext: false,
|
||||
blockCloseRetries: false,
|
||||
chmodNext: false,
|
||||
syncAbortAfter: undefined as AbortController | undefined,
|
||||
syncCount: 0,
|
||||
rootIdentityPath: undefined as string | undefined,
|
||||
}));
|
||||
|
||||
@@ -44,6 +46,15 @@ vi.mock("node:fs/promises", async (importOriginal) => {
|
||||
await close();
|
||||
};
|
||||
}
|
||||
if (injectedFilesystemFailures.syncAbortAfter !== undefined) {
|
||||
const sync = handle.sync.bind(handle);
|
||||
handle.sync = async () => {
|
||||
await sync();
|
||||
injectedFilesystemFailures.syncCount += 1;
|
||||
if (injectedFilesystemFailures.syncCount === 2)
|
||||
injectedFilesystemFailures.syncAbortAfter?.abort();
|
||||
};
|
||||
}
|
||||
return handle;
|
||||
},
|
||||
};
|
||||
@@ -82,6 +93,34 @@ describe("safe artifact output close failures", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"keeps the tree unpublished when cancellation arrives during commit durability",
|
||||
async () => {
|
||||
const parent = await createTestTempDirectory("rea-safe-output-cancel-");
|
||||
const output = join(parent, "unpublished");
|
||||
const tree = await SafeOutputTree.create(output);
|
||||
const bytes = Buffer.from("pending output");
|
||||
await tree.write("file.txt", Readable.from(bytes), {
|
||||
sha256: createHash("sha256").update(bytes).digest("hex"),
|
||||
bytes: bytes.byteLength,
|
||||
});
|
||||
const controller = new AbortController();
|
||||
injectedFilesystemFailures.syncCount = 0;
|
||||
injectedFilesystemFailures.syncAbortAfter = controller;
|
||||
try {
|
||||
await expect(tree.commit(controller.signal)).rejects.toMatchObject({
|
||||
reason: "cancelled",
|
||||
});
|
||||
expect(tree.published).toBe(false);
|
||||
} finally {
|
||||
injectedFilesystemFailures.syncAbortAfter = undefined;
|
||||
injectedFilesystemFailures.syncCount = 0;
|
||||
}
|
||||
expect(await tree.rollback()).toMatchObject({ status: "complete" });
|
||||
await expect(access(output)).rejects.toMatchObject({ code: "ENOENT" });
|
||||
},
|
||||
);
|
||||
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"preserves setup failure when closing the staging handle also fails",
|
||||
async () => {
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
import { silentLogger } from "../../../src/logger.js";
|
||||
import { copyFile, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
|
||||
import { describe, expect } from "vitest";
|
||||
import { z } from "zod";
|
||||
|
||||
import { createBinarySession } from "../../../src/composition/binary.js";
|
||||
import { parseConfig } from "../../../src/config/parseConfig.js";
|
||||
import { inspectMachoSchema } from "../../../src/domain/native/nativeInspection.js";
|
||||
import { createServer } from "../../../src/server/createServer.js";
|
||||
import { thinMach } from "../../../src/domain/binaryTarget.fixture.js";
|
||||
import { createTestBinarySession } from "../../fixtures/binarySession.js";
|
||||
import { observed } from "../../fixtures/analysisExecution.js";
|
||||
import { ok } from "../../../src/domain/result.js";
|
||||
import { parseMcpToolError } from "../../fixtures/mcpToolError.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { mcpTest } from "../../support/mcp/mcpFixture.js";
|
||||
|
||||
const evidenceOf = <Schema extends z.ZodType>(schema: Schema) =>
|
||||
z.object({
|
||||
evidence_id: z.string(),
|
||||
parameters: z.record(z.string(), z.unknown()),
|
||||
normalized_result: schema,
|
||||
});
|
||||
const countSchema = z.object({
|
||||
returned: z.number(),
|
||||
total: z.number().nullable(),
|
||||
exhaustive: z.boolean(),
|
||||
});
|
||||
const summarySchema = z.object({
|
||||
kind: z.literal("summary"),
|
||||
parent_evidence_id: z.string(),
|
||||
summary: z.object({
|
||||
uuid: z.string().nullable(),
|
||||
collections: z.record(z.string(), countSchema),
|
||||
provenance_count: z.number(),
|
||||
}),
|
||||
});
|
||||
const pageSchema = z.object({
|
||||
kind: z.literal("macho"),
|
||||
item: z.array(z.unknown()),
|
||||
coverage: z.object({ next_offset: z.number().nullable() }),
|
||||
});
|
||||
|
||||
describe.skipIf(process.platform !== "darwin")(
|
||||
"Mach-O summary delivery through MCP",
|
||||
() => {
|
||||
mcpTest(
|
||||
"retains complete inspect_macho Evidence and pages its exact rows",
|
||||
async ({ mcp, onTestFinished }) => {
|
||||
const target = join(
|
||||
await createTestTempDirectory("rea-macho-summary-mcp-"),
|
||||
"ls",
|
||||
);
|
||||
await copyFile("/bin/ls", target);
|
||||
const configured = parseConfig({ REA_ANALYSIS_PROVIDER: "auto" });
|
||||
if (!configured.ok) throw configured.error;
|
||||
const session = createBinarySession(
|
||||
configured.value,
|
||||
silentLogger,
|
||||
process.env,
|
||||
);
|
||||
onTestFinished(async () => {
|
||||
await session.close();
|
||||
});
|
||||
const client = await mcp.connect(
|
||||
createServer({ kind: "session", session }),
|
||||
);
|
||||
const opened = await client.callTool({
|
||||
name: "open_binary",
|
||||
arguments: { path: target },
|
||||
});
|
||||
expect(opened.isError, JSON.stringify(opened.content)).not.toBe(true);
|
||||
|
||||
const complete = await client.callTool({
|
||||
name: "inspect_macho",
|
||||
arguments: {},
|
||||
});
|
||||
expect(complete.isError, JSON.stringify(complete.content)).not.toBe(
|
||||
true,
|
||||
);
|
||||
const full = evidenceOf(inspectMachoSchema).parse(
|
||||
complete.structuredContent,
|
||||
);
|
||||
// Omitted detail keeps the default Evidence parameters unchanged.
|
||||
expect(full.parameters).toEqual({});
|
||||
|
||||
const summarized = await client.callTool({
|
||||
name: "inspect_macho",
|
||||
arguments: { detail: "summary" },
|
||||
});
|
||||
expect(summarized.isError, JSON.stringify(summarized.content)).not.toBe(
|
||||
true,
|
||||
);
|
||||
const summary = evidenceOf(summarySchema).parse(
|
||||
summarized.structuredContent,
|
||||
).normalized_result;
|
||||
// Delivery detail never reaches the tools or the source Evidence ID.
|
||||
expect(summary.parent_evidence_id).toBe(full.evidence_id);
|
||||
const report = full.normalized_result;
|
||||
expect(summary.summary.uuid).toBe(report.uuid);
|
||||
expect(summary.summary.provenance_count).toBe(report.provenance.length);
|
||||
for (const name of ["imports", "exports", "dependencies"] as const)
|
||||
expect(summary.summary.collections[name]).toEqual({
|
||||
returned: report[name].items.length,
|
||||
total: report[name].total,
|
||||
exhaustive: report[name].exhaustive,
|
||||
});
|
||||
expect(JSON.stringify(summarized.structuredContent)).not.toContain(
|
||||
report.imports.items[0]?.name ?? "_",
|
||||
);
|
||||
|
||||
// Every facet must reassemble the unparsed complete rows exactly.
|
||||
const raw = z
|
||||
.object({ normalized_result: z.record(z.string(), z.unknown()) })
|
||||
.parse(complete.structuredContent).normalized_result;
|
||||
const facets = [
|
||||
"entrypoints",
|
||||
"architectures",
|
||||
"build_metadata",
|
||||
"load_commands",
|
||||
"dependencies",
|
||||
"imports",
|
||||
"exports",
|
||||
"segments",
|
||||
"provenance",
|
||||
] as const;
|
||||
for (const facet of facets) {
|
||||
const rows: unknown[] = [];
|
||||
let offset: number | null = 0;
|
||||
while (offset !== null) {
|
||||
const paged = await client.callTool({
|
||||
name: "inspect_analysis_view",
|
||||
arguments: {
|
||||
source: {
|
||||
kind: "retained-evidence",
|
||||
evidence_id: summary.parent_evidence_id,
|
||||
},
|
||||
view: { kind: "macho", facet, offset, limit: 16 },
|
||||
},
|
||||
});
|
||||
expect(paged.isError, JSON.stringify(paged.content)).not.toBe(true);
|
||||
const page = evidenceOf(pageSchema).parse(
|
||||
paged.structuredContent,
|
||||
).normalized_result;
|
||||
rows.push(...page.item);
|
||||
offset = page.coverage.next_offset;
|
||||
}
|
||||
expect(rows, facet).toEqual(
|
||||
facet === "provenance"
|
||||
? raw.provenance
|
||||
: z.object({ items: z.array(z.unknown()) }).parse(raw[facet])
|
||||
.items,
|
||||
);
|
||||
}
|
||||
|
||||
const wrongKind = await client.callTool({
|
||||
name: "inspect_analysis_view",
|
||||
arguments: {
|
||||
source: {
|
||||
kind: "retained-evidence",
|
||||
evidence_id: summary.parent_evidence_id,
|
||||
},
|
||||
view: { kind: "wasm", facet: "exports" },
|
||||
},
|
||||
});
|
||||
expect(wrongKind.isError).toBe(true);
|
||||
expect(JSON.stringify(wrongKind.content)).toContain(
|
||||
"Mach-O inspection supports summary and macho views.",
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
mcpTest(
|
||||
"refuses summary delivery before analysis when the server retains no Evidence",
|
||||
async ({ mcp, onTestFinished }) => {
|
||||
const target = join(
|
||||
await createTestTempDirectory("rea-summary-preflight-"),
|
||||
"tool",
|
||||
);
|
||||
await writeFile(target, thinMach(0xfeedfacf, 0x0100000c));
|
||||
const executed: string[] = [];
|
||||
const session = createTestBinarySession(() => ({
|
||||
execute: (operation) => {
|
||||
executed.push(operation);
|
||||
return Promise.resolve(observed(null));
|
||||
},
|
||||
close: () => Promise.resolve(ok(null)),
|
||||
}));
|
||||
onTestFinished(async () => {
|
||||
await session.close();
|
||||
});
|
||||
const opened = await session.open(target);
|
||||
if (!opened.ok) throw opened.error;
|
||||
const client = await mcp.connect(
|
||||
createServer({ kind: "fixed", analysis: session }),
|
||||
);
|
||||
const refused = [];
|
||||
for (const name of ["inspect_macho", "inspect_artifact"])
|
||||
refused.push(
|
||||
await client.callTool({ name, arguments: { detail: "summary" } }),
|
||||
);
|
||||
// Neither analysis ran only to be discarded by the delivery refusal.
|
||||
expect(executed.filter((operation) => operation !== "health")).toEqual([]);
|
||||
for (const result of refused)
|
||||
expect(parseMcpToolError(result)).toMatchObject({
|
||||
error: {
|
||||
code: "capability_unavailable",
|
||||
message: expect.stringContaining("does not retain Evidence"),
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
@@ -4,7 +4,7 @@ import { access, readFile, rm, symlink, writeFile } from "node:fs/promises";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { promisify } from "node:util";
|
||||
import { expect } from "vitest";
|
||||
import { expect, vi } from "vitest";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { itWithCaptureCapability } from "./processCaptureCapability.js";
|
||||
|
||||
@@ -123,6 +123,93 @@ const terminateFixtureProcess = async (pid: number): Promise<void> => {
|
||||
await waitForProcessExit(pid);
|
||||
};
|
||||
|
||||
itWithCaptureCapability(
|
||||
"keeps the process deadline bounded when the wall clock moves backward",
|
||||
async () => {
|
||||
const wallStart = Date.now();
|
||||
let wallReads = 0;
|
||||
const now = vi.spyOn(Date, "now").mockImplementation(() => {
|
||||
wallReads += 1;
|
||||
return wallReads === 1 ? wallStart : wallStart - 60_000 + wallReads;
|
||||
});
|
||||
const controller = new AbortController();
|
||||
const fallback = setTimeout(() => controller.abort(), 1_500);
|
||||
try {
|
||||
const result = await captureProcessScenario(
|
||||
parseProcessScenario({
|
||||
executable: process.execPath,
|
||||
arguments: [processFixture, "hang"],
|
||||
working_directory: dirname(processFixture),
|
||||
timeout_ms: 100,
|
||||
idle_timeout_ms: 5_000,
|
||||
}),
|
||||
controller.signal,
|
||||
);
|
||||
expect(result.ok).toBe(true);
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.exit.reason).toBe("timeout");
|
||||
} finally {
|
||||
clearTimeout(fallback);
|
||||
now.mockRestore();
|
||||
}
|
||||
},
|
||||
10_000,
|
||||
);
|
||||
|
||||
itWithCaptureCapability(
|
||||
"preserves reversed wall-clock observations and monotonic frames across capture",
|
||||
async () => {
|
||||
vi.useFakeTimers({ toFake: ["Date"] });
|
||||
vi.setSystemTime(new Date("2026-01-02T00:00:00.000Z"));
|
||||
try {
|
||||
const result = await captureProcessScenario(
|
||||
parseProcessScenario({
|
||||
executable: process.execPath,
|
||||
arguments: [processFixture, "partial"],
|
||||
working_directory: dirname(processFixture),
|
||||
settle_ms: 0,
|
||||
timeout_ms: 5_000,
|
||||
idle_timeout_ms: 5_000,
|
||||
}),
|
||||
undefined,
|
||||
process.platform,
|
||||
process.env,
|
||||
undefined,
|
||||
undefined,
|
||||
{
|
||||
async report(update) {
|
||||
if (update.phase === "running")
|
||||
vi.setSystemTime(new Date("2026-01-01T00:00:00.000Z"));
|
||||
},
|
||||
},
|
||||
);
|
||||
expect(result.ok).toBe(true);
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.frames.length).toBeGreaterThan(0);
|
||||
expect(Date.parse(result.value.manifest.completed_at)).toBeLessThan(
|
||||
Date.parse(result.value.manifest.started_at),
|
||||
);
|
||||
expect(result.value.limitations).toContain(
|
||||
"Wall-clock completion time precedes start time; elapsed capture timing is recorded separately and remains monotonic.",
|
||||
);
|
||||
expect(
|
||||
result.value.frames.map(({ at_ms }) => at_ms),
|
||||
"capture-relative frame times stay ordered and nonnegative",
|
||||
).toEqual(
|
||||
[...result.value.frames.map(({ at_ms }) => at_ms)].sort(
|
||||
(left, right) => left - right,
|
||||
),
|
||||
);
|
||||
expect(result.value.frames.every(({ at_ms }) => at_ms >= 0)).toBe(true);
|
||||
expect(result.value.exit.reason).toBe("exited");
|
||||
expect(result.value.settlement.elapsed_ms).toBeGreaterThan(0);
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
},
|
||||
10_000,
|
||||
);
|
||||
|
||||
itWithCaptureCapability(
|
||||
"cleans detached run-token children omitted by sampling and preserves an unowned neighbor",
|
||||
async () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { access, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
|
||||
import { createPackage, createPackageWithOptions } from "@electron/asar";
|
||||
import { expect, it } from "vitest";
|
||||
import { expect, it, vi } from "vitest";
|
||||
|
||||
import { ArtifactProvider } from "../../../../src/artifacts/ArtifactProvider.js";
|
||||
import {
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
import { artifactExtractionResultSchema } from "../../../../src/domain/artifactGraph.js";
|
||||
import { projectAnalysisError } from "../../../../src/domain/analysisErrorProjection.js";
|
||||
import { createTestTempDirectory } from "../../../fixtures/temporaryDirectory.js";
|
||||
import { DirectoryArtifactReader } from "../../../../src/artifacts/DirectoryArtifactReader.js";
|
||||
|
||||
it.each(["file", "directory"] as const)(
|
||||
"rolls back when an inventoried %s disappears before extraction",
|
||||
@@ -61,6 +62,42 @@ it("still refuses a regular file added after inventory and rolls back", async ()
|
||||
await expect(access(output)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("rolls back when cancellation arrives while closing the materialization reader", async () => {
|
||||
const root = await createTestTempDirectory("rea-extract-cancel-close-");
|
||||
const source = join(root, "source");
|
||||
await mkdir(source);
|
||||
await writeFile(join(source, "payload.txt"), "complete payload\n");
|
||||
const snapshot = await scanArtifactInventory(source);
|
||||
const output = join(root, "output");
|
||||
const controller = new AbortController();
|
||||
const close = DirectoryArtifactReader.prototype.close;
|
||||
const closeSpy = vi
|
||||
.spyOn(DirectoryArtifactReader.prototype, "close")
|
||||
.mockImplementation(async function (this: DirectoryArtifactReader) {
|
||||
controller.abort();
|
||||
await close.call(this);
|
||||
});
|
||||
try {
|
||||
await expect(
|
||||
materializeArtifactInventory(
|
||||
{
|
||||
inputPath: source,
|
||||
inputFormat: "asar",
|
||||
outputRoot: output,
|
||||
environment: process.env,
|
||||
integrityPolicy: "fail",
|
||||
},
|
||||
source,
|
||||
snapshot,
|
||||
controller.signal,
|
||||
),
|
||||
).rejects.toMatchObject({ reason: "cancelled" });
|
||||
await expect(access(output)).rejects.toThrow();
|
||||
} finally {
|
||||
closeSpy.mockRestore();
|
||||
}
|
||||
});
|
||||
|
||||
it("preserves every equal-content occurrence and copies a nested ASAR as its containing file", async () => {
|
||||
const root = await createTestTempDirectory("rea-extract-nested-");
|
||||
const source = join(root, "source");
|
||||
|
||||
@@ -3,6 +3,8 @@ import { readFile } from "node:fs/promises";
|
||||
import { describe, expect, it, onTestFinished } from "vitest";
|
||||
|
||||
import { MachOSliceArtifactReader } from "../../../../src/artifacts/MachOSliceArtifactReader.js";
|
||||
import { XcrunCommandRunner } from "../../../../src/native/CommandRunner.js";
|
||||
import { DarwinProcessOwnershipInspectionError } from "../../../../src/process/DarwinProcessRunTokenReader.js";
|
||||
|
||||
/**
|
||||
* Read a 32-bit FAT table directly. The host's /bin/ls changes between macOS
|
||||
@@ -20,6 +22,26 @@ const fatSlices = async (
|
||||
};
|
||||
|
||||
describe("Mach-O slice reader with system lipo", () => {
|
||||
it("names the process ownership helper prerequisite when lipo cannot be supervised", async () => {
|
||||
const prerequisite =
|
||||
"Direct Darwin helper compilation requires absolute REA_DARWIN_SWIFTC_PATH and SDKROOT paths.";
|
||||
const reader = new MachOSliceArtifactReader(
|
||||
process.execPath,
|
||||
{},
|
||||
new XcrunCommandRunner({}, undefined, () =>
|
||||
Promise.reject(new DarwinProcessOwnershipInspectionError(prerequisite)),
|
||||
),
|
||||
);
|
||||
onTestFinished(() => reader.close());
|
||||
const enumerate = async () => {
|
||||
for await (const _entry of reader.entries()) continue;
|
||||
};
|
||||
await expect(enumerate()).rejects.toMatchObject({
|
||||
reason: "unavailable",
|
||||
message: `lipo could not enumerate universal Mach-O slices: ${prerequisite}`,
|
||||
});
|
||||
});
|
||||
|
||||
it.skipIf(process.platform !== "darwin")(
|
||||
"checks real /bin/ls slice ranges against its FAT table",
|
||||
async () => {
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
type NativeCommandLauncher,
|
||||
} from "../../../../src/native/CommandRunner.js";
|
||||
import { ok } from "../../../../src/domain/result.js";
|
||||
import { DarwinProcessOwnershipInspectionError } from "../../../../src/process/DarwinProcessRunTokenReader.js";
|
||||
|
||||
afterEach(() => vi.unstubAllEnvs());
|
||||
|
||||
@@ -210,3 +211,23 @@ it.skipIf(process.platform === "win32")(
|
||||
if (!killed.ok) expect(killed.error.reason).toBe("nonzero-exit");
|
||||
},
|
||||
);
|
||||
|
||||
it("keeps the ownership helper prerequisite when xcrun cannot be supervised", async () => {
|
||||
const inspection = new DarwinProcessOwnershipInspectionError(
|
||||
"macOS process ownership inspection requires the Apple Swift compiler via xcrun",
|
||||
);
|
||||
const runner = new XcrunCommandRunner({}, undefined, () =>
|
||||
Promise.reject(inspection),
|
||||
);
|
||||
|
||||
const result = await runner.run("file", [], {});
|
||||
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) return;
|
||||
expect(result.error).toMatchObject({
|
||||
tool: "file",
|
||||
reason: "io",
|
||||
detail: inspection.message,
|
||||
cause: { tool: "xcrun", detail: inspection.message, cause: inspection },
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { DarwinProcessOwnershipInspectionError } from "../../../../src/process/DarwinProcessRunTokenReader.js";
|
||||
import { EventEmitter } from "node:events";
|
||||
import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
@@ -280,6 +281,30 @@ describe("native command failure capture and limits", () => {
|
||||
stderr_bytes: expect.any(Number),
|
||||
},
|
||||
});
|
||||
expect(projectAnalysisError(result.error).details).not.toHaveProperty(
|
||||
"diagnostics.detail",
|
||||
);
|
||||
});
|
||||
|
||||
it("projects the ownership helper prerequisite when a command cannot be supervised", async () => {
|
||||
const inspection = new DarwinProcessOwnershipInspectionError(
|
||||
"Direct Darwin helper compilation requires absolute REA_DARWIN_SWIFTC_PATH and SDKROOT paths.",
|
||||
);
|
||||
const runner = new XcrunCommandRunner(
|
||||
{},
|
||||
() =>
|
||||
Promise.resolve(ok({ path: process.execPath, sha256: "a".repeat(64) })),
|
||||
() => Promise.reject(inspection),
|
||||
);
|
||||
const result = await new NativeMacOSProvider({}, runner, "darwin")
|
||||
.createClient(machoTarget("/private/fixture"))
|
||||
.execute("demangle_swift", { symbols: ["fixture-symbol"] });
|
||||
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) return;
|
||||
expect(projectAnalysisError(result.error).details).toMatchObject({
|
||||
diagnostics: { reason: "io", detail: inspection.message },
|
||||
});
|
||||
});
|
||||
|
||||
it("retains output written before cancellation and reaps the stalled command", async () => {
|
||||
|
||||
@@ -35,15 +35,7 @@ vi.mock("node:fs/promises", async (importOriginal) => {
|
||||
|
||||
it
|
||||
.runIf(process.platform === "linux")
|
||||
.each([
|
||||
"capture",
|
||||
"tool",
|
||||
"limiter",
|
||||
"kernel",
|
||||
"field-tool",
|
||||
"field-limiter",
|
||||
"field-kernel",
|
||||
])(
|
||||
.each(["capture", "tool", "limiter", "kernel"])(
|
||||
"retains failed %s descriptors and retries them before further acquisition and shutdown",
|
||||
async (member) => {
|
||||
const directory = await createTestTempDirectory("rea-signal-descriptor-");
|
||||
@@ -75,17 +67,12 @@ it
|
||||
},
|
||||
() => PrivateRuntimeRoot.create({ parent: directory }),
|
||||
);
|
||||
const discovery = member.startsWith("field-");
|
||||
const resource = discovery ? member.slice(6) : member;
|
||||
const operation = discovery
|
||||
? "inspect_signal_decoders"
|
||||
: "decode_signal_recording";
|
||||
cleanup.path =
|
||||
resource === "capture"
|
||||
member === "capture"
|
||||
? path
|
||||
: resource === "tool"
|
||||
: member === "tool"
|
||||
? command
|
||||
: resource === "limiter"
|
||||
: member === "limiter"
|
||||
? limiter
|
||||
: "/proc/self/limits";
|
||||
cleanup.denied = true;
|
||||
@@ -97,29 +84,22 @@ it
|
||||
cleanup.path = "";
|
||||
});
|
||||
const service = new SignalRecordingService(provider);
|
||||
const first = discovery
|
||||
? await service.inspectDecoders({ query: "uart" })
|
||||
: await service.decode({ path, decoders: "uart" });
|
||||
const first = await service.decode({ path, decoders: "uart" });
|
||||
expect(first).toMatchObject({
|
||||
ok: false,
|
||||
error: {
|
||||
cleanupIncomplete: true,
|
||||
cleanupResources: [cleanup.path],
|
||||
operation,
|
||||
},
|
||||
error: { cleanupIncomplete: true, cleanupResources: [cleanup.path] },
|
||||
});
|
||||
expect(cleanup.handles).toHaveLength(1);
|
||||
expect(cleanup.handles[0]?.fd).toBeGreaterThanOrEqual(0);
|
||||
const launchCount = launches;
|
||||
expect(await service.decode({ path, decoders: "uart" })).toMatchObject({
|
||||
ok: false,
|
||||
error: { cleanupIncomplete: true, operation },
|
||||
error: { cleanupIncomplete: true },
|
||||
});
|
||||
expect(cleanup.handles).toHaveLength(1);
|
||||
expect(launches).toBe(launchCount);
|
||||
await expect(provider.close()).rejects.toMatchObject({
|
||||
cleanupIncomplete: true,
|
||||
operation,
|
||||
});
|
||||
cleanup.denied = false;
|
||||
await provider.close();
|
||||
|
||||
Reference in New Issue
Block a user