Commit Graph
6749 Commits
Author SHA1 Message Date
morluto 87dcb534ba fix(managed)!: read an omitted path from the open target, not a remembered selection (#15345)
Managed tools kept the last explicit path for the server's lifetime and
preferred it over the open target, so close_binary, reset_investigation and
target switches left an earlier file in effect and later calls silently
analyzed the wrong assembly.

The router now keeps no selection. An omitted path reads the active target
when it is a managed PE; otherwise the call is refused, conforming to the
input contract, with remediation naming both ways to supply a target.

Fixes #15314

BREAKING CHANGE: inspect_managed_* tools no longer reuse a path from an
earlier call. Pass path on each call, or open the managed PE with open_binary.
2026-11-30 18:25:55 -05:00
Beqa 4b19f283d3 fix(setup): own REA scripts when the registered Node path is gone (#15281)
* fix(setup): own REA scripts when the registered Node path is gone

When a saved node/script/mcp launcher pointed at a missing interpreter,
ownership stayed unknown and setup refused to refresh after nvm/fnm moved
Node. Check the script whenever a current entrypoint is available, not only
when the interpreter path still resolves as a foreign binary.

Fixes #15024

* fix(setup): own vanished Node only for verified rea-agents scripts

Narrow the missing-interpreter path: keep a disappeared runtime unknown
unless its basename is node/bun and the script verifies as an installed
rea-agents package. Preserve the existing foreign-runtime script check
and the maintainer invariant that a matching non-package script stays
unknown after the executable vanishes.

Merge upstream/main for ownedPackageCommand OpenCode fixtures.
2026-12-01 02:57:17 +08:00
Taksh KothariandVincent Koc 6a728ba419 feat(evidence): page retained procedure aliases (#9325)
* feat(evidence): page retained procedure aliases

Bound alias pages by the serialized byte budget and advertise the native-inventory-aliases selector, including source_index.

* use the shared analysis-view page refusal for alias pages

the 1 MiB page budget already has a typed refusal, so this page does not declare a separate fixed ceiling.

* test(evidence): verify alias page recovery and portability

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 02:52:33 +08:00
ShuaixinHuang e8419acaf5 fix(javascript): explain relation omissions at semantic node ceilings (#15295) 2026-12-01 02:51:17 +08:00
Vincent Koc fcdb137120 test(setup): use owned launchers in uninstall fixtures (#15296) 2026-12-01 02:36:15 +08:00
ShuaixinHuang f9053a26ec perf(artifacts): defer unrelated modules during CLI inspection (#15268)
* perf(artifacts): defer unrelated modules during CLI inspection

* test(cli): detect unrelated modules folded into startup chunks

* test(cli): exercise bundled source markers with positive controls
2026-12-01 01:55:31 +08:00
ShuaixinHuangandVincent Koc 181fd31f16 fix(analysis-view): fit Android JNI row pages to the byte budget (#15276)
* fix(analysis-view): fit Android JNI row pages to the byte budget

* fix(views): preserve indexed selection in byte-bounded pages

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 01:48:30 +08:00
ShuaixinHuang 6940e960ba fix(analysis-view): fit devicetree property pages to the response budget (#15269)
* fix(analysis-view): fit devicetree property pages to the response budget

* test(analysis-view): cover multi-property devicetree pages
2026-12-01 01:46:00 +08:00
Ysopwnableandgensokyo-dev b3cf255894 test(setup): remove PATH assumptions from launcher fixtures (#15282)
Use a shared package-owned launcher in setup and uninstall fixtures.
Exercise publication, recovery, and policy under an isolated PATH.

Follow-up to #15046.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 01:44:05 +08:00
Heo Hao 7741d92531 fix(artifacts): refuse an unrepresentable Windows name as such (#15246)
Creating a destination whose name holds `*`, `?`, `"`, `<`, `>` or `|`
fails inside Win32 with ENOENT, so the write surfaced "Could not
exclusively create extraction path: Report*.txt" with a raw cause. That
reads as a missing path, not as a name the destination cannot hold.

I refuse those names before any extraction path is created and raise the
DestinationPathUnrepresentableFailure that already reports ENAMETOOLONG,
so the refusal names the destination filesystem as the owner. The
character set stays in portablePathSegment.ts, which isPortablePathSegment
already applies to bundle and ROM names.

Device names and trailing dots or spaces stay accepted: the host
materializes NUL, CON and name. as ordinary files, so there is no Win32
redirection to refuse.
2026-12-01 01:42:35 +08:00
Vincent Koc eeba69c9aa fix(javascript): retain import edges through cyclic mutation aliases (#15279) 2026-12-01 01:32:17 +08:00
Ysopwnableandgensokyo-dev ea2db355a5 test(setup): declare ownership in Hermes CLI fixtures (#15277)
Give Hermes YAML preservation and policy fixtures a launcher with
explicit REA ownership. Cover setup on CI runners without an installed
bare rea command on PATH.

Follow-up to #15046.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 01:25:14 +08:00
Ysopwnableandgensokyo-dev a8fa92107c test(setup): cover shared Copilot CLI project configuration (#15275)
Exercise owned Copilot CLI removal and backup in the shared project
MCP file. Assert the winning Mastra Code registration in doctor when
multiple clients report the same shared file.

Follow-up to #15230.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 01:07:54 +08:00
7915d15938 fix(setup): own bare rea only when PATH resolves to this package (#15046)
Resolve bare REA launchers using the registration's effective PATH and
verify the resulting installation before setup or uninstall changes an
entry. Share the parsed environment through registration workflows and
keep unproven launchers unknown. Cover npm shim lookup on Windows and
use deterministic ownership fixtures for layered removal.

Fixes #15026.

Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:53:48 +08:00
ShuaixinHuangandVincent Koc 72d2b74945 perf(analysis-view): bound JavaScript fact group sorting for small pages (#15265)
* perf(analysis-view): bound JavaScript fact group sorting for small pages

* test(analysis-view): verify fact group page ordering and counts

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 00:52:25 +08:00
2afad5b789 fix(setup): honor OpenCode system, managed and policy configuration (#15081)
Discover the OpenCode system and managed layers and honor their effective
MCP policy when planning, publishing, diagnosing, or removing registrations.
Preserve the writable layer's dialect and verify effective registration
and policy after publication.

Fixes #15036.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:48:10 +08:00
Ysopwnableandgensokyo-dev 3e3c2ba1cc feat(artifacts): inspect SWF and extract embedded payloads (#15264)
Inventory FWS and CWS files through the shared artifact reader. Preserve the
carrier and normalized identities, top-level tag counts, and individual
DefineBinaryData occurrences. Use the existing selected-extraction pipeline and
per-call artifact admission controls.

Refs #3614

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:41:11 +08:00
ShuaixinHuangandVincent Koc 88eaed6fa7 perf(analysis-view): count JavaScript fact group nodes without retaining ID sets (#15261)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 00:33:34 +08:00
7bedbcb6f6 fix(javascript): scope the missing-listener rule to proven Node emitters (#8663)
* fix(javascript): scope the missing-listener rule to proven Node emitters

A listener method called without a listener argument passes `undefined` to
Node's `checkListener`, which throws before anything is registered or
removed, so no event operation exists. That rule currently applies to every
receiver, including objects that only look like an emitter.

Restrict it to a receiver whose stable initializer is `new EventEmitter()`
resolved through a proven `events` load, or a call Node's own
`child_process` factories answer with a `ChildProcess`. The proof is
withdrawn when `Function.prototype.call` was replaced, when the class
reference or its prototype object escaped to a call, when any member of the
shared `events` module was written, or when the selected method, the
receiver's own prototype or an earlier escape of the instance may have
replaced it. An effect that runs after the call cannot change whether it
threw.

Any other receiver keeps its operation as an unresolved candidate, as it did
before the missing argument was considered. Those include EventEmitter-style
APIs that define a one-argument form, such as Socket.IO's `socket.off("x")`,
which removes every listener for the event.

* fix(javascript): verify native emitter constructor and prototype ownership

* fix(javascript): retain escaped prototype constructor aliases

* fix(javascript): track acquired builtin module mutations

* fix(javascript): charge module acquisition to phase allowance

* fix(javascript): recognize computed builtin getter keys

---------

Co-authored-by: gongfpp <22683417+gongfpp@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 00:30:59 +08:00
061239a5de fix(setup): follow the registration Copilot, Codex, and Kiro load (#15230)
Follow the effective Copilot, Codex, and Kiro MCP registration. Use the
same resolved Kiro agent file for the approval plan and the write.

Fixes #15032.
Fixes #15034.
Fixes #15035.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:19:28 +08:00
9b3586e933 fix(javascript): keep parameter members a function overwrites unresolved (#9508)
* fix(javascript): keep parameter members a function overwrites unresolved

Wrapper tracing binds a traced function's parameters to the call-site
arguments. JavaScriptSymbolicBindings#identifier returned that bound value
before consulting the binding's recorded member writes, so a member the
function writes, deletes or redefines was still read from the argument. A
wrapper that rewrites def.channel before ipcMain.handle(def.channel, ...)
produced an exact wrapper-substituted channel from the stale argument
member, and a preload wrapper that replaces api.ping before exposing api
produced a call path through the replaced function.

Apply the binding's existing write facts to the bound value per member. A
written member reads as "overwritten object members" wherever the value
flows (aliases, destructuring, spreads, returns, forwarded arguments), and
members() lists it, so spreads and exposed-API inventories do not fall back
to an earlier value. Unwritten members, and loader calls through a
parameter whose properties a module sets, keep their values.

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

* perf(javascript): share parameter member-write views across reads

#withMemberWrites rescanned a binding's writes and copied the bound value
on every read, so W writes and R reads of one parameter did W x R work
outside the symbolic evaluation budget and left R copies in the
evaluation cache.

Collect each binding's written top-level members once, and keep one view
per bound value and binding that every read returns. Building a view is
charged against the evaluation budget before its copies and merged
member sets are allocated, as added conditions already are.

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

* fix(javascript): apply rest parameter writes to spread elements

A rest parameter's view recorded its written members, but a call spread
expanded the array's elements unchanged, so a wrapper that rewrites
args[0] before ipcMain.handle(...args) still supplied the caller's
channel. An index read after a written length also returned an element
the write may have removed.

Rewrite the array's elements when building the parameter's view: a
written index becomes unknown, and a written length or an index past the
end leaves one unknown element for the rest, as for any dynamic spread.
Unwritten elements before that point keep their values.

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

* docs(javascript): state how rest parameter writes resolve

The wrapper-substitution passage said that an argument's unwritten members
keep their values. For a rest parameter, a written length leaves every
element unresolved, and an index written past the end leaves the elements
after the known ones unresolved.

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

* fix(javascript): leave arguments after an unknown-length spread unplaced

arguments() expanded a spread of unknown length as exactly one unknown
element, so the arguments after it kept fixed positions. With
function f(...a){a.length=2; return g(...a, "fallback")}, g's second
parameter read "fallback", although at runtime it is the original second
argument; a helper that picks an argument this way supplied a false
wrapper-substituted IPC channel. The same held for any spread whose value
is not a known array.

Mark the element that stands for an unknown number of further elements
(unknownCount), and stop the argument list after it, so later parameters
read as unknown. A rest parameter bound past that point is the same
open-ended unknown, and a rest array's written length or index past its
known elements produces the marker instead of a fixed-length element.

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

* fix(javascript): pass one element of an unknown-length list as one argument

A fixed parameter bound from a spread of unknown length, and an index
read of a rest array whose length the function writes, kept the
unknown-count marker that stands for the rest of a list. Passed on as an
ordinary argument, that one value made the callee's argument list look
open, so a later rest parameter took the marker and a spread of it
dropped the arguments after it. With function first(x){return x} and
function h(x,...rest){return k(...rest,"app:ping")}, h(first(...xs))
lost "app:ping", although rest is always empty there.

A value selected from one position of an argument list or array is now a
plain unknown, so it supplies exactly one argument wherever it goes.

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

* test(javascript): resolve a channel after a rest list left empty by one value

The symbolic tests for one value selected from a list of unknown length
check the resolver, but the loss shows at the wrapper boundary. A rest
parameter that one selected value leaves empty looked open, so a channel
placed after it in a helper call went unresolved and the wrapper's
app:ping registration disappeared.

Add two wrapper rows to electronWrappedCallPaths.test.ts. In the first,
register(first(...extraArguments)) supplies one argument, so the rest
parameter of register is empty and choose(...extra, "app:ping") picks
app:ping. In the second, forward(args[0]) after args.length = 0 supplies
one argument, so choose(...rest, "app:ping") picks app:ping. Node with a
stub electron module registers app:ping in both cases for every
extraArguments list tried ([], ["x"], ["x", "y"]).

Validation: with the source of the previous commit reverted, these two
rows and the two symbolic rows fail (4 of 322 tests in
javascriptSymbolicBindings.test.ts and electronWrappedCallPaths.test.ts,
the app:ping row is missing) and every other test passes. With the source
as committed, all 322 pass.

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

* docs(javascript): state that one value read from a list is one argument

The guide says arguments after a spread of unknown length stay
unresolved because their positions are unknown. A reader can take that to
cover a value read from such a list, but a value read from one position of
a spread or of a rest array supplies exactly one argument, so a rest
parameter after it is empty and a channel placed after that rest list
still resolves.

State the rule beside the spread rule it qualifies. The behavior comes
from the selected-element rule of "pass one element of an unknown-length
list as one argument". The symbolic rows of that commit and the wrapper
rows of the test commit after it assert it.

Validation: npx oxfmt --check on the guide passes. node
scripts/check-doc-facts.mjs needs a built dist/ and did not run.

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

* fix(javascript): do not grow a rest array for an out-of-range delete

`function f(...args) { delete args[2]; return pick(...args, "fallback") }`
with two known rest arguments always passes `fallback` third: `delete`
neither creates the element nor changes the length. The written member
set lost the operation, so the index past the end appended an
unknown-count element and the fixed-position argument was dropped.

Only members that a write other than `delete` reaches can now grow the
array. A delete inside the known elements still makes that element
unknown, and a delete plus an assignment of the same index still grows.

Validation: the two delete rows fail on the previous head and pass now;
the delete-then-assign control stays unknown. vitest on
electronWrappedCallPaths.test.ts and javascriptSymbolicBindings.test.ts:
365 passed (365). tsc --noEmit is clean.

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

* fix(javascript): separate member enumeration from value invalidation

* fix(javascript): preserve rest-array enumeration and snapshot order

* fix(javascript): preserve conditional writes and pre-mutation array membership

* fix(javascript): invalidate added array indices after length writes

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 00:03:33 +08:00
ShuaixinHuangandShuaixinHuang 5367fe5a5f fix(analysis-view): fit Playwright trace row pages to byte budget (#15231)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-30 23:55:16 +08:00
ShuaixinHuangandVincent Koc dd52af8c92 feat(artifacts): extract stored Unix ar members (#15248)
* feat(artifacts): extract stored Unix ar members

* test(artifacts): assert structured thin ar extraction refusal

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 23:53:45 +08:00
BeqaandVincent Koc 130243a7c1 fix(setup): recognize path-qualified cmd.exe and npm rea.cmd shims (#15045)
* fix(setup): recognize path-qualified cmd.exe and npm rea.cmd shims

Unwrap C:\Windows\System32\cmd.exe /d /c package runners, and read the
script an npm rea.cmd shim launches so those registrations stay owned.

* fix(setup): parse npm rea.cmd launch statements with a bounded read

Own only the script argument of the npm cmd-shim launch line, skip rem
comments, refuse oversized files before allocating, and join with host
path rules so UNC roots stay intact.

* fix(setup): ignore echoed npm launch text in rea.cmd shims

Skip echo lines and refuse ownership when a later "%_prog%" launch names
a non-package script, so printed paths cannot prove an unrelated row.

* fix(setup): require executed npm rea.cmd launch statements

Anchor "%_prog%" matching to a real launch command, skip @rem comments,
and ignore conditional echo lines so ownership cannot follow text that
is never executed.

* fix(setup): require strict npm cmd-shim structure for rea.cmd ownership

* fix(setup): match exact npm cmd-shim template for rea.cmd ownership

* fix(client-identity): reject batch variables and support local node_modules/.bin rea.cmd shims

* fix(setup): recognize current npm command shims

* fix(ci): route CMD shim tests to the Windows package lane

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 23:53:39 +08:00
ShuaixinHuang 1f1dd15a92 fix(analysis-view): fit GraphQL contract pages to byte budget (#15240) 2026-11-30 23:51:46 +08:00
morluto 02c6d3c8bc fix(cli): suggest npx rea-agents@latest setup in the update notice under npx (#15251)
* fix(cli): suggest npx rea-agents@latest setup in the update notice under npx

A package-runner launch has no installed rea to run --update on, and its agent registrations point at that run's cache, so the notice now suggests rerunning setup at @latest through the same runner.

* fix(update): tell npx users how to update REA in plain words

rea update cannot upgrade a copy it did not install. Its message now tells npx users to run npx rea-agents@latest setup and that they can ask their agent to do it. The skill tells agents which update command to run, and the README mentions asking the agent.
2026-11-30 10:33:18 -05:00
morluto 3ab956b327 fix(setup): repair npx registrations after the npx cache is pruned (#15249)
* fix(setup): refresh registrations from a removed npx cache entry

npx rea-agents setup saves REA's script in npm's _npx cache. After npm prunes that entry, setup could not read the package manifest, marked the registration unknown and asked for a manual config edit. A saved script with setup's exact npx layout that no longer exists is now REA-owned and stale, so npx rea-agents@latest setup replaces it and doctor names that command. The npx cache matcher moves to one module shared by doctor and setup.

* docs(agents): keep npx rea-agents setup as the onboarding path

* test(setup): run real npx setup through a cache prune and repair

The end-to-end run showed POSIX setup saves npm exec's node_modules/.bin/rea alias, not the package script, so removed-npx recognition now accepts both layouts setup writes.
2026-11-30 10:21:49 -05:00
AfloatandVincent Koc 4dccd4d252 fix(comparison): retain function CFG entry identity (#14082)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 23:09:51 +08:00
fafde7b243 fix(javascript): resolve Electron paths held in definite constants (#9540)
* fix(javascript): resolve Electron paths held in definite constants

A preload, utilityProcess.fork module path, serviceName or loadFile path
written inline as path.join(__dirname, "preload.js") resolves, but the same
expression stored in a const first stays dynamic, because staticPathFact
returned undefined for every identifier. The ESM idiom
const __dirname = path.dirname(fileURLToPath(import.meta.url)) left
path.join(__dirname, ...) unresolved for the same reason.

The path intrinsic query now also returns the initializer of a single,
unreassigned, unprojected const whose initializer the shared lexical index
proves has run at the read (the proof constant BrowserWindow options use).
staticPathFact and the filesystem-context check recurse into that
initializer, so a source-directory base survives, and the source-directory
and source-file identity proofs follow const aliases. Each constant is
substituted at most once per evaluated expression, which keeps work and
spelling bounded by the source text.

let and var bindings, reassigned, destructured or shadowed constants, reads
that may run before initialization and URL objects stay unknown.

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

* fix(javascript): bound constant alias chains in static path facts

Root cause: staticPathFact and isFilesystemPathExpression recurse once
per substituted constant, and the once-per-initializer set only stops a
revisit. A linear chain of shallow declarations (const c1 = c0; const
c2 = c1; ...) admits every link, so a long enough chain exhausts the
call stack (12,000 `c + "a"` links throw RangeError in the domain test
worker). For plain aliases the same chain was quadratic instead:
isFilesystemPathExpression asked the source-directory proof at every
step, and that proof walks the whole remaining chain (4,096 aliases took
about 55 s). That proof reads initializers outside the per-expression
set, so a source-directory alias read twice, path.join(DIR, DIR, "x"),
still resolved. isFilesystemPathExpression also matched the name
__filename before following a constant of that name, so an ES module
const __filename = "service" got filesystem context, unlike the inline
string.

Structural fix, one bound owned where constants are substituted:
- The path query admits constant substitutions
  (admitConstantSubstitution): at most SEMANTIC_EXPRESSION_DEPTH_LIMIT
  per expression, the budget the expression shape resolver already uses
  for alias chains. substitutingConstantsOnce asks it, so a refused read
  is unknown, never a partial or truncated literal. A refusal records
  the expression-depth resource limit, so the examination is limited and
  the unresolved path still counts as an unknown finding.
- The source-directory proof's alias walk (constantTarget) asks the same
  question, and once the proof holds its top-level aliases are spent
  from the per-expression set like any other constant read.
- isFilesystemPathExpression follows a constant to its initializer
  before the name-based identity checks.

The guide documents the bound. Not changed: constants inside
new URL(CONST, import.meta.url) stay unknown, and the inline
path.join(__dirname, __dirname, "x") still resolves as before.

Validation:
- npm run test:local with the PR test file and nine neighbours:
  Test Files 10 passed (10), Tests 763 passed (763).
- With the two source files at 7d7180515 and the new tests, the rows for
  12,000 concatenations (RangeError: Maximum call stack size exceeded),
  4,096 aliases (resolved after about 55 s), 256 aliases to a source file,
  a chain of 256 aliases, both directory-alias rows and the __filename
  row fail; the 255-alias controls pass.
- npm run check:fast passed; oxfmt --check passed on the four files.
- Not run: the acceptance and boundary tests that need test:focused.

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

* fix(javascript): read the constant alias bound from the semantic precision

Main (#9706) removed SEMANTIC_EXPRESSION_DEPTH_LIMIT: the expression-depth
bound is now state.precision.expression_depth (default 256), so a caller
can raise or lower it per analysis. The constant-alias bound added by this
PR read the removed constant, so the tree merged with main did not compile.

Read the bound from index.bindings.precision, like the other semantic
evaluators. The test takes the default from
JAVASCRIPT_SEMANTIC_PRECISION_DEFAULTS and imports
analyzeParsedJavaScriptStaticSource from tests/fixtures, where main moved
it (#10275). Behavior at the default bound is unchanged.

Validation: npm run check:fast passed on the merged tree.
npm run test:local on javascriptStaticPathConstants.test.ts: Tests 34 passed
(34). The same command on 42 static-analysis test files (this one, the
javascriptStaticAnalysis* files and the electronStaticAnalysis app-path and
identity files): Tests 1004 passed (1004).

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

* fix(javascript): keep file URLs with an unknown base unresolved

staticFileUrlPathFact read only the spelling of its argument's path fact,
so the unknown base that main's #11991 rejects through staticPath was
dropped. `fileURLToPath(path.join("file:", __dirname, "preload.js"))`
spells `file:/preload.js` after the leading source directory, and the
Electron findings reported `/preload.js` instead of an unknown path.

The reader keeps this branch's shared substitution set and now rejects a
fact whose base is unknown before it converts the URL.

Validation: the two new controls (inline and through a constant) fail on
the previous head with `/preload.js` and pass now. vitest on
javascriptStaticPathConstants.test.ts and
javascriptStaticPathResolution.test.ts: 153 passed (153).

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

* fix(javascript): resolve a constant inside a source-relative URL

`const REL = "./preload.mjs"; fileURLToPath(new URL(REL, import.meta.url))`
stayed unknown while the inline literal resolved, because
staticSourceRelativeUrlPath read its first argument with stringValue only.

The decoder now takes the path query and follows a `const` chain to a
string literal, spending the same substitution bound as other constant
reads. A `let` binding, a joined path and a source-directory path inside
the URL stay unknown, and a stored URL object is still not followed.

Validation: the constant, alias and constant-path rows fail on the
previous head and match the inline result now; the three controls stay
unknown. vitest on javascriptStaticPathConstants.test.ts: 43 passed (43).
tsc --noEmit is clean. The CLI acceptance test needs the built runtime
and runs in CI.

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

* fix(javascript): share source path substitution budget

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 23:05:30 +08:00
morluto 9a4e2df67f revert(setup): restore npx rea-agents setup (#15245)
Revert "fix(setup): do not persist versioned launcher paths (#15123)"

This reverts commit 92c61a7c61.
2026-11-30 10:05:27 -05:00
ThejeshandVincent Koc aeca62b117 fix(javascript): recover webpack chunks with array module tables (#13829)
* fix(javascript): recover webpack chunks with array module tables

Webpack writes a chunk's module table as a sparse array when numeric
module ids are dense (webpack 5 moduleIds natural/size, webpack 4
production builds), and webpack 4 registers chunks on webpackJsonp.
Chunk registration accepted only object tables and *Chunk* globals, so
these chunks recovered no modules while coverage stayed complete.

Read object, sparse-array and Array(n).concat([...]) tables through one
moduleTableEntries helper (index plus offset is the module id) and
recognize webpackJsonp as a chunk runtime.

* fix(javascript): mark webpackJsonp chunks as webpack vendor

A minified webpack 4 chunk whose factories never spell
__webpack_require__ now yields a webpackJsonp registration with
bundler "webpack", but detectVendors matched only __webpack_require__
and webpackChunk, so the same file reported no webpack vendor and the
artifact graph's vendor_markers stayed empty.

Add webpackJsonp to the webpack vendor markers, next to webpackChunk,
so the marker and the chunk-runtime classification agree. This also
covers the not-examined path, which reports vendors without
registrations.

* fix(javascript): validate intrinsic array module table offsets

* fix(javascript): guard inherited array slots in table recovery

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 22:52:55 +08:00
ShuaixinHuangandVincent Koc bd6ff678c4 feat(artifacts): inventory standalone Unix ar archives offline (#15224)
* feat(artifacts): inventory standalone Unix ar archives offline

* test(artifacts): align standalone ar assertions and comparison docs

* fix(artifacts): preserve ar names, admission and permission uncertainty

* chore(contracts): refresh ar admission schema summaries

* fix(artifacts): handle GNU thin references and exact name budgets

* perf(artifacts): cache ar name-table observations

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 22:46:35 +08:00
ShuaixinHuangandShuaixinHuang 4886a406f9 fix(release): recover verified versions after npm advances (#15234)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-30 22:39:39 +08:00
clyde 490461938b fix(update): drain output after progress destination closes (#4894)
* fix(update): bound package-manager output collection

* fix(update): drain output after progress destination closes

* test(update): use shared progress test deadlines
2026-11-30 22:35:24 +08:00
fbb113b0d0 fix(release): confirm npm absence with an exact-version lookup (#15233)
* fix(release): confirm npm absence with an exact-version lookup

* test: cover the reviewed CI boundary cases

* fix(release): share the npm registry lookup deadline

---------

Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 22:34:39 +08:00
Adolanium 9d5c5f687d fix(process): accept legal characters in Windows batch paths (#15128)
* fix(process): quote Windows batch operators cmd.exe keeps literal

cmd.exe with delayed expansion off keeps & | < > ( ) ^ ! literal inside quotes. Empty tokens and %name% spans are still refused, including when that name is unset, because the child environment can define it.

* fix(process): report a refused batch path as invalid configuration

A percent expansion or an unusable COMSPEC is configuration_invalid. Packet capture does not append the Wireshark install remediation, and an apktool decode does not report a capability gap.

* fix(process): refuse percent spans joined across batch tokens

cmd.exe expands a percent span on the joined command line. Tokens that
are legal alone are refused when joining them forms a span. The spawn
regression kills its child if that child is still running after 10 seconds.

* test(process): include the Windows batch regression in CI

The curated Windows lane now runs WindowsBatchCommand.test.ts.

* fix(domain): preserve a configuration error's caller message

ConfigurationError accepted userMessage and dropped it, so the public
projection replaced the caller text with the generic doctor sentence.
The constructor now stores that message.

* fix(pcap): keep a batch refusal in the public configuration message

A Windows batch refusal stays in the configuration error the caller
sees, including the refused path and the percent-expansion reason.

* fix(apktool): report a decode batch refusal as invalid configuration

Inspection still reports not_configured. Decoding reports
configuration_invalid and names the launcher that cmd.exe cannot receive.
A percent span that appears only after the quoted tokens are joined is
refused the same way.

* test(process): own the Windows batch regression in the package lane

The curated Windows job already runs WindowsBatchCommand.test.ts. The package scope did not name that file, so the lane ownership check reported it as unowned.
2026-11-30 22:28:54 +08:00
Lucien b0a910b8f4 fix(update): report Frida native module readiness (#7216)
fix(update): report Frida readiness after verified updates
2026-11-30 22:26:52 +08:00
ShuaixinHuangandShuaixinHuang 8c3491439e fix(release): bind every publication preflight to its target branch (#15232)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-30 22:17:19 +08:00
ShuaixinHuang d99b51051c perf(evidence): use ledger lookups for exact record selection (#15221)
* perf(evidence): use ledger lookups for exact record selection

* fix(evidence): document the exact-page request default
2026-11-30 22:00:50 +08:00
54a700e18c fix(ghidra): use host transport defaults for direct clients (#6410)
* fix(tests): make three Windows-failing tests pass and give the Ghidra transport one owner

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(ghidra): cover the per-platform default bridge transport

defaultGhidraTransport had no direct test. Pins authenticated loopback TCP on win32 and a Unix socket on linux and darwin.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ghidra): retain Windows transport boundary coverage

* test(ghidra): align Java fixtures with their host platform

* ci(ghidra): verify transport and byte search on Windows

* test(ghidra): keep Windows probes in the existing test process

* fix(ghidra): await complete Windows endpoint publication

* test(ghidra): use owned child identities for Windows fixtures

* ci(ghidra): own the Windows transport regression inputs

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 21:51:57 +08:00
Vincent Koc 220374038b fix(ghidra): explain Windows P0 database edit limits (#15225)
* fix(ghidra): explain Windows P0 database edit limits

Fixes #15153.

* test(ghidra): narrow unavailable capability before checking recovery

* test(ghidra): distinguish mutation guidance from readiness repair
2026-11-30 20:59:49 +08:00
e9a6324a1c test(javascript): prove receiver ownership by source location (#15227)
* fix(javascript): scope candidate this event receivers

Preserve lexical receiver scopes and possible local inheritance links without asserting runtime this identity. Keep decorator evaluation outside method receiver and callable boundaries.

Fixes #3360

AI-assisted implementation and verification with OpenAI Codex; human PR ownership and readiness remain unfilled.

* fix(javascript): retain receivers through type wrappers

Reuse the canonical expression normalizer to preserve object function receiver identity through transparent wrappers. Keep arrows, computed keys and non-transparent expressions separate. AI-assisted implementation and verification with OpenAI Codex.

* fix(javascript): retain enclosing receivers for computed keys

Apply the existing computed-method-key evaluation boundary before non-arrow receiver selection. Cover object method keys and bodies through semantic IR and CLI/MCP regressions.

* test(javascript): verify class receiver links by source location

* test(javascript): prove computed receiver boundaries by source

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: 星闌 <Xinglan233@163.com>
Co-authored-by: 星闌 <130824939+Xinglan233@users.noreply.github.com>
2026-11-30 20:42:41 +08:00
星闌andCodex 17940852ed fix(javascript): scope candidate this event receivers (#4656)
* fix(javascript): scope candidate this event receivers

Preserve lexical receiver scopes and possible local inheritance links without asserting runtime this identity. Keep decorator evaluation outside method receiver and callable boundaries.

Fixes #3360

AI-assisted implementation and verification with OpenAI Codex; human PR ownership and readiness remain unfilled.

* fix(javascript): retain receivers through type wrappers

Reuse the canonical expression normalizer to preserve object function receiver identity through transparent wrappers. Keep arrows, computed keys and non-transparent expressions separate. AI-assisted implementation and verification with OpenAI Codex.

* fix(javascript): retain enclosing receivers for computed keys

Apply the existing computed-method-key evaluation boundary before non-arrow receiver selection. Cover object method keys and bodies through semantic IR and CLI/MCP regressions.

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-30 20:36:33 +08:00
AfloatandVincent Koc 66f0882ece fix(config): validate target and loader options before printing MCP registrations (#9279)
* fix(config): validate target and loader options before printing MCP registrations

* Preserve executable mode of MCP configuration helper

* Format MCP config CLI and its validation tests

* Run MCP configuration printer regressions in the process boundary suite

Move the config printer's valid, invalid and help cases into the registered MCP launcher Vitest suite. Run the real script with the test-scoped process fixture so CI owns each child and checks its output and exit code.

* test: align verification fixtures with current public contracts

Keep the production changes from upstream and update the verification consumers that still asserted their retired contracts:

- assert unknown workflow identity structurally and retain the bounded provider caveats;
- observe the process capture's partial-error delivery while preserving live cleanup ownership assertions;
- use the package's declared imports in the isolated release controller;
- refresh the replay card digest after the Evidence subject identity migration;
- use the supported compact Kimi profile while testing case-insensitive environment keys;
- assert each public interface's own capture issue path.

These are shared test and verifier compatibility repairs. The evidence summary pagination and config-printer feature changes remain separate.

* test(mcp): observe Kuna close failures at the session owner

Read the original session.close promise result when checking cleanup retry guidance. This keeps the real typed error and all retry assertions while avoiding the retired delivery path after upstream #11647.

* test(mcp): assert DOL snapshots through target identity

Follow the upstream target identity migration in ff017625 (#11551). Preserve the exact DOL format, architecture and entry-point assertions together with the snapshot replay and provider-call checks.

* test: align CLI and progress fixtures with shared owners

Reuse the core registrar for decompile-all instead of registering it twice
after upstream #11680. Assert the outer MCP start/completion notifications
separately from provider cleanup progress introduced by #11637, retaining
cleanup, rate, timeout, cancellation, and evidence assertions.

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 20:35:43 +08:00
AfloatandVincent Koc 7dc0356531 fix(native): honor cancellation during PE alias expansion (#9063)
* fix(native): honor cancellation while parsing exports

Advance export parsing at its cooperative checkpoints so queued cancellation is observed before publishing a complete inventory. Preserve the exact caller abort reason and the existing resource owner.

Add matching checkpoints to PE name, address and alias traversal, with real-byte regression coverage for ELF symbols, GNU version records and PE tables.

* test(setup): retain a valid lowercase Kimi schema profile

Use the supported compact profile in the Windows environment-spelling regression. Keep the exact environment assertion so a duplicate uppercase key still fails, and retain separate coverage rejecting the removed full profile.

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 20:35:37 +08:00
AfloatandVincent Koc 748537728f fix(audit): preserve env shebang argument ownership (#14075)
* fix(audit): preserve env shebang argument ownership

* fix(config): consume env argv0 operands in shebangs

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 20:25:42 +08:00
2SinceJuly aea385cda1 feat(evtx): inventory Windows event log records offline
Inventory EVTX file, chunk and record headers with source-scoped identities, full timestamp precision and explicit partial coverage. Discover the reader from first-contact inspection.

Refs #9174.
2026-11-30 20:25:14 +08:00
ABHISHEK KR. SHARMA aeea7c25ed fix(hopper): clarify publisher verification failures
Clarify publisher hash mismatch and preserve other verification failure causes. Include the selected release and launcher override recovery.

Refs #5245.
2026-11-30 20:12:29 +08:00
ShuaixinHuang 913406fcf8 fix(analysis-view): keep PTX text pages on Unicode boundaries (#15222) 2026-11-30 20:03:26 +08:00
ChiragandVincent Koc d840860bd7 feat(mcp): advertise each tool's family in tools/list _meta (#7154)
* feat(mcp): advertise each tool's family in tools/list _meta

Clients that index a large catalog lazily had to guess each REA tool's
group from its name. Every tools/list entry now carries the contract's
adapter family under the vendor-prefixed _meta key
"io.github.morluto/rea", attached once at the contract-to-registration
boundary. The recorded catalog replays it unchanged on the deferred path.

No tool is hidden or renamed and input schemas are unchanged.

Closes #6870

* refactor(mcp): advertise the selectable family id in tools/list _meta

Since #7228 the contract-owned family inventory gives every tool one
selectable id, the vocabulary REA_MCP_TOOL_FAMILIES accepts. Advertise
that id instead of the adapter kind so clients can map an advertised tool
back to the scope that enables it.

* fix(mcp): omit family metadata for contracts outside the inventory

Renamed test fixtures have no published family; advertise nothing for
them instead of throwing. Drop the docs claim that a family move changes
the catalog digest, since the digest hashes the adapter kind.

* docs(mcp): scope family _meta promise to domain tools; pin catalog env in test

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 19:58:25 +08:00