* fix(desktop): discover application state under its launch home
* fix(desktop): preserve filesystem traversal in state roots
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(native): surface inferred prototype instruction conflicts
- Add evidence-backed x86-32 stack-read and stdcall cleanup diagnostics in ReaGhidraBridge.java without rewriting signatures or function bodies.
- Carry prototype conflicts through native API schemas, analysis summaries and retained dossier views so CLI and MCP share the observations.
- Update Ghidra analysis profile digests, documentation and MCP boundary tests for the new diagnostic contract.
* fix(native): follow framed paths and retain zero cleanup conflicts
- Traverse decoded entry-frame paths in ReaGhidraBridge.java instead of stopping at an address-ordered early return, so later reachable reads remain visible.
- Detect explicit, implicit and partial EBP writes and use decoded operands with p-code loads, preventing stale-frame warnings and recognizing real Ghidra stack reads.
- Compare immediate return cleanup with inferred stdcall stack bytes even when either side is zero, and allow zero in the native API contract.
- Add real Ghidra instruction probes and MCP/CI regressions for the reported cases and document the bounded checks.
* fix(native): attribute frame reads before register writes
- Check a decoded stack read before invalidating EBP in ReaGhidraBridge.java so instructions that read and replace the frame still report the conflict.
- Match each candidate operand's address p-code to its LOAD pointer so a POP from ESP into an EBP destination cannot masquerade as an argument read.
- Cover both decoded instruction cases in ReaPrototypeConflictProbe.java and await verifier-owned scratch cleanup on success and failure.
* fix(ghidra): recompute raw profile digests after rebase
- Recompute the 6502 and disabled-analyzer raw-binary profile digests in GhidraRawProfileDigest.test.ts so the pinned values commit to the merged shared policy on current main.
* fix(native): locate the entry frame by address and own verifier cleanup
- Find PUSH EBP; MOV EBP, ESP from the function entry address in ReaGhidraBridge.java so an owned block below the entry cannot hide a reachable argument read.
- Run analyzeHeadless in its own process group and stop that group before removing scratch in verify-ghidra-prototype-conflicts.mjs, so the JVM and decompiler children are addressed as one owned family.
- Cover the lower-owned-block case in ReaPrototypeConflictProbe.java with an entry frame preceded by a decoded lower block.
* fix(native): size prototype fixture and own Ghidra cleanup
- Allocate the instruction fixture through the lower-block offset in verify-ghidra-prototype-conflicts.mjs so the entry frame and decoded block exist for the probe.
- Check the detached process group instead of the leader exit code before cleaning up, so lingering decompiler children receive SIGTERM and SIGKILL before scratch removal.
* fix(native): own Ghidra probe cleanup with shared process owner
- Use REA's ProviderProcessSupervisor and token-verified cleanup in verify-ghidra-prototype-conflicts.mjs so the JVM and descendants are stopped before scratch removal, including failed launches.
- Preserve the source-owned x86 fixture with an entry frame and lower block while asserting verified cleanup.
- Build the pinned verifier dependency graph in the Ghidra bridge CI job and extend its timeout before running the real probe.
* fix(native): end verifier waits on interrupt before cleanup
- Install SIGINT and SIGTERM handlers before spawning Ghidra and abort the wait, so Ctrl-C no longer leaves the detached process group running.
- Keep cleanup handlers installed until the shared process owner reports verified cleanup, then remove scratch only after the process family is stopped.
* fix(native): preserve verifier cleanup interruption errors
- Keep interrupt handlers installed through process cleanup and workspace deletion, then check cancellation before reporting success.
- Preserve and report the failing cleanup step instead of replacing it with an interruption or deleting a tree that may still be unsafe.
* fix(native): retain probe failures across verifier cleanup
- Record the probe error before cleanup so a late SIGINT or SIGTERM cannot replace its stack and captured Ghidra diagnostics.
- Prefer the earlier probe failure when cleanup also fails, while preserving cleanup diagnostics and temporary state for diagnosis.
* test(kuna): raise caller matrix verifier budget for parallel CI
- The multi-target verifier spawn used a 10s timeout while sibling verifier cases use 25s.
- Under 8-way sharded CI load this intermittently exceeded 10s and produced ETIMEDOUT, failing shard 1/8 and portable tests.
- Raise to 30s to match the existing verifier budget and avoid load flakes.
* ci: retrigger checks after transient Ghidra SDK download 403
- The ghidra_bridge lane failed in upstream's untouched SDK acquisition step: curl returned 403 with 0 bytes downloaded in 0.046s from the GitHub release CDN.
- Push an empty commit to start a fresh run because rerunning on the upstream repository requires admin rights.
* fix(native): keep the cleanup lease on combined verifier failures
- Run the prototype-conflict probe through withVerifierFixture so a probe failure and a failed release surface as one AggregateError that keeps the probe error as its cause and attaches the retained fixture as cleanupLeases, instead of throwing the probe error alone and dropping the cleanup owner.
- Report the failed cleanup step and retained project only when the fixture was not released, and keep interrupt handlers installed until release finishes.
* test(native): use shared MCP prototype test deadlines
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(ghidra): admit plain MIPS32 PIC shared images
Add an elf32-dyn-o32-arch32r2-standard-v1 lane for ET_DYN images without
an ASE flag (shared libraries and ET_DYN executables), beside the MIPS16
lane. It reuses the complete dynamic-relocation inspection and admits
R_MIPS_NONE, symbol-bearing R_MIPS_REL32 and the TLS loader slots
DTPMOD32/DTPREL32/TPREL32, which stay unapplied with a limitation.
Ghidra's default moves an image linked at 0 to 0x10000 and then shifts
only nonzero local GOT entries, so page-zero GOT entries (how GNU-ld
libraries call static functions) keep unshifted values and calls through
them decompile to wrong addresses. The lane imports at the image's own
ELF image base instead (lowest PT_LOAD in the first 20 headers, as Ghidra
computes it), commits it in the analysis profile and requires the bridge
handshake to report it. Images with a prelink trailer are refused.
verify:ghidra:mips32-shared checks LE, BE and soft-float LLD fixtures laid
out like GNU ld output against an independent readelf oracle: every
REL32, local GOT entry (including a zero page entry), global GOT entry
(EXTERNAL or lazy-binding stub) and unapplied TLS slot, plus named calls
in the decompilation, snapshot round trip and CLI evidence.
Refs #2338
* style(ghidra): format link-base regression scenarios
* test(ghidra): require zero-valued local GOT coverage
* test(ghidra): cover TPREL32 in the shared lane and drop duplicated session suites
Add an initial-exec TLS variable so the MIPS32 shared fixture declares
R_MIPS_TLS_TPREL32 beside DTPMOD32/DTPREL32, and require all three slots
to stay UNSUPPORTED with unchanged bytes. Remove the soft-float and
mutation handshake suites that the main reconciliation duplicated in
GhidraSessionValues.test.ts.
* test(ghidra): read the section table in the MIPS32 shared-library oracle
parseMipsReadelf now confirms the fixture's section types from readelf -S
(main added -S to the executable, relocatable and PSP oracles). Request it in
the shared-library oracle too.
* test(ghidra): follow main's verifier contracts in the MIPS32 shared lane
Main made the Ghidra installation probe asynchronous behind the shared
inspectVerifierGhidraInstallation helper, and analyze_function now returns a
summary unless detail "complete" is requested. Use both, as the other MIPS
lanes do.
* refactor(ghidra): keep Ghidra's image-base rule out of shared ELF parsing
The shared MIPS ELF reader computed Ghidra's ElfHeader.getImageBase rule
(lowest PT_LOAD address among the first 20 program headers) and the domain
type described it as Ghidra's base. Record source facts instead: every
PT_LOAD virtual address with its program-header index, plus the Android
prelink trailer. ghidraMipsElfImageBase in GhidraMipsProfile now applies
Ghidra's rule to those facts. The committed elf_image_base is unchanged.
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
* fix(desktop): honor env working directories in launch commands
* fix(desktop): create the replay working directory before launch
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Since #10483, an unapplied loader relocation in a non-writable block made
that whole block volatile. TLS slots are such relocations and sit in .got
beside the entries Ghidra did apply, so in any shared object or PIE with
initial-exec or dynamic TLS every GOT-indirect call decompiled as pointer
arithmetic instead of a named call.
Mark each unapplied destination volatile through its data item's Mutability
setting, creating an undefined item of the relocation's length where nothing
is defined. Fall back to the whole block only when an instruction or a data
item starting before the destination occupies it. Eligibility, limitations,
the read-only path, permissions and source FileBytes are unchanged.
The loader-relocation fixture now reads an initial-exec TLS variable whose
R_X86_64_TPOFF64 slot shares .got with the applied entries. The probe
requires that block and its applied entries to stay non-volatile and both
unapplied destinations to have volatile data items; on the previous bridge
it fails at applied_got_relocations_not_volatile.
Rename loader_relocation_semantics to
volatile-unapplied-relocation-destinations to state the new behavior.
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
A browser probe was only checked for POST, PUT and PATCH when deciding
whether capture.network.request_body had to be selected. A state-backed
bulk DELETE names its entities in a request body despite its method, so
an incomplete probe was admitted and replayed without the call
arguments the served tool needs, contaminating the comparison.
Derive the requirement from the parsed probe requests and the served
catalog's body-argument facts, matching each request to its tool the
same way comparison does. Keep bodyless item DELETEs accepted, and
remove the superseded method-only parser.
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(ghidra): admit RISC-V position-independent executables (#4487)
Admit little-endian RISC-V ELF32 and ELF64 position-independent executables
(ET_DYN with PT_INTERP) into the pinned generic Ghidra lane.
- Collect `PT_INTERP` during the existing validated ELF table walk in
`validateElfDeclaredRanges` and record `hasInterpreter` in target metadata,
supporting arbitrary table offsets and extended program counts without duplicate scanning.
- Admit ET_DYN images when `hasInterpreter` is present under lane identities
`elf32-pie-le-double-float-generic-v1` and `elf64-pie-le-double-float-generic-v1`.
- Preserve refusal for non-PIE ET_DYN targets (shared libraries without PT_INTERP)
explaining that shared libraries require separate load verification.
- Record load model facts (`load_model: "pie"`, `expected_default_image_base: "0x10000"`
or `"0x100000"`, `has_interpreter: true`) in `riscv_elf` analysis profile parameters.
- Record default image base analysis coordinates limitation for PIE targets.
- Update `docs/ghidra-riscv.md` with PIE admission boundary and evidence semantics.
- Add unit tests for PT_INTERP collection, high-offset program headers, and PIE profile resolution.
- Add PIE fixture generation capability to `tests/conformance/ghidra/riscv-fixture.mjs` and
pass `-Wl,-pie` to ensure bare-metal drivers generate ET_DYN.
- Extend `scripts/verify-real-ghidra-riscv.mjs` to test both ET_EXEC and ET_DYN.
Fixes#4487
* fix(ghidra): check structured facts and rethrow typed errors in PIE tests
* style: format GhidraRiscvProfile.test.ts
* fix(ghidra): restrict PIE admission to verified double-float RISC-V lanes
* feat(rust): read cargo-auditable dependencies from WebAssembly modules
cargo-auditable embeds the same zlib-compressed `.dep-v0` JSON in a
WebAssembly custom section for wasm32 targets, but inspect_rust_binary
rejected every module as an unsupported target because only ELF, PE and
thin Mach-O containers were recognized.
Walk the section framing of version 1 core modules to locate the
`.dep-v0` custom-section payload and the data section, where rustc keeps
its constant /rustc/<hash>/ paths. Rust lookups now read one
format-neutral layout, so native and WebAssembly images share a single
dependency-section owner. WebAssembly declares no container word size, so
`bits` is null for that format only; the Evidence subject format is
`file`, as for inspect_wasm_artifact.
Truncated sections, invalid LEB128 sizes, custom-section names that run
past their section or are not UTF-8, duplicate `.dep-v0` sections and a
second data section are malformed. Components, such as wasm32-wasip2
output, embed core modules and are refused as unsupported, like universal
Mach-O containers, rather than inspected through one selected module.
* fix(rust): bound the WebAssembly section walk
The WebAssembly reader visited every section synchronously, and the format
sets no section count. A 256 MiB input of three-byte custom sections with
empty names walked about 89 million sections and held the event loop for
about 7.4 seconds, delaying cancellation and other MCP requests; empty type
sections took about 1.9 seconds.
Refuse a module with more than 65,536 sections with a typed cpu resource
constraint that reports maximum_wasm_sections, as the Go header search
reports its work budget. Producer output holds a few dozen sections, and the
same inputs are now refused within tens of milliseconds.
* fix(rust): accept WebAssembly Evidence in retained dependency views
Retained Rust views compared the parent subject with a Mach-O-only format
mapping, so WebAssembly Evidence, whose subject format is file, was refused
as a different artifact. The report domain now owns the subject format next
to the architecture mapping, and the service and the view both use it. The
real CLI/MCP view workflow now also covers a WebAssembly module.
* fix(rust): name the WebAssembly section-walk allowance in recovery
Fixed-allowance recovery mapped every Rust resource other than capacity and
transport to the parser allowance, so the section-walk refusal said host
memory does not raise it. Each Rust resource now maps to its own allowance,
and the cpu bound is a fixed work allowance. The MCP error contract test
checks that the refusal is not retryable and names that allowance.
* fix(rust): require WebAssembly container facts in reports
The report schema tied a null word size to WebAssembly, but it accepted a
wasm report that named a native architecture or big-endian byte order, and
a native report that named the wasm architecture. Retained views parse
imported Evidence with this schema, so such a contradictory report was
accepted. The architecture is now wasm exactly when the container is
WebAssembly, and a WebAssembly report must be little-endian.
* docs(rust): record the WebAssembly dependency-metadata feature
Feature work now carries a spec, plan and task list under docs/specs.
This adds that record for reading cargo-auditable metadata from
WebAssembly core modules and indexes it. The record states that it was
written during review and lists the verification that remains open.
* fix(rust): bind section names to containers and share the LEB128 reader
The report schema accepted a dependency section name that does not belong
to the report's container, such as a WebAssembly report naming the Mach-O
section. rustDependencySectionName now owns that name for the reader and
the schema, which refuses a mismatch for every container.
The WebAssembly reader decoded section sizes with its own loop. It now
uses the shared readLeb128, and an integer cut off by the end of the file
is truncated rather than malformed.
* fix(rust): classify a cut-off WebAssembly integer by its boundary
The reader called an unfinished LEB128 integer truncated whenever its
limit equalled the file length. A name length cut off inside the final
section was therefore truncated, and the same bytes followed by another
section were malformed. Each caller now states whether the file or the
enclosing section bounds the integer.
* fix(rust): report a duplicate WebAssembly dependency section first
The section walk kept two .dep-v0 matches but walked on, so a module with
two dependency sections and more than 65,536 sections after them was
refused for the section bound instead of the duplicate it had already
established. The walk now ends at the second match.
* test(rust): assert WebAssembly container facts instead of limitation prose
The CLI acceptance test matched an English limitation sentence. It now
checks format, architecture, bits and byte order on the parsed report.
* fix(rust): state container word size as 32 | 64 | null
Output contract: inspect_rust_binary bits, including the summary view, is
32 | 64 | null. Null is valid only for WebAssembly and is not a number.
ELF, PE and Mach-O reports stay 32 or 64. The schema description, guide,
feature record and skill state that, and CLI renderers keep null instead
of substituting a word size.
---------
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
#11787 migrated the last direct AnalysisCancelledError constructions and
deleted scripts/verify/baselines/analysis-cancelled-constructor.json, but
the testing guide still told contributors their files were listed there.
State that the guard now has no baseline and allows zero copies.
* feat(ghidra)!: import recognized DOS COM files with ComLoader
Select Ghidra 12.2 ComLoader for an admitted .com image and do not pass a
base address, so the file stays at 0000:0100. Images ComLoader rejects use
the explicit BinaryLoader import at 1000:0100 and record the typed reason.
BREAKING CHANGE: A DOS COM file that ComLoader accepts now loads at linear
0x100 instead of 0x10100. Read load_address. The BinaryLoader fallback
remains at 1000:0100.
* fix(ghidra): score COM dollar-strings in one pass
ComLoader's printable-run walk restarts at every offset, so a 64 KiB image
of printable bytes blocked profile resolution. The same capped count now
skips a run once an earlier start has seen every later dollar sign.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): align COM import facts with the image Ghidra receives
Mismatch load-image coordinates follow the measured loader and address.
A dotfile named .com keeps that suffix on the snapshot, and selection
uses that snapshot name. The COM fallback verifier owns its MCP
connection before connect.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* style(ghidra): format COM snapshot and verifier files
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): keep measured COM facts and required MZ coordinates
DOS MZ and a verified COM image keep load_segment and entry required.
A COM mismatch emits a known loader or load address on its own, and
omits the segment and entry only when that pair is not a known layout.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): require the verified COM layout and document both entries
A verified COM image is either ComLoader at 0000:0100 or BinaryLoader at
1000:0100 with a fallback reason. The DOS guide queries 0x100 only for
the ComLoader entry and 0x10100 for the fallback.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): attest COM imports against the committed loader
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs(install): warn against npx from inside a REA checkout
A package runner started in the checkout resolves the local rea-agents
package instead of the published install. Document the failure mode and
point contributors at npm link or scripts/rea.mjs.
* docs(install): qualify checkout package runner resolution
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(ghidra)!: verify the bridge on Ghidra 12.2
Admit 12.x from minor 2 upward, with 12.2 and JDK 25 as the verified
pair. The bridge now calls the four-argument storage API added in 12.2,
so 12.1.x cannot compile it and is no longer accepted.
BREAKING CHANGE: Ghidra 12.1.x is rejected. Use Ghidra 12.2 or another
12.x build at or above minor 2, and a JDK inside that installation's
declared range (25 or newer for the verified 12.2 build).
* docs(ghidra): point remaining lanes at Ghidra 12.2
The Windows, 6502, and m68k prerequisites still named 12.1.4 and JDK 21,
which the verified-build check now rejects. The bridge compile lane names
the 12.2 jars it actually compiles against.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(ghidra): admit the JDK the verified install declares
The Java home framing probe still reported JDK 21 while the verified
installation fixture now declares a minimum of 25, so doctor admission
failed before the path framing was checked.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(ghidra): derive admitted install fixtures from the verified release
Boundary hosts and assertions still named Ghidra 12.1.4 after admission
moved to 12.2, so list_procedures evidence and completed property reads
disagreed with the install the provider actually reported.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): record the exact 12.2 Clang switch-recovery defect
Ghidra 12.2 stays the verified build. Sessions and decompiler results on
that exact version name upstream issue 9996 and the 12.2.1 fix commit.
Other version strings, including 12.2.1, do not carry the limitation.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(ghidra): check switch-defect facts instead of the warning sentence
The policy test keeps the structured defect record and checks that the
owning formatter delivers its id, commit, release, and scope fields.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(browser): name the Playwright launch boundary the lifecycle catalog checks
Main retitled that case with a platform placeholder. The coverage catalog
still required the old literal, so the merged full suite reported a missing
title.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(browser): point the lifecycle catalog at main's launch title
The merged suite uses main's platform-specific Playwright launch test.
The coverage catalog now names that title, and this branch keeps main's
test body so the merge stays clean.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(browser): cover the platform launch title on this branch
The lifecycle catalog names main's platform launch title. This branch
now has that quoted test too, so the check passes before and after the
merge.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): record the exact 12.2 masked byte-switch defect
Ghidra 12.2 leaves an AArch64 and-0xff byte-offset switch unrecovered.
Exact 12.2 sessions now cite open upstream issue 10154, and the AArch64
lane expects that jump table to stay unrecovered.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(browser): keep one platform launch environment check
The second launch test repeated the selected environment check. The
remaining test is the parameterized title, and the launcher forwards
SYSTEMROOT on win32 so that assertion holds.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): keep the open switch defect on admitted builds
The exact-version check cleared ghidra-10154 on every build except 12.2.
That defect stays on admitted releases until one is known to fix it.
ghidra-9996 still clears after the exact 12.2 build.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* style(docs): format the Ghidra testing-lane table
The AArch64 jump-table row wrapped past the formatter width and failed
static checks.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(ghidra): give the masked switch its full byte range
The unrecovered oracle now uses 256 readable table bytes, and the same
object must still recover its compare-bounded switch.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs(website): point Ghidra setup at 12.2 and JDK 25
The public setup pages still told new users to install Ghidra 12.1.4 and
JDK 21, which this release rejects. Changed setup sentences are extracted
and left untranslated so those editions use the English page.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* docs(website): keep catalog edits to the changed setup strings
The catalog check compares active message ids, not a full rewrite.
Restore the previous catalogs and update only the Ghidra 12.2 setup
strings, leaving their translations empty.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): apply the closed switch defect from the parsed patch
12.2, 12.2.0, and 12.2.0 with a suffix all precede 12.2.1, so they keep
ghidra-9996. The masked-switch table lists all 256 byte entries.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(ghidra): share the AArch64 switch fixture compiler invocation
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(android): report method disassembly failure as unavailable body
Catch JADX bridge get_method_body failures in inspectMethod and project as an unavailable body with disassembly_failed marker, avoiding generic execution_failure with irrelevant rea doctor remediation.
Fixes#10482
* fix(android): preserve method identity when disassembly is unavailable
* fix(android): retain method identity when smali generation fails
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(desktop): resolve needed origins before library deduplication
* fix(desktop): resolve library paths through filesystem
* fix(desktop): retain package ownership of required library links
* fix(desktop): traverse hard-linked dependencies once
* fix(ci): isolate expensive capacity regressions from parallel workers
(cherry picked from commit a1f762d1139f51d97130f8c20cfb12d567cced72)
* fix(desktop): preserve complete library lookup semantics
* fix(desktop): retain required directory alias owners
* fix(desktop): preserve ownership across complete library link routes
* fix(desktop): share merged-system ownership lookup for link entries
* test(mcp): observe cleanup failures at their current delivery boundary
* fix(mcp): preserve workflow completion progress through delivery
* test(setup): keep the Windows Kimi profile fixture on a supported profile
The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.
The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.
Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.
* test(ci): restore verifier and MCP contract regressions
* test(captures): assert adapter-owned input issue field names
* fix(ghidra): avoid Java probes for missing installations
* fix(desktop): retain all selected leaf ownership spellings
* fix(desktop): retain link target ownership contexts
* fix(desktop): retain successful lookup retries and cancellation
* fix(desktop): preserve library probe failures and cancellation
* fix(desktop): preserve cancellation after lookup refusals
* docs(desktop): clarify library lookup error precedence
* fix(desktop): check library budget before absolute path lookup
* fix(desktop): report each unowned library path once
---------
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: g0at <50488370+g1at@users.noreply.github.com>
Co-authored-by: IvenKooLab <276572622@qq.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(domain): classify EM_PPC64 ELF in the powerpc family
An ELF with e_machine 21 was refused as "unsupported ELF architecture" before any provider was consulted, so every entry point answered a 64-bit PowerPC file with the generic file-format refusal.
The header reader now places EM_PPC64 in the powerpc family and keeps its class, byte order, e_type and e_flags as it does for EM_PPC. No provider lane admits these files: the Ghidra PowerPC gate already refuses ELF64 by naming PPC64, and Hopper, IDA and Kuna decline the family. Static ELF readers keep the name ppc64 for the machine.
Refs morluto/rea#12085.
* feat(domain): map the ppc64 reader name to the powerpc Evidence subject
Static readers report a 64-bit PowerPC ELF as ppc64, and the Evidence subject of those reports had no architecture because the name mapped to no family. With EM_PPC64 classified as powerpc, the subject now carries that family, as it does for ppc.
The Go verifier and the Go and Rust guides state the new mapping, and the boundary test keeps an unknown machine (s390) to show that unrecognized names still map to no family.
Refs morluto/rea#12085.
* revert(domain): keep ppc64 reader reports without a subject family
This reverts commit bbd7f7f661.
Evidence saved before the mapping carries no subject architecture for a ppc64 report. Views over those records compare the saved subject with the family the reader name maps to, so the mapping made them refuse records they accepted before. Nothing in this branch produces Evidence that needs the family, so the mapping can wait for a provider lane.
Refs morluto/rea#12085.
* fix(domain): classify EM_PPC64 only for an ELF64 header
Classifying machine 21 by number alone had two effects beyond target resolution. An ELF32 big-endian ET_EXEC header that claims EM_PPC64 became a powerpc target with class 32, which the 32-bit Ghidra lane admits because it sees only class, byte order, type and flags. And every static reader that maps a machine to a family started to put powerpc in its Evidence subject, which changes what views expect from records saved earlier.
elfArchitecture now takes the ELF class and names the family for machine 21 only when the caller commits ELF64. Header admission passes the class. Readers that pass only a machine keep the machine unclassified, so their reports, reader names and Evidence subjects are as they were.
Refs morluto/rea#12085.
* 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>