mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 02:17:09 +00:00
3970afecc6fc3a952e10ec0db4cc21fa6cb7a71d
1834
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
51b3671b08 |
feat(artifacts): inventory Nintendo DS ROM binaries, overlays and file tables offline (#14664)
* feat(artifacts): inventory Nintendo DS ROM binaries, overlays and file tables offline Recognition now claims a Nintendo DS ROM from the cartridge header: stored logo CRC 0xCF56, unit code 0, 2, or 3, an ARM9 offset after the header, and a matching logo-area or header CRC. Inspection records those header facts on the root and lists arm9.bin, arm7.bin, overlays/<cpu>/overlay_<id>.bin, FNT-named data/<path> files, and unnamed fat/<id>.bin files as stored byte ranges. A checksum mismatch, a partial table, or a range past the end of the file leaves coverage unknown. Secure-area encryption, compressed overlays, and NitroARC archives stay undecoded, and the format is registered for inventory, extraction, and the docs. * docs: move the Nintendo DS ROM guide under guides/firmware * Address review feedback * Address review feedback * Address review feedback * fix: Compare NDS entry addresses and overlay facts * fix(artifacts): bound NDS path expansion and enforce expanded_bytes * fix(artifacts): omit NDS format declaration for ordinary filesystem files --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
d97b796076 |
fix(dwarf)!: bound PE COFF section-name decoding with max_structure_bytes (#14787)
BREAKING CHANGE: Oversized individual PE COFF long section names in inspect_dwarf_units now project an adjustable_budget refusal (boundary max_structure_bytes with details.limit) instead of fixed_ceiling (pe-section-name-bytes). |
||
|
|
47875ba073 |
fix(native)!: bound Android packed relocations with max_structure_bytes (#14788)
BREAKING CHANGE: Oversized Android APS2 packed relocation tables in inspect_native_initializers now project a memory/adjustable_budget refusal (boundary max_structure_bytes with details.limit) instead of capacity/fixed_ceiling (native-index-capacity). |
||
|
|
2bb086c87a |
feat(providers): retain native selection provenance in Evidence (#9668)
* feat(providers): retain provider selection provenance with session evidence The registry records how a deep provider became selected and why every other candidate was rejected, and binary_session exposes those facts for the active route. Evidence already carried provider identity, but nothing recorded which candidates the session evaluated, so a retained record could not explain why this engine produced the observation or what the alternatives were. Attach provider_selection to Evidence admitted by the session: the selection source and, for each evaluated candidate, its identity and version, selection state, availability and target-support outcome, and the stable rejection codes. The field is optional and excluded from semantic identity, following caller_input_path, so each admitted record stays attributable to the exact provider instance without changing observation identity, evidence IDs or replay. Copy only stable selection facts. Candidate diagnostics, remediation prose and target content stay in the session status projection instead of being repeated in every record. * style(domain): reformat the provider-selection assertion oxfmt --check rejected the three-line expect() call; the formatter's single-line layout is the canonical one, so Static checks failed only on formatting. * fix(evidence): keep a rejected record inside the Result boundary `recordEvidence` ran `withEvidenceProviderSelection` before handing the record to the ledger. That helper parses to seal the rebound envelope, so a tampered or otherwise invalid record threw a `ZodError` from the attribution step and never reached `EvidenceLedger.record`, which is where the declared `Result` is produced. `tests/boundary/mcp/processEvidenceIdentityMcp.test.ts:454` asserts `session.recordEvidence(tampered).ok === false` and fails on the throw. Authenticate the input first and return the ledger's own rejection for a value it would refuse anyway; attribution then only ever sees a record its reader accepts. * fix(binary): attribute imported records to the recording session Import replaces a same-ID record's presentation metadata, and provider_selection is part of that metadata. When runDirectAnalysis imports the provider's own bundle, the copy it rebuilds carries no selection, so the import erased the attribution the session had stamped and the caller kept an unattributed record instead. Attribute at both merge sites, where the session already authenticates everything it admits. A refreshed route after a failed switch can bind a different selection than the one the earlier binding held, so re-derive it there as the initial open does; spreading the previous binding kept the stale value. * fix(binary): admit record input before sealing it for attribution recordEvidence and the two bundle import paths seal Evidence through withEvidenceProviderSelection before handing it to the ledger. A sealed value skips the ledger's ordinary-JSON and heap-headroom admission, so a session with no authentication allowance accepted a mutable record and a large record was copied and traversed before the guard ran. Hold the caller's own value to that admission first, then attribute. The import paths also refuse with a Result instead of falling through to an unattributed import when admission fails. * fix(binary): re-attribute a sealed record without traversing it again recordEvidence now admits the caller's value before attributing it, but a record returned by evidenceForAnalysis has already been through that admission and is sealed. Running the ordinary-JSON walk and the heap-headroom check over it again repeats the work the ledger itself skips for a sealed value. Ask the ledger first: a value it holds is the admission it made, so the check costs one lookup. Only a value the ledger has not seen pays for the full walk. * fix(providers): return the recorded Evidence after import Import re-stamps session provenance onto the Evidence it records, but callers kept the pre-import copy, so retained selection attribution and cache metadata were dropped from what analysis reported. Read the recorded record back after a successful import, and leave an already-retained record as the ledger attributed it instead of re-deriving attribution from the caller's copy. * fix(providers): keep the caller's copy when re-attributing an imported record The merge with main brought in the unchanged-record path, where an import whose only change is display metadata now replaces the ledger's record. Re-attributing that incoming value put the session's provider selection on the caller's copy, so the import reported a record that differed from what the caller sent. Attribution now applies only to records the ledger does not already hold. The snapshot cache test now asserts the session's attribution explicitly instead of byte equality with the un-attributed source. * fix(providers): keep the caller's record when importing over a retained one The previous change skipped attribution for a record the ledger already held, which left the imported copy's own selection — missing or from another session — in place. Import replaces a same-ID record's presentation metadata, and provider_selection is part of it, so the session's attribution wins over the caller's copy while the caller's other display metadata is kept untouched. * fix(providers): attribute staged snapshot and unknown-mutation Evidence Address the open review findings on session provider provenance: - importAnalysisSnapshot merged the re-attributed bundle into the ledger but staged the snapshot's own bundle, so AnalysisSnapshotCache rebuilt replay bindings from records the merge had replaced. Hand the merged bundle back to the stage so replays bind to the attributed evidence. - recordResult recorded an attributed record and then serialized the caller's copy, so successful MCP responses omitted provider_selection while the ledger and exports carried it. Read the recorded Evidence back before delivery, as the direct analysis path already does. - recordUnknown and updateUnknown synthesized unknown-mutation Evidence without the active session's provider selection, so those exported records were unattributed. Thread the binding's selection through to unknownMutationEvidence, which is where the record is produced. * fix(providers): attribute the atomic Evidence-and-Unknown mutation record recordEvidenceWithUnknown synthesizes its own rea.residual-unknown-mutation record, so the selection the session threads into recordUnknown and updateUnknown never reached it. The atomic comparison workflows therefore exported one record without provider_selection, contradicting the guarantee that every admitted record carries the recording session's selection. Thread the active binding through the atomic method as well; analyst-authored mutation records still keep analyst-inference authority and gain only the session selection. * fix(evidence): require one selected candidate in provider provenance provider_selection carries no separate selected-provider id, so a reader can only name the recording session's provider when exactly one candidate claims the selection. The schema accepted any candidates array, so an imported bundle could re-export zero or several selected candidates under a stable Evidence id and consumers would have no way to resolve the provider. The recording paths always derive the selection from a single bound provider (AnalysisProviderRegistry selects one usable candidate, and SessionProviderRouter marks only the bound id selected), so the refine rejects only foreign input. * fix(evidence): adopt the recording session's selection on a duplicate record Recording an observation the ledger already holds under the same semantic ID returned duplicate and discarded the attributed object, so lookup and export kept the imported record's missing or foreign provider_selection. Replace the retained display metadata with the active selection on that path; semantic identity and the stored payload stay the same record. The provenance schema also accepted a selected candidate that is unavailable or unsupported, which no registry path can bind. Require the selected candidate to be available and supported so an imported bundle cannot re-export a selection that never occurred. * fix(evidence): keep retained display metadata and notify observers on duplicate Attribution replaced the whole stored record with the incoming copy, so a provider-produced duplicate without the caller-selected path, alias set or subject display erased the metadata the recording session retained merely to add provider_selection. Adopt only the display facts the incoming copy actually carries; omission is not deletion. Import keeps its documented replace semantics. The duplicate branch also returned before refreshEvidenceMetadata and #emitSnapshotChanged, so replay caches and snapshot subscribers kept the old metadata after a successful replacement. Treat a non-no-op replacement exactly as the import path does. * fix(artifacts): compare Evidence by identity across a replay session The composed-workflow test opened a second fixture, which writes its own temp artifact, so a replay record's subject path and the session-attributed provider selection no longer matched the snapshot copy. Both are display metadata outside the Evidence id; the provider call is what establishes the binding here, so compare the content the id commits to and assert the ids separately, which the test already does. Also apply the formatter to BinarySessionInvestigation.test.ts, which fails format:check on its own. * fix(server): deliver the retained copy that carries the session selection Recording stamps the active session's provider selection onto the ledger copy of a semantic ID. The tools that build or project their own Evidence value then delivered that unattributed copy, so the MCP response and the snapshot export disagreed for the same evidence_id: Ghidra reference and evidence flows, composed workflow overviews, analysis functions and the process capture tools all failed deep-equality against the retained record. Hand the delivered copy the session's selection when the ID is retained. Other retained display metadata, such as a caller path carried by an imported record, stays as the caller built it. * test(investigation): keep the session test within its lint and format limits Two checks on this branch failed for reasons the branch itself introduced: format:check wants the withEvidenceProviderSelection call in UnknownEvidence.ts wrapped at its argument list, which the branch's edit moved off. lint reports max-lines-per-function (152 lines, limit 150) for the "reobserves resource-scoped ..." case after the branch expanded two assertions in it. The provider-selection expectation is a fixed value, so it moves to a module-level constant and the case drops back under the limit without weakening either assertion. * fix(server): carry the session selection on the workflow copy delivered Commit |
||
|
|
188e2bd684 |
fix(website): honor validators and restore the implicit design system (#14768)
* fix(website): honor validators and restore the implicit design system - Route every worker answer that skips Markdown negotiation through the HTML fallback, so validators and ranges removed for the probe still apply. - Replace undefined classes with existing components and remove 27 CSS classes no page uses. - Express article text color as a token so component colors win in both themes, and use logical properties for text-flow layout in RTL pages. - Give an untranslated English fallback notice English direction. - Start the page navigation closed without JavaScript, dismiss it with Escape or an outside click, and keep later copy clicks, failed key imports and first animation frames from corrupting demo state. - Sync the theme bootstrap into the Notes fixture through a declared region. * fix(website): skip Markdown negotiation for requests with a body Markdown probing takes ownership of the caller request body. Methods other than GET and HEAD have no Markdown representation, so they reach the asset service once with the original body and validators. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(website): describe the homepage menu's closed start The disclosure has no open attribute, so without JavaScript it starts closed and the summary reveals the fragment links. The guide now matches that, including overlay dismissal. Co-authored-by: morluto <morluto@users.noreply.github.com> * style(website): wrap the worker precondition assertion oxfmt's 80-column width is what Static checks enforce. The If-Match comparison in the non-retrieval test exceeded it. 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> |
||
|
|
e99d0b2d86 |
fix(call-path): bound inline shortest-path enumeration (#4984)
* fix(call-path): bound inline shortest-path enumeration build_call_path could allocate every shortest path before response-budget enforcement. Count the exact total with a capped BigInt pass over the distance graph instead, and bound enumeration itself: max_paths (default 64) is a caller-selected count preference while a 2 MiB serialized paths-field budget is the resource bound, checked before each cited path is formed. The representation accounting measures each string with the rules JSON.stringify applies instead of charging six bytes per code unit, so an ASCII address or Evidence id is no longer billed six times what it writes, and the paths-array brackets the per-path accounting excludes are reserved. A path that serializes to 469,497 bytes is no longer refused as over the budget. Results report total_shortest_paths, total_shortest_paths_capped, paths_truncated and paths_limited_by_bytes so exact counts, representation limits and completeness stay distinguishable, and a found result whose single path cannot fit still reports the known path with byte-budget truncation. * fix(call-path): always return the first shortest path and measure cited paths The byte budget dropped a sole shortest path whose citations exceeded 2 MiB, although that path is linear in the supplied Evidence; only path count grows exponentially, and max_paths bounds it. Always return the first path and let the budget bound the paths after it. Measure each cited path with JSON.stringify instead of a hand-written estimator that duplicated citePath's shape and JSON escaping (it also charged U+007F-U+009F as escaped). The found result again requires at least one path. * refactor(call-path): measure cited paths from cached parts before assembling A candidate path was cited and serialized in full before the byte check, so a rejected path still built its representation. Move citation into CitedPathParts, which builds each node and edge record once per graph position with its exact JSON size. Enumeration sums a candidate from those parts and assembles only an accepted path, which shares the cached records. The path skeleton is measured from the same record constructor, so size and output cannot drift. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
331808dcd2 |
fix(website): resolve tagged and latest release download links (#9238)
* fix(website): resolve tagged and latest release download links * fix(website): reuse parsed release asset identity --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
752f5769e2 | fix(android): allow filtering references by the unnamed package (#14752) | ||
|
|
4edb2c08ee |
fix(artifacts): explain ASAR PE signed-after-packing mismatches (#14702)
* fix(artifacts): explain ASAR PE signed-after-packing mismatches When an unpacked PE companion fails ASAR integrity only because Authenticode was applied after packing, record a verifiable signing_explanation on the SHA-256 contradiction and error details instead of an opaque untrusted mismatch. Bytes stay observed-untrusted; any other mutation remains an unexplained contradiction. Fixes #7212 * fix(artifacts): address signed-after-packing Greptile review Catch ParseFailureError so unreadable PKCS#7 keeps the digest explanation, share WIN_CERTIFICATE structural walks, index signer lookups, charge optional reads to acquisition budgets with reported skips, preserve mismatch details through cleanup failures, and inherit the shared MCP test deadline. * fix(pe): walk WIN_CERTIFICATE entries lazily under max_entries Convert the certificate-table walker into a generator so inspection stops at the entry budget without materializing every range, and reconstruction can validate structure with constant memory. |
||
|
|
d5b4c4bb61 |
fix(verify): bound concurrent file reads in architecture and limit guards (#14720)
* 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`. |
||
|
|
192177f0c9 |
feat(artifacts): inventory and expand Android sparse images offline (#13244)
* 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> |
||
|
|
5257f40ffb |
feat(android)!: count class members in summaries and page them
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> |
||
|
|
32280113a7 |
feat(android)!: budget trace_android_references delivery
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> |
||
|
|
a16facbd9f |
feat(apktool)!: budget decode_android_resources delivery
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> |
||
|
|
0053ad589c |
fix(ghidra): pass inspected JDK to the Windows verifier (#10752)
* fix(ghidra): resolve bare java command against PATH on Windows
The Windows owned-process launcher requires absolute executable paths and
rejects bare names (ERR_REA_WINDOWS_NATIVE, Win32 87). When JAVA_HOME is
unset, ghidraJavaLaunch handed the bare "java.exe" to that launcher, so the
documented remediation ("a 64-bit full JDK 21 or newer on PATH") could never
work on Windows even with Java on PATH.
Resolve the bare command against PATH (Path/PATH, join + existsSync) before
spawning; if no candidate is found, keep the bare name so the existing
probe-failure diagnostics stay unchanged. POSIX behavior is unchanged.
Reproduction: Node 24 / Windows 11 x64, Ghidra 12.1.2, JDK 21 on PATH
(via javapath shim), no JAVA_HOME -> provider unavailable,
java_probe_failure ERR_REA_WINDOWS_NATIVE. Setting JAVA_HOME to an absolute
JDK root makes the provider available, confirming the launch path.
* fix(ghidra): resolve PATH java for inspection and harden the resolver
- resolve java.exe for installation inspection on win32: the provider-
availability decision comes from the inspection probe, which still sent
the bare name to the Windows owned-process launcher after the launch-path
fix (Greptile P1)
- unwrap quoted PATH entries so installer-written directories resolve
(XiaoBinGan Gap 1)
- throw GhidraAdmissionError java_command_unresolved with the searched
PATH instead of silently falling back to the bare name on the launch path
(XiaoBinGan Gap 2); an already-aborted caller keeps its cancellation
- extract the shared resolver into GhidraJavaPathResolution.ts
- add subprocess-free regression tests: inspection through a quoted Path
entry, bare-fallback parity when java.exe is absent, resolver unit cases,
and the launch rejection code
* test(ghidra): translate win32 fixture paths for POSIX hosts
The win32 platform option makes appendCallerPath join with backslashes
(win32.join), so the inspection tests' host readText/executable received
backslash-separated paths that only resolve on Windows. Translate the
separator back to the host's before touching the real filesystem; fixture
directories contain no literal backslashes and Windows accepts forward
slashes, so the translation is safe on both (greptile review finding).
* fix(ghidra): parse Windows PATH through the executable search owner
GhidraJavaPathResolution split PATH on every semicolon, so a quoted entry
such as "C:\Tools;Local\jdk\bin" became two candidates and the installation
inspection missed java.exe. The environment variable lookup was also
case-sensitive.
Reuse windowsPathCandidates, which preserves quoted entries, matches
environment names without case, and keeps relative entries out of the
absolute-only selection. The launch diagnostic now reads the same normalized
snapshot. Add a regression test for a quoted entry containing a semicolon.
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
---------
Co-authored-by: Z <Z@example.com>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
|
||
|
|
a00511e88e |
fix(mcp): paginate tools/list under the FastMCP SSE limit (#9142)
* 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> |
||
|
|
523d44f6d8 |
feat(browser): accept retained capture references in compare_web_captures
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> |
||
|
|
9ca9654500 | refactor(ci): share repository identifier validation (#14678) | ||
|
|
155715942e |
fix(limits)!: budget Rust dependency parser ceilings per call (#14666)
* 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> |
||
|
|
0eb19a395e |
fix(limits)!: let apktool and assetutil take producer_limits.output_bytes and type Android and process capture refusals (#14624)
* 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 |
||
|
|
4c9dca63a0 |
feat(native)!: give the Go and Rust readers max_structure_bytes and Rust max_wasm_sections (#14661)
* 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> |
||
|
|
6ae722a660 |
feat(limits)!: register producer.output_bytes as the session default for bounded producer output (#14648)
* 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 |
||
|
|
42ce0ea231 |
feat(browser)!: budget observe_web_execution delivery
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> |
||
|
|
0aca049128 |
feat(native)!: give the PE readers per-call text, entry and metadata budgets (#14659)
* 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 |
||
|
|
4d3fa5a080 |
feat(native)!: give inspect_native_exports per-call inventory, text and structure budgets (#14658)
* 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 |
||
|
|
1cc655bbc0 |
feat(native)!: give inspect_dwarf_units a per-call max_decompressed_bytes (#14660)
* feat(native)!: give inspect_dwarf_units a per-call max_decompressed_bytes inspect_dwarf_units refused at a fixed 256 MiB of decompressed DWARF sections for one image. It now accepts max_decompressed_bytes (default 256 MiB, at most 1 GiB) and reports details.limit; the sections decompress in turn, so the refusal reports no required_value. The ELF note text, hash and scan allowance is reclassified as derived: it equals the admitted image length plus its decoded section names. Part of #14235. BREAKING CHANGE: a DWARF decompression refusal reports details.limit for max_decompressed_bytes instead of a fixed_ceiling refusal. * fix(native): document DWARF decompression budget charges, update schema summary, and test raise-and-retry |
||
|
|
31297470ef |
feat(artifacts): back archive member counts with the artifact.member_count setting (#14650)
* 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. |
||
|
|
1badb6a8ae |
fix(native)!: report details.limit for remaining native reader budgets and make BEAM table rows adjustable (#14631)
* 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 |
||
|
|
43117a8ae0 | perf(ci): omit unused PR associations from timing queries (#14636) | ||
|
|
fb1b4c0fbb | perf(ci): resolve small pinned test batches directly (#14638) | ||
|
|
25c27df316 |
chore(deps): update lossless-json to 4.3.4 (#14634)
* chore(deps): update lossless-json to 4.3.4 * fix(capture): report locked JSON parser versions in evidence * fix(contracts): refresh capture examples from decoded evidence |
||
|
|
50d13f9f08 |
fix(native)!: report details.limit for native reader per-call budgets (#14622)
* 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. |
||
|
|
a5c71e8c88 |
fix(limits)!: let inspect_sqlite_database take producer_limits.input_bytes and type SQLite, Kuna and web-bundle refusals (#14627)
* fix(limits)!: let inspect_sqlite_database take producer_limits.input_bytes and type SQLite, Kuna and web-bundle refusals The SQLite snapshot refused a database and WAL above a fixed 256 MiB. The copy streams to private disk, so inspect_sqlite_database now accepts producer_limits.input_bytes (default 256 MiB) and reports details.limit for it. Refusals that carried recovery only in prose are typed: SQLite's result-column limit and the 16 MiB value/statement/reply allowance as fixed ceilings, occupied SQLite slots and live Kuna and web-bundle heap headroom as measured exhaustion, and the Kuna cache capacity as the REA_KUNA_CACHE_MAX_BYTES environment control. The SQLite worker diagnostic capture is reclassified as protocol. BREAKING CHANGE: the SQLite snapshot refusal reports details.limit for producer_limits.input_bytes, and the SQLite column and reply refusals carry a fixed_ceiling refusal in place of their authored remediation. * fix(sqlite): keep producer_limits in Evidence parameters and report the effective input bound |
||
|
|
9edc95c512 | refactor(elf): share note reader limit error projection (#14644) | ||
|
|
d9b449d39c | refactor(verify): share canonical output schema assertions (#14640) | ||
|
|
0f358c2c97 | refactor(ci): share completeness guard grouping transitions (#14637) | ||
|
|
98d83d0787 |
feat(trace)!: give Playwright trace import per-call trace_limits (#14628)
* feat(trace)!: give Playwright trace import per-call trace_limits inspect_playwright_trace refused large ordinary traces at a fixed archive allowance, a fixed record nesting allowance and four authored-only budgets (decoded streams, retained facts, metadata reads, line bytes). It now accepts trace_limits (CLI --trace-limits JSON) with today's values as defaults, and each refusal reports details.limit. The record parser node allowance is derived from facts_bytes and recovers through it; nesting_depth is capped where a retained record still fits the Evidence JSON depth. The capture JSON parser takes the trace's depth from the caller instead of a format special case. The source-location view's page refusal now reports view.max_bytes in details.limit. GraphQL AST nesting is registered as a representation bound, and GraphQL host-limit, web-bundle host-capacity and the trace decoder's occupied slot declare measured exhaustion. BREAKING CHANGE: PlaywrightTracePort.inspect takes the resolved limits, and trace archive and nesting refusals report details.limit instead of a fixed_ceiling refusal. * fix(trace): project trace records at the selected depth and record trace_limits The HAR projection of a trace record read the network capture's depth (64 by default), so a record admitted under a raised trace_limits.nesting_depth was dropped as malformed. Projection now runs under the selected trace depth. Evidence parameters record the caller's trace_limits selection as given, in complete and partial results. |
||
|
|
e540cbdafd |
feat(native)!: give the native structural decoding allowance a per-call max_structure_bytes (#14626)
* feat(native)!: give the native structural decoding allowance a per-call max_structure_bytes The 16 MiB structural budget on native header, section, load-command and ELF dynamic-directory table reads, and on decoded section names, was a fixed ceiling with no override. inspect_elf_unwind_ranges, inspect_kernel_module, inspect_elf_debug_link, inspect_dwarf_units, inspect_binary_hardening and inspect_native_initializers now accept max_structure_bytes (64 bytes to 512 MiB, default 16 MiB) and report details.limit when it stops them. binaryContainer owns the default, the limit name and the failure (nativeStructureFailure); the directory readers take a NativeDirectoryBudgets object in place of the positional decoded-name budget, and Mach-O, the ELF dynamic directory and the ELF pointer relocation pass take the same budget. Other allowances that shared the "structure" limit name now carry their own: the PE per-name decode, the retained DWARF section bound (derived from the admitted image), and the hardening table-entry count. The ELF dependency provider's structural projection was unreachable and is removed. Part of #14235. BREAKING CHANGE: refusals at the structural budget report reported_limits.boundary "max_structure_bytes" instead of "structure". * fix(native): apply max_structure_bytes to the ELF hardening dynamic table and scope its help inspect_binary_hardening read PT_DYNAMIC under its entry count only, so a sectionless ELF could exceed the selected max_structure_bytes; the dynamic table is now checked first. The shared help no longer names tables a reader does not bound, and the limits reference states hardening's Mach-O and PE coverage. The initializer CLI recovery test asserts a parsed successful report. * fix(native): refuse a partial ELF hardening dynamic table as malformed before its budget |
||
|
|
4f66985978 |
feat(metadata)!: give NTFS, Maven report and NuGet budgets typed per-call controls (#14629)
* feat(metadata)!: give NTFS, Maven report and NuGet budgets typed per-call controls inspect_ntfs_journal refused acquisitions above a fixed 64 MiB allowance; it now takes max_file_bytes (default 64 MiB) and re-admits a retained acquisition under the call's budget, so lowering it cannot reuse a larger cached read. inspect_maven_gradle_metadata refused at six fixed report allowances; they are now report_limits fields (CLI --report-limits JSON) with today's values as defaults. Maven max_file_bytes and NuGet max_file_bytes, max_entries and max_nuspec_bytes refusals now report details.limit from the same bounds objects the schemas use. The Ghidra installation-properties read allowance is registered as a protocol bound: it reads the provider's own short installation descriptor, not analysis input. BREAKING CHANGE: NTFS and Maven report refusals report details.limit instead of a fixed_ceiling refusal, and parseMavenGradleMetadata and the inspect_ntfs_journal input contract gain the new controls. * fix(metadata): keep omitted NTFS budgets omitted and type host and maximum recovery inspect_ntfs_journal recorded the default max_file_bytes as if the caller had chosen it; the field is now optional and resolved for execution only, so Evidence keeps omission. A host allocation failure while holding an admitted acquisition is reported as measured memory exhaustion instead of generic I/O. A Maven report refusal whose need exceeds the control's maximum no longer suggests raising it. A public CLI/MCP test covers report_limits refusal and recovery for a POM. |
||
|
|
49e2eca4f9 |
feat(flutter)!: give Flutter APK admission per-call apk_limits (#14623)
* feat(flutter)!: give Flutter APK admission per-call apk_limits identify_flutter_build and inspect_dart_aot refused a large but ordinary APK at seven fixed allowances (APK snapshot, ZIP metadata, library read, cumulative extraction, ABI count, library path and snapshot-hash candidates) with no recovery. They now accept apk_limits (CLI --apk-limits JSON) with today's values as defaults. Each refusal reports details.limit naming the apk_limits field, its effective value and range. The domain owns one bounds object that feeds both the schema and the reported limit. library_path_bytes is capped by the 16-bit ZIP name field, and the inspect_dart_aot ABI selector length now follows that maximum instead of the old 1 KiB default. BREAKING CHANGE: Flutter size, inventory and candidate refusals report details.limit instead of a fixed_ceiling refusal, and the inspect_dart_aot abi selector admits labels up to 65,521 characters. * fix(flutter): bound library_path_bytes by the decoded ZIP name size Inventory counts a library path's decoded UTF-8 bytes, and one stored byte decodes to at most three (a CP437 box-drawing character), so the maximum is three times the 16-bit stored name length rather than the stored length itself. The ABI selector keeps its character bound from the stored name. Recovery tests now assert the reported facts after raising a limit. |
||
|
|
3dae567185 |
feat(artifacts)!: give Deno, wxapkg and tar readers artifact_limits controls (#14620)
* feat(artifacts)!: give Deno, wxapkg and tar readers artifact_limits controls Deno compile, wxapkg and tar readers refused large ordinary inputs at fixed allowances with no recovery. Their admission budgets are now per-call artifact_limits.deno, .wxapkg and .tar fields with today's values as defaults, and each refusal reports details.reader_limit. artifact_limits.expanded_bytes now also applies to Deno and wxapkg. The shared artifact path registry names its owning group's path_parts and path_nodes controls instead of a fixed fallback. audit_release_exposure max_file_bytes keeps its 256 MiB default but is no longer capped there; its refusal reports details.limit. The Deno VFS recursion depth is registered as a representation bound and the wxapkg member-I/O allowance as derived from expanded_bytes. BREAKING CHANGE: artifactReaderLimitsSchema now requires deno, wxapkg and tar groups, so saved Evidence whose effective_limits predates them fails validation and must be re-inspected. A release-exposure refusal at max_file_bytes reports details.limit instead of a fixed_ceiling refusal. * fix(artifacts): keep Deno indexed paths representable and omit undercounted retained size artifact_limits.deno.path_parts now has a minimum of 2: indexed fallbacks live under a reserved top-level namespace directory, so a one-part selection could only refuse the whole inspection. The retained-bytes refusal no longer reports a required value, because the bounded byte count stops at the allowance and understates it. |
||
|
|
33e4e07dd0 |
fix(limits)!: report packet and signal producer budgets as details.limit and page discovery at its record budget (#14621)
* fix(limits)!: report packet and signal producer budgets as details.limit and page discovery at its record budget Owned packet and signal producers (inspect_packet_capture, inspect_packet_fields, decode_signal_recording, inspect_signal_decoders) refused an exhausted producer_limits.input_bytes, output_bytes or command_timeout_ms with the control named only in remediation prose. ArtifactAnalysisResources now takes the selected input budget as an AnalysisParameterLimit and the command's selected and default budgets, so each refusal carries details.limit. Packet-field and sigrok decoder discovery refused a page whose records exceeded a fixed representation budget. The budget now ends the page early with has_more and output_window.record_budget_reached, so the rest is retrieved from offset + returned instead of being refused. BREAKING CHANGE: discovery output_window gains record_budget_reached, a page can return fewer than limit records, and discovery no longer refuses at the record or line budget. * test(verify): expect record_budget_reached in real discovery pages |
||
|
|
2bb554e8b0 |
feat(cli)!: keep over-budget CLI results recoverable by default (#14610)
* feat(cli)!: keep over-budget CLI results recoverable by default An over-budget CLI result without --evidence_output now saves its complete Evidence to a private retained-Evidence cache under the user cache directory and returns the summary with the file's path, size and digest, so it pages with inspect-analysis-view without a rerun. Files are named by the complete record's Evidence ID, created exclusively as 0600 by the Evidence bundle writer in a 0700 directory the user owns, reused by repeat runs and never overwritten. Each retention removes records unused for 7 days, then the least recently used over delivery.cli_retained_evidence_bytes (REA_CLI_RETAINED_EVIDENCE_BYTES, default 256 MiB). --no-retain or a 0 setting writes nothing; a record that cannot be kept falls back to the rerun arguments with the reason. Fixes #14594 BREAKING CHANGE: An over-budget CLI result without --evidence_output is now saved to REA's private retained-Evidence cache and reported as {summary, evidence_bundle, delivery} with delivery.retained cache-file, instead of writing nothing. Pass --no-retain, or set REA_CLI_RETAINED_EVIDENCE_BYTES=0, to write nothing as before. * fix(cli): key retained Evidence by its content and keep its owner's facts Review fixes for default CLI retention: - Name files by the SHA-256 of the complete record's exact JSON, since the Evidence ID leaves out caller paths; report it as evidence_bundle.sha256. - Remove a bundle that outgrows the cache after the write. - Renew a record's age when inspect-analysis-view reads it. - Re-check a record's use time before evicting it. - Never use a cache whose path holds a value marked sensitive, and redact retention failure reasons. - Report a save that committed but then failed with its receipt and cleanup owner, as --evidence_output does. - Request source records whenever the cache may receive a bundle. - Refresh the advertised-schema summaries for the new setting. * fix(cli): withdraw the receipt of a bundle the cache discards A bundle that outgrew the cache was removed after the writer had already recorded its publication receipt, so output recovery could name a missing file. Retention now withdraws that receipt whenever it keeps nothing, unless the file committed and its failure is reported. * fix(cli): retain publication receipt when removing an oversized retained bundle fails |
||
|
|
fdbfd85c23 |
refactor(domain): add CoverageAccumulator and ratchet ad-hoc completeness ternaries (#14589)
* refactor(domain): add CoverageAccumulator and ratchet ad-hoc completeness ternaries * fix(verify): parse ad-hoc completeness ternaries via TypeScript AST * fix(verify): use zero-dependency source-tokens scanner in completeness ternary guard * fix(verify): handle generic conditional types and arrow return-type colons in completeness ternary guard * fix(verify): track generic angle depth separately from comma boundaries and ignore member .extends * fix(verify): preserve generic angle depth across nested infer extends constraints * fix(verify): handle multi-substitution templates and chained parenthesized assertions in completeness ternary guard * fix(verify): stop skipTypeAnnotation at ASI newlines in completeness ternary guard * fix(verify): preserve multiline prefix type operators and disable ASI inside bounded contexts * fix(verify): include logical operators in expression continuations for completeness ternary guard |
||
|
|
f7641050c7 |
feat(views)!: page byte-entropy blocks and runs; budget xrefs and nupkg delivery (#14599)
inspect_byte_entropy's retained summary now lists the first 64 runs in
offset order beside the ten longest, and inspect_analysis_view gains
view {kind: "byte-entropy", collection: "blocks" | "runs", offset, limit},
which pages the retained series by index with a coverage cursor. The
summary's run list is page zero of that view, so both read one selection.
xrefs and inspect_nuget_nupkg gain the delivery detail selector and join
the agent result budget, reusing their existing summary projections and,
for xrefs, native-observation pages.
BREAKING CHANGE: xrefs and inspect_nuget_nupkg with detail omitted now
return their retained summary when complete Evidence exceeds
delivery.agent_result_budget_bytes in a session that can page it. Pass
detail "complete" (CLI --detail complete) for complete inline delivery.
|
||
|
|
a156d20516 | refactor(verify): share Ghidra installation prerequisites (#14569) | ||
|
|
6cdab224f9 | refactor(verify): share native client receipt context (#14568) | ||
|
|
3d9ceeae6b | refactor(resources): share the retained close-owner adapter (#14562) | ||
|
|
0bbdbeaedf | refactor(cli): share compiled runtime checks with the session worker (#14557) | ||
|
|
825fd0a19a | refactor(verifiers): reuse streamed digests for artifacts on disk (#14555) |