Commit Graph
5715 Commits
Author SHA1 Message Date
gensokyo-devandClaude Opus 5.5 809f0d69db fix(mcp): report HTTP listener recovery from its parsed failure
rea mcp --http printed "Choose another --port or stop the process using
it" for every listener failure except a missing host allowlist, so a host
lookup failure, an unassigned address or a permission denial got port
advice. StreamableHttpListenError already classifies the native failure
and owns a recovery for each kind.

Startup now always prints that owned recovery behind one shared lead-in,
and the fixed message is removed. The native cause text stays out of
stderr as before.

Fixes #7346

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:57:03 +01:00
e1d229cd6b test(process): plan scenario admission cases for a host that reaches it
Planning for win32 refuses PTY capture before root admission runs, so the
cancellation cases now plan for Linux on any host. The ENOTDIR admission
case skips on Windows, which reports ENOENT for a path below a file and
admits it as a root the scenario may create.

Squashed from #9306 onto current main.

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:50:06 +01:00
01fcf8e3d7 test(ghidra): give simulated Linux installs a POSIX path on Windows
The Ghidra profile fixture simulates a Linux host, so posix.isAbsolute
refused the C:\ install directory a Windows test run supplied. The
fixture now owns a POSIX-shaped install directory with shared ownership
and cleanup, used by the DOL, MIPS, PowerPC, RISC-V and language
override suites.

Squashed from #9284 onto current main.

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:50:06 +01:00
RRFZ 0a3368a6a9 test(filesystem): admit the snapshot fixture as written on Windows
The snapshot identity test writes its file and admits it at once with the
default ChangeTime mode. On Windows that ChangeTime is inside the 2 s drift
window, so admission keeps re-reading the descriptor until it settles. The
returned baseline is then a later observation, not the one the test
captured, and the descriptor stat runs more than once.

Admit the fixture as written. That is the documented mode for a file that
was just written, and it reads the descriptor once on every host. Settling
keeps its own coverage in ChangeTimeBaseline.test.ts.
2026-11-14 04:50:06 +01:00
morluto bddbd80afb refactor(cli): run one-shot commands through one shared owner (#10405)
* refactor(cli): run one-shot commands through one shared owner

scripts/rea.mjs and the test CLI session worker each implemented the
one-shot command sequence: argument normalization, output admission,
configuration errors, version documents, the Amp scope refusal, and
result delivery. The worker copy had drifted: it never rendered
formatted version reports or the Amp refusal.

Move the sequence into src/cliOneShot.ts. Both callers supply a host
for their streams, exit and resource ownership. The launcher keeps
closed-pipe status, worker shutdown and process exit; the session
worker captures output per command.

The cliOutput bundle entry is superseded and removed. The dispatcher
test now replaces only the command runtime, so output admission runs
production code. A new parity test compares the file session with a
fresh process.

* test(cli): bundle the one-shot entry in the runtime bundle fixture
2026-11-14 11:48:19 +08:00
morluto fcc0a8c454 perf(mcp): build advertised tool schemas once per contract (#10421)
* perf(mcp): build advertised tool schemas once per contract

The MCP SDK reprojects every registered tool schema on each tools/list.
REA memoized that projection, but per wrapper, and each server built new
wrappers for every contract, so each new server reconverted the whole
catalog: about 280 ms per tools/list for 255 tools with the full input
profile. Each wrapper also registered a new schema in zod's global
registry, so heap grew with every server.

Contracts are immutable module values, so build each advertised input
and output wrapper once per contract. tools/list on later servers drops
to about 26 ms (full profile) or 48 ms (compact).

* test(mcp): load only the contract family under test
2026-11-14 11:47:51 +08:00
RRFZ 4a4e959513 fix(javascript): retain global escapes across repeated calls 2026-11-14 04:46:27 +01:00
RRFZ 4e1e9b62a7 fix(javascript): preserve global escapes across callback boundaries 2026-11-14 04:46:27 +01:00
RRFZ 54677ec1d6 fix(javascript): preserve timer delays after global escapes 2026-11-14 04:46:27 +01:00
RRFZ 1abd327913 fix(javascript): retain timer delays after opaque global effects 2026-11-14 04:46:27 +01:00
RRFZ 186b2c352c fix(javascript): omit Node timers with rejected delay values 2026-11-14 04:46:27 +01:00
RRFZ 827b31c128 fix(javascript): honor child-process callback overloads 2026-11-14 04:46:27 +01:00
gensokyo-devandClaude Opus 5.5 ee339e5db5 fix(debuggers): keep stopped Rizin and GDB sessions explainable
After REA stopped a Rizin debug session (frame or output limit, deadline,
cancellation, protocol failure) or the debugger exited, later commands
returned a generic invalid_request and status gave no reason. GDB
collapsed the same states the same way.

Both managers now keep a published session addressable until
close_*_session releases it, record the first reason it stopped, report
it as closed_reason in session status, and refuse later commands with
capability_unavailable naming that reason and the close-then-restart
recovery. An ID the server never returned, or that close released, still
fails as invalid_request with its own recovery. Retained stopped
sessions keep their slot, which the capacity recovery now says. A GDB
command deadline now records its reason like cancellation already did.

Fixes #8024

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:42:35 +01:00
gensokyo-devandClaude Opus 5.5 6ce708cfde fix(rizin): report shell refusals instead of complete empty results
Rizin exits 0 when its shell refuses a statement, so execute_rizin_command
reported completion_status complete with exit code 0 and an empty stdout
that read as a genuine empty result.

Rizin 0.6 through 0.9.1 log exactly four refusal lines from
librz/core/cmd/cmd.c: an unknown command, a wrong argument count, an
invalid statement (RZ_CMD_STATUS_INVALID, which also stops the remaining
statements) and a parse error. The Rizin command profile now classifies a
completed process's stderr against those lines; the shared one-shot
service reports completion_status "rejected" and a limitation that names
the refusal and says stdout holds only earlier statements' output. Other
ERROR lines come from commands that ran and stay diagnostics.

Fixes #10364

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:42:35 +01:00
gensokyo-devandClaude Opus 5.5 884b683a94 fix(cli): advertise the decimal token grammar on integer arguments
`cliIntegerArgument` piped a regex-guarded string into a number but never
published Zod's input view, so `--schema` advertised a bare integer for 15
fields while the parser accepted only decimal argv text. `environment-serve
--port` had the same gap through the transforming MCP_PORT owner.

Remove `cliIntegerArgument` and route every call site through
`cliDecimalField`, binding each field to its domain or contract owner where
one exists so bounds, defaults and optionality come from that owner. Export
the input-view publisher as `publishArgvInput` and apply it to `--port`,
which keeps the MCP_PORT grammar shared with `rea mcp --http`.

The decimal catalog test now requires every numeric field's advertisement
to admit its decimal argv token, covers repeated options and
string-advertised token grammars, and checks `--schema` output directly.

The string branch's missing numeric range (#9348) is unchanged.

Fixes #9344

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:27:54 +01:00
d3efeb0c36 test: assert elapsed time where a deadline guarded complexity
Four wide-input regressions used a short per-test deadline as their only
check against a slow but terminating implementation. Assert the same
budgets explicitly so the project deadline only detects hangs. The
composed-body test keeps its exact read count instead.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:27:07 +08:00
46728ca41d test: remove per-test deadlines owned by project policy
Explicit deadlines at or below the project deadline only shortened it:
a literal 30-second value also disabled the coverage scaling, which timed
out wide-capacity regressions on main. Workloads above the built
deadline use the long-running tag. Deadlines derived from an operation
budget remain.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:27:07 +08:00
Kaoru0822 4566e483ab fix(process): retain wide descendant inventories (#10386) 2026-11-13 10:49:10 -08:00
Kaoru0822 bf63760cb4 fix(setup): normalize Gemini trust rules before selection (#10378) 2026-11-13 10:48:50 -08:00
Kaoru0822 3b006841e2 fix(rizin): qualify process completion in command evidence (#10377)
* fix(rizin): expose command validity limits in observations

* test(rizin): compare guidance with its owning contract
2026-11-13 10:48:35 -08:00
gensokyo-devandClaude Opus 5.5 b67c1e8ce6 fix(contracts): enforce well-formed Unicode paths without advertising surrogate patterns
rea-agents 6.9.0 advertised `^[^\uD800-\uDFFF]*$` on every local path
input. RE2 has no `\u` escape and Rust's `regex`/`jsonschema` crates refuse
non-scalar code points, so strict MCP clients and gateways (DeepSeek, RE2
gateways, Open Design) rejected the complete tools request and no REA tool
could run.

Move the rule into one runtime check, `rejectUnpairedSurrogates`, which
advertises nothing and still raises the `invalid_format` regex issue, so
CLI and MCP corrections keep reason, expected value, and message. The
objdump disassembly symbol already enforced the same rule with its own
refinement; it now shares the owner and the correction shape.

Dropping the pattern also brings inspect_android_jni_bindings within the
compact profile's per-schema budget, so compact delivery now keeps its
DEX dimension pattern. The descriptor admission test follows the actual
presentation instead of assuming compact always omits it.

Fixes #10238
Fixes #10348
Fixes #10198

Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:57:31 +01:00
morluto cdc4541ef7 refactor: remove redundant seams and preserve cleanup ownership (#10375)
* refactor: remove redundant seams and preserve cleanup ownership

* fix: validate PE resource extents before budget checks
2026-11-13 10:11:06 -05:00
Kaoru0822 4b26f38d6f fix(javascript): preserve wide async chunk collection (#10362)
* fix(javascript): collect async chunks without call spreads

* test(javascript): bound the public checkpoint control
2026-11-13 06:17:43 -08:00
Kaoru0822 e841fb16e4 fix(browser): validate wide scenario reference lists (#10359) 2026-11-13 06:17:22 -08:00
Kaoru0822 26b70c8ea4 fix(mcp): complete wide retained occurrence inventories (#10356) 2026-11-13 06:16:57 -08:00
Kaoru0822 5d046b9ad7 fix(javascript): retain wide function fingerprint inventories (#10355) 2026-11-13 06:16:36 -08:00
Kaoru0822 c4cec6373d fix(javascript): retain wide runtime load-state inventories (#10354) 2026-11-13 06:15:03 -08:00
Kaoru0822 02a33a8f58 fix(javascript): reject invalid fs open argument roles (#10346) 2026-11-13 06:10:25 -08:00
Kaoru0822 ea101dbe30 fix(browser): interpret agent link relations once per element (#10345) 2026-11-13 06:07:58 -08:00
Kaoru0822 fd3e613d23 fix(captures): retain wide native numeric exclusions (#10343)
fix(captures): append admitted numeric exclusions without call spreads
2026-11-13 06:07:41 -08:00
Kaoru0822 adf8bdf833 fix(javascript): preserve GraphQL Source ownership across spreads (#10338)
* fix(javascript): preserve GraphQL Source ownership across spreads

* fix(javascript): keep inline Sources owned by their enclosing Source
2026-11-13 06:07:24 -08:00
Kaoru0822 cd96c5e9eb fix(desktop): preserve own JSON keys in task grading (#10331)
* fix(desktop): preserve own state keys in task witnesses

* test(desktop): preserve witness parse failure details

* fix(desktop): retain own column keys in task conditions
2026-11-13 06:07:06 -08:00
Kaoru0822 617e4cbfb3 fix(windows): preserve pre-epoch shortcut timestamp milliseconds (#10305)
fix(windows): keep pre-epoch shortcut times in their millisecond
2026-11-13 06:06:47 -08:00
morluto bbe2bcc979 refactor: remove legacy seams and consolidate resource ownership (#10349) 2026-11-13 04:45:16 -05:00
Kaoru0822 15a2de737c fix(navigation): offer available instruction observations (#10307) 2026-11-12 23:57:46 -08:00
Kaoru0822 c2ca3819e5 fix(analysis): iterate admitted inventories without call spreads (#10304) 2026-11-12 23:57:04 -08:00
Kaoru0822 0084810ef7 fix(browser): bound cached responses with zero-padded lengths (#10237) 2026-11-12 20:40:26 -08:00
Kaoru0822 feca30c72c fix(go): validate string extents before budget admission (#10231) 2026-11-12 20:40:05 -08:00
Kaoru0822 913b029c96 fix(desktop): retain dconf failures without stderr (#10230) 2026-11-12 20:39:50 -08:00
Kaoru0822 bfecbb1d48 test(native): cover deadlines throughout signature inspection (#10217) 2026-11-12 20:39:31 -08:00
Kaoru0822 0c01517cc0 fix(pcap): disclose truncated DNS responses as partial (#10214)
* fix(pcap): disclose truncated DNS responses as partial

* fix(pcap): explain DNS truncation in coverage limitations

* fix(pcap): preserve mDNS TC semantics
2026-11-12 20:34:34 -08:00
ShuaixinHuangandShuaixinHuang 9c86465d47 fix(captures): retain preparation cleanup owners (#10288)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-12 22:08:37 -05:00
morluto c836f57b7d refactor: consolidate shared analysis boundaries (#10293) 2026-11-12 22:05:32 -05:00
morluto 6878a84796 fix(tests): restore worker fixture and allow setup completion 2026-11-12 20:57:43 -05:00
Kaoru0822 937d10df1c fix(pe): enforce DER extension critical encoding (#10212) 2026-11-12 19:33:31 -05:00
Kaoru0822 c19d319929 fix(desktop): preserve literal directories in ELF origin expansion (#10215)
fix(desktop): expand ELF origin paths as literal directory names
2026-11-12 19:33:16 -05:00
Kaoru0822 966bde3780 fix(android): enforce DEX array dimension limit (#10227) 2026-11-12 19:29:53 -05:00
Kaoru0822 50d4f7bea4 fix(desktop): validate guest file replies at their shared boundary (#10224)
* fix(desktop): reject malformed guest file base64

* fix(desktop): scope guest file metadata validation to its namespace
2026-11-12 19:29:18 -05:00
Kaoru0822 594d73985c fix(desktop): preserve Unicode separators in entry values (#10210) 2026-11-12 19:29:05 -05:00
Kaoru0822 0f5ac9d5f3 fix(desktop): preserve multiline apt-config locations (#10241) 2026-11-12 19:28:11 -05:00