39 Commits

Author SHA1 Message Date
morluto 9140deae63 docs: clarify ownership and cleanup review guidance
Clarify structural parsing, admitted facts and freshness, useful facade and compatibility responsibilities, immutable JSON proof, and partial Evidence retention. Document fixture cleanup ownership, semantic fault injection and the limits of static checks; extend the existing PR owner hint. Correct the session-record architecture label.

Validation: docs:check (including nine README consistency tests), rendered docs:build with link validation, touched Markdown formatting and git diff --check passed. Source and installed Vitest cleanup behavior were reviewed. No runtime behavior changed.
2026-10-25 06:51:31 +08:00
morluto efab65c2f9 docs: codify boundary regression checks
Turn recurring parser and projection failures into a selectable regression
guide covering format assumptions, raw identity, missing values, partial work,
independent limits, representation expansion, snapshots, and public delivery.
Link it from the agent instructions and PR template without adding checkboxes.

Clarify completed-observation ownership, digest representations, and exclusive
success/failure budget accounting. Preserve capacity fixtures and use byte
comparisons for large buffers to avoid diagnostic allocation blowups.
2026-10-25 06:49:10 +08:00
morluto 58fb824105 refactor(evidence): centralize JSON payload admission
Give ordinary Evidence creation an explicit unknown-payload input contract
while retaining the strong JSON contract for producer helpers and cooperative
immutable creation. Keep schema admission, input snapshotting and identity
hashing with the Evidence owner.

Remove 32 generic JSON preparses that only fed ordinary Evidence construction.
Preserve semantic format validation, selected-source bindings, standalone
JSON boundaries, typed executions and scenario digest contracts. Invalid JSON
now reports its Evidence parameters/normalized_result/raw_result prefix.

Validation: fresh runtime/catalog build, 560 focused and README tests passed,
4 platform-specific cases skipped, full static/docs checks, test discovery,
duplication and diff checks. New regressions cover omitted semantic optionals,
raw-result defaults and nested undefined refusal without input mutation.
Installed providers, real browsers/Frida/JADX and Linux-only recovery remain
unverified; boundary providers are authored fixtures.
2026-10-25 05:01:36 +08:00
morluto 9b3a633298 fix(evidence): retain caller paths across snapshot replay
Preserve the verbatim direct CLI selection in caller_input_path, separate from canonical subject identity and provider/query parameters. Fresh publication uses the existing immutable metadata import path so provider auto-recording cannot discard request provenance. Replay returns the current selection without rewriting stored Evidence or partitioning the cache by alias. Historical records without the optional field still authenticate.

Use the domain semantic projection for ledger agreement, remove the duplicate projection and subject-only replacement names, and preserve request metadata at same-invocation summary delivery. Later retained-view questions do not inherit that context. Existing one-shot parameters.input_path remains for compatibility.

Validation: 149 focused tests, 28 public CLI/MCP cases, all canonical advertised schemas through the pinned SDK, and nine documentation tests passed across the affected checks. Build, typecheck/lint, and formatting passed. Two Windows-only replay cases were skipped on macOS. Native macOS and managed fixtures were exercised; no Hopper/Ghidra/IDA runtime was started.
2026-10-25 02:20:13 +08:00
morluto 535926ca2b fix(analysis): retain one-shot target selection provenance
Retain the exact selected CLI path in one-shot provider Evidence while preserving canonical subject identity and provider inputs. The shared request-provenance boundary replaces the artifact-only special case across native, managed, and bundle-resource routes. Remove the redundant parameter fallback and make the private managed helper receive explicit Evidence parameters.

Validation: real macOS codesign fixtures through the compiled CLI retained app aliases for signature, plist, and absent asset inspections, with direct-target controls. Archive selection, managed direct analysis, and snapshot replay regressions passed; Windows-specific replay cases were skipped on macOS. Build, static, format, and docs checks passed. Snapshot-backed direct request provenance still follows its existing authenticated query contract.

Refs: #5479
2026-10-25 01:45:23 +08:00
morluto 1d896e03b7 fix(artifacts): retain original I/O failure evidence 2026-10-24 12:21:44 +08:00
morluto 1564fc8d9b fix(managed): retain completed facts through close cancellation 2026-10-24 11:27:27 +08:00
morluto 640a0cf423 fix(evidence): retain owner finalization reports across cleanup envelopes 2026-10-24 04:38:08 +08:00
morluto c2cc81927a fix(evidence): preserve primary semantics during pending cleanup 2026-10-24 04:38:08 +08:00
morluto 271fecf53a fix(evidence): preserve format-owned JSON recovery diagnostics 2026-10-24 03:11:07 +08:00
morluto 9becdfe8f4 fix(session): retain cleanup blockers and snapshot request identity 2026-10-24 03:11:07 +08:00
morluto 4d3a7a0589 fix(artifacts): preserve exact ZIP and DMG caller cancellation reasons 2026-10-24 03:11:07 +08:00
morluto e2eacf6f29 fix(artifacts): sync nested publication and retire admitted file state 2026-10-24 02:35:22 +08:00
morluto 3f49545320 fix(cli): preserve canonical input bounds and required choices 2026-10-24 02:29:44 +08:00
morluto a0c22ff012 fix(browser): preserve correspondence and uncertainty in capture comparisons 2026-10-24 01:47:31 +08:00
morluto 2443b949a4 docs: clarify evidence applicability and boundary limitations 2026-10-24 01:18:46 +08:00
morluto a281455f0b docs: clarify parser authority and compatibility evidence 2026-10-23 18:25:11 +08:00
morluto e6537df806 docs: clarify derived values and comparison controls 2026-10-23 17:45:15 +08:00
morluto 461541348e docs: clarify evidence ownership and verification guidance 2026-10-23 17:13:00 +08:00
morluto 0d596fa8f7 docs(limits): describe how to design admission recovery (#6368)
* fix(reconstruction): dedupe residual unknown ids with uniqueSorted

Merged obligation candidates called uniqueBy, which is not defined, so
the project did not typecheck. String ids already use uniqueSorted.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* docs(limits): describe how to design admission recovery

Add a short contributor guide for named defaults, settings, recovery
text, and the agent recovery ladder, and mirror that ladder into the
authored skill.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(hopper): pass distribution readers into install-host tests

systemLinuxHopperInstallHost now requires the caller's distribution
reader. The Linux install tests still passed only the environment, so
typecheck failed.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* docs(limits): name the parser doctor shares with startup

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test: align pcap, storage, and regex fixtures with current contracts

Source and portable CI failed on fixtures that still described the
previous pcap client identity, legacy storage fingerprints, and the
old regex deadline sentence.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* docs: link repository experiments outside the built site

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-10-23 05:10:36 +08:00
morluto 7016951394 fix(process): retain diagnostics through bounded output finalization
Separate verified process cleanup from output closure. Bound additional retention from owned stop entry through cleanup retry, drain before detaching capture, and mark unreadable or abandoned output incomplete. Release owned event-loop references on drain timeout without changing the proven cleanup disposition; preserve borrowed handle reference state.

Cover held and failed cleanup, late tail, bounded drain, stream errors, borrowed authority, and a real POSIX inherited-stderr release barrier. The real pipe control drops its final ten bytes on the baseline and retains them with this change. Focused consumer checks passed, including simulated Windows ownership; native Windows and real provider failure scope remain unverified.

Android still constructs its startup error snapshot before retirement; that consumer correction remains separate work.

Fixes #4840
2026-10-18 01:03:19 +08:00
morluto 150e996a86 refactor(providers)!: await owned readiness observations
Carry asynchronous readiness through provider selection, session status, CLI and MCP. Join observations during cancellation and shutdown, keep status readable during finalization, and retain mixed provider errors and exact cleanup dependencies through the shared inspection failure owner.

Validation: 255 focused tests across 18 files; 21 registry tests rerun with primary restoration assertion; check:fast; docs:check and 5 README conformance tests. Registered MCP and SDK schema checks use controlled providers; no real Ghidra/JVM verification.

This is a prerequisite for #4561. The synchronous Ghidra Java producer and its doctor/client ownership migration remain unfinished.

BREAKING CHANGE: binary_session candidate availability can be unknown during owner finalization. Consumers must handle this state; the internal session status API is now asynchronous.

Refs: #4561
2026-10-17 09:57:43 +08:00
morluto 4087048270 fix(process): retain owned command cancellation provenance
Preserve the owner-observed opaque caller reason through preparation, collection and cleanup failure wrapping without assigning cleanup authority or serializing the raw reason.

Validation: 68 focused process/deadline tests; check:fast; docs:check (5 conformance tests). Controlled local process fixtures only; no native provider verification.

Refs: #4638
2026-10-17 09:41:13 +08:00
morluto f26973a529 fix(providers): own profile selection through finalization
Join pending profile producers on cancellation and shutdown. Preserve failed results before later signals, retain every automatic-selection cleanup owner, and move profile file ownership into the registry.

Related: #4569
2026-10-17 04:21:21 +08:00
morluto 1b97b0f370 fix(lifecycle): preserve observations and cleanup ownership (#4274)
* fix(application): retain completed evidence through cancellation

Validate completed provider reports before classifying cancellation and preserve Evidence and captured diagnostics. Share MCP recording and delivery across custom observation handlers. Add source-owned completion and public SDK recording controls. Refs #3923, #3927, #4261.

* fix(wasm): retain final observations through cancellation

Keep completed Evidence after finalization and through CLI/MCP delivery. Preserve output and cleanup failure precedence. Refs #4254.

* fix(browser): retain final observations and forward cancellation

Classify final CDP detach and completed scenario cleanup at the provider boundary. Translate completed partials into canonical Evidence for MCP recording, and forward CLI cancellation to passive Electron tools. Refs #4255, #4256, #4257.

* fix(ghidra): isolate cancellation of shared startup waiters

Keep startup group-owned while each caller has an independent abortable wait. Await final-owner cleanup and preserve cleanup facts before retrying. Reuse the shared abortable promise helper. Refs #3983.

* fix(mcp): keep shutdown registrations until cleanup succeeds

Retain repeated event requests while unresolved owners need cleanup, and unregister only after success. Verify coalescing and failed-owner retry. Refs #4253.

* fix(adb): own transfer snapshots and stage screen publication

Bind transfer digests to the exact private input bytes and preserve caller APK names. Retain failed descriptors and private-root owners with typed cleanup evidence; publish captures exclusively after the cancellation cutoff. Refs #4251, #4252.

* fix(verification): report ADB cleanup failures

Always close after attempted verification and keep unexpected primary failures and cleanup details visible. Exercise the production script with controlled imports, including null and undefined throws. Refs #4260.

* fix(runner): stop owned Windows commands on cancellation

Use the retained ChildProcess handle for IPC cancellation and parent disconnection. Keep the SQLite lock until observed child close, and include native Windows regressions in the curated CI lane. Native Windows results remain pending. Refs #4258.

* fix(website): canonicalize link containment boundaries

Compare resolved targets with resolved repository and site roots. Accept directory aliases while preserving escape checks and keep fixtures within their temporary owner. Refs #4264.

* docs(testing): cover completion races and cleanup retry

Clarify validation-before-cancellation, independent startup waiter controls, producer and adapter coverage, and repeated shutdown events.

* fix(filesystem): retain file owners and completed reads after close failure

* fix(session): report retained snapshot staging in cleanup status

Fixes #4277. Include both snapshot and profile file-resource scopes in the owning status fact, preserving publication receipts and cleanup retry.

* docs(mcp): clarify recovery of raw partial observations

Document the observed SDK cancellation boundary and the open design decision in #4276 without promoting raw errors to Evidence.

* fix(kuna): own the complete installation inspection lifetime

* test(kuna): cover session cleanup of shared cache resources

* fix(hopper): isolate publisher operation resource admission

* fix(hopper): preserve launcher cleanup failure classification

* fix(adb): retain ordered cleanup and screen publication outcomes

* fix(runner): retain Windows job ownership through cleanup retries

* docs: clarify inspection admission and ordered cleanup regressions

* fix(ghidra): preserve startup cleanup and request deadlines

* fix(runner): supervise stdin errors and bootstrap native controls

* docs: require queued lifecycle controls to survive admission

* fix(cli): leave cleanup resolution with resource owners

* test(adb): verify owned install snapshots through CLI

* fix(errors): exclude resolved primary cleanup resources

* fix(adb): resolve publication cleanup after its handle closes

* fix(android): resolve JADX hash cleanup after owned close

* refactor(android): share hash failure cause options

* fix(kuna): gate commands on retained descriptor cleanup

* docs: cover cleanup admission and owner-confirmed recovery

* refactor(artifacts): bind cleanup errors to confirmed release

* fix(adb): resolve recovered cleanup at retained owners

* fix(kuna): resolve installation cleanup after owned close

* fix(kuna): gate cache reads on retained hash cleanup

* fix(setup): preserve publisher cleanup admission failures

* fix(android): resolve the reported retirement cleanup error

* test(runner): scope post-spawn fault control to POSIX

* test(adb): cover persistent snapshot owner retirement

* fix(kuna): preserve file outcomes with explicit cleanup ownership

* fix(artifacts): resolve errors through retained cleanup owners

* docs(lifecycle): carry cleanup ownership in typed outcomes

* fix(adb): bind staged screen errors to their cleanup lease

* fix(kuna): bind profile cleanup through a close capability

* fix(artifacts): retain descriptor resources in cleanup errors

* fix(pcap): bind existing errors to snapshot retirement

* fix(windows): load source owner through its file URL

* test(build): copy the command runner helper into fixtures

* fix(mcp): own shared observation providers in the transport

* fix(jadx): resolve every retained cleanup retry error

* fix(kuna): bind retry errors to every retained cleanup owner

* fix(adb): bind admission and shutdown errors to exact cleanup leases

* fix(windows): resolve command paths before native ownership

* test(publisher): assert exact descriptor recovery without release metadata

* docs(lifecycle): require every retry error to follow its owners

* fix(kuna): keep hash cleanup state stable across concurrent retries

* test(windows): exercise surviving descendants with scoped shutdown deadlines

* fix(uninstall): preserve primary read errors through cleanup failure

* test(publisher): assert cleanup Result and exact owner recovery

* test(windows): observe supervisor resources through IPC disconnect

* fix(browser): retain typed cancellation after interrupted actions

* test(publisher): assert ownership phases without retry-count coupling

* fix(lifecycle): preserve abort reasons through shared provider execution

* fix(jadx): preserve execution and late hash cancellation causes

* fix(adb): compose late cancellation with exact cleanup failures

* test(mcp): use the shared budget for session workflows
2026-10-16 11:48:59 +08:00
morluto 3ed925e547 fix(errors): exclude recovered cleanup resources
Compose only unresolved primary resources into a later cleanup failure, retaining both original causes and diagnostics. Document exact-owner recovery and cover resolved and unresolved composition controls. Refs #4266, #4274.
2026-10-16 09:06:13 +08:00
morluto ca7ee018b2 fix(providers): own shared startup and retained cleanup
Give concurrent Ghidra and Hopper callers independent waits over one owned startup. Join final-caller cleanup, preserve failed cleanup owners, and derive readiness from the current startup result and live transport. Distinguish provider closure from caller cancellation and clean up interrupted final lineage observation.

Reuse the Ghidra socket fixture, replace stale cancellation health assertions with cold and warm reuse controls, and cover public MCP peer cancellation. Validation: 315 affected tests, build, typecheck, lint, docs, and 25 relocated startup controls passed. Controlled child bridges only; real Ghidra JVM and Hopper GUI verification remains unperformed. Refs #3983, #4227, #4274.
2026-10-16 08:51:11 +08:00
morluto 0e1f0bf2d0 fix(lifecycle): preserve ownership, cancellation, and cleanup outcomes (#4238)
* fix(cleanup): preserve owner recovery instructions

Keep cleanup remediation through combined errors and direct or managed one-shot analysis while retaining primary diagnostics.

Refs: #4227

* fix(hopper): recover late startup and retained cleanup

Authenticate initial and cleanup handshakes through the same identity owner. Expose startup and cleanup activity, retain health after target retirement, and expire abandoned unauthenticated listeners without timing out authenticated work.

Refs: #4227

* fix(providers): retain composite lifecycle facts across retries

Preserve observed child health with incomplete peer coverage, retry only unresolved clients, and retain all child cleanup recovery actions.

Refs: #4233

* fix(process): honor cancellation through capture cleanup

Check the request signal after cleanup and before final publication, retaining completed observations under typed cancellation.

Refs: #4005

* fix(native): preserve failed LLDB launch ownership and exit proof

Publish failed-launch process identity and observed exit separately from object validity. Retire only the exact owned process and retain uncertainty when exit cannot be established.

Refs: #4232

* fix(native): honor cancellation after trace finalization

Check cancellation after runtime-root cleanup and retain collected trace observations as partial cancellation evidence.

Refs: #4009

* fix(cli): preserve analysis results when provider cleanup fails

Reuse the existing one-shot finalizer across thirteen command families to retain completed Evidence and primary diagnostics on close failure. Cover success, denied cleanup, and combined primary/cleanup failure through the public CLI.

Refs: #3935

* docs(lifecycle): define completion invariants and regression scenarios

Document distinct ownership/readiness/exit facts, late cancellation and atomic publication boundaries, partial child cleanup, and diagnostic retention. Link representative regressions and route contributor guidance through AGENTS.md.

Refs: #4227

* fix(session): retain run identity through pending cleanup

* fix(cli): preserve original cleanup resource diagnostics

* fix(native): retain completed facts through finalization failure

* fix(providers): report retained cleanup paths at their owners
2026-10-16 05:09:35 +08:00
morluto 10aa74dfed fix(mcp): preserve tuple constraints in advertised schemas
Declare fixed tuple tails and lengths at the canonical boundary so client array validation accepts every tool. Preserve nonempty candidate constraints in managed and application comparisons. Add catalog-wide client checks and parser/schema parity coverage for both dialects and projection directions.

Fixes #3576
2026-10-15 01:12:46 +08:00
Ysopwnable 8e004522f2 docs: define performance priorities for analysis workflows (#2245)
Set agent tokens and context first, analysis time second, and CPU and memory
third while preserving correctness, Evidence and existing contracts.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-10-13 00:42:06 +08:00
morluto 9c8511409c fix(analysis): preserve relationship coverage across evidence and replay
Separate observed relationship coverage from general provider caveats. Authenticate and replay coverage without changing legacy Evidence IDs; expose unknown and capped relationship sets through CLI/MCP graphs and traces.

Validated focused domain, snapshot, IDA/Ghidra boundary, MCP, schema, package and static checks. Provider fixtures establish contract behavior; licensed engine behavior was not reverified.
2026-10-12 05:57:35 +08:00
morluto 5d79387505 docs: prune repeated contributor and tool design instructions 2026-10-10 05:28:13 +08:00
morluto ba4422296d docs: consolidate agent guidance around ownership and boundaries 2026-10-10 05:22:35 +08:00
morluto a9e00b83f3 docs: clarify evidence ownership and verification guidance 2026-10-08 23:29:43 +08:00
morluto e07b81649e refactor!: simplify runtime tools and remove replay engines (#572)
* fix(hopper): report unavailable procedure body coverage

* refactor!: simplify runtime tools and remove replay engines

Keep direct inspection, capture, and comparison tools. Bind handlers to named contracts and let agents compose experiments with commands and local fixture servers.

BREAKING CHANGE: Remove controlled replay, Node characterization, finite replay-machine, managed runtime planning, and redundant string-tracing tools. Retire process replay, shims, reactive scenarios, custom checkpoints, and active browser replay and origin-scope inputs.
2026-10-05 21:15:04 +08:00
morluto b5e98915c6 fix(tools)!: simplify direct invocation and harden boundary contracts (#555)
Remove REA permission grants, scope ceilings, approval confirmations, and inert settings. Preserve selected local evidence, accept caller-chosen commands and paths, and report actual runtime failures.

Harden provider results, schema serialization, snapshot evidence binding, archive paths, source maps, native screenshots, managed EH parsing, and cancellation cleanup. Regenerate tool metadata and document direct invocation.

BREAKING CHANGE: Removed permission configuration and policy commands, approval fields, filesystem scope inputs, and fixed confirmation options. Process capture inherits the host environment and accepts command names; callers must refresh tool schemas and migrate removed fields.
2026-10-05 20:16:44 +08:00
morluto 9dd72c4911 docs: prioritize reusable analysis primitives (#493) 2026-10-02 06:33:38 +08:00
morluto 3b64c813cf docs(tools): clarify complete inline results 2026-09-29 17:00:29 +08:00
morluto 36aeec9586 docs: add REA tool design guidance (#485)
docs: clarify MCP tool design guidance
2026-09-29 16:28:13 +08:00