Commit Graph
7476 Commits
Author SHA1 Message Date
wunianze666-netizenandgensokyo-dev 3e95d22dd4 fix(cli): report observe-web-session progress on stderr
MCP passes progress to observeWebSession, but the CLI did not, so a
caller of `rea observe-web-session` never saw the armed observation
window it must wait for before acting. Three CLI commands also each
wrote their own copy of the same stderr progress line.

One cliProgress module now owns the stderr progress line and reporter.
observe-web-session uses it, as do web runtime, JavaScript application
and desktop capture progress. The CDP session also stops reporting
readiness once collection is no longer active, so a stopped capture does
not invite the external action.

Fixes #8141
Supersedes #8149

Based on #8149; the desktop capture copy now shares the line writer too.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
gensokyo-devandgensokyo-dev fee267759d fix(desktop): keep the advertised apt suite pattern valid in v-mode
The start_build_computer apt `suite` pattern, added after #10423's base,
had an unescaped / inside a character class, which the v flag refuses.
The full-profile guard from #10423 caught it. Spell it \x2f, as the
same pattern already spells -.

Refs #10389

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
41625d7d1b docs(web): state the segment limit in the template_rules description
The template_rules description said prefix-variance applies "at any
method or length", but sibling-variance, sibling-pair-variance and
prefix-variance compare only routes of at most 32 segments. The
description now states that limit, built from SEGMENT_LIMITED_RULES and
SIBLING_VARIANCE_SEGMENT_LIMIT so it cannot drift from the code.

Fixes #7388

Based on #7446 by theo-73.

Co-Authored-By: theo-73 <tejas38293@gmail.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
67f3190def docs(native): say inspect_macho segment offsets are slice-relative
The inspect_macho catalog description did not say that segment and
section file offsets are relative to the selected slice, so callers of
a universal binary read them as input-file offsets. It now names
selected_architecture.container_file_offset as the addend.

Fixes #8302

Based on #8345 by deepakrakshit, reduced to one clause in the compact
description.

Co-Authored-By: deepakrakshit <deepakrakshit505@gmail.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
2SinceJulyandgensokyo-dev 30d23ccd92 fix(verifiers): accept Hopper's declared unknown relationship coverage
verify-real-hopper asserted complete relationship coverage for
analyze_function, but HopperProvider always declares unknown caller and
callee coverage with a reason, and compare_functions then reports the
calls dimension as unknown. The fixture oracle now checks the declared
unknown and its reason instead of demanding coverage Hopper never
claims.

Fixes #8067

Only the verifier hunk of #9496 is taken; the rest of that PR reverted
unrelated main code.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
gensokyo-devandgensokyo-dev cf58037726 fix(setup): show a known manual step in the interactive dry run
The approval prompt now discloses a client's manual completion step,
but the interactive TTY dry run still printed only the planned file
changes, so `rea setup --dry-run --client grok_bot` hid the Grok Bot
connector step. The dry-run renderer now prints the planned result's
remediation the same way.

Refs #7692

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
Avocadoandgensokyo-dev bbad1db998 test(setup): admit inert launcher in Linux approval fixture
Refs #7692

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
Avocadoandgensokyo-dev 4d02bc82b3 fix(setup): disclose manual connector steps before approval
Fixes #7692
Supersedes #7792

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
gensokyo-devandgensokyo-dev 4e8e1f5346 test(process): pass the capture resource scope in the removed-observer test
prepareProcessCapture takes the run's resource scope on main.

Refs #7281

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
70960d253d fix(mcp): traverse contentSchema in schema keyword normalization
Fixes #7123

Supersedes #7122

Co-authored-by: mawahnnie <198902683+mawahnnie@users.noreply.github.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
ducanhnguyen223andgensokyo-dev cf9e7f7dad test(process): skip POSIX observer errors on Windows
Refs #7281

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
ducanhnguyen223andgensokyo-dev 1201c99427 test(process): cover observer path resolution errors
Refs #7281

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
ducanhnguyen223andgensokyo-dev 37ca2bcc0c fix(process): tolerate missing observer roots
Fixes #7281
Supersedes #7287

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
LexLuthorPrimeroandgensokyo-dev b6b6800346 fix(contracts): keep advertised full-profile patterns portable
Fixes #10389
Supersedes #10423

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
a02202aba2 fix(cli): count the full-output envelope for TOON/YAML token counts
With --token-count --full-output, TOON and YAML results were delegated
to Incur before the envelope-aware count branch, so Incur counted only
the selected data (13) instead of the emitted full document (31).
Keep that combination on the REA output boundary so the count covers
the envelope and metadata, matching the docs/cli.md contract. Bare
counts stay delegated to Incur and are unchanged.

Fixes #7271
Supersedes #7278

Co-authored-by: Saim Shafique <128062316+sx4im@users.noreply.github.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
ShuaixinHuangandgensokyo-dev 86799f919d fix(desktop): preserve ZIP member identity across bounded readers
Fixes #10172
Supersedes #10173

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
morlutoandgensokyo-dev 1adc3fa553 fix(adb)!: preserve malformed version declarations
Fixes #7534

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
kittimzheandgensokyo-dev 6227c443bb fix(adb): reject package ids with attached text instead of admitting the prefix
inspect_adb_package matched a leading digit run in userId/appId
declarations and admitted it, so userId=10123abc became user_id 10123
with no numeric issue and complete coverage. A malformed declaration
before a valid one could also decide which id the caller received.

The decimal id must now end its token: Package Manager separates later
fields with whitespace, so attached text makes the declaration an
invalid_format numeric issue with its original line, coverage becomes
partial, and first-valid selection only considers well-formed values.
Whitespace-separated suffixes stay admitted as before.

Fixes #7409

Supersedes #7470

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:16:39 +01:00
gensokyo-devandgensokyo-dev a6f98e733e test(native): pair the truncated export count case with a stored table
Add a PE whose section stores every declared export slot, so the entry
allowance refusal is also shown for a structurally possible table, and use it
over MCP. Leave dispatch-test directory removal to its temporary fixture.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 065fbec4b3 fix(session): select the registered entrypoint as the running runtime does
Node resolves its script entrypoint lexically, so a registered spelling that
crosses a symlink before `..` names the running file lexically, while Bun
follows native traversal (#8844). Select the expected server path with the
shared runtime-aware entrypoint normalizer before comparing it with the
running entrypoint, and fall back to file identity only when they differ.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 982ea7fa9f test: drop a frozen bridge sentence and a pcap deadline override
Keep the bridge cursor-mismatch code check without copying its message, and
let the pcap relative-tool diagnostic use the shared child deadline, which it
does not test.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 06745befda fix(rust): name the storage basis only when it bounds inflate
A padded PE section above 128 KiB derives an allowance larger than the fixed
8 MiB cap, so the cap is what inflate enforces. Name the padded storage size
only when its allowance is below the cap.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 4ad1eb5beb fix(snapshot): locate entry diagnostics by collection and index
Each snapshot entry is validated alone, so its schema issue path started at
the entry. Prefix it with entries or workflow_entries and the entry index so
the reason names the entry to repair, and match the header case's issue
count without freezing the whole sentence.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 612b330b3b test(native): keep the export entry-allowance case in its own group
Merging the native export capacity tests made one describe block exceed
the lint function-length limit.

Refs #7628

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev c52bf54ce3 test(snapshot): type the CLI detail comparison
Refs #7442

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev e6bcda9d45 test(snapshot): compare snapshot diagnostics without MCP session facts
MCP errors now also carry open-session facts (selection and target at
failure), so the CLI/MCP comparison checks that MCP keeps the CLI's
snapshot details rather than requiring identical objects.

Refs #7442

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
3ae21f9ff8 fix(evidence): name the noncanonical bundle sections
Any canonical-form mismatch reported "Evidence bundle manifests are not
canonical", so a bundle whose records were out of order, or whose
unknowns differed, blamed unchanged manifests. The error now names the
top-level sections that differ from canonical form, for example
"Evidence bundle sections are not canonical: records".

Fixes #7330

Based on #7358 by zzrs-xxxr, which split records from manifests; this
reports every differing section instead, so unknowns or several
sections are attributed correctly.

Co-Authored-By: zzrs-xxxr <225415@qq.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 644d059487 fix(rust): name the padded-storage basis of an inflate refusal
A padded PE dependency section that overflowed inflate allocation
reported the storage-based allowance (section size x 64) as the
generic size limit, which reads as the smaller limit the docs derive
from the consumed stream. The stream length is unknown when inflate
stops, so the enforced bound stays the reported maximum_bytes and the
message now says it was derived from the padded storage size.

Fixes #9227

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
ab26fc9023 fix(wasm): keep a rejected relative WABT directory in the refusal
A relative REA_WABT_BIN_DIRECTORY was refused with only the setting
name, and an unset value was indistinguishable from an empty one. The
admission refusal now carries the rejected value as
diagnostics.configured when it is set.

Fixes #7595

The idea and original report are from #7753 by ayobamiseun, which
targeted a message that WabtAdmissionError has since replaced.

Co-Authored-By: ayobamiseun <adegokeayobamiseun@gmail.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
morlutoandgensokyo-dev 4104f88b62 fix(native-ui): advertise capture source requirement
Refs #7570

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
Harshit Sharmaandgensokyo-dev 60a59daaa6 fix(native-ui): preserve capture source refusal reasons (#7570)
Fixes #7570
Supersedes #7589

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
morlutoandgensokyo-dev 4d544c8434 test(snapshot): assert full validation diagnostics
Refs #7442

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
wunianze666-netizenandgensokyo-dev 213fcc8ce1 fix(snapshot): retain schema diagnostics in file failures
Refs morluto/rea#7442

Fixes #7442
Supersedes #7875

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
morlutoandgensokyo-dev 7471b07a90 test(native): verify export allowance recovery over MCP
Refs #7628

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
ayobamiseunandgensokyo-dev 8e5e23c21e fix(native): name the exhausted native export allowance by its units
The native export parser throws one BinaryResourceFailure for both its
262144-entry inventory ceiling and its 16 MiB retained-text byte budget, and
NativeExportsProvider mapped every such refusal to the fixed-count recovery.
A PE whose export names exhaust the byte budget therefore reported
reported_limits.maximum 16777216 next to "is a fixed count".

Tag each parser allowance at the producing boundary (NativeExportLimitFailure
with limit "rows" or "retained_text") and let the provider select count,
byte, or structural-decoding recovery from that tag instead of from message
text. The refusal code, non-retryable flag, message, and reported maximum are
unchanged.

Fixes #7628
Supersedes #7754

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
Cursor Agentandgensokyo-dev 3fbc940330 fix(ghidra): report byte-search cursor mismatches without schema repair
A cursor for another target, profile, pattern, mask, bounds, or document
was reported as invalid input and pointed at schema repair. Name the
binding, attribute the issue to the cursor, and leave the differing
component unknown.

Fixes #8366
Supersedes #8420

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
Zhaowei Guandgensokyo-dev 4447c2ea25 test(native): pin IDA and Kuna in the dispatch fallback acceptance test
The darwin-only acceptance test passes the caller's environment to the CLI
and points only Hopper, Ghidra and Java at missing paths. On macOS the
list_names fallback has four candidates (ghidra, hopper, ida, kuna), so a
REA_IDA_MCP_CONFIG or REA_KUNA_COMMAND set in the developer's shell still
reaches it: with REA_KUNA_COMMAND set, kuna is no longer rejected as
not_configured. Point both at missing paths, as
tests/acceptance/nativeDispatchSnapshot.test.ts does, so the test always
exercises the unavailable fallback.

Signed-off-by: Zhaowei Gu <83746079+zw-g@users.noreply.github.com>

Refs #7651

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
3a1db29166 fix(native): retain the dispatch reader failure when the symbol fallback fails
When the byte reader for inspect_native_dispatch_metadata refuses a target
(for example a 32-bit Mach-O) and the list_names symbol fallback then fails
or returns an invalid inventory, only the fallback's error reached the
caller. Retain the reader failure under diagnostics.binary_metadata_failure.

Fixes #7651.

Carries forward e7884a704 (by @morluto, on @dreinst's #7701).

Signed-off-by: Zhaowei Gu <83746079+zw-g@users.noreply.github.com>

Supersedes #8036

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
fd97d0926c fix(hopper): type the Apple Events authorization denial
A hardened-runtime client without the Apple Events automation
entitlement got generic Automation advice, and the projection kept
retryable: true, so agents retried from the same unauthorized client.
The denial is now a typed launch rejection whose message and recovery
name the entitlement and the Automation setting, with retry turned off.

Fixes #9879

Squashed from #9916 and rebased onto main.

Co-Authored-By: morluto <76467478+morluto@users.noreply.github.com>
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
1052326311andgensokyo-dev eee8c5fa97 fix(session): compare entrypoint file identity
Fixes #8844
Supersedes #8849

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
morlutoandgensokyo-dev 90fd58d373 test(pcap): verify relative tool diagnostics through MCP
Refs #7569

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
Harshit Sharmaandgensokyo-dev 1327c386da fix(pcap): keep selected relative executable paths in error facts (#7569)
Fixes #7569
Supersedes #7577

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 14:06:23 +01:00
gensokyo-devandgensokyo-dev 2caa2598d3 fix(python): walk slice members in the code hashability stack
The key resolver followed slice members, but the explicit-stack hashability
walk skipped them, so a code object reached through a slice constant started
a recursive hashability check. A 3,000-link slice-wrapped TYPE_REF code chain
overflowed the JavaScript stack. Push slice members onto the same explicit
stack as tuple and frozenset members.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 13:37:55 +01:00
gensokyo-devandgensokyo-dev ca147d7c4d docs(skill): regenerate the Cursor plugin skill for the pyc range
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 13:37:55 +01:00
gensokyo-devandgensokyo-dev 9d3eb083dd fix(python): pin only the 3.14 and 3.15 magics checked locally
Keep magic 3627 (CPython 3.14.6) and 3666 (CPython 3.15.0b3), whose code
layout and inline-cache tables match those interpreters' opcode tables and
whose decoded code objects match marshal.loads across a stdlib sample. Leave
the 3.15.0a8 magic 3663 unpinned, since no 3.15.0a8 interpreter was available
to check it, and regenerate the 3.15 slice fixture with 3.15.0b3.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 13:37:55 +01:00
Abhishek Sharma 1d08253ff2 feat(python): decode CPython 3.14 and 3.15 pyc code objects
Decode marshal slice constants from magic 3608 onward and pin the 3.11 code
layout and inline-cache tables for the 3.14 and 3.15 magics.

Refs #8206
2026-11-14 13:37:55 +01:00
gensokyo-devandgensokyo-dev 5451d3cb2d test(cli): compare each registrar in a fresh lazy process
The in-process equivalence checks share every module that the complete
CLI already imported, so they cannot detect a registrar that relies on
another module's import-time setup. For each registrar, a fresh rea
process now runs one of its commands with an unknown option, taking the
lazy path. The test compares the rejection document and status with the
complete CLI's.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 20:25:11 +08:00
gensokyo-devandgensokyo-dev b990eb496d perf(cli): load only the registrar a one-shot command needs
Every rea process imported and registered all 52 command registrars
(about 1,900 modules) before running any command. A one-shot command
now loads only the registrar that defines its top-level command.

- src/cli/cliCommandRegistrations.ts holds every registrar in one table,
  grouped by tool family, with its module loader and its call. The
  complete createCli registers the table with static imports, and the
  types check that each entry matches its module.
- src/cli/cliShell.ts owns what does not depend on which commands are
  registered: identity, globals, argument policy, completions and the
  registration builtins. The full and lazy paths share it.
- scripts/record-cli-commands.mjs records, after tsc, which registrar
  defines each top-level command, from the same compiled table. The
  bundle keeps the record as an external dist module.
- cli/cliLoader.ts selects the recorded registrar when a known top-level
  command runs. It loads the complete CLI for help, --schema, --llms,
  completions, builtins, unknown names ("did you mean"), or a missing
  record.
- Process-owned CLI resources register their closers when their module
  loads (cli/cliResources.ts), so the shell no longer imports
  JavaScript-analysis and guidance owners just to close them.

Measured on one pinned core (median of 5 warm runs, base main vs this
change):
- guidance: 1.95 s / 253 MB → 0.42 s / 101 MB
- list-cutter-sessions: 1.97 s → 0.49 s
- inspect-go-binary: 1.95 s → 0.95 s
- setup --dry-run: 2.40 s → 1.88 s
- analyze: 2.39 s → 1.78 s
- --help: 1.99 s → 2.04 s (complete CLI, as before)

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 20:25:11 +08:00
gensokyo-devandgensokyo-dev 55c9e8e546 test: close the wait-deadline review gaps
- doctorCancellation measured from the signal, after the probe had
  started, so a probe stopped by its own deadline could still pass. The
  fake probe now records its start, and the check runs from there.
- rea/project-wait-deadline missed literal computed `timeout` keys and
  spread options. It now reports both, as well as computed keys it
  cannot read.
- The testing guide notes that a long-running test's expect.poll keeps
  its project budget, while waitFor follows the tag's deadline.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 19:28:38 +08:00
gensokyo-devandgensokyo-dev 4baf1b6193 test: keep the wait helper free of config-only context types
Stryker's TypeScript checker compiles the test support without
vitest.config.ts, so inject("testDeadlineScale") had type never there.
Outside a test the wait helper now uses the unscaled source deadline,
which no project's hook deadline is shorter than.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-14 19:28:38 +08:00