Commit Graph
1381 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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 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
a5aee4f9e9 feat(artifacts): inventory Android super image metadata (#14928)
* feat(artifacts): inventory Android super image metadata

Refs #14391

* fix(artifacts): preserve partial Android super metadata evidence

* fix(artifacts): recognize Android super PE overlays

Refs #14928

* fix(artifacts): reject an Android super device with no usable sector

A first usable sector at the device size was accepted, so extent checks
reported a different field. Keep stored copy failures to malformed,
truncated, and unsupported now that format failures include unrecognized.

* fix(artifacts): preserve Android super partial evidence on budget exhaustion

* fix(mcp): preserve existing provider partial observation contracts

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-30 06:15:43 -05:00
ShuaixinHuangandShuaixinHuang 358e4e52ad feat(iso9660): stream files across separated extents (#15190)
* feat(iso9660): stream files across separated extents

* test(iso9660): compare extracted buffers directly

* fix(iso9660): keep separated read plans private

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-30 17:50:09 +08:00
e98a1e66ef fix(oci)!: keep unobserved directory identity unknown (#15164)
* fix(oci)!: keep unobserved directory identity unknown

BREAKING CHANGE: OCI layout Evidence now reports an unknown subject. The selected path and layout-document snapshot digest are available in normalized_result.artifact.

* fix(evidence): keep desktop directory content identity unknown

* fix(evidence): admit legacy desktop directory subjects

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 16:42:34 +08:00
c86e86d697 fix(artifacts): retain stored files in Godot PCK patches (#15180)
* fix(artifacts): retain stored files in Godot PCK patches

* docs(godot): distinguish stored member flags from removals

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 16:12:48 +08:00
92c61a7c61 fix(setup): do not persist versioned launcher paths (#15123)
* fix(setup): do not persist versioned launcher paths

A command saved from nvm, Volta, Homebrew Cellar, mise, or a package cache stops launching after an upgrade or prune, and doctor then treats that registration as foreign.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(setup): recognize default nvm installation layouts

The usual POSIX install is ~/.nvm/versions/node, and nvm-windows stores each release in nvm\v<version>. Both were still saved, and the launcher guide still told setup to keep a cache path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(setup): keep durable Windows and mise launcher paths

Default Windows Volta and pnpm dlx stores were still persisted, and mise's stable latest alias was dropped before the Aube launcher could use it.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(setup): keep a mise shim when Node itself is versioned

A versioned running runtime was rejected before a durable Node alias could be selected, and fnm's installed tree was still saved. Doctor now tells version-manager and package-cache paths apart from a session directory.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(setup): reject versioned aube store targets and align install routes

Reject version-tagged node_modules/.mise store targets beneath mise latest aliases (while keeping verified outer Aube shims), reject asdf/nodenv/nvs/nix/snap versioned paths, fix the nvm-sensitive Windows runtime assertion in setupLauncherAlias tests, and align installation docs, install.sh, and getting-started guidance with durable-path registration.

* fix(setup): recognize custom manager env roots and align onboarding docs

Pass environment through versionedLauncherPath and transientLauncherRemediation so custom version-manager env roots are classified accurately while preserving fnm_multishells as a session path; fix Windows PowerShell rea.cmd and Linux PATH persistence in get-started; align remaining setup quick starts and affected setup acceptance/boundary tests.

* fix(setup): reject session paths and configured package caches

Windows fnm session directories and custom npm or Bun cache roots were still eligible for client registration. Quick starts now require a durable Node install, and the website setup copy no longer uses a PowerShell-invalid command chain.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(setup): resolve configured launcher roots

* docs(setup): align persistent launcher prerequisites

* docs(setup): persist paths in Bash login profiles

* fix(setup): name the missing saved launcher path

* fix(setup): reject Bunx execution-cache launchers

* docs(setup): add writable npm prefix prerequisite

* style(website): format prefix prerequisites

* chore(website): format setup introduction

---------

Co-authored-by: Ambuj Agrawal <aseachambuj@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 16:10:33 +08:00
Vinícius AndradeandVincent Koc eb5cd34258 fix(devicetree): read later FDT versions backwards compatible with v17 (#14136)
* fix(devicetree): read later FDT versions backwards compatible with v17

The header reader admitted only versions 16 and 17 and consulted
last_comp_version only to reject a value above the version. DTSpec 5.1
requires a client to accept any version backwards compatible with
version 17, and libfdt reads such a blob with the version 17 header.

Admit a later version whose last_comp_version is 17 or lower and read it
with the version 17 layout, reporting the declared version. A later
version that needs a newer reader and any version below 16 stay
unsupported, and v16 and v17 outcomes are unchanged. FIT recognition
shares the reader, so it now claims a FIT in such a version as well.

* test(devicetree): cover a later FDT version backwards compatible with v17

Parse the shared fixture with version 18 and last_comp_version 16: the
header is read with the version 17 layout and the tree decodes as it
does for v17. Raising last_comp_version to 18 keeps the blob
unsupported. FIT recognition, which shares the header reader, covers
the same version.

On the previous reader the version 18 parse and the version 18 FIT
recognition fail, because version 18 was refused before
last_comp_version was read.

* docs(devicetree): describe later FDT versions backwards compatible with v17

* test(devicetree): keep the unsupported-version cases on an incompatible header

The CLI and MCP error cases used version 18 as an arbitrary unsupported
version, but their fixture declares last_comp_version 16, which is now
read as a version 17 blob. Declare last_comp_version 18 there so both
cases still reach unsupported_target through the public paths.

The shared fixture takes the declared compatibility version for this,
and the parser case uses it instead of patching the header word.

* test(devicetree): cover compatible versions through CLI and MCP

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 16:02:58 +08:00
Saim ShafiqueandVincent Koc 76cb6645be fix(macos-pkg): retain cpio hard-link contents (#15157)
* fix(macos-pkg): retain cpio hard-link contents

* fix(macos-pkg): withhold ambiguous aliases and bound link resolution

* fix(macos-pkg): bound cpio hard-link resolution

* fix(macos-pkg): keep intermediate cpio sidecar boundaries

* fix(macos-pkg): bound trailing cpio sidecar work

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-11-30 15:46:09 +08:00
Vincent Koc 97322254dd test(beam): reuse the CLI Evidence reader (#15171) 2026-11-30 06:20:51 +00:00
Tristan 52b3358f7e fix(limits): report details.limit for pyc budget refusals (#14386)
* fix(limits): report details.limit for pyc budget refusals

Rebased onto main; the devicetree and NuGet parts were dropped here (landed via #14622 and #14629). This commit now carries only the pyc part.

Refusals of the per-call budgets on inspect_devicetree, inspect_nuget_nupkg
and inspect_python_pyc carried recovery only in remediation prose. Each
owner now keeps one bounds object that feeds both its input schema and a
structured details.limit (parameter, effective value, unit, range, default).

A pyc limit that depends on max_objects and max_depth together reports
related_parameters instead of a single range. The fixed decoded devicetree
allowance is reported as a fixed ceiling and registered as pending.

Refs #14234

* test(python): expect field-only pyc recovery text and the CLI limit flag
2026-11-30 13:18:51 +08:00
8e62e1c7ae fix(setup): honor Mastra Code project registrations in doctor (#15122)
* fix(setup): honor Mastra Code project registrations in doctor

* fix(doctor): share Mastra Code project scope with provider diagnostics

* fix(doctor): cancel Mastra Code registration discovery

* fix(doctor): retain structured Mastra Code cancellation

---------

Co-authored-by: Jatin Pandey <279688498+JayDev-27@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-29 21:08:01 +00:00
morluto 6537e35fa7 fix(setup): honor Qwen Code MCP settings precedence (#15131)
* fix(setup): honor Qwen Code MCP settings precedence

* fix(setup): preserve Qwen settings identity and readiness
2026-11-29 19:19:32 +00:00
morluto 3928b3981a fix(setup): preserve native Codex registration settings (#15119)
* fix(setup): preserve native Codex registration settings

* test(setup): verify nested Grok settings by their parsed values

* test(setup): preserve fractional Codex seconds alongside milliseconds
2026-11-29 18:11:19 +00:00
Adolanium 996ab6e2ae fix(zip): bound the member count of a ZIP inventory (#14997)
* fix(limits): admit a ZIP member count on reader limits

artifact.member_count now resolves artifact_limits.zip.member_count. Recorded Evidence from before this group may omit zip.

* fix(zip): refuse a central directory past the member count

Count every central-directory record before retaining it. The refusal omits required_value because later records stay unread.

* test(zip): cover a central directory past the member count

Three empty members at a count of two refuse through the reader and through the zip format reader.

* docs(limits): name zip.member_count on the member-count setting

The existing REA_ARTIFACT_MEMBER_COUNT seed already supplies that default.

* test(artifacts): select the ZIP member count with the explicit fields

The acceptance case ignores an invalid artifact.member_count seed only when every backed field is selected. zip.member_count is one of those fields.

* fix(schemas): record the ZIP member-count input summaries

extract_artifact and inspect_artifact changed their input compact schema when zip.member_count was advertised.

* fix(zip): keep member count on Flutter, Playwright, and SAZ

Those readers omitted the session count and described the refusal as a byte budget. They now admit artifact.member_count and report the count.

* test(zip): cover member-count refusals outside artifact inventory

A two-member archive at a session count of one stays a count for Flutter, Playwright traces, and SAZ. One member still passes that cap.

* docs(limits): name the ZIP consumers of artifact.member_count

Flutter APK inventory, Playwright trace import, and SAZ decoding use the session count and report it as a count.

* fix(capture): read the fixed-limit boundary from the ceiling

CaptureFormatError keeps that boundary on ceiling. The SAZ reply read cause.boundary, so a fixed-limit reply omitted the field the parent requires.

* fix(limits): recover ZIP member count through the session setting

Flutter, Playwright, and SAZ have no artifact_limits argument. The refusal names artifact.member_count, leaves parameter unset, and tells the caller to raise that setting. sessionSettingConstraint owns the error next to the other resource refusals.

* fix(android): keep a partial JNI report at the ZIP member count

readAndroidJniLibraries already returns a partial inventory when its entry allowance stops the scan. The session member count is that same stop. The reader takes artifact.member_count, and the report names the unexamined remainder instead of aborting the inspection.

* fix(zip): resolve the member count from the selected environment

ZIP admission and its refusal use the launch environment selected for the runtime. Only SAZ sends that count to the capture decoder.

* fix(zip): drop the unused ZipReaderLimits export

Knip reports the type because no caller imports it. ZIP limits stay on the schema.

* fix(playwright): return an invalid member-count seed as a result

The trace catch uses the count captured before the failure. A configuration error stays a Result and keeps the archive hash.

* fix(jni): name the member count on a partial library scan

The partial report keeps the count that stopped the scan and the recovery for artifact.member_count.

* fix(settings): register artifact.member_count for its ZIP consumers

Scoped inspection of the Flutter, Playwright, capture, and JNI operations includes the setting.

* test(artifacts): parse Evidence that omits the audit-log policy

The merged reader-limit schema still accepts a record that omits the Kubernetes audit-log policy.
2026-11-29 13:08:56 -05:00
gensokyo-devandgensokyo-dev 4dafa3a58e fix(setup): compare the script before rejecting another runtime
A registration that starts this installation's own script under another
still-installed runtime, such as a source checkout after a Node switch,
was foreign because the runtime mismatch was decided first. Runtime and
script identity are now evaluated separately: when both Node's lexical
and native traversal select the current script, the registration is owned
but selects another installation, and setup refreshes it. A spelling only
one traversal maps to the current script is unknown. Aube launchers of
another runtime use the same rule.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 11:02:35 +08:00
gensokyo-devandgensokyo-dev 23c2238d69 fix(setup): keep a launcher whose script does not resolve unknown
A different runtime no longer proves a registration foreign, so a saved
launcher under another runtime whose REA script was removed, such as a
pruned npx cache entry, is now unknown rather than foreign. Doctor then
asks the user to restore or verify the installation instead of renaming
or removing the registration.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 11:02:35 +08:00
gensokyo-devandgensokyo-dev 161d562f75 fix(setup): keep unresolved REA package evidence unknown
A launcher in REA's package layout whose manifest cannot be read or
parsed, or whose spelling Node and native traversal resolve to different
files with either one in an REA package, no longer reads as foreign.
Package evidence is now verified, absent or unknown, and unknown evidence
leaves ownership unknown. A missing manifest still means no installed
package claims the script.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 11:02:35 +08:00
gensokyo-devandgensokyo-dev 956074b20e fix(setup): prove the REA script under both path traversal semantics
Node removes `..` before following links, while native traversal follows
links first. A spelling such as `<dir>/link/../scripts/rea.mjs` could
realpath into an installed REA package while another runtime runs an
unrelated script, so it no longer proves another REA installation.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 11:02:35 +08:00
gensokyo-devandgensokyo-dev 263d03d915 fix(setup): refresh registrations of another installed REA package
A registration saved by an earlier npx run, a different global prefix or
another runtime points at REA's own CLI script under a different path.
Exact path comparison classified it as foreign, so setup refused to
refresh it and asked for manual edits in every client.

An absolute launcher whose script resolves to the CLI script named by an
installed node_modules/rea-agents/package.json is now owned but selects
another installation. Doctor reports it stale with a refresh remediation,
and setup replaces it with the current launcher after backing it up.
Source checkouts, other package names, other bin scripts and removed
installations stay foreign or unknown.

Fixes #15022

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 11:02:35 +08:00
ShuaixinHuangandShuaixinHuang 858a9cf51e fix(firmware): decode Intel HEX linear address crossings (#15074)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-28 20:37:34 -05:00
2SinceJulyandCursor Agent 295bdfaf73 feat(artifacts): inventory Kubernetes audit logs offline (#14952)
* feat(artifacts): inventory Kubernetes audit logs offline

A Kubernetes audit log exported from kube-apiserver is JSON-lines that the
inventory treated as an unknown file: no format claim, no reader, and no way
to see what an acquired log declares without a live cluster. Recognize the
format from its first event and report, offline, the line, stage and verb
totals and a bounded window of the events joined on their auditID.

Each line stays an event in its own right, so a request whose stages were
written out of order, repeated at one stage, or missing a stage is reported
rather than reordered into a tidy request. Unknown API versions keep their
auditID and stage but are not interpreted under field names the version may
not use. Malformed lines are counted and bounded, never dropped silently.

Refs #11352 (first slice: request, user, object reference and response code;
request/response bodies, annotations and impersonation metadata are not read).

* fix(artifacts): bound Kubernetes audit inventory and preserve stage evidence

* fix(artifacts): preserve audit fields and extend first-record recognition

* fix(artifacts): stream audit identity without decoding skipped bodies

* fix(artifacts): handle every audit probe tokenizer event

* fix(artifacts): read padded Kubernetes audit logs and modelled stages

Recognition stopped at the first newline and rejected a leading UTF-8 BOM, while the reader skipped blank lines and trimmed that BOM away. Both now treat empty lines, JSON whitespace, and one leading U+FEFF as padding.

Request fields come from the first stage whose API version is modelled, so an earlier unmodelled stage no longer hides a later v1 record.

* fix(artifacts): skip unowned Kubernetes audit JSON bodies

JSON.parse built a value tree for ignored request and response objects, so a deeply nested body could abort the process. Each line is tokenized and only the summary fields are kept. The tokenizer stops at 64 containers; identity already read is kept, and a deeper body before that identity is one line diagnostic.

* fix(artifacts): report audit depth limits and wrong field shapes

A container where a scalar or string list was required now leaves that field null, and a source address or group list past the retained text budget is not stored. Lines that exceed the tokenizer depth are counted separately from malformed JSON, and a sampled request says when the scan stopped early. Recognition uses the same depth cap and does not flush a tokenizer that already stopped.

* fix(artifacts): keep audit field omission and last-key facts

A source address or group list past the retained text budget sets request_fields_omitted instead of looking absent. Owned strings stop growing once they pass that budget. A later scalar that replaces user, objectRef, or responseStatus clears the earlier object.

* fix(artifacts): chunk audit tokenization and depth-cutoff versions

Ordinary lines are tokenized in 4 KiB slices. A depth overflow rereads that line one code unit at a time. When the cutoff hides apiVersion, request fields stay uninterpreted. A later array that replaces user, objectRef, or responseStatus clears the earlier object.

* fix(artifacts): reread overflowed audit records from the start

A depth overflow discarded every token in that slice, so identity later in the same record could be missed. Recognition keeps the first record's decoded slices and rereads them after an overflow. A scalar that replaces user.groups clears the earlier list.

* fix(artifacts): stop replaying audit records once identity is known

A depth overflow after auditID and stage no longer rereads the first record, and decoded slices are dropped once that identity is known. A replacement sourceIPs or groups list clears the previous list when it starts, including when the depth cap ends the replacement.

* fix(artifacts): replay only the overflowed audit slice

A depth overflow now rereads the failed slice one code unit at a time and the earlier slices in chunks, so a later stage key in that slice still wins. A cutoff before apiVersion suppresses request fields without labeling the version unsupported.

* fix(artifacts): let a readable stage fill fields cut by depth

A first stage whose request body hits the JSON depth cap observes no
apiVersion, so its request fields are withheld. The sample still marked
fieldsRecorded true because only a declared unsupported version counted,
so a later readable stage for the same auditID never supplied the URI,
verb, user, or object details. Gate both the flag and the later fill on
suppressFields so depth-suppressed stages stay fillable.

* fix(artifacts): clear audit budget omission when the final value fits

A later duplicate that supplies a small user agent, URI, or list no longer leaves request_fields_omitted set for the value that was replaced.

* fix(artifacts): drop audit budget omission when null replaces the value

A later null or container for an owned field clears the budget-omission mark left by the value it replaces.

* fix(artifacts): keep audit omission keys distinct and release replay slices

Nested field omission no longer shares a key with a top-level property of the same spelling. Replacing a list with an object clears that list's budget mark. Recognition drops the first-record replay buffer when the line ends and when the probe finishes.

* fix(artifacts): clear list budget marks and keep replay text until the line is read

A later null for sourceIPs or groups clears that list's budget mark. Recognition keeps the first record's slices until that line has been tokenized, then drops them.

* fix(artifacts): clear nested audit omissions and release failed replay text

A later null or object for user.groups clears that list's budget mark, and a new user or objectRef object clears its child marks. Syntax failures drop the recognition replay buffer before the probe returns.

* fix(artifacts): limit audit budget omission to request fields

An over-budget apiVersion no longer sets request_fields_omitted. Replacing an objectRef field, or starting a new sourceIPs or groups list, clears that field's budget mark.

* fix(artifacts): accept long zero-fraction audit response codes

A status lexeme such as 200.00000000000000000 is still the safe integer 200. The number text bound is 64 characters, which covers that form and still rejects an unbounded digit string.

* test(artifacts): cover audit response code number bounds

The response code is now admitted by its numeric value instead of a 20-character text bound. Pin the two edges that keep the wider bound honest: the widest safe integer on both sides, an exponent form that evaluates to a safe integer, and a value past the safe range that is still dropped.

* fix(artifacts): keep padded audit status codes and pending recognition

Trailing zeros after a decimal do not drop an integral status code. A verb dropped by the text budget counts as unlisted. A recognition finish before the first line ends stays pending and keeps its replay text.

* fix(artifacts): keep integral audit status exponents and probe padding

A status code is the safe integer its lexeme evaluates to, including a fraction that an exponent cancels. Leading padding has its own recognition allowance, and a verb dropped before an unread API version stays out of the histogram.

* fix(artifacts): keep audit status codes with a cancelling exponent

A large exponent is rejected only when it cannot cancel to a safe integer inside the maximum line. The final shift still decides the code.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-28 16:14:52 -05:00
gensokyo-devandgensokyo-dev dcbee09dae test(artifacts): use the file MCP session for malformed POM cases
The malformed-POM cases kept their own lazy MCP session beside the file's
shared one, so the file still started two servers. They now use the
shared session, and the superseded owner and its import are gone.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 38574d8715 test(firmware): share one MCP session in UEFI firmware tests
Seven tests opened their own MCP server; one lazy file session now serves them. Each test opens its own image before implicit-target calls.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev a140d31a88 test(artifacts): use the file MCP session in iNES container tests
Each test opened its own default MCP server; they now use the file's shared session. Each test opens its own target before implicit-target calls.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 34d47919e2 test(rust): use the file MCP session in Rust dependency view tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 267edbc5a2 test(artifacts): use the file MCP session in artifact comparison tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 6dfb546506 test(pe): use the file MCP session in unsupported PE target tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 462f284126 test(firmware): use the file MCP session in devicetree tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 7a3c1afed4 test(artifacts): use the file MCP session in NuGet package tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 839d237dae test(artifacts): use the file MCP session in VSIX package tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev f382bf263a test(artifacts): use the file MCP session in Maven and Gradle metadata tests
Each test opened its own default MCP server; they now use the file's shared session. Retained bundles are matched by Evidence ID, so records from earlier tests do not affect them.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev bdce4693a5 test(android): use the file MCP session in APK v1 signature tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev 6020db9abd test(android): use the file MCP session in APK signature view tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:32:24 +08:00
gensokyo-devandgensokyo-dev fedff66758 test(javascript): use the file MCP session for default route tests
The default-catalog test now uses the file's shared session. Tests that select a schema profile or heap limit keep their own server.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:08:09 +08:00
gensokyo-devandgensokyo-dev bcb38e2ae5 test(javascript): use the file MCP session in factory completion tests
Each test opened its own default MCP server; they now use the file's shared session.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-29 04:08:09 +08:00