Commit Graph

17 Commits

Author SHA1 Message Date
Matt Van Horn 2a78763e20
feat(native): search analyzed memory for masked byte patterns (#2341)
* feat(native): search analyzed memory for masked byte patterns

The diff adds search_bytes to the CLI, the shared MCP contract, Ghidra
inventory, and the headless bridge, and advertises the same operation on
Hopper as unavailable until that provider is verified. Patterns are
hexadecimal byte pairs with optional ?? wildcards and an optional
equal-length bit mask; the TypeScript boundary and the bridge both
require a nonempty pattern, equal lengths, and at least one constrained
bit. Ghidra walks initialized blocks in address order within inclusive
bounds, keeps overlapping matches inside a single block, and returns
each hit with its segment, unique source file offset, and containing
procedure, continuing through a cursor bound to the target, profile,
pattern, mask, and bounds. Each page reports the inclusive ranges
examined and the skipped uninitialized blocks; cancellation returns a
typed error and discards the active Ghidra database.
address_to_file_offset now uses the same unique-offset helper, which
rejects a mapping that is missing, ambiguous, or larger than a safe
integer.

* fix(native): limit unbounded byte search to loaded memory

Without start or end, search_bytes walked every Ghidra block, including
non-loaded file parts such as .symtab and overlay blocks, which the docs
call out of scope. Unbounded searches now skip those blocks and list them
in searched.skipped_not_loaded; explicit bounds in their address space
still search them. Document that a match must end at or before end.

* fix(native): preserve implicit address spaces in range consumers

* fix(native): reject present malformed byte search state

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-13 23:41:45 +08:00
astralyx0129 69e097a8ca
fix(scripts, install): honor test:fast "without build" promise and orient Node.js engine mismatches (#2026)
* fix(scripts): defer dist/ imports in verifier helpers so test:fast runs without build

Two helpers under scripts/lib/ reached into ../../dist/ at module load even
though the top-level import was only needed by one of their exports. That
turned mocked, dist-free tests into failing tests under `npm run test:fast`,
which docs/testing.md § test scripts explicitly promises runs "without build":

- tests/conformance/providers/hopper/realHopperSemantic.test.ts only calls
  requireCurrentDocument and resolveFixtureProcedure (both mock-only), but
  scripts/lib/real-hopper-semantic.mjs eagerly imported
  requireFunctionDossierOracle from dist/application/RealHopperAssertions.js.
  Moved the dist-dependent dossier oracle into a lazy loader called from
  verifyRealHopperFixture, which is where it is actually used (against the
  real Hopper bridge, after build:cached).

- tests/evaluation/package/packagePlatformDiagnostics.test.ts only uses
  assertLinuxPackageProviderFailure, which depends on `json`, but
  scripts/lib/verify-package-core.mjs eagerly re-exported helpers from
  mcp-verifier-results.mjs, which in turn pulls four dist/ modules. Moved
  that import into verifyCompleteToolCatalog (the only consumer in this
  file). Downstream scripts (verify-recorded-crash.mjs, verify-package-mcp.mjs,
  verify-windows-package.mjs) are unaffected because they already run after
  build:cached.

Reproduction before fix:
  rm -rf dist && npm run test:fast → 2 failed (both import-time errors)

Reproduction after fix:
  rm -rf dist && npm run test:fast → 388 passed, 4924 tests, 0 failed
  npm run build:cached && npm run test:fast → 388 passed, 4924 tests, 0 failed

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

* fix(install): orient Node.js version mismatch failures with actionable remediation

install.sh previously told operators "use Node.js 22.x (>=22.19), 24.x (>=24.11),
or 26+" without saying how to install one. The curl|bash onboarding path then
left the operator to guess between nvm, fnm, n, Volta, system packages, or
nodejs.org — a lookup that bounces across search engines for a first-time user.

Replace the one-line failure with a block that:
- Names the detected Node.js version (so the operator confirms it is theirs).
- Shows the three most common install paths (nvm, fnm, direct tarball).
- Pins the Node.js release line (24) that satisfies the engine, so copy-paste
  commands produce a supported runtime instead of whichever "latest" is on top.
- Maps uname -m / uname -s to the Node.js tarball label pair for this host
  (e.g. darwin/arm64, linux/x64), so the operator can grab the right archive
  from https://nodejs.org/dist/latest-v24.x/ without a second lookup.

Verified with four Node.js versions (24.18 compatible, 25.9/20.11 outside the
supported ranges, 22.18 below the minor floor) that remediation triggers only
on real mismatches and names the host labels correctly. shellcheck install.sh
and npm run check:fast remain clean.

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-10-12 13:54:57 +08:00
Kaoru0822 fb94d9dde0
fix(errors): stop recommending retries for non-retryable failures (#1869)
* fix(errors): stop recommending retries for non-retryable failures

Unreadable output and provider adapter failures project retryable=false,
but their standard message and remediation said "Retry once", so a
firmware run whose expected report was never published told callers to
repeat a non-retryable operation. Point those failures at `rea doctor`
and the reported details instead, leaving retryability decided once by
the projected error code.

Fixes #1855

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

* fix(errors): align Hopper remote failure guidance with retryability

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:17:35 +08:00
morluto f0dc233d64 fix(setup): recognize supported Nobara hosts 2026-10-10 02:49:46 +08:00
Ysopwnable 6aa9afb549
refactor(process): separate capture implementation from analyst workflows (#988)
* refactor(process): separate capture implementation from analyst workflows

* fix(ci): generate source catalog before shard tests
2026-10-08 00:46:21 +08:00
Namnarak 98b2b027af
fix(linux): improve Hopper reliability and CachyOS support (#963)
* fix(linux): support CachyOS Hopper hosts

* fix(config): reuse user-local Hopper launcher

* fix(hopper): harden Linux demo dialog handling

* chore: retrigger CI after PR title fix

* fix(linux): align Hopper defaults and support docs

---------

Co-authored-by: Ysopwnable <161784452+N0zoM1z0@users.noreply.github.com>
2026-10-07 23:16:48 +08:00
N0zoM1z0 8d44b3edd3
fix(target): explain the JavaScript directory analysis route (#733) 2026-10-06 19:53:08 +08:00
Kaoru0822 ea0b733687 fix(setup): align Node runtime checks with package engines 2026-10-05 22:13:22 -07:00
morluto c34efca4cd refactor(files): use caller paths for local evidence files 2026-09-29 14:53:20 +08:00
morluto 53db3a476b docs: refresh tool catalog and cleanup audit fixtures 2026-09-29 11:23:24 +08:00
morluto dca293a446 refactor(evidence): remove session ledger quotas 2026-09-29 10:53:17 +08:00
morluto 0d96275b68 refactor: return complete tool results inline 2026-09-29 07:08:46 +08:00
morluto 0f96bf365c fix(errors): preserve actionable analysis diagnostics 2026-07-29 07:18:29 +00:00
N0zoM1z0 941d7101dd feat(session): add explicit provider registry and target binding
Introduce deterministic deep-provider discovery and immutable per-target routing while retaining disjoint artifact and native capability families.

Expose provider selection consistently through MCP, CLI, environment configuration, session status, prompt completion, typed diagnostics, and generated documentation. Preserve exact provider/profile provenance without request racing or transparent fallback.

Cover overlapping providers, ambiguity, rejection details, cancellation, restoration, package installation, and real Hopper target switching.
2026-07-15 22:13:48 +09:00
N0zoM1z0 54056a9782 docs: reconcile product documentation with shipped behavior
Align the documented tool inventory, setup client matrix, supported hosts, installation behavior, and roadmap with the 1.6.0 implementation.

Record Ghidra as the accepted next read-only provider direction without claiming shipped support, and refresh the provider admission criteria around evidence fidelity and local diagnostics.

Regenerate the committed TypeDoc site from current sources so package metadata and Process Capture v4 contracts replace the stale 1.1.0/v3 output. Add localized README coverage for every detected setup client.
2026-07-15 17:03:56 +08:00
morluto 12060f6d8d fix(copy): use agent terminology 2026-07-13 19:17:15 +00:00
morluto 77454dc8f4 fix(errors): improve recovery guidance 2026-07-13 19:09:27 +00:00