#11489 moved the selected-file target error projection into src/resources
and #11575 moved the Frida capture-limit and input-error builders into
src/domain; both squashes are file moves with import repoints.
SAZ import reported every ZIP reader limit as its max_input_bytes budget.
A method-93 member whose Zstandard window exceeds the ZIP reader's fixed
128 MiB allowance was therefore refused as invalid_request out_of_range
with advice to raise max_input_bytes, which cannot admit it.
The SAZ decoder now keeps a ceiling the reader names: CaptureFormatError
carries it, the decoder child sends it on the reply wire as a
fixed-limit reply (allowance, value, unit, narrowing and the bounded
resource), and inspect_web_network_capture returns resource_constraint
with details.refusal for that ceiling. Only the metadata read budget the
decoder gave the reader still maps to the expanded-input budget.
A reader's fixed ceiling (ArtifactFixedLimit) now always states its value
and unit, so it can cross the process boundary intact. A refusal at a
producer-named fixed ceiling is built by fixedCeilingConstraint, which the
Playwright trace import also uses.
Fixes#11642
* refactor(mcp): bind close_binary and reset_investigation through the shared table
* refactor(mcp): bind provider operations through the shared table (#11649)
* refactor(mcp): bind provider operations through the shared table
* fix(mcp): bind a provider operation only to the contract of the same name
* refactor(mcp): bind objdump and Rizin commands through the shared table (#11653)
* refactor(mcp): bind objdump and Rizin commands through the shared table
* test(rizin): keep the pre-admission Rizin checks under the mutation sweep
* refactor(mcp): bind the desktop build tools through the shared table
* fix(cli): describe a contract option whose description sits inside .optional()
zod does not carry a wrapped schema's description to its .optional()
wrapper. Since #10798 projected analyze_javascript_application from its
contract, source_paths is javaScriptSourcePathsSchema.optional(), so
'analyze --help' and 'analyze-javascript-application --help' listed
--source-path with no description and cliOptionAliases.test.ts fails on
main.
The contract option projection now reads the field's description through
its wrappers (describedThroughWrappers), once for every argv branch, in
place of three per-branch copies that read only the outer schema. The
opener and member option projections use the same reader.
* test(cli): assert the exact help text of a wrapped contract field and of a projection override
#11518 merged its counted baseline beside #11641, which added two
fixed-allowance refusals to FlutterBuildProvider, and #11659, which
removed one from AdbCommand; AppleAssetCatalogAnalysis no longer builds
one. The architecture guards fail on main until the baseline records
those counts.
The preflight digest case runs on a fake clock and asserts the timeout at exactly 200 ms. The fatal-protocol observation case uses a window longer than any test deadline, so waiting it out fails as a deadline instead of passing a 5 s bound.
* feat(native): carry the value of each fixed structural decoding allowance
BinaryResourceFailure and relocation-index refusals pass their maximum as limit and unit; the PE certificate decoder allowances drop the value from their names and pass it with a per-payload unit; the ELF note parser names its text ceiling with the enforced value. Kernel-module and unwind providers no longer claim a fixed text or structural allowance for a memory limit that names no ceiling (no parser produces one).
* fix(native): report a binary resource ceiling in the unit its producer counts
BinaryResourceFailure carries an optional unit; the ELF hardening entry budget says entries and the structural byte budgets say bytes. binaryResourceCeiling reports the unit only when the producer named it, so an entry count is no longer labelled as bytes. The ELF note test takes its expected ceiling from the fixture length instead of the message.
* fix(adb): classify adb launch failures through the shared launch owner
The adb version probe and device commands read a launcher error with the
refusal-only table plus their own capacity check, so E2BIG became an
adb protocol failure and host capacity at the version probe became an
"unavailable" configuration. Both now read the launcher's failure with
launcherFailureOf and report host capacity and oversized launches
through classifyLaunchFailure; the selected-binary refusals keep adb's
own configuration reports.
The adb-specific capacity error, its remediation, the host_capacity
configuration code and the exported refusal-code helper are removed.
Refs #11614
* docs(adb): describe adb launch constraints as shared resource errors
* test(architecture): count hand-built resource-constraint refusals
Refs #11456
* test(architecture): record main's resource-constraint refusal counts
Main's comment-aware tokenizer (scripts/verify/source-tokens.mjs) now sees
the two Flutter constructors the regex stripper hid behind "lib/*/" in a
string, and main moved PngVisualDiff into src/domain and added two refusals
to classifyProviderOutcome.
* fix(artifacts): run hdiutil under owned supervision with a SIGTERM-first stop
runOwnedCommand gains a per-command termination policy: before owned
cleanup kills a command's process group, it sends the command's own stop
signal to that group while the leader is unreaped and waits a bounded
grace for the leader to exit. NativeDmgArtifactReader runs every hdiutil
command through runOwnedCommand with SIGTERM and a 5 s grace, so an
interrupted attach can roll back as before. An hdiutil whose cleanup
fails is retained by the reader and retried on close, which reports it
until it is released. Raw command failures are interpreted once in
runChecked.
Refs #11619
* fix(artifacts): release hdiutil commands retained during DMG reader close
Detach and inventory commands that run during close can have their cleanup
fail too; close now retries retained hdiutil processes again after detach
and reports any that remain instead of resolving.
* fix(artifacts): keep hdiutil's exit status when its cleanup fails and budget each output stream
* fix(artifacts): admit no hdiutil command while an earlier one's cleanup is unresolved
Go string recovery asserts container table reads, Solidity duplicate-key checks assert key serializations, and managed attribute resolution asserts one MethodDef owner-index build. Each counter fails fast past its budget.
The pre-cleanup close refusal carries diagnostics.inferior_disposition_required (multiple-inferiors or no-durable-output-sink, the cleanup codes a forced stop would report) and live_inferiors, so callers and tests need not read its prose.
* test(lifecycle): cover browser-transport handshakes and cleanup retry
Close six provider lifecycle gaps: Electron CDP handshake, cleanup and retry; V8 inspector handshake; web-module-trace handshake and retry.
* test(lifecycle): assert retained cleanup finishes before the next acquisition
Hold the retried browser and Electron transport close and check that no replacement launch or connect starts until it completes. Track gated upgrade sockets in the fake CDP browser so close() destroys them.
* test(lifecycle): release held retry gates and join gated work on failure
Teardown for the resolver and Electron retry tests releases the held close and awaits the gated request even when an assertion fails while it is held.
* test(lifecycle): cover worker and tool launch, worker handshake, and decoder completion (#11512)
* test(lifecycle): cover worker and tool launch, worker handshake, and decoder completion
Close six provider lifecycle gaps: SQLite and JavaScript worker launch, JavaScript worker handshake, assetutil launch, and qlog and mitmproxy decoding through the owned decoder child.
* test(lifecycle): run the worker relaunch in a built project and check exits before close
The relaunch starts the built worker entry, so it moves to tests/boundary/javascript. The handshake tests now check that the stand-in child has exited when analyze() returns, before close() runs.
* test(lifecycle): cover in-process cancellation and PE certificate completion (#11524)
* test(lifecycle): cover in-process cancellation and PE certificate completion
Close six provider lifecycle gaps: caller cancellation for the managed, Harmony, JavaScript workflow, runtime reconciliation and V8 code cache providers, and PE certificate completion (an existing CLI/MCP regression). Two Apple application gaps remain (#11509).
* test(lifecycle): compare the whole retained V8 code cache observation
* test(javascript): hold the startup deadline clock until the stand-in worker is running
* test(javascript): restore real timers in a void teardown
* test(lifecycle): join the held Electron request on failure, refuse unmodeled Inspector commands, drop a wording assertion
* fix(apple): run assetutil under owned process supervision and retain unproven cleanup (#11586)
* fix(process): report a cancellation or deadline during refused final cleanup as that interruption
* fix(apple): prepare ownership before the assetutil deadline, keep per-stream allowances, join interrupted-cleanup tests
* fix(artifacts): classify assetutil launch failures through the shared launch owner
After #11615, owned-command launch failures are one launch-failed outcome
classified by the shared owner. The assetutil dialect keeps only its
unavailable report (launchUnavailable) and names its provider; host
capacity and E2BIG become resource constraints.
* fix(artifacts): keep a completed assetutil run's output on its cleanup-only report
When assetutil exits 0 but its process cleanup is unproven, the cleanup
error is the primary report. retainOwnedCommandCleanup now accepts the
completed run's captured output for such a caller, so CLI and MCP keep the
retained output beside the cleanup owner.
PE TLS callback and ELF initializer section lookups now assert section-table reads through a counting proxy on the parsed image, and the huge DT_INIT_ARRAYSZ case asserts mapping lookups. The kernel-module shared-name bound is deleted: removing the section-name cache already fails that test on the 16 MiB name budget.
* fix(process): classify GDB, Apktool and Java-probe launch failures through the shared launch owner
GDB session start, the Apktool version probe and the Jadx and Ghidra Java
probes read a launcher's error with launcherFailureOf and report host
capacity (EAGAIN, ENOMEM, EMFILE, ENFILE) and E2BIG through the shared
classifyLaunchFailure, keeping their own unavailable reports for refusals.
Only a launcher-raised errno counts as a launch failure, and a GDB launch
failure no longer retries the MI2 dialect. The refusal-only
classifyLaunchFailure helper is removed.
Refs #11614
* fix(process): name the environment as the E2BIG repair for fixed-argument launches
GDB, the Apktool version probe and the Jadx and Ghidra Java probes launch
fixed arguments, so selecting less input cannot shrink an oversized launch.
The shared launch report takes fixedArguments and then tells the caller to
shrink the environment REA runs with. Launch tests check structured facts
and guidance delivery instead of whole sentences.
* fix(process): report which launch input an E2BIG refusal leaves to shrink as a structured fact
* 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
* 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
* 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
#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.
* 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
* 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
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.
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.
* 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
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
* 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.
Since #11551 a snapshot persists its target as { identity, kind }, so binding_mismatch.target reports the identity's sha256 and selection there. Two tests still expected the flat target and fail on main.
* 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
* 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
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
* 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
* fix(verify): read a TypeScript non-null assertion as completing its operand
A postfix ! after a completed operand leaves it complete, so a following / divides instead of opening a regular expression that hid the rest of the expression from the guards.
* fix(verify): read export default as the start of an expression
* 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)
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
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
* build(scripts): type-check the shared verifier run, fixture, cleanup and source loader
The five scripts/lib modules join tsconfig.scripts.json (69 errors). Named types come from their existing declaration files. The source loader probes the runtime's TypeScript transform once and refuses a Node.js without transform mode (Node.js 26 removed it) with the pinned-runtime message instead of failing on the first owned source file.
* build(scripts): type-check the managed PE and function dossier fixtures (#11611)
* build(scripts): type-check the managed PE and function dossier fixtures
pe.mjs and function-dossier.mjs join tsconfig.scripts.json (68 errors). Named option types come from pe.d.mts; heap names are paired with their rows instead of read back by index; optional metadata tables are added to the row map directly; a placed body's RVA is computed by bodyRva, which refuses an unplaced body. Fixture bytes are unchanged.
* build(scripts): type-check the managed conformance entry point and support (#11612)
conformance.mjs, support.mjs and config.mjs join tsconfig.scripts.json (34 errors), completing the managed conformance closure. Result checks narrow with assert.ok, Evidence results are read through their owners' schemas, the native function subject is an EvidenceSubjectTarget, the comparison check no longer dereferences a right-only method's null left side, and the fixture callback returns the report instead of assigning outer variables.
* 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
* 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.
* 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
* 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.
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
* 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
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.
* 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