* fix(native): decode Objective-C categories that Swift lists in __objc_catlist2
Swift lists categories on a class it reaches through a Swift class stub
in __objc_catlist2, and the Objective-C runtime loads that list like
__objc_catlist. inspect_native_dispatch_metadata read only __objc_catlist,
so these categories, their methods and protocols were missing while
objc_properties_categories coverage reported complete.
Read both lists. A stub's first word is a plain value from 1 to 15, as
the runtime's isStubClass checks, and it holds no class_t, so a category
whose class reference is a stub keeps a null class and coverage names
the reference instead of reading unrelated bytes as a class name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(native): version the dispatch reader profile for __objc_catlist2 categories
Reading __objc_catlist2 changes inspect_native_dispatch_metadata results,
but the reader still declared apple-metadata-reader-4, so a snapshot saved
before this change matched the current profile and replayed its empty,
complete category result. Declare reader version and revision 5 so those
snapshots are refused with a binding mismatch and the image is read again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(verify): bound concurrent file reads in architecture and limit guards
`scripts/verify/architecture-guards.mjs` reads every `.ts`, `.mts`, `.mjs`,
and `.py` file under `src/`, `tests/`, `scripts/`, and `bridge/` (8,203 files
on current `main`) via unbounded `Promise.all(paths.map(readFile))`. On
Windows, queuing all `open()` calls at once exceeds the UCRT 8,192 file
descriptor ceiling and deterministically fails `npm run verify:architecture-guards`,
`npm run check:fast`, and the pre-push hook with `EMFILE: too many open files`.
Add a zero-dependency JSDoc-typed `mapWithConcurrency` helper in
`scripts/verify/bounded-file-reads.mjs` (default cap 64, registered in
`tsconfig.scripts.json` so it runs before `npm ci`), apply it across all four
bulk `readFile` loops in `scripts/verify/architecture-guards.mjs` and the
sibling `src/` scan in `scripts/verify/rea-numeric-limits.mjs`, and add unit
coverage in `tests/evaluation/boundedFileReads.test.ts`.
* test(verify): copy bounded-file-reads helper in numericLimitGuardPermission fixture
`scripts/verify/rea-numeric-limits.mjs` now imports
`./bounded-file-reads.mjs`. Copy both scripts into the temporary checkout
in `tests/boundary/process/numericLimitGuardPermission.test.ts` so the
copied verifier starts cleanly on non-root Linux/macOS runs instead of
failing with `ERR_MODULE_NOT_FOUND`.
When planEspFlashLayout locates a bootloader whose flash address is at or
after the selected partition table, it omits the bootloader region and
records a limitation. finishEspFlashLayout previously checked only
plan.input.bootloader === undefined, so a dump whose partitions covered
the rest of the image could still report coverage: "complete".
Check whether a bootloader region was actually placed in plan.regions
instead of re-deriving presence from plan.input.bootloader, matching
EspFlashImageArtifactReader. Update docs/esp-flash-image.md and add unit,
reader, and CLI regressions.
Each hosted APT download attempt now has its own deadline, so the
900-second budget would let three attempts outlast the 25-minute job.
Give each attempt 360 seconds: a resumed second attempt still covers the
slowest observed cold download (657 seconds), and the test asserts that
three attempts leave the job five minutes to build and verify fixtures.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
A slow archive connection can still be progressing when the single
download deadline expires, failing the Windows native controls lane
while MinGW archives were mid-transfer. Download within three bounded
attempts instead; APT keeps completed archives and resumes partial ones,
so a later attempt reconnects and continues. Installation still runs
only from the local cache after a successful download.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): inventory and expand Android sparse images offline
* chore(schemas): update artifact tool schema summaries for the sparse image limit
* fix(artifacts): retire undrained sparse image streams on cancellation
* fix(artifacts): keep large RAW reads in the sparse stream's owner
A large RAW run was streamed through a nested readFileHandleChunks
Readable, which could prefetch a descriptor read while the outer
iterator was idle, so close or cancellation could retire the stream
with that read still running. Read the run directly in the expansion
iterator so every read is pending in the owner that cancellation waits
on, and add held-read close and cancellation regressions.
* fix(firmware): drop unused ANDROID_SPARSE_MAGIC_BYTES export
* test(artifacts): release held sparse reads before restoring mocks
Release the held RAW read and join the retiring close or cancellation in
finally before restoring the read spy, so a failed assertion cannot leave
reader.close() waiting on a read nobody will finish. Use
awaitAcknowledgement for the held-read start barrier and drop the
per-test five-second timeouts in favor of the shared test deadlines.
* fix(lint): register sparse-image forwarded fixed ceiling
Upstream main added the fixed-ceiling registry check. The sparse-image
reader projects the parser's own named ceiling, so register it as
forwarding like the boot-image reader.
* Address review feedback
* test(android-sparse): expect partial code for chunk budget refusal
* test(android-sparse): expect partial code in MCP chunk budget refusal
* fix(artifacts): keep the chunk_sz offset when a RAW chunk outgrows its header
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro-10.local>
The inspect_android_package summary kept every component declaration.
On VLC 3.7.2 its 60 components made the summary 62,118 bytes, above the
agent result budget it was delivered for, although the component-summary
and components facets already page and count them.
The summary's components now carry the component status, limitations and
counts by kind, exported declaration, exported default and declaration
coverage, computed by the same helper as the component-summary facet.
Component rows page through the components facet.
With real JADX on VLC the package summary was 6,280 bytes.
BREAKING CHANGE: the inspect_android_package summary no longer lists
component declarations. Page them with view {kind: "android", facet:
"components"}, or pass detail: "complete".
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
The inspect_android_class summary was the complete normalized class: on
VLC's org.videolan.vlc.PlaybackService, with 302 methods, it was 70,266
bytes, twice the agent result budget it was delivered for. Claude Code
saved it to a file, and REA-only agents read the class back through about
five evidence-json pages.
The class summary now carries the class name, engine, counts of methods,
constructors, overloaded method names, fields, encoded static values and
inner classes, the overloaded method names with their overload counts,
and the mapping's identity and record counts. The android-class view pages
methods (exact names, name prefixes, constructors), fields (exact names,
name prefixes, static values), inner classes and mapping symbols, and
inspect_android_class accepts it with detail summary in the same call.
Method summaries are unchanged and keep their own projector.
With real JADX on VLC the class summary was 4,601 bytes.
BREAKING CHANGE: the inspect_android_class summary, delivered for detail
summary or above the agent result budget, no longer lists methods, fields,
inner classes or mapping symbols. Page them with the android-class view,
or pass detail: "complete".
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
trace_android_references returned every using node inline. On VLC's
org.videolan.vlc.PlaybackService the MCP result was 214,955 bytes, so
Claude Code saved it to a file a REA-only agent could not read, and
inspect_analysis_view did not support the operation. In two trials asking
which outer classes reference the class, Claude Code answered nothing
after 17 to 20 calls and about 870,000 tokens.
trace_android_references now takes detail and view and joins the agent
result budget. Omitted, a trace that fits delivery.agent_result_budget_bytes
is inline and a larger one is retained behind its summary. With detail
summary, view returns one android-references page in the same call. The
CLI uses the shared Evidence delivery with --view.
With real JADX on VLC the default reply was 5,987 bytes, and the
top-classes page of all 97 top classes 16,724 bytes. In two trials each,
Claude Code then answered correctly with 92,000 to 125,000 tokens, and
Codex with 208,000 to 217,000 tokens instead of 364,000 to 408,000.
BREAKING CHANGE: a trace_android_references call that omits detail on a
trace above the agent result budget now returns the retained summary.
Pass detail: "complete" (--detail complete) for the previous shape.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
decode_android_resources returned the complete decode inline. Claude Code
saves an MCP result above about 25,000 tokens to a file, so on VLC 3.7.2
(180,996 bytes) a Claude Code agent limited to REA tools never saw the
strings: in two trials it failed every answer after 20 or more calls and
about 900,000 tokens. Even string_limit 1 returned 77 KB, because the
manifest text is always inline.
decode_android_resources now takes detail and joins the agent result
budget. Omitted, a decode that fits delivery.agent_result_budget_bytes is
inline and a larger one is retained behind its summary. With detail
summary, view returns one android-resources page in the same call, so the
German and Japanese values of one string take one call. The CLI uses the
shared Evidence delivery with --view.
On VLC with real Apktool 3.0.3 the default reply was 3,368 bytes, and the
two-locale strings page 2,695 bytes.
BREAKING CHANGE: a decode_android_resources call that omits detail on a
decode above the agent result budget now returns the retained summary.
Pass detail: "complete" (--detail complete) for the previous shape.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(browser): return completed scenario capture when cleanup is unconfirmed
When every scenario action completed but session cleanup timed out or
failed, capture_browser_scenario reported a hard cleanup_incomplete
failure and retained the finished observation only as a raw partial
with no evidence_id, so the caller lost a result that had succeeded.
Model capture and cleanup separately: the capture schema now admits
cleanup "incomplete" for a completed capture, and the Playwright
provider returns the completed capture in that case, with the cleanup
reason and the resources that may remain reported as a limitation.
The cleanup lease stays retained, so provider close and the next
capture still retry and surface unconfirmed cleanup. Captures whose
operation failed keep the existing cleanup error and partial
observation behavior.
Fixes#6166
Co-authored-by: Saim Shafique <128062316+sx4im@users.noreply.github.com>
* test(browser): update the retained-cleanup CLI test for the completed-capture behavior
When every action completed but cleanup is unconfirmed, the one-shot CLI
now returns the completed capture as Evidence instead of failing with
cleanup_incomplete and exit 1. The retained-cleanup test still asserts the
retry (provider close once, browser close retried, profile removed once)
but now expects the success output: the capture with browser.cleanup
"incomplete", both steps completed, and the unconfirmed-cleanup limitation.
* fix(browser): preserve typed cleanup failure reasons
* test(browser): model capture finalization in session mock
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(mcp): paginate tools/list under the FastMCP SSE limit
Unsloth's FastMCP client rejects the single tools/list event because the full 241-tool catalog serializes to about 4.2 MB, over its 1 MiB SSE cap, so every refresh fails. The MCP SDK returns the whole catalog with no nextCursor, and the server never handled the cursor at all.
Page oversized listings at the transport seam, per the MCP cursor contract: pages stay under 896 KiB, cursors are bound to the catalog snapshot, and catalogs that fit are returned in one response as before.
* fix(mcp): track pending tools/list requests in one map
pendingToolListCursors already held every tools/list id, including
requests without a cursor. Membership, cancellation, and cleanup now
use that map.
Cursor rejection tests assert JSON-RPC -32602, then a cursorless
listing returns the complete current catalog.
* fix(mcp): count one schema discovery per tools/list pagination
The paged tools/list turns one logical discovery into several wire
requests, which broke the artifact verifier probe's per-request
counting and its duplicate injection assumed the target tool on the
first page. Count one discovery per listTools call and inject the
duplicate only on the page carrying the tool.
* fix(mcp): bind tools/list cursors to full tool definitions
A cursor digest now covers each advertised tool, so a schema change
invalidates it. One tool larger than REA_MCP_TOOLS_LIST_PAGE_BYTES
fails with a resource_constraint error instead of a successful page.
* test(doctor): keep the configuration table within its line limit
The page-budget refusal stays covered by the setting parser tests.
* fix(mcp): honor the tools/list page budget on the stdio path and register the setting
Register REA_MCP_TOOLS_LIST_PAGE_BYTES in the numeric limit registry and
the limit inventory so the numeric limit check passes.
Carry the parsed page budget from AppConfig into DeferredEvidenceMcpServer
so the default stdio startup path honors the setting instead of always
using the 917504-byte default.
Harden the page budget parser tests to surface the parse error instead of
returning early on failure.
* fix(mcp): return a fitting final tools/list page and use the parsed page budget
verifiedPage returns the remaining tools as one final page without a
cursor when they fit, instead of failing a resumed listing whose first
tool plus a cursor exceeds the budget.
parseConfig builds the page budget from parseEnvironment's admitted
number instead of re-parsing the raw environment, and the now-unused
resolveMcpToolsListPageBudget helper is removed.
* fix(mcp): use shared isRecord in tools/list pagination
Static checks flagged the local record predicate in toolListPagination.ts:
import the shared isRecord from src/domain/isRecord.ts instead.
The numeric-limit registry test still expected 15 entries after the
REA_MCP_TOOLS_LIST_PAGE_BYTES entry was added; bump it to 16.
* test(mcp): page tools/list fixtures under explicit small budgets
The compact-only presentation strips field descriptions before advertising, so the 80-tool catalog fits one page and the oversized tool fits too. Set explicit small page budgets against the advertised size. The parseConfig success test now throws the typed error before reading the value, per the test guide.
* test(config): throw typed parse errors in tools/list budget test
Greptile P2 on #9142: the budget test checked the selected parse via
an inline toMatchObject on the Result, hiding the typed error on
failure. Bind both parse results and throw their errors before
asserting values, per the repo test guide.
* fix(mcp): format tools/list pagination test to repo style
oxfmt --check flagged src/server/toolListPagination.test.ts
(the cursor-identity expectation was written expanded; oxfmt
collapses the two-element array onto one line). No behavior change.
* style(mcp): oxfmt the page-budget assertion
The Greptile P2 fix re-wrapped the expect call past oxfmt's width; run
the pinned formatter so Static checks stays green.
* fix(mcp): use the shared sha256Hex helper for the tools/list catalog digest
The architecture guards forbid a second one-shot SHA-256 hex digest;
use the shared helper from src/kernel/sha256Hex instead.
* fix(mcp): build the tools/list page-budget refusal through the shared owner helper
The architecture guard counts hand-built AnalysisResourceConstraintError
constructions; toolsListPageBudgetError() held the only new copy. The
refusal cause is a page budget, not a parse limit, so parseLimitConstraint
does not fit. Add toolsListPageBudgetConstraint() beside it in
parseFailureAnalysisError.ts and build the refusal from the page-budget
facts there; the produced error is unchanged.
Also give the pagination test SDK client the shared schema validator
from createMcpSchemaValidation, released with the client.
* fix(server): adapt instructions call to the predicate API
Main changed serverInstructions to take an advertisesTool predicate
instead of a tool-family set, and RecordedMcpCatalog gained required
toolFamilies and promptRequirements fields. The merge head no longer
typechecked, failing Build package, Documentation and Static checks.
Adapt the call site to main's own adapter shape and add the two empty
fixture fields.
* fix(mcp): restore main's tool-family scope in deferred startup
The merge dropped the family scoping main added to the deferred
startup path. A scoped stdio start advertised every recorded tool and
saved the full catalog identity, so attachRuntime rejected the selected
identity on first use. Restore the toolFamilies option, scoped
capabilities/instructions/identity, and the shared helper through
runDeferred and the deferred constructor.
* fix(mcp): share page limit facts and stream catalog sizing
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* feat(cli): retain over-budget partial observations from failed CLI runs
When a failed CLI command carries an over-budget partial observation without
--evidence_output, retain the complete partial Evidence in the private
retained-Evidence cache instead of dropping it to a rerun-only fallback.
- Pass the composed source closure into budgetFailurePartialEvidence so cited
source records are written into the retained bundle alongside the partial
observation.
- Report the retained path, byte size, and record_sha256 under
details.diagnostics.evidence_bundle, set details.partial_observation_delivery
to retained: "cache-file" with a paging cursor, and keep all failure facts
(code, message, failure_kind, retryable, remediation, limits, existing
diagnostics) unchanged.
- Honor --no-retain and REA_CLI_RETAINED_EVIDENCE_BYTES=0, fall back to
retained: "not-retained" with rerun arguments and redacted retention_failure
on uncommitted write errors, preserve the original failure and committed
cache receipt on post-commit staging cleanup failures, and keep cancelled
failures on the no-publication contract.
- Document the behavior in docs/reference/limits-and-recovery.md and add
boundary and CLI acceptance tests.
Fixes#14618
* fix(cli): preserve pre-commit cleanup ownership and surviving oversized cache receipts
Address two gaps in the shared retainOverBudgetEvidence path that affected
both successful (deliverRetainedSummary) and failed (budgetFailurePartialEvidence)
CLI retention:
- Preserve pre-commit writer errors whose staging cleanup stayed incomplete
(including exists failures with unfinished cleanup), reporting cleanup_incomplete
and remaining resources via projectFailure on successes and via
refusedPartialPublication (keeping execution_failure and complete inline
partial_observation) on failures.
- When removing an oversized retained cache bundle fails (fileRemains), carry
the surviving file metadata through RetentionStop.remainingFile, record the
complete receipt (path, bytes, record_sha256), and report retained: "cache-file"
with its paging cursor and retention_failure instead of a not-retained fallback.
- Simplify refusedPartialPublication back to a plain delivery value now that
retainOverBudgetEvidence tracks the attempted cache path directly.
- Add public CLI tests for both paths (success and failure) using
evidencePublicationPreload.mjs and update docs/reference/limits-and-recovery.md.
* fix(cli): key retained bundles by complete source closure
* chore(format): format retained evidence publication
* fix(cli): canonicalize retained bundle cache keys
* test(cli): compare retained bundle bytes directly
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(android): admit DEX-bearing ZIP packages by directory content
A ZIP root without an .apk suffix was classified as a generic zip, so
inspect_android_package refused extensionless DEX archives. Generic ZIP
roots are now admitted as APKs when the central directory lists a root
AndroidManifest.xml or classes*.dex entry.
* fix(artifacts): bound Android ZIP probing and preserve selected formats
* chore(format): format Android ZIP admission changes
* fix(artifacts): bind ZIP classification to final file identity
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(javascript): keep Electron options visible past conditional literal spreads
The static object-literal model treated a spread such as
`...(isMac && { titleBarStyle: "hidden" })` or
`...(isMac ? { frame: false } : {})` as an unknown write, so every earlier
key became dynamic. BrowserWindow webPreferences and the preload association
were lost, and child-process options such as stdio lost their values too.
Expand `&&` and `?:` spreads whose branches are bounded literal copies into
one conditional-keys member. Only the keys a branch may copy stay
unresolved, and a falsy `&&` operand may still copy index keys
(document.all). `||`, `??`, unresolved branches, getters and computed keys
stay unknown, and nesting counts against the existing expression depth
limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(javascript): leave spread keys unknown after an unresolved && operand
A falsy `&&` operand is copied itself, and the conditional spread model
assumed it could add only index keys. document.all, the only falsy
object, can also carry expando properties with any key, so
`{ webPreferences, ...(isMac && { title: 1 }) }` reported the earlier
`webPreferences` as explicit while `isMac` was unresolved.
Bound the left operand with the same spread rules as a branch. A
comparison, `!` negation or other primitive result copies no named keys
and keeps earlier options readable; an unresolved operand, such as an
identifier, leaves the spread unknown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
compare_web_captures now advertises the request schema and admits it in
the application, which reads the session's retained Evidence. Each
capture field is the opaque complete observation or an exact
retained-evidence reference. The tool description says either ID works,
and inspect_web_page no longer says comparison needs the complete
capture.
Because the fields are declared reference alternatives, an inline
comparison refused for exceeding REA_MCP_MAX_INPUT_ELEMENTS names the
retained reference as its recovery. On a local Chromium 156 page with
2,000 list rows and three libraries, two complete captures were 6,701,922
bytes of arguments and were refused at the shipped allowance; the
reference request was 274 bytes and returned the same result and
parameters.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(limits): assert structured apktool and Go limit fields
Apktool and Go limit tests matched English limitation and recovery
sentences. They now assert the structured result: string-table status,
decode_timeout_ms details.limit, JVM exhaustion area, and Go module or
string-literal fields.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(go): keep the chained-fixup limitation check
LC_DYLD_CHAINED_FIXUPS is not a report field. The limitation is the only
record that pointer recovery can miss rebase-encoded slots, so the test
keeps that sentence beside the structured truncation facts.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(limits): apply producer.output_bytes within each producer's maximum
decode_android_resources and inspect_asset_catalog ignored the session
output setting because their defaults and maxima differ from the shared
4 MiB default. An unset setting still uses 4 MiB and 64 MiB. An explicit
runtime value or REA_PRODUCER_OUTPUT_BYTES supplies the omitted field and
is clamped to each producer's maximum. A per-call value still wins.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(limits): show above-cap producer output settings are reduced
A runtime override or REA_PRODUCER_OUTPUT_BYTES above a producer's maximum
is enforced as that maximum. Apktool's capture budget and assetutil's
refusal both report the reduced value.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(limits)!: budget Rust dependency parser ceilings per call
inspect_rust_binary refused a compressed .dep-v0 stream or its inflated
JSON with one fixed parser allowance. Those ceilings are now the per-call
parameters max_compressed_dependency_bytes (1 MiB),
max_inflated_dependency_bytes (8 MiB) and max_dependency_inflate_ratio
(64). A refusal is adjustable_budget and names the parameter that stopped
the parse. Allocation before the consumed length is known uses the stored
extent, including PE alignment padding. Omitted fields keep the previous
defaults.
BREAKING CHANGE: Rust dependency-parser refusals report details.limit for
the binding parameter instead of a fixed_ceiling allowance.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* test(rust): admit dependency sections above the former ceilings
A stored section larger than 1 MiB and 8 MiB is refused at those defaults
and parsed once both budgets are raised. A stream that inflates more than
64 times is refused at the default ratio and parsed once the ratio is raised.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(limits)!: let apktool and assetutil take producer_limits.output_bytes and type Android and process capture refusals
decode_android_resources and inspect_asset_catalog refused larger apktool or
assetutil output with a fixed capture ceiling. Both now accept
producer_limits.output_bytes (defaults 4 MiB and 64 MiB) and report
details.limit for it. assetutil's budget covers each stream and the JSON
retained across catalogs, capped at 128 MiB for the in-process decode.
capture_process's retained-frame refusal reports details.limit for
limits.output_bytes, and a JADX JVM heap failure is marked as measured
exhaustion. The lipo field-retention allowance is reclassified as derived from
the native command output capture, and the JADX external DEX representation
allowance as protocol (a fraction of the bridge's local MCP frame).
BREAKING CHANGE: apktool and assetutil output refusals report details.limit for
producer_limits.output_bytes instead of a fixed_ceiling refusal.
* test(apktool): decode raised output after the default refuses it, and check deadlines leave the output budget unchanged
* fix(resources): keep a file-size refusal's observed size through failure rebuilds
* feat(native)!: give the Go and Rust readers max_structure_bytes and Rust max_wasm_sections
inspect_go_binary and inspect_rust_binary read the ELF directory and
Mach-O load commands through the shared container reader with the fixed
16 MiB structural allowance. Both now accept max_structure_bytes, threaded
through readBinaryContainerFromReader. inspect_rust_binary's fixed
65,536-section WebAssembly walk becomes max_wasm_sections (default 65,536,
at most 16,777,216).
Refusals report details.limit and the generated recovery. The Go budget
refusals drop their authored prose and always report their limit, so a
value at its maximum gets the generated narrowing advice.
Part of #14235.
BREAKING CHANGE: Go and Rust structural refusals and the WebAssembly
section refusal report details.limit instead of a fixed_ceiling refusal.
* chore: refresh the Go and Rust advertised schema summaries
* test: keep the Rust section-walk admission check type-correct
* refactor(native): own the max_structure_bytes refusal in the native domain
The Go and Rust providers may not import src/native, so nativeStructureConstraint moves to src/domain/native/nativeStructureBudget.ts next to the limit it builds, and every provider imports it from there.
* fix(native): report the effective Go structure budget and document max_wasm_sections
The Go limitation text named a fixed 16 MiB structural bound after a caller could raise it; it now names the effective max_structure_bytes. The Rust guide and MCP boundary test describe max_wasm_sections as a per-call control, and the admission test requires a raised value to succeed.
* fix(native): report the effective Go structure budget and Rust section control
Go inspection limitations named a fixed 16 MiB structural bound after
max_structure_bytes selected another value. The report now uses that
effective budget, including the shared default when the field is omitted.
Rust WebAssembly section refusals are an adjustable max_wasm_sections
budget. The MCP expectation, the Rust guide, and the CLI and MCP checks
follow that control, and a raised budget must admit the same module.
* style(rust): format the section-walk CLI assertion
oxfmt rejects the wrapped cast in the CLI recovery check. Static checks
run format:check, which check:fast does not.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* feat(limits): register producer.output_bytes as the session default for bounded producer output
inspect_packet_capture, decode_signal_recording and inspect_signal_decoders
share BOUNDED_PRODUCER_LIMITS, and an agent decoding several large captures or
recordings raised producer_limits.output_bytes on every call. The registered
setting producer.output_bytes (seed REA_PRODUCER_OUTPUT_BYTES, default 4 MiB)
now supplies the omitted field. A per-call value wins, then the runtime
override, then the seed, then the default. An output refusal reports the
setting's limit with its parameter and source, so the generated recovery
names both routes.
* fix(limits): refuse an invalid producer output seed after retained cleanup, forward it through setup, and cover the seed
observe_web_execution returned complete script sources inline. On a local
page loading rxjs, openpgp and isomorphic-git in Chromium 156, the
complete observation was 1,888,024 bytes of structured content, nearly all
source text.
observe_web_execution now takes detail and joins the agent result budget.
Omitted, an observation that fits delivery.agent_result_budget_bytes is
inline and a larger one is retained behind its summary, which pages
through the web-execution view. On that page the default reply was 7,458
bytes. detail summary retains the observation through the shared retained
summary binding. rea observe-web-execution uses the shared CLI Evidence
delivery. The real-browser verifiers request the complete observation
they assert on.
BREAKING CHANGE: an observe_web_execution call that omits detail on an
observation above the agent result budget now returns the retained
summary. Pass detail: "complete" (--detail complete) for the previous
shape.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(native)!: give the PE readers per-call text, entry and metadata budgets
inspect_pe_imports refused at a fixed 16 MiB of retained names,
inspect_pe_unwind_ranges at a fixed 2,097,152 exception-directory entries
and inspect_pe_resources at a fixed 8 MiB result. They now accept
max_text_bytes (default 16 MiB, at most 256 MiB), max_entries (default
2,097,152, at most 16,777,216) and max_metadata_bytes (default 8 MiB, at
most 256 MiB). The DLL, function and TLS callback refusals report
details.limit for max_dlls, max_functions and max_callbacks instead of
authored recovery, and an unwind refusal reports the declared entry count
as required_value.
The shared PE failure projection no longer maps an unnamed
BinaryResourceFailure to "The PE structural decoding allowance": no PE
reader produces one, since PE header and section tables are bounded by the
format.
Part of #14234 and #14235.
BREAKING CHANGE: the PE retained-text, exception-directory entry and
resource metadata refusals report details.limit instead of a fixed_ceiling
refusal.
* fix(native): update PE advertised schema summaries, test types, and assert retry success
* test: compare PE resource refusals across adapters with each adapter's control spelling
* test: avoid shadowing the CLI fixture in the PE resources parity check
* feat(native)!: give inspect_native_exports per-call inventory, text and structure budgets
The native export reader refused at a fixed 262,144-row inventory, a fixed
16 MiB retained-text allowance and the fixed 16 MiB structural allowance.
It now accepts max_entries (rows and declared symbol counts; default 262,144,
at most 4,194,304), max_text_bytes (default 16 MiB, at most 256 MiB) and
max_structure_bytes, which now also bounds the ELF dynamic, symbol and
version tables located through PT_DYNAMIC.
The parser threads one NativeExportBudgets object through the ELF and PE
paths and elfDynamicExportTables; the Android JNI reader keeps the defaults.
Refusals report details.limit and the generated recovery. A declared table
count is reported as required_value; the text budget stops at the first
excess and reports none.
Part of #14235.
BREAKING CHANGE: export inventory and retained-text refusals report
details.limit for max_entries or max_text_bytes instead of a fixed_ceiling
refusal, and MAX_NATIVE_EXPORT_ROWS is renamed DEFAULT_NATIVE_EXPORT_ROWS.
* chore: refresh the inspect_native_exports advertised schema summary
* fix(native): omit lower-bound GNU hash required_value, decouple version work from max_entries, and update export recovery tests
* test: expect the lower-bound marker on a stopped GNU hash chain walk
* fix(native): cap ELF version traversal work and aggregate malformed version definition diagnostics
* build(deps): update Turbo to 2.11.13
* test(artifacts): check the Bun path budget without an exact count
(cherry picked from commit 0953e5cca9)
* test(artifacts): preserve unknown .NET bundle path requirements
(cherry picked from commit 7441283b5f)
#14646 stopped reporting required_value for artifact_limits path budgets
because the path-depth count stops at the limit and knows only a lower
bound. The .NET bundle journey still expected 257, which failed any CI
run that selected it.
* feat(limits)!: raise disk-backed admission defaults for large ordinary targets
Raise four per-call input defaults whose work streams from disk or reads
by range, so large but ordinary targets are admitted without a retry:
- inspect_sqlite_database producer_limits.input_bytes: 256 MiB -> 2 GiB.
The database and WAL stream into a private on-disk snapshot that
node:sqlite reads by page with mmap disabled; the worker heap stays
256 MiB.
- inspect_go_binary max_input_bytes: 256 MiB -> 2 GiB. One streaming
hash pass, a header prefix and range reads with chunked build-info
search.
- inspect_rust_binary producer_limits.input_bytes: 256 MiB -> 2 GiB.
One streaming hash pass, a header prefix and a windowed rustc scan.
- inspect_nuget_nupkg max_file_bytes: 64 MiB -> 256 MiB, above
nuget.org's 250 MB package ceiling. The ZIP is read by range; only
the directory and .nuspec are retained.
Descriptions and remediation text that restated the old Rust and NuGet
values now derive from the owning constants.
BREAKING CHANGE: omitted input budgets for inspect_sqlite_database,
inspect_go_binary, inspect_rust_binary and inspect_nuget_nupkg now admit
larger files. Callers relying on the old default refusal must pass the
old value explicitly.
* test(nuget): pin the default max_file_bytes refusal boundary through CLI and MCP
* feat(artifacts): back archive member counts with the artifact.member_count setting
Archive member, entry, module and asset counts are the reader limit an
agent is most likely to raise repeatedly in one session. A new runtime
setting, artifact.member_count (launch seed REA_ARTIFACT_MEMBER_COUNT,
default 100,000), now supplies the default for artifact_limits
bun.module_count, dotnet_bundle.entry_count, node_sea.asset_count and
deno.vfs_entries. An explicit artifact_limits field still wins for that
call. A refusal at one of those fields reports the setting's limit with
the field as parameter and the value's source, so its recovery names
the per-call field and update_analysis_settings (or the launch seed on
the CLI). When a non-default session value applies, Evidence reports
the resolved effective_limits.
* test(artifacts): cover the artifact.member_count session route over stdio MCP
update_analysis_settings at 1 refuses a two-entry .NET bundle with the
setting, source runtime and both recovery routes; an explicit
artifact_limits field wins over the session value; raising the setting
to 2 admits the same bundle.
* fix(artifacts): resolve caller member counts before the session seed
When a call selects every field artifact.member_count backs, the
session value and its launch seed are no longer read, so an invalid
REA_ARTIFACT_MEMBER_COUNT cannot block an explicit per-call recovery;
a request-sourced refusal still names the setting. The setting now
lists inventory_artifact, which it also applies to.
* fix(config): own the artifact.member_count seed outside the runtime settings module
Resolving the seed through launchAnalysisSetting made
runtimeAnalysisSettings import the launch schema map, which imports
modules that import runtimeAnalysisSettings; the cycle left the bridge
reply schema uninitialized in some load orders. The seed now has its
own owner, src/config/artifactMemberCount.ts, like the pwntools input
seed, and the definition names its environment variable literally as
the numeric-limits guard requires.
* fix(native)!: report details.limit for native reader per-call budgets
Devicetree, Windows shortcut, kernel build config, firmware staging and
byte-entropy refusals of caller-selected budgets named their control only
in remediation prose. Each now sets details.limit from a domain-owned
budget object that also builds the schema (src/domain/parameterBudget.ts),
so the reported range is the one the next call accepts.
inspect_devicetree's fixed 32 MiB decoded representation allowance becomes
the per-call max_decoded_bytes (default 32 MiB, 1 KiB to 256 MiB); its
refusal reports boundary max_decoded_bytes instead of decoded_bytes.
The pwntools allocation failure declares measuredExhaustion, the firmware
inherited RLIMIT_FSIZE refusal declares measuredExhaustion, and the LLDB
combined-result ceiling is a registered representation bound.
Part of #14234 and #14235.
BREAKING CHANGE: inspect_devicetree's decoded-representation refusal reports
reported_limits.boundary "max_decoded_bytes" with details.limit, instead of
"decoded_bytes".
* fix(native): keep FIT decoded-budget boundary, LLDB narrowing and entropy length range exact
The FIT reader compared the renamed devicetree limit against decoded_bytes, so a decoded-budget refusal became capacity; it now checks max_decoded_bytes, with a test. The LLDB representation ceiling keeps a short name and carries its recovery as narrowing. The byte-entropy length maximum is the window the selected block_size admits.
* fix(cli): describe inspect-devicetree --max-decoded-bytes
* refactor(native): let the generated adjustable-budget recovery name the native reader controls
With #14625 the refusal owns per-call recovery, so the devicetree, Windows shortcut, kernel build config, firmware staging and byte-entropy refusals drop their authored sentences. inspect_byte_entropy reports the smallest admitting block_size as required_value.
* fix(native)!: report details.limit for remaining native reader budgets and make BEAM table rows adjustable
inspect_elf_dependencies, inspect_elf_unwind_ranges, inspect_apple_ips,
inspect_dwarf_units, inspect_native_initializers and inspect_pe_resources
named their per-call budgets only in remediation prose. Each now reports
details.limit from a domain-owned budget object that also builds the
schema. The unwind per-page symbol-name text refusal names the page size
`limit`, the control that admits it.
The fixed 65,536-row BEAM table ceiling becomes the per-call
max_table_rows (default 65,536, at most 1,048,576).
The plist nesting allowance is reclassified as a representation bound
(MAX_JSON_DEPTH less the report envelope). GPU and APK input refusals that
named their fixed allowances only in prose now declare them, registered
as pending #14235.
Part of #14234 and #14235.
BREAKING CHANGE: a BEAM table-row refusal reports details.limit for
max_table_rows instead of a fixed_ceiling refusal.
* fix(native): keep naming the dependency and BEAM row controls in recovery
* refactor(native): let the generated adjustable-budget recovery name the remaining native controls
With #14625 the refusal owns per-call recovery, so the ELF dependency, ELF unwind, Apple IPS, DWARF, initializer, PE resource and BEAM refusals drop their authored sentences. BEAM reports the complete row and atom counts as required_value. The unwind per-page text allowance is a registered fixed allowance whose narrowing names a smaller limit, because a larger page would not admit it.
* style: format the PE resources provider test
* refactor(native): keep one owner of the IPS budget bounds and document the unwind text allowance