Commit Graph
127 Commits
Author SHA1 Message Date
morluto 1564fc8d9b fix(managed): retain completed facts through close cancellation 2026-10-24 11:27:27 +08:00
morluto 96ad94f69e fix(managed): attribute malformed comparison inputs to their arguments
Pass the caller-selected input field to the shared managed parse-failure
owner. Derive filename and field from one comparison selection, reporting
leftPath or rightPath while ordinary inspection continues to report path.
Preserve typed input classification and completed-left partial Evidence.

Replace weaker direct malformed-input cases with a compiled CLI workflow
covering both sides, the healthy comparison, and sibling inspection.
Document the input-attribution contract.

Validation: the public regression reproduced the generic path issue;
focused CLI, comparison and shared-reader controls passed after repair.
No managed assembly or external analysis provider was executed.
2026-10-24 09:17:10 +08:00
morluto fc2dddc1d9 fix(managed): retain facts without inventing delta identities
Recognize baseline-dependent #JTD metadata at the shared layout owner before table sizing and decoding. Report unsupported partial metadata across all inspection workflows, preserve admitted PE/CLI and metadata header facts, and keep member identities and inventories unknown without the baseline.

A generated PE carrier reproduced complete coverage and a wrong standalone MethodDef token before the fix. Producer and actual CLI/MCP checks now cover all three inspections, normal metadata, retained comparison after source deletion, exact caller selection, source digests, unchanged bytes, and known header facts. Released .NET writer/reader sources establish framing applicability; natural PE occurrence and real CLR/Edit-and-Continue execution were not verified.
2026-10-24 07:31:55 +08:00
morluto bcd18d2898 fix(managed): select types from retained definition records 2026-10-24 05:36:41 +08:00
morluto 097b604039 merge: consolidate upstream projection cleanup 2026-10-24 05:34:43 +08:00
morluto f470350528 refactor(managed): retain TypeDef row ownership through projections 2026-10-24 05:32:59 +08:00
morluto 8d3ed58cb7 merge: consolidate upstream managed token facts 2026-10-24 05:25:09 +08:00
morluto 271ef32f0c refactor(managed): retain decoded metadata token facts 2026-10-24 05:21:04 +08:00
morluto 53601d0bdf merge: consolidate upstream identity and representation owners 2026-10-24 05:13:41 +08:00
morluto 250e209f32 refactor(managed): give MethodDef row facts one owner 2026-10-24 05:02:09 +08:00
morluto 6d4cc6e6a4 refactor(managed): share compressed integer format decoding 2026-10-24 04:49:21 +08:00
morluto 7356434202 merge: consolidate upstream ownership and coverage fixes 2026-10-24 04:43:33 +08:00
morluto bc1c5073df refactor(managed): carry parsed signature type coordinates 2026-10-24 04:36:00 +08:00
morluto ce3c27fe92 refactor(managed): unify coded-index identity and validation
Decode metadata coded indexes once into null, valid or invalid facts. Migrate
all existing consumers and remove parallel token and failure-reason decoders.
Keep required-null policy with each column, preserving tokens, reason text,
offsets, issue ordering and readable partial metadata.

Retain known table/row coordinates even when invalid; TypeRef regressions
preserve row-zero and out-of-range enclosing facts without granting validity.
Attribute naming consumes the same validated constructor coordinate.

Validation: metadata/member/native-boundary/signature source suites and public
CLI/MCP recovery workflows passed; static, docs and duplication checks passed.
2026-10-24 04:18:07 +08:00
morluto dac544be20 test(managed): assert large issue retention without full-array diffs 2026-10-24 03:00:10 +08:00
morluto 6cfb998af4 fix(managed): accept immutable parsed type selection facts 2026-10-24 02:40:22 +08:00
morluto 1f0eb228e5 fix(managed): derive selected scope from parsed declarations 2026-10-24 02:37:47 +08:00
morluto bc2d494030 fix(managed): retain declaration kind and runtime implementation facts 2026-10-24 02:36:50 +08:00
morluto 4345a45982 fix(managed): share source identity and input failure ownership 2026-10-24 02:35:22 +08:00
morluto db923eba44 fix(managed): preserve verification input and coverage semantics 2026-10-24 02:29:08 +08:00
morluto d1fea89e1e style: format integrated boundary fixes 2026-10-24 01:58:35 +08:00
morluto 693a3851ec test(managed): bound capacity fixtures with reserved budgets 2026-10-24 01:47:31 +08:00
morluto 357e354ac7 fix(managed): preserve member scope and nominal edge identity 2026-10-24 01:47:31 +08:00
morluto b3c912ab79 fix(filesystem): retain read cleanup capabilities across retries 2026-10-24 01:47:31 +08:00
morluto d0432d63c9 refactor(managed): share decoded type definition facts 2026-10-24 01:11:58 +08:00
morluto 87fa1b613d fix(managed): retain nested names and ReadyToRun observations
Resolve attribute display names from validated nesting and parsed member facts, admit composed names before allocation, and preserve unknown malformed chains. Keep ReadyToRun classification ahead of metadata hints while retaining each observed hint.

Fixes #6815
Fixes #6810
2026-10-24 00:11:41 +08:00
morluto ecd997e512 fix(managed): compare catch types by scoped nominal identity
Preserve boundary facts and uncertainty through their consumers. Add focused production-boundary regressions and update affected documentation.

Fixes #6760
2026-10-23 23:49:26 +08:00
morluto b33f68deb7 refactor(providers): separate identities from workflow profiles 2026-10-23 23:14:14 +08:00
morluto 4f0c33e8c4 fix(dotnet): correct metadata comparison regressions 2026-10-23 21:28:10 +08:00
morluto b305104e4a fix(dotnet): keep TypeRef catch identity unknown
Fixes #6712
2026-10-23 21:28:10 +08:00
morluto a8b8ff2acf fix(dotnet): preserve managed metadata comparison facts
Decode VARARG sentinels and allow omitted empty blob heaps while retaining failures for referenced missing data. Compare field and catch targets using owning parsed facts instead of build-local tokens.

Fixes #6720
Fixes #6686
Fixes #6713
Fixes #6712
2026-10-23 21:28:10 +08:00
morluto 5a5bcb6b54 test(managed): align source goldens with metadata validation
Fixes #6650
2026-10-23 19:10:32 +08:00
morluto 749ae11b15 fix(managed): share reference instruction semantics
Use the same parsed method/field operand predicate when producing member edges and comparing call and field shapes. Exclude ldtoken and operands without a value from both interpretations.
2026-10-23 19:07:46 +08:00
morluto 667402846c fix(managed): validate metadata operands and locals declarations
Classify MemberRef operands from parsed signatures, validate signature table references and LocalVarSig blobs, and compare observed locals declaration presence. Keep partial CIL facts and transient-budget ownership at the method reader.

Fixes #6578
Fixes #6572
Fixes #6558
Fixes #6513
2026-10-23 18:30:45 +08:00
371f3d91ae fix(managed): retain type discovery after member limits (#5312)
fix(managed): retain types after member limits

Admit type identity and a bounded recovery envelope before member decoding so callers can discover smaller selections after capacity exhaustion.

Fixes #5146

Co-authored-by: eco-null <eco-null@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-23 06:07:03 +08:00
morluto 9a426033ff refactor(core): import shared contracts from their owners 2026-10-23 01:57:31 +08:00
Muhammad Hamza 3b2d2863da fix(managed): refuse non-PE inputs as unsupported targets (#6287)
The managed static provider refused a readable non-PE executable with
AnalysisCapabilityUnavailableError, the same type as its unimplemented
operation guard. inspect-managed-artifact, inspect-managed-members and
inspect-managed-native-boundaries therefore reported capability_unavailable
/ unsupported_provider and omitted the selected path.

Return AnalysisUnsupportedTargetError with the operation, path and observed
format instead. Unimplemented operations keep the capability error.

Fixes #6076
2026-10-22 17:50:42 +08:00
Jay-Alexander Elliot 57fd3ea5d8 feat(cli): summarize managed members with durable Evidence paging (#5167)
Fixes #5148.

Add opt-in durable managed member summaries and authenticated paging while preserving complete default output, original Evidence, cleanup ownership and queued cancellation.

Verified with bounded real Newtonsoft/Redux/Rust tasks, independent oracles, 556 focused tests and the expanded domain gate; paired token estimates and latency tradeoffs are recorded in experiments/analysis-efficiency/managed-cli.md.
2026-10-22 00:43:30 +00:00
morluto 6b44e35bec refactor(managed): own successful PE inspection identity 2026-10-22 08:35:20 +08:00
Abdul Samad Siddiquiandmorluto ca2ca16146 fix(dotnet): reject unfinished CIL prefix chains (#4416)
* fix(dotnet): reject unfinished CIL prefix chains

* test(dotnet): cover unfinished prefixes in fat method bodies

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-22 06:13:10 +08:00
morluto 949966712e fix(files): preserve physical read failures across late cancellation
Tag physical read outcomes at the owning boundary and preserve opaque caller cancellation reasons through JSON pipelines and reference imports. Share named bounded-read options across consumers and retain failed cleanup ownership for retry.

Closes #5686
2026-10-21 06:14:03 +08:00
morlutoandCursor Agent ef59174c1e fix(errors): name fixed allowances in resource-constraint recovery (#5633)
* fix(errors): name fixed allowances in resource-constraint recovery

Fixed parser, count, report, input, and capture refusals inherited
host-memory, wait-and-retry, or retained-Evidence advice. Producers now
attach allowance-specific recovery, and deterministic capacity caps are
not retryable. IL2CPP reader occupancy stays retryable capacity.

Refs #5556, #5405, #5456, #5459, #5460, #5504, #5505, #5506, #5537, #5628, #5630, #5631, #5632

* fix(il2cpp): keep a closing metadata reader non-retryable

close() stops admission before the active inspection finishes. A second
inspect in that window was projected as retryable capacity. Closing and
closed readers now report capability_unavailable. Occupied readers that
remain open stay retryable.

* fix(errors): align fixed-cap recovery with retained facts

IL2CPP report refusals keep observed source facts instead of denying Evidence. Command-output caps use the capture allowance. Ghidra seed recovery names the limit that was exceeded.

* fix(errors): call byte caps a byte allowance

WASM representation limits and the IL2CPP Ghidra seed-file cap are byte budgets. Their recovery no longer says the exceeded allowance is a fixed count.

* test(ida): keep unresolved procedure lookups non-retryable

Main now treats an unchanged invalid request as non-retryable. The IDA lookup tests follow that projection.

* fix(errors): qualify capture recovery for live output

A fixed capture allowance still rejects the same output. Live captures such as adb logcat can change between requests, so recovery no longer says every unchanged request fails again.

* fix(adb): keep a truncated live capture retryable

Device output can shrink between calls, so an adb capture that exceeds the allowance stays retryable. Deterministic capture and version-output limits stay non-retryable.

* fix(adb): keep truncated mutations non-retryable

Only live observations opt into retrying a capture that exceeded the allowance. Push, install, uninstall, and other mutations stay non-retryable.

* fix(errors): keep live capture recovery off deterministic limits

Artifact-derived capture allowances again say the unchanged request fails. Only volatile adb observations use the live-output sentence.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-21 03:45:34 +08:00
morluto 483678bf9f fix(managed): retain operand-free instruction anchors 2026-10-20 18:37:56 +08:00
gensokyo-dev b4938aed58 feat(artifacts): triage desktop installation directories (#5207)
* feat(artifacts): triage desktop installation directories

* fix(artifacts): retain completed probes through failed file cleanup

* perf(artifacts): decode only assembly reference names for desktop triage

* fix(artifacts): enforce exact signatures and responsive directory probes

* fix(artifacts): recognize Unity bundles and bound FORM chunks

* fix(artifacts): retain bounded desktop omission evidence

* fix(artifacts): select ASAR targets before inventory probes

* chore: preserve tested upstream HTTP owner during integration

* fix(artifacts): reuse Mach-O signatures for FAT64 desktop probes

* fix(artifacts): expose bounded desktop probe diagnostics

* fix(artifacts): derive desktop snapshots from observed source identities

* fix(artifacts): admit desktop facts before JSON expansion
2026-10-20 04:01:36 +08:00
morlutoandPrabhuram Karki 435efe7afc fix(frida): share exact JSON string byte accounting
Count the serialized JSON representation at its owner, including escaped
lone UTF-16 surrogates. Frida now retains the correct bounded prefix and
reports truncation in script results and subsequent session Evidence.

Move the existing exact managed string counter into the domain layer and
use it for Frida, managed projections and Ghidra inline PDB caveats. Remove
the superseded counters while keeping Ghidra's bounded length guards and
NativeAOT's distinct raw-byte admission before string allocation.

Validated with 296 focused tests, check, docs and exact test discovery.
The Unicode oracle checks every UTF-16 code unit and adjacent fragments
against native JSON encoding. Frida execution uses simulated native handles
through the real MCP handlers/client; real target instrumentation is unverified.

Fixes #5097

Co-authored-by: Prabhuram Karki <prabhuramkarki07@gmail.com>
2026-10-19 17:50:50 +08:00
keeponlight e26bb49a4b fix(managed): avoid duplicate decode budget charging on cached metadata strings
Charge each immutable metadata heap string decode once; keep unique-string and per-occurrence projection accounting bounded.

Validation: focused capacity regressions, fresh real .NET DLL CLI/MCP workflows and complete exact-head CI passed. Before/after measurements and their limits are recorded in the PR.

Fixes #3449.
2026-10-17 07:10:58 +00:00
duckhunt113andMark 2d95b85aa4 fix(managed): report stream-name errors at file offsets (#4418)
Co-authored-by: Mark <m-user@Marks-MacBook-Air.local>
2026-10-16 23:56:08 +08:00
Ysopwnableandhhang fe2a398dd9 fix(managed): retain descriptor ownership through hash cancellation
Fixes #4381. Follow-up to the Linux lifecycle audit in #4227.

Keep managed source hashing on bounded reads through its existing FileHandle owner. Preserve exact opaque cancellation reasons before filesystem or cleanup interpretation, retain genuine failed closes, block unsafe admission, and recover the same provider after verified cleanup.

Validated with 484 related tests, source/docs checks, seven real Linux provider cancellation/recovery scenarios using an unchanged official Microsoft .NET assembly, and paired actual CLI/stdio MCP Evidence workflows. Normal completed-task timing, CPU, memory and token proxies remained comparable.

Adopts xu91102/rea commit ebeec580c839f2f72144282a44f4e11ea5759843 with independent Linux verification and cancellation-reason hardening.

Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-10-16 18:49:10 +08:00
Kaoru0822andClaude Opus 5.5 bddeae5108 fix(managed): charge admitted member facts once in the final projection (#3487)
* fix(managed): charge admitted member facts once in the final projection

inspect_managed_members admits method bodies, signatures, call edges,
field accesses and user strings as they are produced, then admits the
whole result again before returning it. The final pass re-counted every
already-admitted record, so the 64 MiB representation budget was spent
at roughly twice the result's JSON size. Ordinary assemblies such as
MathNet.Numerics, MongoDB.Driver, Npgsql, ClosedXML, System.Reactive and
Azure.Storage.Blobs returned resource-limit with no members.

The budget now remembers each admitted projection. A containing
projection spends that charge once instead of counting the subtree
again; a value that serializes more than once still pays for every
further occurrence. Results that already fit are byte-identical.

Refs #3449

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(managed): check a repeated occurrence pays with fresh credit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:19:33 -07:00
Kaoru0822andClaude Opus 5.5 1851f1fcfd fix(managed): report ILONLY-clear assemblies as mixed in boundary summaries (#3516)
inspect_managed_native_boundaries derived summary.mixed_mode_or_native_header
only from the managed native header and the native entry-point flag. A C++/CLI
assembly with ILONLY clear and no ReadyToRun signature was classified as
mixed-clr-native by inspect_managed_artifact but summarized as not mixed.

Give the rule one owner, managedCliIsMixedClrNative in ManagedPeReader, and
use it for both the artifact runtime family and the boundary summary. The
summary now reads the CLI header directly instead of the cli_native projection.

Fixes #3366

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:11:12 -07:00