* fix(windows): gate transient writes on runtimeWriteTransient capability
A source checkout and the published 6.8.0 addon share package version
and native ABI 1, so the loader admits the older addon. JavaScript
staging then fails at source-transfer with Win32 87 because the addon
has no runtime_write_transient operation.
Native inspection now advertises runtimeWriteTransient, the loader
accepts it only as literal true, and writeTransientFile refuses before
dispatch with a typed nonretryable error pointing at an exact-source
rebuild. Older addons stay admitted for the controls they support.
Recovery text no longer presents a same-version tarball as enough for
an unreleased checkout.
Fixes#9286
* test(ghidra): expect the new native-authority remediation wording
The #9286 fix changed the doctor recovery text so a same-version
tarball is no longer presented as enough for an unreleased checkout;
the pinned expectation still asserted the old wording.
---------
Co-authored-by: morluto <76467478+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>
A virtual directory node was identified from the SHA-256 of its canonical
listing JSON through the same function as raw file bytes. A regular file
containing exactly that JSON (for example an empty directory's
{"children":[],"kind":"directory"}) received the same artifact ID, the
directory node overwrote the file node, and extraction of the valid
archive failed with an integrity mismatch.
Derive virtual node identities in a separate domain and validate node IDs
by representation. Inventory Evidence retained with the earlier virtual
identity is still accepted.
Fixes#8551
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>
* fix(verify): preserve Linux descendant records with multiline names
* fix(verify): load the stat parser without changing stderr
---------
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@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>
Browser scenario launches forward a caller-selected environment through
snapshotEnvironment, which uppercases every name on win32. The launch
allowlist read the mixed-case "SystemRoot" spelling, so the lookup was
always undefined on Windows and the launched browser never received the
variable the allowlist intends to forward; the effective launch
environment was only HOME/LANG/PATH/TEMP/TMP.
Node's Windows spawn path re-adds a small set of system variables from
the parent environment, which has masked the missing entry so far, but
that behavior is outside REA's contract. The Electron active-provider
allowlist already reads "SYSTEMROOT" (uppercase) for the same snapshot,
so match that spelling here and keep the launched browser environment
dependent only on REA's own allowlist.
Co-authored-by: Vinicius Henrique Menezes Moreira <29902685+SwintexD@users.noreply.github.com>
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(sqlite): refuse one-byte files instead of reporting an empty schema
* test(sqlite): assert refusal facts instead of the full error sentence
The one-byte and corrupt-input acceptance tests froze the sentence that
SqliteDatabaseWorkerExecution builds from fixed wording, SQLite's
diagnostic and the selected path. Share one helper that keeps the code,
issue path, reason and single-issue shape exact, and checks the
diagnostic and selected path separately, so rewording the sentence no
longer breaks either regression.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
third_party/README.md names scripts/fixtures/android-apidemos.json as the
record of the ApiDemos fixture's provenance. #873 moved that file to
scripts/fixtures/android/apidemos.json, so the cited path no longer
exists. Point the sentence at the moved file.
* fix(evidence): derive default authority from subject binding
evidenceEnvelopeForAdmission defaulted a missing authority to shipped-artifact
for every observation, including ones with no artifact subject and ones
produced by a live debugger session. An unbound record therefore claimed
authority over an artifact it cannot name, and live GDB, Rizin and Cutter
observations could never qualify a live-observation contract because that
contract accepts only controlled-replay or external-service Evidence.
Default to analyst-inference when no subject is bound and keep
shipped-artifact when one is, so the default matches what the record can
actually support. Declare controlled-replay at the eight live debugger
observation sites (GDB 6, Rizin 1, Cutter 1) so those records describe the
controlled replay they performed and satisfy the documented contract.
* fix(gdb): label retained process-exit observations as controlled replay
The GDB command process-exit branch was the only unbound retention path that
named no authority, so this branch's new default derived it as
analyst-inference. That label cannot support the live-observation contract,
and every sibling path (timeout, cancellation, protocol failure, startup)
already states controlled-replay.
The authority and the unavailable-subject reason now live beside the
provider identity so the retention paths read them from one place instead
of repeating the literals and drifting apart.
* style(evidence): apply repository formatting
* fix(cutter): classify command observations as external-service
The bridge drives the documented already-running Cutter GUI, whose
document state REA neither owns nor resets, so its command
observations claim no controlled replay. Label them external-service
like the comparable IDA and Frida bridge evidence: live-observation
obligations still accept it, while controlled-replay-only verifier
contracts and bundle replay scenarios no longer include these
observations.
* fix(adb): keep device observations at external-service authority
The admission default now derives authority from the subject, so a subjectless ADB observation fell to analyst-inference. A device is a service REA attaches to rather than drives, so the observation supports external-service and must stay eligible for live-observation contracts.
Carry an explicit authority through AnalysisObservation so a producer that knows its own authority can name it, and set it for every ADB operation.
* fix(adb): keep retained observations at external-service authority
The admission default derives authority from the subject, and a subjectless
observation falls to analyst-inference. createAnalysisExecution never carried
an authority field, so every observation the ADB adapter built through it was
committed at the subject-derived default instead of the service's.
Name the authority once in the domain model, stamp it on every successful
execution at the adapter boundary, and route the cleanup-failure and
cancellation-retention sites through one helper. Open the execution options
field so other providers can name their own authority.
Verified: a push whose device digest does not match now retains its receipt at
external-service; removing the stamp fails that assertion. check:fast passes.
* fix(adb): keep the retained verification receipt at device authority
The verificationFailed branch built its retained receipt with createEvidence
directly, so the admission default derived the authority from a subjectless
target and labelled an observed push as analyst-inference. Pass the device
authority through the same way the neighbouring digest-mismatch partial does,
so the receipt can still support live-observation verification.
* style(adb): apply oxfmt formatting to the authority fix
The previous commit wrapped two expressions that oxfmt keeps on one line, so
npm run format:check failed on Static checks.
* fix(decompile): repair a torn journal on Windows before resuming
Windows opens an O_APPEND handle with FILE_APPEND_DATA only, so ftruncate
through the journal's append handle fails with EPERM and every resume after
an interrupted write was refused. Truncate through a separate write handle
first, then open the append handle.
* docs(decompile): say why the journal opens without following symlinks
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(inventory): validate PE headers before classification
* fix(inventory): retain declared PE record windows
---------
Co-authored-by: Josh <joshuakrishna21@gmail.com>
* fix(setup): name an unresolved client location in the picker
When a client's configuration location cannot be resolved, such as
Claude Desktop with migrated Claude-Data storage, setup refuses to write
it and the user has to register REA by hand. The client picker still
said "Existing configuration needs repair before setup" (6.9.0, where
the state is invalid) or "Detected · choose to configure" (main, where
#10698 records it as unknown), and neither is true.
Show "Configuration location unresolved · register REA manually" for
any client with a location error, and keep the repair hint for
configurations that are actually malformed.
Fixes#11697
* test(setup): type picker fixtures as SetupClientState
The journey fixtures used array paths and a marker field that setup
never sends, and omitted registrationProfile. They now satisfy the
production contract so the type checker rejects drift.
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
fix(process): keep the Darwin helper's exit cleanup from crashing the host
When the macOS ownership helper root cannot be removed while the process
exits — descriptor exhaustion is the recorded case — `cleanupAtExit` let
`rmSync` throw from a `process.once("exit")` listener. Node reports that as
an uncaught error, so a successful command exits 1 and prints a stack for a
directory nobody can retry.
Remove the root best-effort at exit and name the retained root once through a
guarded synchronous write: Node cannot drain a queued stderr chunk from an
exit listener, so the warning uses `writeSync(2, ...)` and swallows a failed
report. The root's normal cleanup path, its retained-cleanup error and every
caller's classification are unchanged; only the exit-time failure stops
changing the exit status.
Verified: `src/process/DarwinHelperExitCleanup.test.ts` asserts the root is
gone after a successful removal with no report, and that a root the process
cannot remove is retained, named once, and does not throw (2 tests). The
permission case is skipped for root and Windows, where permissions do not
prevent removal. `check:fast` passes.
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
The --llms-full manifest and discovery table rendered raw object keys
(--blockSize), which disagreed with command help (--block-size). Reuse
optionFlagName so manifests emit the same canonical flags as help, and
update the two CLI parity goldens. Adds a boundary test asserting both
surfaces agree on canonical flag names.