Commit Graph
484 Commits
Author SHA1 Message Date
morluto 48d4b6145a perf(process): transfer chunked string buffers into RegexMatcher worker (#13428)
* perf(process): transfer chunked string buffers into RegexMatcher worker

* test(process): verify 1M RegexMatcher inventory in isolated 16 MiB subprocess
2026-11-22 14:08:26 +00:00
CyberSprout 6a20a88e81 perf(uefi): pool framed LZMA worker and fuse single-pass publication (#13338)
* perf(uefi,firmware): pool framed LZMA worker and fuse single-pass publication

Fixes #13282

* fix(uefi): own worker stdin errors and compose concurrent publication cleanup

* fix(uefi): preserve startup cancellation and timeout classification

* test(uefi): assert startup cancellation and timeout projections

* fix(uefi): retain completed inspection across pooled worker shutdown
2026-11-22 08:06:38 -05:00
morluto 58af29e6b0 perf(io): stream SQLite snapshots, chunk stable artifact reads, and bound procfs and staging-budget I/O (#13360)
* perf(io): stream SQLite snapshots, chunk stable artifact reads, and bound procfs and staging-budget I/O

* fix(firmware/sqlite): restore bounded opendir streaming, settle lstat batches before throw, and test snapshot destination close lifecycle
2026-11-22 08:03:45 -05:00
morluto 3a36311004 fix(process): retain synchronous command launch failures (#13350) 2026-11-22 09:26:24 +00:00
morluto 2f171faa9f perf(search/kuna): optimize regex worker dispatch and Kuna inventory validation (#13320)
perf(search,kuna): optimize RegexMatcher worker dispatch and Kuna inventory validators
2026-11-22 03:46:02 -05:00
morluto b795aee553 perf(process): wake OwnedCommand on output close, lazily materialize diagnostic snapshots, and bound tail copies (#13261)
* perf(process): wake OwnedCommand on output close, lazily materialize diagnostic snapshots, and bound tail copies

* fix(process): capture event-time bytes in diagnostic snapshots and make wrap test independent
2026-11-22 03:15:02 -05:00
morluto 178467f6a7 fix(mcp): settle independent launch preparation owners (#13259) 2026-11-22 01:49:55 +00:00
morluto 75a75a1bd1 fix(process): verify nested worker exit after parent cleanup (#13242) 2026-11-22 00:17:58 +00:00
morluto 60e099848d perf(browser): wake the bundle worker on observed events (#13225) 2026-11-21 22:35:15 +00:00
8d6552e928 feat(config): persist provider settings in a user config file (#3023)
* feat(config): persist provider settings in a user config file

Providers currently rediscover install paths from scratch in every
process, so a path set once (for example GHIDRA_INSTALL_DIR) silently
reverts on the next run. Introduce ~/.config/rea/rea.json as the
user-owned persistence layer and merge it into the environment
snapshot before configuration parsing, keeping env > config file >
auto-detect precedence on both the CLI and MCP entry points.

Add a rea config command (list/get/set/unset) as the write surface,
reporting the effective value and where it came from.

* fix(config): address review findings on persistence safety and CLI surface

- stage config writes beside the file and rename into place so an
  interrupted write cannot leave partial JSON (greptile #4, codex #11)
- convert unreadable config files into configuration errors on the CLI
  seam instead of escaping raw filesystem errors (greptile #5, codex #15)
- keep injected runtimes without a config root isolated from the host
  account's rea.json (codex #18)
- surface the config file error on stderr when doctor falls back to the
  raw environment (greptile #3, codex #16)
- route the config command through logCliCommand and return documents so
  --json stays parseable and failures exit non-zero (greptile #2,
  codex #10)
- reject empty --set values, unknown --set/--unset/--get names, and --get
  combined with mutations (greptile #1/#7, codex #9/#12/#13/#17)
- cover the new behavior in the boundary tests and stop leaking one
  temporary home per run (greptile #8)

* fix(config): validate and back up persisted provider settings

* fix(config): keep saved provider defaults out of client registrations

* fix(config): preserve provider discovery and budgets for saved settings

* fix(config): check only settings needed by the IDA deadline lookup

* fix(config): share effective provider settings and verify config file reads

* fix(doctor): share selected settings with Hopper and ILSpy probes

* fix(config): resolve the destination of first-time saves

* fix(doctor): preserve unresolved provider location inputs

* fix(doctor): honor inherited IDA deadline overrides

* fix(config): show empty environment overrides

* fix(setup): preserve client-selected saved configuration roots

---------

Co-authored-by: Jackzigen <zigenhan@gmail.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-21 22:02:35 +00:00
abba1f43bb fix(setup): register aube's bin shim instead of its versioned store path (#5311)
* fix(setup): register aube's bin shim instead of its versioned store path

mise's npm backend installs with aube, whose bin is a shell shim that runs
the script inside one version's store directory. Setup registered that
versioned script, which the next upgrade removes from under the agents.
Setup now registers the shim when it proves, from the shim's own header,
that it runs this exact entrypoint, and registration identity accepts that
shim as REA's own.

Refs #4847

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(setup): move aube store registrations to the shim and follow links to it

Status now reports a direct registration as stale when the running
entrypoint has an aube bin shim and the registration is not that shim, so
doctor and setup move registrations written before this fix. A link to a
shim resolves the target from the shim's real directory, as the shim does.
The shim check runs only when the exact-path check does not already own the
command, applies on every platform (the header alone decides), and a failed
close no longer escapes classification. The test now lays out versions the
way mise does, with `latest` as a symlink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(setup): launch managed shims without client PATH dependencies

* fix(setup): bind Node for installed Aube shims without a sidecar

* fix(setup): keep an independent Node fallback for Aube shims

* fix(setup): preserve independent Node aliases across upgrades

* fix(setup): reuse verified Node for host-bound Aube shims

* fix(setup): keep Aube registrations across shim format changes

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-21 16:34:38 -05:00
Saim Mehmood ab47c970a7 fix(process): name the fixed finalization delivery grace
An unsettled finalization signal delivery reported a bare millisecond
figure, without saying whether that grace is adjustable. An agent could
infer that raising the caller-selected finalization_ms would extend it.

PROCESS_FINALIZATION_DELIVERY_GRACE_MS is module-private with no runtime
control, and is independent of finalization_ms (the SIGTERM-to-SIGKILL
interval). State both in the reason, keeping the lowercase fragment
register used by the sibling reasons on this field.

Relates to #5910.
2026-11-21 22:29:57 +01:00
Clark de44e5e273 test(process): check SIGHUP limitation through its exported owner constant 2026-11-21 22:29:33 +01:00
Clark 95dfbae68e fix(process): record PTY session-leader SIGHUP limitation in Evidence 2026-11-21 22:29:33 +01:00
gensokyo-devandgensokyo-dev 2d360253dd refactor(process): compose analysis runtime cleanup through the shared owner
ArtifactAnalysisResources built its multi-failure cleanup composite and
bound the parts by hand; providerCleanupErrorFromFailures builds the same
composite with the existing per-part diagnostics.

Refs #11859

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-21 19:34:01 +01:00
df1bd11895 test(process): publish timeout stop signal atomically in ExecFileOutput test (#13151)
The child recorded the received signal with writeFileSync, which creates
an empty file before writing. The test polls for existence and reads the
content while the child is still alive, so it could observe '' instead of
SIGINT (main CI run 44898480483). Write to a sibling file and rename it.

Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-21 17:55:13 +01:00
morluto d989ff06e8 test(process): bound inherited-pipe fixture lifetime to its workspace (#13030)
test(process): stop inherited-pipe fixtures when their workspace disappears
2026-11-21 07:28:38 +00:00
morluto 86b4360ce2 test(process): consolidate command timeout and output ownership checks (#12905)
* test(process): consolidate command timeout and output ownership checks

* test(process): join inherited-pipe descendant during failed checks

* test(process): cover inherited pipe grace and use project wait deadlines
2026-11-20 19:16:55 +00:00
morluto 9fff01f791 test(process): consolidate local bridge transport and cancellation coverage (#12907)
* test(process): prove local socket handoff with a real exchange

* test(ghidra): consolidate wire admission and cancellation checks
2026-11-20 14:12:32 -05:00
morluto 3a002fb708 test(process): consolidate supervised output closure and cleanup checks (#12906) 2026-11-20 19:03:45 +00:00
morluto 193bc533be test(process): consolidate Darwin helper request and cleanup proof (#12897)
* test(process): consolidate Darwin helper request and cleanup proof

* test(process): preserve native helper argument boundaries in fixture
2026-11-20 17:47:03 +00:00
morluto 56682a75c1 test(windows): consolidate executable lookup and cancellation coverage (#12894)
* test(windows): verify qualified lookup cannot fall back to PATH

* test(ida): join stalled Windows lookup fixtures at close and timeout
2026-11-20 17:45:58 +00:00
morluto 21f8f56dde test(process): consolidate PID authority and native exit settlement coverage (#12895) 2026-11-20 17:36:41 +00:00
morluto afc8c0ae7b test(process): consolidate run-token fallback and native retry coverage (#12892) 2026-11-20 17:28:35 +00:00
morluto cbe3d16e44 test(process): join descriptor inspection and consolidate ownership proof (#12891) 2026-11-20 17:22:18 +00:00
morluto 880e62351e test(process): consolidate process inventory and native row checks (#12889)
* test(process): remove redundant wide-family assertions

* test(process): consolidate process inventory checks
2026-11-20 17:16:38 +00:00
morluto 19f9a01655 test(process): synchronize launcher exit proof and remove duplicate deadline check (#12890) 2026-11-20 17:10:04 +00:00
morluto 819a72678f test(process): consolidate worker and transport ownership checks (#12887)
* test(process): consolidate worker admission and cleanup ownership checks

* test(process): prove local transport ownership after setup

* test(process): keep cleanup coverage after a skipped owner
2026-11-20 16:55:34 +00:00
morluto 7b8ddab284 test(process): consolidate capture finalization and timer checks (#12852)
test(process): consolidate native capture finalization proof
2026-11-20 14:28:16 +00:00
morluto c5907d3944 test(process): consolidate process capture finalization checks (#12785)
* test(process): consolidate capture finalization cases

* test(process): check grace from the escalation barrier

* test(process): verify cancellation preempts capture grace

* test(process): join pending delivery when an assertion fails
2026-11-20 12:45:09 +00:00
morluto 5f7a586aa5 test(process): exercise reserved success IDs with a valid frame (#12787)
test(process): exercise Ghidra reserved reply IDs
2026-11-20 12:33:03 +00:00
morluto eb1e75b809 test(process): consolidate provider startup deadline coverage (#12773) 2026-11-20 07:21:16 -05:00
morlutoandCursor Agent be14c9d475 test: own temporary directories through createTestTempDirectory in src/ tests (#12725)
Give per-test temporary directories to the shared helper so Vitest removes
them after the case. Keep directories whose lifetime is the assertion, or
that are shared from beforeAll, on their existing cleanup.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-20 04:10:06 +00:00
74bdfd2ec2 test: assert structured recovery facts instead of recovery wording in src tests (#12721)
* test: assert structured recovery facts instead of recovery wording in src tests

Replace recovery-sentence locks with the structured fields that already
carry those facts, and own Batch 4 temporary directories through
createTestTempDirectory.

* test(hopper): keep recovery order that retry_action does not carry

retry_action names restart or unknown. It does not say to read
provider_operation_health before retrying, or to close_binary before
opening and retrying. Those order checks stay.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 23:05:20 -05:00
RRFZ fa9abed521 refactor(process): inherit cleanup ownership for debugger cancellation (#12537) 2026-11-19 17:28:02 -05:00
morluto 0fead85457 fix(desktop): preserve exact dpkg ownership from partial queries (#12360)
* fix(desktop): preserve exact dpkg ownership from partial queries

* test(desktop): cover dpkg executable ownership transcripts

* test(desktop): keep executable ownership regression outside describe
2026-11-19 09:07:59 -05:00
ShuaixinHuang 8ab42177c7 fix(ghidra): preserve cgroup path identity in OOM diagnostics (#12189) 2026-11-18 23:55:00 -05:00
ShuaixinHuangandShuaixinHuang fe784e7f03 fix(process): release drained bridge reply backing storage (#12180)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 04:00:58 +00:00
morluto 3493d6d252 fix(process): decode bounded worker control frames as strict UTF-8 (#12162)
* fix(process): decode analyzer worker control frames as strict UTF-8

Refs #12145.

* fix(process): decode bounded control input without byte replacement

* fix(android): bound guardian readiness by the first UTF-8 frame (#12176)

Follows the readiness framing and lifecycle findings reported by @LcokHcak in #3048.
2026-11-19 04:00:02 +00:00
morluto 089fce8614 fix(process): share Linux limits and bind samples to process identity (#12160)
* refactor(process): share Linux resource limit admission with EVM

Refs #12128

* fix(desktop): bind process details to their Linux generation

Refs #12134.

* fix(desktop): bind open-file samples to their process generation

Refs #12134.
2026-11-19 03:48:12 +00:00
00a3f4d2b9 fix(process): preserve Darwin snapshot and cleanup failures (#12100)
* fix(process): preserve Darwin opening snapshot failures

* fix(process): retain the exact Darwin helper cleanup owner

Transfer the failed helper-root capability across repeated prepare failures. Reuse that same owner for retirement and reader close so stale cleanup cannot remove a replacement helper.

Co-authored-by: Anandumv <anandumv@gmail.com>
Co-authored-by: nextjohnp7 <nextjohnp7@gmail.com>

* test(process): isolate retained cleanup and compiler acknowledgements

---------

Co-authored-by: Anandumv <anandumv@gmail.com>
Co-authored-by: nextjohnp7 <nextjohnp7@gmail.com>
2026-11-18 17:34:25 -05:00
IvenKooandmorluto ec17f39e82 fix(process): keep the Darwin helper exit cleanup from crashing the host (#11714)
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>
2026-11-18 11:18:57 -05:00
RRFZandmorluto 8a10fa9c00 fix(pcap): resolve tshark and capinfos on the Windows PATH (#11734)
* fix(pcap): resolve tshark and capinfos on the Windows PATH

On Windows, resolvePcapTools kept the bare names "tshark" and "capinfos"
for the launcher to search PATH/PATHEXT. The owned Windows launcher
starts only absolute paths, so it refused the bare name (Win32 87) and
every pcap operation reported "Selected tool tshark could not be
launched (ERR_REA_WINDOWS_NATIVE)", even with tshark on PATH.

Resolve a PATH selection on Windows through the shared PATH/PATHEXT
search, from absolute entries only as on POSIX, and report the same
<tool>_missing failure when no image is found.

* test(pcap): assert typed missing-tool failures

* test(pcap): clarify PATH fixture platform

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 10:38:15 -05:00
RRFZandmorluto 5aa1fc5737 fix(process): resolve Windows root-relative commands on the selected drive (#11763)
* fix(process): resolve Windows root-relative commands on the selected drive

* test(process): pin drive-less PATH entries and UNC root-relative commands

A Windows PATH entry rooted without a drive now counts as relative, so
programOnPath skips it. Pin that with a Windows case, test a
root-relative command under a UNC working directory, and say in the
relativeEntry and windowsPathCandidates docs that drive-less entries
count as relative.

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-18 10:23:14 -05:00
RRFZ 390969209d fix(process): classify a Windows launch of a non-image file as not executable (#11735)
A tool selection that points at a file Windows cannot start (a DLL, a
script, any non-PE file) was reported as "could not be launched
(ERR_REA_WINDOWS_NATIVE)" by the owned launcher, and as an unrecognised
EFTYPE failure by Node's spawn. POSIX reports the same mistake as
ENOEXEC: "exists but could not be executed".

Treat EFTYPE as not executable, and read the native launcher's
ERROR_BAD_EXE_FORMAT (Win32 193) as EFTYPE, the code Node's own spawn
reports for the same file. Other native codes stay unclassified.
2026-11-18 23:05:59 +08:00
morluto c338e54c33 fix(process): keep provider waits bounded by the absolute deadline (#11967) 2026-11-18 12:27:32 +08:00
morluto 93b59bec45 test(process): isolate readable procfs thread evidence (#11933)
* test(process): isolate readable procfs thread evidence

* test(process): bound the held procfs read acknowledgment
2026-11-18 10:11:00 +08:00
morluto 87b1b322e4 test(process): await completed sampling coverage (#11927) 2026-11-18 09:55:40 +08:00
morluto 48e27e19b7 test: prune redundant and implementation-coupled coverage 2026-11-17 18:48:24 -05:00
morluto 015f726a9e test: prune redundant and obsolete coverage 2026-11-17 14:16:24 -05:00