* fix(process): name the fields a located divergence compared
`first_divergence` handed back the whole observation on each side, so a
caller that saw `changed` had to diff two large objects by hand to learn
what the comparison actually judged. Reported in #8204: the same
deterministic CLI captured twice reports `terminal`, `exit`, and
`filesystem` changed, and the report names no field.
A located divergence now carries `fields`, the sorted leaf paths that
differ in the projection the comparison judged, for example
`files[3].path`, `pid`, `process_samples[0].pid`, or `$` when a whole
observation is present on one side only. Positions are bracketed array
indices; the list is bounded to eight names because the report names a
difference rather than copying the observation, and `left` and `right`
still retain both complete observations.
The list is computed from the comparable projection, not the observed
values, so capture-local timing (`at_ms`, `dispatched_at_ms`,
`elapsed_ms`, `sent_at_ms`) is never named unless a `trace_spec`
explicitly selects it. That keeps the names honest about what the
comparison measured.
Naming a volatile value is not a claim of equivalence. A per-run
temporary root or PID still counts as a difference; the exclusion path
remains capture-time normalization (`normalization.paths`,
`normalization.pids`, `normalization.patterns`), which must match on both
sides because comparison refuses captures under different rules.
`fields` is optional in the contract. `readComparisonResult` re-validates
`normalized_result` of authenticated Evidence, so a required field would
reject records written before this change. Producing code always
populates it.
Validation: `tsc --noEmit` clean; `oxlint` reports only the four
pre-existing complexity/length warnings this file already carried;
`scripts/ci/static-check-report.mjs lint` 0 errors; module boundaries and
architecture guards pass; `oxfmt --check` clean on the touched files;
`completeness-enum-guard`, `optional-fact-default-guard`, and
`rea-numeric-limits` pass; `scan:todos` and `verify-test-discovery`
clean; jscpd within budget. 194 focused domain tests passed, including
five new cases covering a temporary-path leaf inside a filesystem
checkpoint, a fully populated process sample, the eight-name bound,
one-sided presence as `$`, and an authenticated payload without
`fields`. No live process capture was exercised on this host.
Refs #8204
* fix(process): honor trace timing policy in divergence fields
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(zip): corroborate local member extent claims
* fix(zip): verify descriptors of contained records
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Where PID 1 does not reap orphans promptly, a killed descendant stays a zombie for a while. Signal 0 still reaches a zombie, and a raw process table still lists it, so four boundary tests decided a stopped process was alive although cleanup had worked.
The stop assertions in artifactVerifierCleanupOwner and desktopBuildOwnedCommand now use processHasStopped. The run-token sweep in ownedCommand reads the product's liveProcesses view, which drops zombie rows. The testing guide says to assert a stop this way and not with signal 0.
Ported onto current main from morluto/rea#11837. The helper and the first eight cases landed in morluto/rea#12034, so this keeps the four that remained.
Co-authored-by: Dayan Kijege <dayanusa7@gmail.com>
* fix(setup): write the recommended tool call timeout into dsh registrations
rea setup --client dsh wrote registrations without toolCallTimeoutMs, so
DeepSeek Harness applied its 60-second default while a native provider
startup alone can exceed it. Setup now derives the deadline from the same
provider allowance plus operation headroom used for Kimi and Codex,
preserves a positive caller-selected value, and doctor reports a
registration without a usable timeout as stale.
ProviderRequestBudgetResolver declares an optional budgetSettings read
set, so the fail-closed budget gate rejects unresolved Cordis expressions
only for settings the derivation may read plus the timeout inputs; an
unrelated expression such as GHIDRA_INSTALL_DIR still refreshes, and an
expression in REA_IDA_MCP_CONFIG fails closed.
* test(setup): record the dsh tool call deadline in the NUL repair fixture
The NUL refusal scenario rewrites a valid dsh registration and expects
doctor to report it healthy. That fixture omitted toolCallTimeoutMs,
which doctor now reports stale, so the repaired registration records the
deadline a current dsh registration carries.
* test(setup): separate dsh timeout repair coverage
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(pe): admit Authenticode nesting depth of signed Windows binaries
inspect_pe_certificates refused genuine Authenticode signatures with "ASN.1 nesting exceeds 32 levels". Windows dual signing embeds whole SignedData values in unsigned attributes: a nested signature (1.3.6.1.4.1.311.2.4.1) holding an RFC 3161 timestamp (1.3.6.1.4.1.311.3.3.1). Each embedding adds eight levels, so signed system binaries pass the shared reader's default of 32.
The PE certificate reader now gives the shared ASN.1 reader its own depth allowance of 64. The node allowance is unchanged, and a payload past the depth allowance is still refused as an exhausted fixed allowance.
Ported onto current main from morluto/rea#7160. The fixture gains signed attributes through its fields argument, and the provider's allowance test moves to the new limit.
* test(pe): pin the Authenticode depth allowance at its boundary
The dual-signed fixture has to be deeper than the shared reader's default, or it would pass without the PE depth allowance. An independent DER walk now asserts its depth, and a boundary case admits nesting at the allowance and refuses one level more as an exhausted allowance.
The certificate guide states the depth allowance next to the value allowance.
---------
Co-authored-by: AmmarJamil23 <ammarjamil7000@gmail.com>
fix(javascript): keep wrapper redeclarations from inventing application owners
A top-level lexical declaration that reuses a CommonJS wrapper parameter
cannot evaluate, and its recovered syntax is complete. Counting that
diagnostic as dropped syntax marked the entrypoint as an unexamined loader
and erased another package's proven loadFile root.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(cutter): explain empty discovery when Cutter 2.5.0 rejects the plugin
Official Cutter 2.5.0 builds have been observed to reject Python plugins at
startup, including Cutter's own sample plugin and REA's bridge
(rizinorg/cutter#3659). No session is published, and list_cutter_sessions
returns no_live_bridge_found with nothing pointing at the Cutter release.
The list_cutter_sessions contract now says what no_live_bridge_found means
and names the observed 2.5.0 rejection. The Cutter bridge docs describe
installing the plugin, the startup log lines Cutter prints when it rejects
it, and that 2.4.1 loaded the bridge in the reported check. A minimal
independent plugin fails the same way, so the bridge itself is unchanged.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): report empty-discovery causes in the shared result
The guidance lived only in the MCP tool description, which
`rea list-cutter-sessions` never shows. The docs also assumed a known package
folder, which npx installations do not have.
The discovery result now carries limitations, owned by
cutterDiscoveryLimitations in the domain. For no_live_bridge_found they list
the causes discovery cannot tell apart, including the observed Cutter 2.5.0
Python-plugin rejection (rizinorg/cutter#3659). CLI and MCP project the same
text, and the tool description returns to its previous wording. The docs now
take the plugin from the published package of the matching version with
npm pack.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): name failed status probes among no-live causes
no_live_bridge_found also covers a published session whose status probe
fails: a stale descriptor after Cutter exited, an unresponsive bridge, or
an incompatible bridge version. The limitation named only process,
plugin-loading and directory causes. It now lists these too, and the
dead-status-endpoint test asserts that such a discovery carries it.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cutter): give the finalization discovery fixture its limitations
commandFinalizationCancellation builds a Cutter discovery through the
list_cutter_sessions output schema, which now requires limitations. CI
shard 4 failed all five final-close cases with a ZodError. The fixture
now takes the owner's empty limitations for sessions_found.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): count unanswered sessions beside found ones
When one session answered and another published session failed its status
probe, discovery returned sessions_found with no limitation. The partial
result looked complete. The client already throws for live ceiling
mismatches, so every other descriptor without a session is a failed probe.
It now passes that count to cutterDiscoveryLimitations, which reports the
unlisted sessions for sessions_found. The stale-descriptor case in
cutterBridgeRequestLimit asserts it.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): name unpublished bridge sessions among no-live causes
When Cutter loads the plugin but the bridge cannot write its session
descriptor, for example in an unwritable or full bridge directory,
_BridgeServer.run closes the socket without logging. Cutter's log then shows
the plugin as loaded, yet discovery finds nothing. The no-live limitation now
names that cause and says the bridge does not log it. The Cutter docs say to
check the bridge directory when the plugin is loaded but no session appears.
Refs #10299
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): count unreadable descriptors among unlisted sessions
The descriptor loader dropped filename-matching candidates it could not read
before listSessions counted unanswered sessions, so a found session beside a
malformed, oversized, non-private or misnamed descriptor reported no
limitation. The loader now returns its unreadable count, and the discovery
limitation owner reports it beside failed status probes for both
sessions_found and no_live_bridge_found. The no-live text keeps only the
causes that leave nothing published; published sessions are now counted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cutter): leave session existence unknown for unreadable descriptors
A filename-matching candidate the loader could not read does not establish
that any session exists: it may be malformed, misnamed or removed while
reading. The limitation now counts unreadable descriptor candidates and
says whether they describe Cutter sessions is unknown, instead of saying
their sessions are not listed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(mcp): record the list_cutter_sessions limitations in the advertised summary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(native): report undecoded Objective-C category class properties
inspect_native_dispatch_metadata read a category's instance property
list and stopped. A category that also declares class properties kept
`decode.status: "decoded"` and `objc_properties_categories` stayed
complete, although its `_classProperties` list was never read.
When the image info declares the field and the list is present, the
category is now partial with `category_class_properties_not_decoded`
and coverage names the list field, as protocols already do for their
class property list.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(native): keep a category whose class property field is unreadable
Reading the image info flags or the `_classProperties` pointer could
throw inside the category decode, which dropped the whole row and its
already decoded name, methods, protocols and properties.
Both reads now fail into a `category_class_properties_unreadable`
issue at the failing field, and the category stays as a partial row.
Same-named image infos are read together instead of taking the first.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(native): report a truncated image info instead of reading it as absent
A present `__objc_imageinfo` section shorter than its 8 bytes was filtered
out, so a category in that image stayed decoded although whether its record
ends in `_classProperties` is unknown. The category now keeps its decoded
facts and is partial with `category_class_properties_unreadable`, located at
the image info.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(native): resolve the category class property field and read image flags once
A bound `_classProperties` field read as zero and counted as a null list,
and so did a zero whose pointer fixups are unknown. The field is now resolved
through its fixup: a bind is a present list, and an unknown zero keeps the
category partial with `category_class_properties_unreadable`.
The image info declaration is read once per decode instead of once per
category; an image info that declares the field decides.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(native): list Swift types recorded in __swift5_types2
inspect_native_dispatch_metadata read nominal type records only from
`__swift5_types`. Swift records noncopyable types in `__swift5_types2`
with the same record layout, so those types were missing from
`swift_decls` while `swift_declarations` coverage stayed complete.
Both sections are now read, and each declaration's evidence names the
section its record came from.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(native): assert complete Swift declarations across both type sections
The regression fixture left each descriptor's parent unset, so both
declarations were partial and the test asserted only the examined
count. The descriptors now share a module context, and the test asserts
decoded rows, their module and qualified names, and complete coverage.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Members under package/ are OPC packaging parts, like _rels/ and
[Content_Types].xml; nuget pack writes the core properties .psmdcp there.
Dependencies come from every <dependencies> element. When any <group>
exists, ungrouped <dependency> elements are omitted with a limitation that
counts them, because NuGet's restore-time NuspecReader ignores them.
`cliDecimalField` published the domain range on the integer branch and only
the fixed `^[0-9]+$` guard on the decimal-token branch, and JSON Schema
bounds do not constrain strings. A client validating raw argv text against
`--schema` therefore admitted out-of-range tokens such as `--row-limit=0` or
`--block-size=255` that the parser rejects with `VALIDATION_ERROR`.
Publish the domain range on the token branch through the schema-constraint
owner, keeping the CLI's decimal leading-zero convention and the existing
parser diagnostics: the declaration is metadata, so accepted values and
`too_small`/`too_big` messages are unchanged. Non-range refinements such as
the power-of-two entropy block size stay parser-only, and an open-ended
domain still publishes its floor. The getting-started guide states the same
contract.
Fixes#9348
inspect_elf_notes and inspect_elf_debug_link now examine up to 128 note
entries by default instead of 32; the ceiling stays 256. Ubuntu 26.04's
libc.so.6 is examined as 85 entries, 79 of them SystemTap probes, and both
tools refused it with default arguments.
The .nuspec, its OPC relationships and the Maven POM now parse with
lineEndings normalize, as XML 1.0 section 2.11 and the NuGet and Maven
readers do. Text from CRLF files no longer keeps carriage returns.
* fix(artifacts): accept Android boot images without final page padding
The truncation check required the file to reach the page-aligned end
after the last component, so an image holding every declared byte but
omitting the trailing zero padding was refused as truncated, and the
message named the padded end. Bound truncation by the last declared
header or component byte instead, keep the page-aligned end for
locating an AVB footer, and check the AVB original image size against
the declared bytes.
Fixes#11854
* test(artifacts): check boot image declared ends against the fixture layout
Derive each expected end from the fixture layout instead of the
parser's dataEnd, so a declared structure dropped from the coverage
check fails the test.
---------
Co-authored-by: Anurag Singh <211784907+Anurag-5ingh@users.noreply.github.com>
Inspect local Maven/Gradle metadata as Evidence with bounded report/XML admission, preserved caller choices and owned cleanup.
Refs #8828; broader comparison and resolution work remains outside this change.
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Inspect supplied NuGet packages as local Evidence with bounded ZIP parsing, preserved caller choices and credential-safe metadata.
Fixes#8144
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Project retained Go and Rust dependency metadata as deterministic, bounded CycloneDX documents with parent provenance and explicit unknowns. Share current Evidence identity admission and canonical document-ceiling recovery.
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Add offline ELF dependency, search-path, symbol-version and import inspection with retained Evidence summaries and pages. Bound GNU-hash work and preserve cancellation, stable identity and caller-selected parameters across CLI/MCP.
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(ci): narrow false full-suite fallbacks in PR test selection
* ci: unify Go and Android lanes under CI and scope CodeQL and cache retention
* perf(ci): trim classification checkout, cache MinGW/Windows builds, and rebalance full shards
* fix(ci): calibrate PR CI health window and CI timings schedule
* perf(ci): fix script-basename substring fallbacks and trim macOS/Windows lane overhead
* fix(ci): address PR review findings across CodeQL, Windows cache key, PR health, and docs
* perf(tests): share canonical MCP catalog setup and avoid Ajv $ref expansion
* fix(ci): align selected test shard limits (50 files, max 8 shards) with 400-file cap
* fix(adb): run adb commands under owned supervision and start the adb server explicitly
The adb version probe and device commands now run through runOwnedCommand
in their own process group, keeping adb's SIGTERM-first stop through the
termination policy. A device command's escaped descendants are swept with
its cleanup, and cleanup that fails stays owned by the provider, which
retries it before its next operation.
Device operations start the adb server with an explicit `adb start-server`
first. The server is an external shared service: REA may start it but never
stops it, so a device command never forks it into its own cleanup.
runOwnedCommand gains a byte-limited stdout collector: output beyond
maxStdoutBytes is an output-limit failure, like an exceeded diagnostic
budget, and the collected bytes are kept exactly for binary protocols such
as screencap. Ownership preparation that cannot start its own helper for
lack of host capacity is reported as the command's host-capacity launch
failure.
* fix(adb): preserve completed refusals, server startup facts, and lazy server start
* fix(adb): scope runtime-root command cleanup and preserve incomplete command cleanup
* fix(adb): preserve completed bugreports and staging directories across command cleanup failures
* fix(adb): preserve bugreport command cleanup across readback failures and project live cleanup resources