Commit Graph
6212 Commits
Author SHA1 Message Date
morluto 0035d8edb3 feat(errors): name the fields a failure's recovery selects so the CLI renders their flags (#11644)
* feat(errors): name the fields a failure's recovery selects so the CLI renders their flags

AnalysisError gains related { parameters, operations } (contract fields and operation names), projected as details.related_parameters / related_operations and kept through the domain re-attribution helpers. The CLI projection adds details.related_cli_flags for its own command's fields. inspect_plist's missing-default failure and inspect_sqlite_database's column-evaluation failure name fields only in their text.

* test(sqlite): check MCP omits CLI flags on the failure that names related fields
2026-11-15 20:54:50 -05:00
morluto 2a31e064f3 feat(flutter): carry the value of each fixed Flutter allowance (#11641)
* feat(flutter): carry the value of each fixed Flutter allowance

Each Flutter fixed allowance now passes limit and unit, so details.refusal states the ceiling. The ABI inventory refusal names the ceiling that was exceeded: the ABI count or the library path bytes.

* fix(artifacts): name the ZIP decoder window ceiling in Flutter and trace refusals

A Zstandard member whose window exceeds the ZIP reader's fixed 128 MiB allowance now carries that ceiling as a typed fixed allowance (limit, unit, and the recompression narrowing). Flutter reported any ZIP reader limit as its APK metadata read allowance, and Playwright trace import as a recorder-chunk limit; both now keep the reader's ceiling.

* fix(flutter): report the APK expansion ceiling and keep JNI recompression advice

A ZIP reader limit with a reader-owned parameter (the size-derived expansion budget) is no longer reported as the Flutter metadata read allowance; Flutter exposes no control for it, so it is a fixed ceiling with the reader's effective value. The JNI library failure message carries the reader-named ceiling's narrowing, since that report has no refusal field.

* test(artifacts): compare decoder-window advice with its owning ceiling
2026-11-15 20:54:31 -05:00
morluto b51ed4c3ec refactor(kernel): migrate the remaining SHA-256 hex digests to sha256Hex and move isRecord into src/kernel (#11571)
* refactor(kernel): migrate the remaining one-shot SHA-256 hex digests to sha256Hex

* refactor(kernel): move isRecord into src/kernel and replace its inline copies (#11574)

* fix(scripts): import isRecord from src/kernel in the managed manifest parser
2026-11-15 20:53:36 -05:00
morluto 9ecfb109e8 test(evidence): assert the identity-named subject in the snapshot and kernel config tests (#11650)
#11551 made a snapshot entry's subject the Evidence subject schema and
#11416 moved the subject's format under identity. Two tests that merged
alongside them still asserted the old shapes and fail on main:

- evidenceSubject.test.ts parsed the snapshot subject with the retired
  {format, architecture, path, sha256} projection and expected it to strip
  extra fields. It now asserts the snapshot subject is the Evidence subject
  schema, whose admission and strictness the rest of the test covers.
- KernelBuildConfigService.test.ts matched subject.format; it now matches
  subject.identity.format.
2026-11-15 20:53:13 -05:00
morluto 2234a7db57 fix(mcp)!: require absolute local paths for pcap capture and debugger sessions (#11508)
* fix(mcp)!: require absolute local paths for pcap capture and debugger sessions

The MCP server's working directory is not the caller's, so sibling local
file contracts refuse a relative path. inspect_pcap_capture (path),
start_rizin_debug_session (path, inferior_tty) and start_gdb_session
(inferior_tty) admitted one and resolved it against the server's
directory. They now use absoluteLocalPathStringSchema.

The inspect-pcap-capture CLI command declares path as a caller path, so
a relative CLI argument is still resolved against the caller's working
directory before the contract sees it. debug-with-rizin and
debug-with-gdb call their managers directly and are unchanged.

BREAKING CHANGE: MCP calls to inspect_pcap_capture,
start_rizin_debug_session and start_gdb_session with a relative path or
inferior_tty are refused with invalid_request. Pass absolute paths.

Fixes #11079

* test(mcp): call the debugger session tools with absolute paths

* fix(cli): describe the inspect-pcap-capture path without the MCP absolute requirement

The CLI resolves a relative capture path, so its help keeps the
caller-path description instead of inheriting the contract's absolute
wording.

* test(pcap): expect the absolute-path format issue beside the empty-path bound
2026-11-16 09:48:52 +08:00
morluto 465796af0f refactor(mcp): bind layout, browser scenario, runtime observation, guided workflow and native matching tools through the shared table (#11646) 2026-11-16 09:46:21 +08:00
morluto ef031f639e feat(errors): carry the value of fixed allowances whose name embedded it (#11638)
* feat(errors): carry the value of fixed allowances whose name embedded it

Eleven fixed allowances (apktool output and version-output capture, the APK
signing report, release exposure input, external DEX representation, IPS fixed
format ceilings, native export rows and retained text, native plist input,
nesting and decode, PE import retained text) wrote their value into the
allowance name, so details.refusal had no limit or unit and the value existed
only in text. Each now passes limit and unit, the name no longer repeats the
value or 'no runtime override', and the derived remediation states both.

Refs #10508

* test(native): compare plist ceiling guidance with the refusal formatter
2026-11-16 09:44:10 +08:00
morluto 125612175a feat(pcap): carry the value of each fixed packet-tool allowance (#11643)
The packet-tool output capture, tshark JSON decoding and expansion, packet-inventory retained-fact, owned capture snapshot, and packet-field discovery record allowances now pass limit and unit, so details.refusal states the ceiling.
2026-11-16 09:42:07 +08:00
morluto 680c83f88c feat(errors): carry the value of Go, Rust, IL2CPP, sigrok, Electron fuse, CDP, projection and assetutil allowances (#11645)
Each of these fixed allowances now passes limit and unit, traced to the constant or parse refusal that produced it. The Electron fuse, CDP runtime retention and assetutil names no longer embed the value.
2026-11-16 09:40:58 +08:00
morluto 836ac2fea6 feat(artifacts): project fixed reader ceilings as typed refusals (#11634)
* feat(artifacts): project fixed reader ceilings as typed refusals

ArtifactReaderFailure('limit') carried fixed reader ceilings only as
remediation prose: artifactFixedLimitFailure and six Deno reader sites wrote
fixedAllowanceRemediation into the message, so CLI/MCP had no details.refusal
and the value was only in text. The failure now carries a typed fixedAllowance
(name, kind, limit, unit) that survives rebuilds (primaryFacts) and
translateArtifactFailure, and ArtifactOperationError projects it as a
fixed_ceiling refusal whose remediation derives from the allowance. The message
states only what exceeded the ceiling.

Refs #10508

* test(artifacts): keep a fixed reader ceiling's refusal through cleanup wrapping
2026-11-16 09:29:54 +08:00
morluto f86b83ccd7 test(javascript): bound member-path propagation by alias states instead of elapsed time (#11635)
The eight elapsed-time bounds in the reference-lifetime tests measured wall
time. Seven become alias-state allowances at twice each case's measured count,
using the production member-mutation allowance that charges every scheduled
alias state. With 28595276fa's path normalization or its covering antichain
removed, each bounded case needs more than four times as many states, so the
analysis refuses it and the test fails. The shallow-copy bound guarded no
mechanism that a mutant could remove, so it is deleted and its
uncertainty assertion stays.

Refs #10513
2026-11-16 09:29:03 +08:00
morluto e94ca9f223 refactor(mcp): bind GDB and Cutter tools under external-mutation admission through the shared table (#11637)
* refactor(mcp): bind GDB and Cutter tools under external-mutation admission through the shared table

GDB start and status, and Cutter discovery, bind as values outside admission; gdb_console and cutter_command bind on the external-mutation evidence kind (gdb_console with delivery detail), and close_gdb_session on owned-cleanup. Tests build their servers through one debugger fixture, and the Rizin lifecycle regressions now run for all three debuggers.

* refactor(mcp): bind the session target, context and process capture tools through the shared table (#11640)

Value bindings can return a ReducibleValue (alternatives tried when the complete value overflows) or a DetailedFailure (facts delivered beside the error's details). A new query binding reads the analysis its required admission grants. open_binary and open_bundle_resources bind as values; get_navigation_context and inspect_address_context as queries; capture_process_scenario on the analyze kind through an application owner that records its Evidence and residual unknowns.
2026-11-16 09:28:35 +08:00
morluto 093e41a568 refactor(mcp): bind Frida discovery and session tools through the shared table (#11621)
* refactor(mcp): bind Frida discovery and session tools through the shared table

* refactor(mcp): bind browser observation tools through the shared table (#11622)

* refactor(mcp): bind session record tools through the shared table (#11625)

* fix(mcp): record a completed provider-backed workflow's Evidence once before delivery

* refactor(mcp): bind Rizin debugger tools under external-mutation admission through the shared table (#11629)

* refactor(mcp): bind Rizin debugger tools under external-mutation admission through the shared table

* test(mcp): cancel a Rizin command during its retirement close, and route moved code to the reverse-tools lane
2026-11-16 09:14:20 +08:00
morluto 7b500d7833 fix(browser): report non-literal request URLs as unknown endpoints instead of dropping them (#11630)
* fix(browser): report non-literal request URLs as unknown endpoints instead of dropping them

* fix(browser): read XHR URLs from the proven request kind and bound view call sites
2026-11-16 09:12:44 +08:00
morluto 9738583ed8 fix(native,hopper): keep the descriptor a failed process identity read left open (#11633)
The LLDB tracer's target start-identity read and exit/signal identity checks,
and the Hopper client's bridge start-identity read and exit-identity check,
reduced an inspection-owner rejection to a message, so a descriptor whose close
failed was dropped. Each reader now keeps the identity unavailable (or the exit
unverified) and moves the rejection's descriptor owners into the session's
inspection scope, which trace/close retries; the reported failure names the
descriptor until it is released. The Hopper exit check no longer makes close()
reject.

Fixes #11602
2026-11-16 09:11:49 +08:00
morluto d3350d81fd refactor(resources): move the selected-file target error projection into src/resources (#11489) 2026-11-16 08:58:40 +08:00
morluto 9699ce9057 fix(frida)!: require an absolute script path over MCP (#11580)
* fix(frida)!: require an absolute script path over MCP

`load_frida_script` and `instrument_with_frida` admitted a relative script
`path`, which the MCP server read against its own working directory rather
than the caller's. Both contracts now admit only an absolute local path, as
the pcap and debugger contracts do. The `instrument-with-frida` CLI resolves a
relative `--script-file` against its working directory before the contract
sees it. `program` is unchanged: on a remote device it may name a path there.

BREAKING CHANGE: MCP `load_frida_script` and `instrument_with_frida` refuse a
relative script `path` with `invalid_request`; send an absolute path. CLI
`--script-file` still accepts a relative path, and Evidence `source_path` is
now the resolved absolute path.

Fixes #11506

* test(frida): assert a refused relative script path starts and loads nothing

* test(frida): verify the CLI fixture's script file spelling is relative

* test(frida): give the contract test an absolute script file

The load and instrument contracts admit only an absolute script path, so
the contract test's relative script.js no longer parsed. Use a resolved
path for the accepted inputs and refuse the relative spelling in its own
test.

* test(frida): drop the contract-level relative path check the MCP test covers
2026-11-16 08:54:51 +08:00
morluto 793ab582be refactor(desktop): give the agentenv provider name an entry file and name the build computer's controlled routes as a port (#11600)
* refactor(desktop): give the agentenv provider name its own entry file and move ComputerRelease into src/domain

* refactor(desktop): name the build computer's controlled routes and controller answer as a port (#11604)
2026-11-16 08:51:27 +08:00
morluto 2910fc0b13 fix(electron): refuse a wait longer than Node can schedule (#11606)
An Electron scenario wait accepted any non-negative duration_ms, and
Playwright's waitForTimeout schedules a delay above 2147483647 ms as 1 ms,
so a very long wait returned at once. Bound it at admission with the shared
Node timer maximum, as the browser scenario wait already does.

Refs #11601
2026-11-16 08:48:38 +08:00
morluto a80a47f143 test(python): bound pyc parser work by counts instead of elapsed time (#11608)
PythonPycParser takes an optional work counter (digested bytes, constant
summaries, listed container children, nested and key walk steps, key bytes
and report flattening visits). The eight pyc tests that bounded wall-clock
time now assert those counts, so each regression they guard (repeated
hashing, per-reference summaries, per-step child copies, shared walks,
exponential key expansion) fails deterministically on any machine.

Refs #10513
2026-11-16 08:45:43 +08:00
morluto d6af08e4be test: name tests after the behavior they check, not a removed limit (#11618)
* test: name tests after the behavior they check, not a removed limit

Thirty-one test titles still said "beyond/above/after the former ..." for
limits that no longer exist. They now state what the test checks (the size,
count or depth it exercises, or the bound that still applies, such as
max_snapshot_bytes for the managed manifest snapshot). Test bodies are
unchanged.

Refs #10515

* test: say "more than" where a title counts only part of its fixture
2026-11-16 08:42:11 +08:00
morluto 34ec903786 feat(native): report which Mach-O slices a signature describes and their signing states (#11620)
* feat(native): report which Mach-O slices a signature describes and their signing states

inspect_signature gains slices: described (the codesign architecture the
identity, hashes, requirement, entitlements and runtime state describe),
architectures (every selectable slice), unmapped, checked and unsigned.
Partial coverage and unsigned slices were only limitation prose, so the
native inventory goldens matched sentences. Slices checked before a failed
per-slice read keep their states in the partial observation.

Refs #10508

* fix(native): name a thin slice by codesign's architecture and qualify unknown slice states

A thin file's admitted architecture is a CPU family, so slices.described
reported a thin arm64e file as arm64. It now takes the architecture codesign
names for a thin file (null when it names none) and keeps the selector for a
universal one. The described slice's state is the top-level signed; only
other unchecked slices are unknown, and architectures comes from the admitted
universal header.
2026-11-16 08:40:43 +08:00
morluto d4a7c17b38 feat(errors): project fixed native and producer input allowances as typed refusals (#11623)
* feat(errors): project fixed native and producer input allowances as typed refusals

fixedNativeAllowance wrote its allowance and value only into the remediation
sentence, and fixedProducerInputAllowance put the byte count into the
allowance name. Both now build fixedAllowanceOptions with limit and unit, so
the native command output capture, PE resource metadata, Ghidra
installation-properties and artifact analysis input refusals project
details.refusal {kind: fixed_ceiling, allowance_kind, limit, unit}. The
fixed-ceiling remediation renders the value from those facts for every
ceiling that carries them.

Refs #10508

* test(errors): check the rendered allowance value, not its sentence
2026-11-16 08:39:18 +08:00
morluto 3f4953bfae feat(android)!: require integrity_check on a JNI library integrity failure (#11624)
* feat(android)!: require integrity_check on a JNI library integrity failure

A JNI library failure is now a tagged union: kind integrity carries a
required integrity_check, and no other kind carries one. The producer builds
it from the reader failure, whose integrity constructor requires the check
since #11505. Also drop the stale "evidence produced before this field"
clause from the electron_semantics comment; earlier Evidence revisions are
refused.

BREAKING CHANGE: Android JNI Evidence whose library failure has kind
"integrity" must name integrity_check. Records written before #11191 that
lack it no longer parse; recreate them.

Refs #10510

* test(android): check the JNI failure union in its JSON Schema and the unnamed-check refusal

Exclude integrity from the other failure kinds with excludedValues, so the
JSON Schema conversion declares the exclusion that a bare refine dropped.
The test checks the converted schema against the same valid and malformed
records, and drives an integrity read failure with an explicitly undefined
check: the read is refused, the reader is closed and every checkpoint parses.
2026-11-16 08:38:29 +08:00
morluto cf1407966e test(desktop): bound child-text and reference-index work by counts (#11610)
The child-text selector test counted elapsed time while reading a 4 MiB
child; it now counts the characters read and refuses a whole-string rewrite
of that text. The shared-key reference test counted elapsed time over
60,000 records; it now counts the elements Array.prototype.includes scans,
which grows with the square of the records without the per-tag cap.

Refs #10513
2026-11-16 08:25:52 +08:00
morluto 482165d7ce perf(cli): find recorded controls without reparsing whole union branches (#11607)
* perf(cli): find recorded controls without reparsing whole union branches

The control walk skips schema subtrees that declare no recorded control and rules out union options from their keys and literal values before parsing; when one option remains it is followed without a parse. On a 227 MB analyze-javascript-application --full-output result the walk drops from about 4 s and 0.7 GB of heap to about 1 ms.

* test(cli): assert which union branches the control walk parses
2026-11-15 19:25:40 -05:00
morluto 42e808ff76 test: expect the unknown Evidence subject for resource-only and objdump command records (#11613)
Since #11416 every Evidence record has a subject; one without a file
target names identity {kind: unknown, reason: not-observed} with null name
and local_path. Four tests that #11416's run did not select still expected
subject: null and fail on main: the keyless bundle resource CLI, provider
composition and acceptance tests, and the objdump command identity test.
2026-11-16 08:25:18 +08:00
morluto dbb4bc29f0 fix(process): classify every launcher failure once by errno in the shared launch owner (#11615)
* fix(process): classify every launcher failure once by errno in the shared launch owner

* fix(process): keep the launch owner's syscall, cause and facts in RE and pwntools unavailable reports
2026-11-16 08:24:39 +08:00
morluto 0884836abf refactor(mcp): bind provider-backed workflows on admitted analysis through the shared table (#11617) 2026-11-16 08:22:50 +08:00
morluto 6fa58b0ec8 feat(artifacts): require every integrity reader failure to name its check (#11505)
ArtifactReaderFailure overloads require integrityCheck for a literal
"integrity" reason and an explicit (possibly undefined) check for a rebuild
whose reason is not a literal; primaryFacts always carries it. The .NET bundle
reader uses assertProducedEntry, and the PyInstaller cookie probe and owned
lease cleanup rewrap keep the check they previously dropped.
2026-11-16 08:10:08 +08:00
morluto c1546be70d refactor(ida)!: remove the legacy ida-pro-mcp 1.4 attached protocol (#11546)
* refactor(ida)!: remove the legacy ida-pro-mcp 1.4 attached protocol

Attached IDA analysis now has one protocol, the native ida-free-mcp plugin.
The legacy 1.4 GUI proxy branches, response schemas, tool profile, GUI
navigation effects and plain-text reply kind are removed. A stored
registration that still names "protocol": "legacy" is refused at
configuration with a REA_IDA_MCP_CONFIG constraint naming the migration
section; it is never read as another protocol and the file is not rewritten.
Native and headless request/response handling is unchanged.

Refs #10516

BREAKING CHANGE: "protocol": "legacy" IDA registrations are refused.
Before (accepted, ida-pro-mcp 1.4 GUI proxy):
  {"mode": "attached", "protocol": "legacy", "command": "python",
   "args": ["/path/ida_pro_mcp/server.py", "--ida-rpc", "http://127.0.0.1:13337"]}
After (native plugin for an open GUI database):
  {"mode": "attached", "protocol": "native", "url": "http://127.0.0.1:13337/mcp"}
or an ida-pro-mcp 2.x database supervisor in headless mode:
  {"mode": "headless", "command": "idalib-mcp", "args": ["--stdio", "--max-workers", "1"]}
procedure_callers is no longer available from any IDA profile, and IDA
procedure_assembly/read_function_instructions no longer advertise may_show_ui.
See docs/providers/ida-provider.md#migrate-a-legacy-attached-registration.

* test(ida): deliver null metadata overrides and compare legacy refusal with its owner
2026-11-16 08:08:38 +08:00
morluto 48b4bcd19a feat!: name process capture, Rizin and gdb Evidence by their target identities (#11568)
* feat(process)!: name process capture Evidence by its launched root process

The capture result now carries the launched root process in
`manifest.root_process`: its PID with the start identity that
`observeProcessStartIdentity` read for that PID at launch, bound to the
capture's run token. The harness reads that identity once and shares it
between finalization signalling and the manifest, so the read no longer
depends on a positive finalization interval.

Capture Evidence names the root as its subject,
`{ kind: "process", pid, start_time, executable_sha256 }`. A PID without
its start identity is not an identity, so an unread start identity leaves
the subject `unknown`/`not-observed`. When the caller selects PID
normalization, the raw PID and start identity are not recorded:
`root_process` is `withheld-by-caller` and the subject is
`unknown`/`withheld-by-caller`, a new unknown reason. Capture validation
requires the withheld state exactly when PID normalization is selected.

Refs #11417

BREAKING CHANGE: process capture Evidence IDs change: captures without PID
normalization name `{ kind: "process", pid, start_time, executable_sha256 }`
as their subject, and captures with PID normalization name
`{ kind: "unknown", reason: "withheld-by-caller" }`. Capture results
require `manifest.root_process`; captures without it are refused.
Recreate stored process capture Evidence.

* fix(process): join the launch identity read and let cancellation interrupt its wait

The root's launch identity read now runs for every capture and the
manifest awaits it. The read stays unsignalled, because finalization
signals after a cancellation still need the retained identity, so the
manifest's wait observes cancellation through `waitForAbortable` instead.
`finishProcessRun` and the startup-failure path join the read, so a
capture never returns while it is still running.

* feat(rizin)!: bind Rizin command Evidence to its session and launch file (#11570)

* feat(rizin)!: bind Rizin command Evidence to its session and launch file

Rizin command Evidence was subject-less (`unknown`/`not-observed`). A new
`session` target identity names the debugger session REA minted and the
target it launched: `{ kind: "session", session_kind, id, target }`, where
`target` is a file identity or an explicit unknown. The Evidence subject
validates the nested launch file with the format-owned subject
declaration.

`start_rizin_debug_session` hashes the launch file with the shared stable
file hasher before Rizin starts and binds the session to it (`format:
"file"`, no architecture or selection). Later debugger commands do not
rebind it. A descriptor whose close fails is retained in the startup
resource scope, like the inferior TTY lease, and fails the start, as does
cancellation; any other hash failure leaves the target
`unknown`/`not-observed` and records the reason as a limitation. The
"target identity is not established" limitation is replaced by the
binding's meaning.

Refs #11417

BREAKING CHANGE: `rizin_debug_command` Evidence IDs change: its subject is
`{ kind: "session", session_kind: "rizin", id: <session_id>, target }`
with `target` the launch file hashed at start (`{ kind: "file", sha256,
format: "file", architecture: null, selection: null }`) or
`{ kind: "unknown", reason: "not-observed" }`. Recreate stored Rizin
command Evidence.

* feat(gdb)!: name GDB command Evidence by its debugger session (#11572)

GDB startup and console Evidence was subject-less (`unknown`/`not-observed`).
It now names the session REA minted with the shared `session` identity:
`{ kind: "session", session_kind: "gdb", id, target }`. One projection,
`gdbSessionSubject`, replaces the six `unknownTarget("not-observed")` sites.

`start_gdb_session` launches no program file; programs are loaded or
attached by console commands that REA does not hash, so the session target
stays `unknown`/`not-observed`. REA does not infer a file from a PID or a
path. The existing limitation that the active inferior identity is not
established still applies.

Refs #11417

BREAKING CHANGE: `start_gdb_session` startup Evidence and `gdb_console`
Evidence IDs change: their subject is `{ kind: "session", session_kind:
"gdb", id: <session_id>, target: { kind: "unknown", reason: "not-observed" } }`.
Recreate stored GDB Evidence.

* fix(rizin): keep the launch file read failure when its close also fails

When hashing the launch file failed and closing its descriptor failed
too, the start error kept only the close failure; the retained lease
retries only the close, so the read failure was lost. The cleanup error
now carries it as `launch_file_hash_failure`.

The session-binding test now rewrites the launch file after spawn and
between two commands, and checks that both records keep the digest read
before launch.

* fix(process): keep the descriptor a failed launch identity read could not close

The launch identity read reduced every rejection to an unverified reason, so an inspection-owner failure carrying an unclosed descriptor was dropped and the capture could succeed without retaining it. The retained identity now keeps that owner's failure; startup cleanup and finishProcessRun pass it through the same secondary inspection-failure path as the sampler, which fails the capture and keeps the descriptor owned for cleanup retry.

* refactor(rizin): describe a launch-file hash failure through errorMessage

* test(rizin): create launch-file fixtures through createTestTempDirectory

* fix(process): keep the descriptor a finalization signal's identity check left open (#11603)

* fix(process): keep the descriptor a finalization signal's identity check left open

The root signaller now catches a delivery whose identity check fails through the inspection owner, records the attempt as unverified, and keeps the inspection failure. finishProcessRun joins every delivery (including one that outlasted the finalization grace) and retains those failures through the same secondary inspection-failure path as the launch identity read, so the capture fails with the descriptor still owned for a cleanup retry.

* test(process): release descriptor-retention captures when an assertion fails

Both descriptor-retention regressions register their resource-scope release before the capture starts and use the project deadline instead of a fixed 15 s timeout.
2026-11-16 08:06:35 +08:00
morluto d9f5e9cf7d refactor(domain): move the Frida capture-limit and input-error builders into src/domain (#11575) 2026-11-16 08:04:53 +08:00
morluto 6eb42a8d8d fix(rust): report compiler-path byte trimming only when it removes a path (#11582)
* fix(rust): report compiler-path byte trimming only when it removes a path

When the reader's compiler guidance did not fit the complete-report
allowance, trimming replaced the reader's coverage (max_rustc_hashes) and its
guidance with the shorter byte-trimming record. In a narrow allowance range
that swap alone made every hash fit, so the report kept all paths but claimed
they were omitted by the byte budget and lost the count-limit control.

Now, when every path fits, the reader's record and control stay and only its
guidance text (which restates rustc_commit.coverage) is left out; if even
that does not fit, one path is dropped so the recorded byte coverage is true.

* fix(rust): keep the complete compiler record whenever it fits without guidance

Check the reader's record without its guidance before building the trimming record, so trimming always removes a path and the unreachable fallback is gone. The boundary test now requires a tight budget that keeps every path with the reader's coverage record.
2026-11-16 07:58:26 +08:00
morluto 65f78edce5 perf(reference): overlap reference-source identity lookups in traversal order (#11585)
The reference-source reader made about nine serial filesystem calls per
directory. It now runs its read-only identity lookups ahead of their turn,
bounded to four running at once (libuv's default filesystem concurrency):
opening admissions of the next pending directories, metadata of the next
listed names, and closing admissions of directories already enumerated.
Results are applied in traversal order: policy and exclusion callbacks keep
their order, the first error in traversal order is returned, a failure a
started lookup observed is retained, and every started lookup settles before
the read returns. Running opening admissions are counted, so older siblings
buried by deeper levels cannot raise concurrency with tree depth.

Measured on macOS, Node 24.22.1: the 130,000-directory regression's
reference-source read 27.5 s -> 17.2 s; a 20,000-directory flat tree
2.1-2.3 s -> 1.2 s; an 8,641-file source tree 1.41 s -> 1.31 s.

Refs #11365
2026-11-16 07:57:51 +08:00
morluto e3eb4c1749 test: state the current contract in tests named after removed limits (#11588)
Eleven tests were named "beyond the former ..." and pinned a value just above
a limit that no longer exists. Each now states and checks the current
contract:

- jsonShape: the caller's byte allowance is the only bound; a shape that fits
  exactly is complete and one byte less is a capacity refusal.
- Hopper download: chunks arriving just inside the stall bound complete (the
  trickle case already covers the total bound).
- Firmware: a selected analysis_timeout_ms above the default governs the owned
  command, expressed from the default constant.
- Provider process output, CDP resources/timeline/WebMCP frames, Playwright
  steps/artifacts/Electron waits, scenario diff and Bun ELF names: renamed to
  the unbounded-count or exact-selection contract they check, with a note on
  what bound (if any) still applies and where it is covered.

The six JavaScript analyzer tests with the same naming are left to their
workstream.

Refs #10515
2026-11-16 07:56:52 +08:00
morluto f8cec67e44 refactor(mcp): bind plain-value application tools under analysis admission (#11591)
* refactor(mcp): bind plain-value application tools under analysis admission

A value binding that declares admitted: true runs under analysis admission. evaluate_reconstruction_coverage and export_environment_bundle move to the shared binding table; registerApplicationTools and its folder are removed.

* refactor(mcp): bind the managed-code workflows as session derivations (#11593)

Each managed workflow's application owner returns its sources and residual unknown; the four MCP tools bind through the shared session-derivation kind, and registerManagedWorkflowTools is removed.
2026-11-16 07:55:43 +08:00
morluto 459553b901 fix(evidence)!: require ESP flash_dump and PE unsigned attribute OIDs (#11595)
* fix(evidence)!: require ESP flash_dump and PE unsigned attribute OIDs

Both fields were optional only for Evidence recorded before REA reported
them (6.8.0 and earlier). Every producer writes them: the ESP image reader
and facts builder write `flash_dump` (null unless the file is a flash dump
read from a later address), and the PE certificate parser writes
`unsigned_attribute_oids` (null when the signer has none). They are now
required and nullable, and the inspection hint no longer branches on an
absent `flash_dump`. The ESP acceptance test that read pre-6.9 inventory
Evidence now checks that such Evidence is refused.

A call-path comment called Evidence without relationship coverage "legacy";
providers that report no coverage still produce it, so the comment now says
so.

BREAKING CHANGE: inline inventory Evidence for an ESP image root without
`format_metadata.flash_dump`, and PE certificate Evidence whose signers lack
`unsigned_attribute_oids`, are refused as invalid input. Recreate the
observation with the current REA.

Refs #10510

* test(certificates): refuse a signer without unsigned_attribute_oids; update the guide
2026-11-16 07:53:42 +08:00
morluto d15304b928 feat(cutter): name the response limit on an unknown-completion command failure (#11598)
When a Cutter response exceeded the framed transport limit after the command
was sent, the client kept the structured limit error only as message prose:
the command result's `message` named the bytes and the launch seed, and the
returned failure (completion unknown) carried no limit. The client result now
keeps that error's setting limit, and the service attaches it to the failure,
so it projects as `details.limit` (`bridge.max_request_bytes` with its
effective value and source). The test asserts the fact instead of the prose.

Refs #10508
2026-11-16 07:51:12 +08:00
morluto 332dea76a6 fix(native): keep unreported value-flow and archive coverage unknown, and exempt generation caps by reason marker (#11288)
* fix(native): keep unreported value-flow truncation and archive decode coverage unknown

* test(verify): count multiline optional-fact defaults and pin the guard's exclusions

* fix(domain): keep unknown counts and costs unknown in comparison and coverage summaries (#11325)

* fix(domain): keep unknown counts and costs unknown in comparison and coverage summaries

* refactor(verify): exempt legitimate optional-fact defaults with a reasoned marker (#11355)

* refactor(verify): exempt legitimate optional-fact defaults with a reasoned marker

The optional-fact-default guard counted request defaults and absence that
is modelled elsewhere as hidden unknowns. A comment
`// optional-fact-default: <reason>` on the default's line or the line
before now exempts it; the guard reads unstripped source for the marker and
ignores matches inside comment lines.

Marked: the two evidence paging offsets and four Swift literal reads whose
absence swiftLiteralCoverage reports. Removed instead of marked: jsdiff 9
types Change.count as required, so its two `?? 0` defaults were dead; the
evidence link traversal now carries retained records, so it no longer
re-looks them up behind `?? []`. Baseline 31 -> 22.

* fix(verify): blank comment spans instead of skipping comment-led lines in the optional-fact guard

Skipping a match whose line starts like a comment hid live code after a
leading block comment and counted defaults inside a block comment without
leading stars. The counter now blanks comment text (keeping offsets and line
breaks, skipping string literals) and matches the blanked code, while
exemption markers are still read from the original lines.

* refactor(domain): mark optional-fact defaults whose absence is not an observation (#11389)

* refactor(domain): mark optional-fact defaults whose absence is not an observation

Per-site review of the remaining optional-fact-default entries. Each marked
default is a caller option (trace ignore_fields, environment rules), a list
whose producer omits the empty case (unknown_size_frames, the schema's
min-1 representation_node_ids), caveat text whose completeness another field
carries (call diagnostics, unresolved calls, semantic resource limits), or
absence that already turns the result unknown (Wasm interface inventory,
WebMCP discovery, managed ExportedType rows, legacy integrity mismatch IDs).

Left counted: webCaptureDiff redirects (2; the CDP producer always records
them, so absence is a legacy record that should compare as unknown, not
as no redirects) and HopperCallerReconciliation (2; index-miss semantics not
yet verified). Baseline 22 -> 4.

* fix(browser): compare redirects as unknown when a capture predates redirect recording (#11402)

* fix(browser): compare redirects as unknown when a capture predates redirect recording

The CDP producer records every request's redirect chain, empty when there was none; a record without one predates redirect recording (#986). Comparing it against a current capture reported the network dimension as unchanged, treating the missing chain as "no redirects". Redirects are now compared only when both captures recorded them, and the network dimension is otherwise unknown with a reason; proven membership changes are still reported.

* refactor(hopper): interpret a caller-index miss once at the lookup (#11403)

The forward index holds observations from the examined procedures only, and relationship coverage stays unknown with the scan facts as its reason. A miss therefore adds no callers without showing there are none; the lookup now says so once instead of four optional reads defaulting at each site. The optional-fact-default baseline is now empty.

* docs(javascript): state why an omitted representation list adds no nodes

* fix(verify): count optional-fact defaults from parsed TypeScript, not comment-blanked text

The guard blanked comments with a hand-written scanner and matched a regular expression on the rest, so a default quoted in a string counted and a regular expression holding /* hid the code after it. It now walks the TypeScript syntax tree for property reads defaulted with ?? 0, ?? [] or ?? false, and reads exemption markers only from comment trivia.

* fix(verify): tokenize optional-fact defaults without a compiler and count chained defaults

* fix(verify): match whole optional-fact default expressions across calls and operators

* fix(verify): count optional-fact defaults in template substitutions and after postfix updates, and tie markers to their own expression

* refactor(verify): exempt generation and sample caps from the constant-maximum-slice guard by reason marker (#11454)

* refactor(verify): exempt generation and sample caps from the constant-maximum-slice guard by reason marker

* fix(verify): read reason markers only from real line comments

* fix(verify): read reason markers from the shared source tokenizer

* fix(verify): read a regular expression after a control head as a statement start

The shared tokenizer treated every closing parenthesis as the end of an operand,
so in `if (ready) /[/*]/.test(v)` it read `/[` as division and `/*` inside the
regex as a block comment, hiding the rest of the file from the marker-aware
guards. Parentheses are now tracked: the `)` closing an if/while/for/with head
allows a regular expression, while a call's `)` still means division.

* fix(verify): keep a keyword-named member call out of control-head detection

`policy.if(ready) / (…)` was read as an if-statement head, so the division was
taken for a regular expression and the denominator's optional-fact default was
not counted. A control keyword after `.` or `?.` is a member call.

* refactor(verify): exempt budget-arithmetic cursors and tallies by a not-an-allowance marker (#11493)

* refactor(verify): exempt budget-arithmetic cursors and tallies by a not-an-allowance marker

The budget-arithmetic guard cannot tell a scan cursor, an observed total, a
string being assembled or a tail buffer's retained length from an allowance
when each is compared with a limit. A field declaration marked
`// not-an-allowance: <reason>` (read through the shared reason-marker scan)
is no longer counted. The four remaining sites carry a marker, so the
baseline is empty and removed.

* refactor(verify): exempt detail levels, lifecycle states and domain vocabularies from the completeness-enum guard by reason marker (#11510)

A zod enum containing "complete" is counted as a local coverage vocabulary. Eleven
are not coverage: a caller-chosen detail level, how far a command or session
ran, and format states (GPU decode depth, WASM name section, SQLite column
details). They now carry `// detail-level:`, `// lifecycle-state:` or
`// domain-vocabulary:` with a reason, read through the shared reason-marker
scan (which gains an optional predicate for the matches a guard counts).
local-completeness-enum: 22 -> 11 on this branch.

* fix(verify): bind a not-an-allowance marker to its own class field

Exemptions were a file-wide set of names, so a marked tally in one class hid an
unmarked allowance with the same name in another, and a marked object property
could exempt a class field. Markers now exempt only a member declaration (at
class member depth) of the top-level class that contains it, and the named-
allowance count is taken per class so the same scoping applies to it.

* fix(artifacts): keep main's resources import in the Deno standalone reader after merging main

* fix(verify): start an expression after a template substitution and a non-member keyword, and accept any marker reason

The shared tokenizer read the `/` after `${` as division, so a regular
expression holding `/*` in a substitution hid the rest of the file from
every tokenizer-based guard, and it treated property names such as
`row.return` as keywords. Tokens now record whether template text opens a
substitution and whether a name is an expression keyword (not after `.` or
`?.`), and the regular-expression rule and the optional-fact-default operand
rule read those facts. The optional-fact-default guard reads markers through
reason-marker's isReasonMarker, so any non-empty reason exempts, as for the
other reason markers.

* fix(verify): blank comments with the shared tokenizer before matching architecture guards (#11573)

* fix(verify): blank comments with the shared tokenizer before matching architecture guards

The guards stripped comments with a regular expression that took a `/*`
inside a string, template or regular expression for a comment opener and
deleted code up to the next `*/`. src/flutter/FlutterBuildProvider.ts's
"lib/*/libapp.so" text hid four --pool-policy remediation strings from
cli-option-text-outside-cli. blankComments in source-tokens.mjs now owns
comment removal for the architecture guards and the reason-marker scan: it
blanks comment tokens in place (newlines kept) and keeps strings, templates
and regular expressions. The scan behind it retains only the last tokens it
reads, and whitespace runs are skipped at once.

The cli-option-text-outside-cli baseline records FlutterBuildProvider.ts at
its true count of 4; no other baseline changed.

Fixes #11477

* fix(verify): read a regular expression after a statement block and keep comment offsets for wide characters

The tokenizer now records whether each `{` opens a statement block or an
object literal (from the token before it) and marks the `}` that closes a
block, after which a statement, and so a regular expression, can start; an
object literal's `}` still ends an operand. blankComments replaces each run
of comment text with one space per UTF-16 unit, so a surrogate pair no longer
shifts later offsets.

* chore(verify): drop the Flutter CLI-text baseline entry now that main names no option there
2026-11-16 07:40:30 +08:00
morluto a86a668718 fix(javascript): count escapes of Function.prototype before trusting call and apply (#11501)
* fix(javascript): count escapes of Function.prototype before trusting call and apply

* fix(javascript): key cached returned references on ambient escapes too

* fix(javascript): track arguments of directly invoked functions through their parameters (#11538)

* fix(javascript): track arguments of directly invoked functions through their parameters

Passing a value to a function expression invoked where it is defined, such
as a UMD header (function(root, factory){...})(this, ...), recorded an
escape of the argument to unevaluated code although the callee's body is
source code whose effects are indexed. javascriptSemanticDirectInvocations
owns which arguments reach such a callee only through a plain parameter;
the ambient path resolver and member mutation indexing follow that
parameter back to its argument, and neither records an escape for it.
Spread and rest lists, pattern or default parameters, arguments and direct
eval keep the escape, as do unknown callees.

Refs #11499

* fix(javascript): escape values thrown out of a function and scan arguments once

A value thrown out of a function or class body reaches handlers the
throw-to-catch index does not link to it. Arguments of a directly invoked
function used to hide this behind the call escape; they no longer do, and
captured values had the same gap. The binding pass records such throws,
and ambient and member effect indexing escape their values at the throw.

Which functions name 'arguments' is now found in one program walk instead
of one subtree scan per directly invoked function.

* perf(javascript): find shadowed direct-invocation parameters in one pass

* fix(javascript): settle Object and Reflect static call receivers in one owner (#11543)

* fix(javascript): settle Object and Reflect static call receivers in one owner

Ambient write indexing skipped the receiver escape of any resolved Object
or Reflect static call, even when source code had replaced the method,
while member mutation indexing escaped the constructor for every such
call. The second escape (global.Object contents) made each later
Function.prototype.call/apply check uncertain in bundles that call
Object.defineProperty or Object.freeze. Ambient indexing now settles these
receivers once all ambient writes are known: the constructor escapes only
when a write or escape may replace the method before the call, and member
mutation reuses that decision through retainedGlobalCallReceivers.

Refs #11535

* fix(javascript): retain the receiver only for native Object and Reflect statics

A resolved Object member that is not one of the language's own static
methods (for example one Object inherits from Function.prototype, or an
unknown name) may be user code that receives the constructor, so its call
keeps the receiver escape.

* fix(javascript): look up intrinsic and builtin method tables by own key only

NATIVE_STATIC_METHODS and BUILTIN_RECEIVER_METHODS were plain objects, so
an owner such as globalThis.constructor or a module named 'constructor' or
'toString' found an inherited Object.prototype function and analysis threw
a TypeError on '.has'. Both are Maps now.

* fix(javascript): escape values thrown uncaught at the top level (#11556)

A value thrown uncaught at the top level reaches the host's uncaught-exception handlers (process.on('uncaughtException'), window.onerror), which may change it before a timer or callback reads it. The binding pass recorded escaping throws only when the walk reached a function or class body; a throw that reaches the program without a handler now escapes the same way.

* fix(javascript): follow direct-invocation arguments through returned references and function arguments properties

A callable argument of a directly invoked function no longer escapes at the call, but the shared returned-reference owner could not follow the parameter to it, so patch(get()) inside the callee lost the escape of the value get returns. The returned-reference walk now follows the parameter to its argument like the write and escape walkers.

A sloppy function's arguments property (f["arguments"], g.caller.arguments from a function it calls) exposes its activation's arguments. A non-strict callee is no longer tracked through its parameters when the program reads an arguments or caller property by a static key. The strictness reader moves beside javaScriptProgramStrictness so both modules share it.
2026-11-16 07:37:59 +08:00
morluto ff6467ca97 feat(debuggers): name why an owned debugger stop is incomplete (#11517)
* feat(debuggers): name why an owned debugger stop is incomplete

Owned debugger stop results carry a cleanup code; retained Rizin and GDB
cleanup failures project it as details.diagnostics.debugger_cleanup, close-all
failures carry it, and GDB detach refusals name multiple inferiors, a missing
durable output sink, unknown inferior state or a changed inferior TTY.
GdbSessionManagerCoverage asserts the codes instead of reason prose.

* fix(debuggers): put the cleanup code on every returned failure

incompleteStopFacts builds the cleanup observation and debugger_cleanup
diagnostic together, so GDB startup, cancellation and timeout failures carry
the code; Rizin's composed cleanup failure retains it at its top level; and
one-shot debug commands report debugger_cleanup_codes from the close-all
failure.
2026-11-16 07:33:16 +08:00
morluto af0db09605 refactor(resources): move the directory artifact reader into src/resources (#11520) 2026-11-16 07:32:08 +08:00
morluto 44071f9b97 refactor(domain): move retained web-script capture selection into domain and script publication into application (#11576) 2026-11-16 07:30:32 +08:00
morluto f40476265a refactor(reference): declare the reference-source reader's contract as its entry files (#11577)
* refactor(reference): declare the reference-source reader's entry files for the import workflow

* refactor(reference): keep traversal state, symlink reconciliation and entry failure helpers out of the declared entry files
2026-11-16 07:29:54 +08:00
morluto 33557c4715 refactor(mcp): bind the application workflows through an application binding kind on the shared table (#11578)
Thirteen application tools (feature and semantic traces, version, endpoint,
source-to-bundle and export-shape comparisons, API contract, NTFS journal and
Playwright trace inspections, the obligation ledger and the three mobile graph
projections) each had a bespoke registration repeating admission, retention
checks, logging, source retention, unknown recording and view delivery.

The shared table gains an application binding kind: a workflow that returns
the completed Evidence, its sources and its residual unknown, and an optional
view selector. One handler runs it under analysis admission, refuses a view
or summary before running when the complete Evidence cannot be retained,
delivers a failure's partial Evidence, and stages the view against the
completed Evidence before recording (deliverApplicationExecution, moved from
registerApplicationTools/helpers.ts). The comparison unknowns and the ledger's
request resolution move to src/application/ApplicationToolExecutions.ts with
their exact question text, so recorded unknown identities do not change.
2026-11-16 07:28:20 +08:00
morluto 2430b081c9 refactor(providers): bind provider refusals' per-call controls instead of naming CLI flags (#11455)
* refactor(native): bind producer_limits and max_input_bytes as the per-call controls of pwntools and Apple dispatch refusals

producerLimitControl in src/domain/producerResourceLimits.ts names one producer budget as producer_limits.<field>; the shared provider outcome classifier now carries a resource signal's limit. Pwntools file-size, CPU and output refusals and the Apple dispatch input refusal bind their control, and their remediation no longer names CLI flags.

* fix(native): report the selected output allowance as the omitted file_bytes default

* fix(native): bind producer_limits.diagnostic_bytes as the pwntools command output-limit control

* refactor(rust): bind producer_limits as the per-call control of Rust input and report refusals (#11458)

* refactor(rust): bind producer_limits as the per-call control of Rust input and report refusals

* test(rust): cover the complete-report refusal's producer_limits control

* refactor(browser): bind caller-selectable browser deadlines as per-call controls instead of naming CLI flags (#11466)

* refactor(rust): bind producer_limits as the per-call control of Rust input and report refusals

* test(rust): cover the complete-report refusal's producer_limits control

* refactor(browser): bind caller-selectable browser deadlines as per-call controls instead of naming CLI flags

deadlineParameterLimit in src/domain/analysisResourceLimits.ts owns the millisecond deadline control that nativeDeadlineRecovery and the browser recoveries share. CDP command and discovery, web bundle per-script and total, network capture and source-map decode deadlines now carry it; browserDeadlineIncrease no longer takes CLI flag text.

* fix(browser): record a per-script deadline's parameter control in partial web bundle results

* refactor(providers): bind Wabt, SQLite, EVMole, Apktool and Go controls instead of naming CLI commands (#11472)

* refactor(providers): bind Wabt, SQLite, EVMole and Apktool deadline and byte controls instead of naming CLI commands

These remediation strings named rea commands and flags through template text the cli-option guard did not count. Wabt byte refusals and output limits bind max_input_bytes, max_tool_bytes or max_output_bytes while a larger value is selectable; SQLite worker_timeout_ms, EVMole timeout_ms and Apktool decode_timeout_ms bind through deadlineParameterLimit; the shared provider outcome classifier now carries an output limit's control.

* refactor(go): bind Go analysis budgets as per-call controls instead of naming CLI flags

* fix(providers): keep the typed primary when Wabt, EVMole or pwntools command cleanup fails

* ci(guards): count template-built CLI option and command text outside the CLI layer (#11478)

* refactor(providers): bind Wabt, SQLite, EVMole and Apktool deadline and byte controls instead of naming CLI commands

These remediation strings named rea commands and flags through template text the cli-option guard did not count. Wabt byte refusals and output limits bind max_input_bytes, max_tool_bytes or max_output_bytes while a larger value is selectable; SQLite worker_timeout_ms, EVMole timeout_ms and Apktool decode_timeout_ms bind through deadlineParameterLimit; the shared provider outcome classifier now carries an output limit's control.

* refactor(go): bind Go analysis budgets as per-call controls instead of naming CLI flags

* fix(providers): keep the typed primary when Wabt, EVMole or pwntools command cleanup fails

* ci(guards): count template-built CLI option and command text outside the CLI layer

The cli-option-text-outside-cli pattern now also matches "(CLI ...", "on the CLI", "or use rea ..." and backticked `rea <command>` references, so remediation built from a template such as --${name} or rea inspect-... <path> is counted. Doctor.ts is exempt: setup and doctor run only through the CLI. The baseline records the newly counted pre-existing sites (22 -> 45 across 21 files).

* ci(guards): extract the CLI text matcher, exempt host-only commands with written reasons, and test each spelling

* ci(guards): exempt a host-only command and its own arguments in any matched CLI phrase

* fix(native): bind producer_limits.output_bytes for oversized pwndbg debugger replies through one owner

* fix(cli): name an Evidence target source failure's control by the source option that sets it

* feat(cli): render the flags of result-recorded controls in the full-output envelope (#11507)

* feat(cli): render the flags of result-recorded controls in the full-output envelope

* fix(cli): collect result controls only for a full-output envelope, in its requested format, past undefined values

* ci(guards): end a host-only command's arguments before the next CLI command

* refactor(reverse): record the output budget that stopped a one-shot command as a parameter control (#11528)

* fix(cli): read result controls only at positions the output schema declares as recorded controls

* refactor(providers): record the controls that bounded Rust compiler paths and kernel module text instead of naming CLI options (#11532)

* refactor(rust): record the control that bounded compiler-path coverage instead of naming CLI options

* refactor(native): record the controls that omitted kernel module .modinfo text instead of naming CLI options (#11534)

* fix(rust): describe compiler coverage from the retained result after report trimming

* refactor(providers): record managed representation and JavaScript semantic ceiling controls instead of naming CLI options (#11537)

* refactor(managed): record the representation budget on a resource-limit issue instead of naming its CLI option

* refactor(javascript): record the semantic retention ceilings that stopped a graph instead of naming CLI options (#11540)

* fix(cli): name a composed command's source options for the controls its result records

* fix(cli): read result controls from the delivered Evidence when a summary wraps it

* fix(rust): keep the report-byte control recorded when trimming omits every compiler path

When the complete-report allowance left room for no compiler path, rustc_commit became null and its coverage.limit was lost, so --full-output could not name the option that raises the allowance. The report now records rustc_commit_omission { reason, limit } outside the dropped record, and the summary view carries it.

* refactor(flutter): record the string-pool budgets that left a projection partial instead of naming the CLI option (#11541)

* refactor(flutter): record the string-pool budgets that left a projection partial instead of naming the CLI option

* test(flutter): assert the complete set of recorded string-pool budgets

* feat(cli): name the options of controls a failure's partial Evidence records (#11557)

meta.cli_controls was collected only from a successful result. A failure whose partial observation is Evidence of the command's own operation is now read the same way, at the positions the output schema declares as recorded controls; Evidence of another operation or a retained reference is not read. When --evidence_output publishes the partial, the delivery records it before replacing it.

* refactor(javascript): record the evaluator budgets that limited sources instead of naming the CLI option (#11564)

Per-value unknown reasons and the Electron wrapper limitation named --semantic-precision. The static examination now records the semantic_precision controls that limited a source (examination.controls), and analyze_javascript_application's semantic_graph.coverage.controls records every evaluator budget that limited any source (examination and semantic IR coverage), beside the retention ceilings. The CLI renders --semantic-precision from those records in meta.cli_controls; the reason texts name only the contract field.
2026-11-16 07:12:16 +08:00
morluto 79abe4e5fa refactor(compression): move the raw LZ4 block decoder into src/compression (#11492) 2026-11-16 07:10:02 +08:00
morluto f1fc603b12 refactor(domain): move the tshark JSON packet envelope reader into src/domain/pcap (#11503)
* refactor(domain): move the tshark JSON packet envelope reader into src/domain/pcap

* refactor(captures): declare live capture's use of the pcap Wireshark tool configuration (#11504)

* chore(verify): count the tshark envelope's JSON.parse now that domain/pcap is parser scope

#11526 brought src/domain/pcap into the parser guards. The envelope reader keeps its one JSON.parse: both tshark callers pass --no-duplicate-keys, so tshark merges repeated members into arrays before REA parses them.
2026-11-16 07:09:18 +08:00
morluto 5f718ce30e refactor(kernel): give error-message, byte-hex and SHA-256 hex helpers one owner in a new src/kernel layer (#11542)
* refactor(kernel): give error-to-message text one owner in a new src/kernel layer

* fix(kernel): keep the regex worker's own error text inside its isolated source

* refactor(kernel): exclude copies that run in another realm from the error-message guard by name

The regex worker's source string and the page.evaluate fetch in PlaywrightScenarioRequest cannot import errorMessage. The guard now names them, so the counted baseline does not invite a later slice to rewrite them.

* refactor(kernel): migrate the long tail of inline error-message copies to errorMessage (#11552)

Every provider and adapter folder with six or fewer copies now calls errorMessage from src/kernel. Local helpers whose whole body was the copy (failureMessage, gdbErrorMessage, message, describe, reasonOf, recoveryFailureMessage and four local errorMessage definitions) are removed and their call sites call the owner.

Refs #11548

* refactor(kernel): give byte-to-hex formatting one owner in src/kernel (#11560)

byteToHex returns the two lowercase hexadecimal digits of one byte. All eight inline copies (native, contracts, domain firmware and desktop, pcap) call it, keeping their own 0x, % or \x notation, and a counted guard with an empty baseline keeps new copies out.

Refs #11548

* refactor(kernel): give one-shot SHA-256 hex digests one owner in src/kernel (#11562)

sha256Hex digests one in-memory value. A counted guard records the one-shot createHash("sha256").update(x).digest("hex") chains (115 in 101 files) and the first slice migrates domain, contracts and process (35 copies), removing local wrappers (sha256, sha256Text, hash) and the exported sha256Text. Incremental and streamed hashing is not counted.

Refs #11548

* refactor(kernel): migrate the application layer's inline error-message copies to errorMessage (#11563)

All 69 copies in src/application call errorMessage from src/kernel. Local helpers whose whole body was the copy (errorDetail, causeReason and five local errorMessage definitions) are removed and their call sites call the owner.

Refs #11548

* refactor(kernel): migrate the native provider's inline error-message copies to errorMessage (#11567)

All 49 copies in src/native call errorMessage from src/kernel. The local errorReason helpers in LldbCallTracer and LldbRetainedObservations, whose whole body was the copy, are removed and their call sites call the owner.

Refs #11548

* refactor(kernel): migrate the remaining inline error-message copies to errorMessage (#11569)
2026-11-16 07:05:30 +08:00