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.
* 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
* 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
* 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
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.
* 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
* 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.
* 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.
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
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
* 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.
* 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
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
* 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
* 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.
* 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.
* 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
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.
* 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.
* 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.
* 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)
* feat(snapshots)!: persist the target identity as the snapshot target
The snapshot target is now `{ kind, identity }`, where `identity` is the
FileTargetIdentity that `binaryTargetIdentity` produces and `kind` is the
binary kind query IDs commit to. The per-format target projection and
`snapshotTargetIdentity` are deleted; the schema checks the format's
selection, architecture and kind instead of keeping one union arm per format.
Entry execution subjects use the Evidence subject shape (file or explicit
unknown), so a snapshot entry commits to the same identity, including the
selection, as its Evidence record. Workflow entries take the subject of the
workflow's own Evidence. Replay no longer re-derives the selection from the
open target.
`FileTargetSelection` gains `universal-slice` (`offset`, `size`, and the FAT
`cpu_type`/`cpu_subtype` when target admission supplied the FAT table, else
null). `binaryTargetIdentity` produces it for `mach-o-universal` targets, so
Evidence and snapshots for different slices of one container no longer share
an identity.
Refs #11417
BREAKING CHANGE: analysis snapshot files change shape: `target` is
`{ kind, identity: { kind: "file", sha256, format, architecture, selection } }`
and entry `execution.subject` is the Evidence subject
(`{ identity, name, local_path }`, never null). Snapshot binding mismatch
details report `target.snapshot`/`target.selected` in the same shape. Evidence
IDs of universal Mach-O targets change because their subject identity now
carries the selected slice. Recreate saved snapshots and Evidence bundles of
universal Mach-O targets.
* docs(evidence): name the universal Mach-O slice selection in the subject contract
* fix(snapshots): read the snapshot target identity in the Ghidra verification scripts
The real Ghidra snapshot checks (lifecycle, RISC-V, MIPS, PowerPC) read
snapshot.target.sha256 and .architecture, which moved under
snapshot.target.identity, so they would fail after saving a valid snapshot.
* feat(evidence)!: name live browser page Evidence by its page URL (#11559)
Browser page observations (inspect_web_page, analyze_web_bundle,
observe_web_session, discover_webmcp_tools, capture_web_screenshot,
observe_web_execution, inspect_web_event_listeners) named an unknown
(`not-observed`) subject although the provider reports the page URL.
`TargetIdentity` gains a `url` kind: the reported URL with userinfo removed
and its origin (`null` for an opaque origin). The schema refuses a URL that
carries userinfo or an origin the URL does not have.
`browserUrlTargetIdentity` in the browser URL owner builds it from the
provider's reported URL; a withheld or unparseable URL stays unknown
(`not-observed`). Target lists and comparisons still name no single
document. Analysis views keep their parent's URL subject, as they already
keep a file subject.
BREAKING CHANGE: Evidence IDs of live browser page observations and their
analysis views change, and their subject is
`{ "kind": "url", "url", "origin" }` with `name` and `local_path` null.
Recreate stored Evidence for these tools. This lands inside Evidence format
revision 2 under the release hold (#11417); no `evidence_format` bump.
* refactor(mcp): bind artifact and bundle comparison through an acquiring derived binding that owns their artifact resource scope
compare_artifacts and compare_bundles registered bespoke handlers that read caller-named files under the server's artifact resource scope and then repeated the session-derived delivery. The derived binding kind now takes an optional acquisition with the resource scope it reads under; the table passes the scope, the readers open and release handles in it (failed releases stay owned for retry), and acquisition failures are delivered unchanged. The artifact unknown and the bundle Evidence moved to application owners.
* fix(mcp): return a bundle comparison's record-pair failure as a typed Result
bundleComparisonExecution declared a Result but let compareBundles throw AnalysisInputError for missing or repeated record pairs. It now returns the typed failure; unexpected errors still propagate.
* refactor(mcp): bind the investigation workflows through the session-derived binding kind
* refactor(mcp): move reconstruction verification Evidence to the application layer and bind it on the shared table (#11553)
verify_reconstruction built its Evidence and residual unknown in the MCP adapter. The application workflow verifyReconstructionEvidence now owns the parse, verification, Evidence closure and unknown, and the tool is a session-derived binding, so admission, logging, cancellation and recording follow the other investigation workflows.
The I/O-free PE resource tree parser moves from src/artifacts/pe to src/domain/pe and reports malformed structure, decode budgets and cancellation through the domain parse failure algebra. artifactParseFailure in src/resources maps those onto artifact reader reasons at each provider's boundary, so native no longer imports artifacts.
Fixes#11527
refactor(resources): give artifact failure translation to resources and declare JavaScript reconstruction's artifact entries
translateArtifactFailure projects ArtifactReaderFailure, which src/resources owns, and depends only on resources and domain, so it moves to src/resources and is exported from its index. JavaScript reconstruction drives the canonical inventory scan, the format reader and the source read inside one resource scope; those three artifacts files are declared entry files. application -> artifacts past-entry imports go from 7 to 1 (the ZIP reader, moved by #11525).
Refs #11359