mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 18:06:46 +00:00
* fix(ghidra): report a held checkpoint lease as retryable contention * fix(ghidra): let sessions share a checkpointed target Sessions restore a checkpoint into private projects without a lease. The socket lease is held only while one session publishes, and publication is a compare-and-set on the source that session started from, so a later save is refused instead of overwriting another session's edits. Addresses #14834. Stacked on #14844. * feat(ghidra): bound the checkpoint save wait with a launch control REA_GHIDRA_CHECKPOINT_SAVE_WAIT_MS replaces the fixed 30 s wait for another session's checkpoint publication. Default 30000 ms, floor 50 ms (one lease poll), maximum 600000 ms. The value is parsed when REA starts and fixed for a session when its checkpoint owner is constructed. It is a restart-only launch control in the numeric limit registry, not a runtime analysis setting, so the MCP tool catalog is unchanged. The busy refusal names the control, the applied value, its source and the range, and binds them as an environment limit. An invalid value is reported by doctor and registration validation and refuses only a checkpointed Ghidra session. * fix(ghidra): keep checkpoint save waits and refusals accurate - Poll again when a lease probe races the owner's release or another waiter's stale-socket recovery instead of failing the save with configuration_invalid. - Release the publication lease even when a staging or superseded file removal fails, so a retained cleanup does not block other saves. - Report an initial analysis overtaken by another session's edits as a superseded restore (reopen) rather than as refused edits. - Carry the save-wait details.limit onto a busy close_binary, through AnalysisClientCreation, and document the close-time shape. * fix(ghidra): report discarded checkpoint edits and end a forced close's save wait A session whose checkpoint save was refused because another session published first releases its edits on the next close_binary. That close now reports it: the result carries checkpoint {status: "discarded", reason: "superseded", directory}, alongside the snapshot receipt when snapshot_path was given. Only the close that releases the Program reports it, so a failed cleanup keeps the refusal and its retry reports instead. AnalysisClient.close returns an optional EngineCloseReport that the composite client, BinarySession close and closeWithSnapshot carry to the close_binary contract; an ordinary close keeps result null. A graceful close's final save did not observe a forced stop while it waited for another session's publication lease, so a cancelled request escalating the close could block for the whole save wait (up to ten minutes). The escalation now aborts that wait. The abort covers only the lease wait, the save's cancellation cutoff; once the lease is held the bounded publication completes, so a committed save is never reported as failed. The busy refusal's recovery and the installation guide now state that REA_GHIDRA_CHECKPOINT_SAVE_WAIT_MS cannot make an MCP client wait longer: that client's request deadline is separate and unknown to REA. The refusal keeps its environment details.limit. * fix(ghidra): tell a contention retry to reopen once the owner saved edits A session that waited for a checkpoint lease keeps the generation it selected, so after the owner saves Program edits and closes, repeating the call cannot succeed. Report that outcome as a typed superseded failure with reopen recovery instead of a checkpoint-directory configuration error, and say so in the busy recovery. * fix(ghidra): report both failures when checkpoint file removal and lease release fail retryCleanup rethrew a lease release failure before the saved removal failure became part of the error, so callers saw only the lease. A release failure alongside a removal failure is now reported with it: one ProviderCleanupError names both reasons, keeps the pending files and the retained lease as cleanup resources, and carries both causes. A lone release failure keeps its own error. * fix(ghidra): keep close facts and launch causes through composed failures Completed close facts were dropped wherever a later failure was composed. A released engine's discard report and a saved snapshot receipt are now carried by one owner, retainCloseOutcome, which every close composition calls on its outermost error with the outcomes it composed: the composite client when a sibling fails after a child released its edits, the session when file, candidate or bundle cleanup fails after the provider closed, the process-capture close wrapper, and the Ghidra client when cleanup fails after its JVM stopped. The report rides the failure as partial_observation.checkpoint and is not repeated by the retry. This replaces retainSavedAnalysisSnapshot and the close wrapper's snapshot extractor. Only close_binary reports edits released unsaved, so open_binary of another target, opening app resources, reset_investigation and external mutations now refuse with capability_unavailable while a client reports them through the new AnalysisClient.unsavedCloseReport, instead of releasing them silently. A launch failure was replaced by a superseded-restore error whenever another session had saved meanwhile. The launcher now records whether the failure happened while restoring the checkpoint, and only that failure is explained as superseded; any other keeps its cause, output and diagnostics. The busy recovery now says that a repeated call can report a superseded checkpoint when the other session's save changed it. * fix(ghidra): deliver the discard report through GhidraProvider and keep refusals typed GhidraProvider wraps its client in DeferredAnalysisClient, whose AnalysisClientCreation released the client through a cleanup lease and returned ok(null), so the real close_binary path dropped the discard report. The lease entry now keeps the releasing close's report and hands it to one release outcome; a failed release, a failed inspection cleanup and a retained creation failure carry it through retainCloseOutcome. The GhidraProvider client does the same when native AOT cleanup also fails. A boundary test drives close_binary through GhidraProvider. A forced close could still publish when its stop arrived while the lease was being acquired. Acquiring the lease is now the cancellation cutoff: publish checks the lease signal right after it and stops, and cleanup releases the lease. A refused save whose cleanup also failed was wrapped into a generic adapter error, so the client missed the refusal and kept the staged file for another impossible save. The checkpoint now keeps its typed refusal primary and unwrapped, carrying the cleanup failure on it; the client records the discard and reports the cleanup failure in diagnostics. * fix(ghidra): report released edits only for refused saves and keep startup cleanup failures A superseded initial analysis (stage restore) set the same refused-save flag as a refused edit, so its stopped JVM became a released-unsaved report: the session claimed discarded edits it never had, and open_binary refused the reopen its own error asked for. The refusal now states whether it refused edits (GhidraCheckpointSupersededError.refusesEdits, true only for a save), and the client records a discard only from that fact. Any refusal still discards its staged file. The cleanup failure a checkpoint refusal carries was read at close but not by the startup session failure factory. Ghidra lifecycle errors that carry a cleanup failure are now recognized by one guard, isGhidraCleanupCarrier, used by bindGhidraSessionFailure and the close error alike; the close diagnostic is renamed carried_cleanup_failure since it covers every carrier.
Documentation directory
Find an installation step, investigation guide, or contributor reference by task. The REA website has worked examples and product pages.
Getting started
- Installation and setup
- Supported targets and requirements
- Client configuration and troubleshooting
- CLI and Evidence
- Guided MCP prompts and completion
Desktop applications
- Desktop installation directories
- Desktop application capture
- Desktop application state
- Desktop application tasks
- Desktop application export
- Desktop build computer
- Desktop build witness
Agent environments
Native binaries
- Native binary investigation
- Go binary build metadata
- DWARF compile units
- Offline binary diagnostics
- ELF separate debug files
- ELF and Mach-O initializer functions
- ELF unwind function ranges
- Linux kernel build config
- Recorded crash evidence
- Windows Shell Link shortcuts
- Acquired NTFS metadata
- Binary hardening
- ELF note tables
- ELF dependency tables
- Linux kernel modules
- PE Authenticode certificate tables
- PE import and delay-load tables
- PE TLS callbacks and load configuration
- PE x64 exception-directory function ranges
- PE overlay
- Match native functions across builds
- Rust binary dependency metadata
- Static CUDA and HIP code objects
JavaScript and Electron
- JavaScript Application Graph
- Cross-layer JavaScript application workflows
- JavaScript artifact reconstruction
- JavaScript source recovery
- Passive Node and Electron runtime observation
- JavaScript static/runtime reconciliation
- Electron file-page observation
- V8 code cache inspection
- Electron fuse state
- Static JavaScript route inventory
- Bun standalone executables
- Deno compile executables
- Node.js single executable applications
Browser and captured websites
- Website observation with CDP
- Browser scenario contract
- Website runtime source attribution
- Historical web network captures
- HTTP/3 capture lab
- Captured website source locations
- Captured website module relationships
- Captured website scripts and static JavaScript analysis
- Offline Playwright traces
Android applications
- Static Android APK analysis
- Apktool resource decoding
- ADB device inspection and acquisition
- Flutter build identification
- Android boot and vendor_boot images
- APK signature schemes
Apple applications
.NET assemblies
- Managed-code analysis
- NuGet packages
- VS Code extension packages
- .NET single-file bundles
- IL2CPP metadata
Firmware
- Firmware analysis
- Android OTA update payloads
- Android Verified Boot vbmeta images
- Android sparse images
- UBI images
- Flattened devicetree inspection
- ESP flash images
- ESP images
- U-Boot FIT images
- Qualcomm MBN images
- Intel HEX and S-record images
- UF2 and DfuSe images
- U-Boot legacy uImage containers
- uClinux bFLT flat executables
HarmonyOS packages
Packages and metadata
- Offline API contract inventory
- CycloneDX dependencies
- Maven POM and Gradle module metadata
- OCI image layouts
- Release exposure
- Model file declarations
- Python packaged applications
- Debian package inspection
- CPython pyc inspection
- Erlang BEAM files
- Godot PCK archives
- UnityFS AssetBundle archives
- iNES containers
- Nintendo DS ROMs
- WeChat mini-program wxapkg archives
- macOS flat installer packages
- ISO 9660 disc images
- tar and gzip-compressed tar archives
- Nintendo Switch NSO and NRO executables
- GPU asset headers: DDS, GLB, KTX and KTX2
WebAssembly
EVM contracts
Databases and recorded packets
Process capture and instrumentation
Provider setup and formats
- Ghidra provider semantics
- DOS MZ and COM analysis with Ghidra
- Optional NativeAOT metadata recovery
- MIPS ELF analysis through Ghidra
- PSP static ELF analysis through Ghidra
- RISC-V ELF analysis through Ghidra
- Windows Ghidra P0
- Headerless raw-binary analysis with Ghidra
- IDA provider
- JEB instrumentation and analysis
- GameCube DOL analysis through Ghidra
- PowerPC ELF analysis through Ghidra
- Kuna provider
- Reverse-engineering tool integrations
Contracts and evidence
- MCP runtime contracts
- Target failures
- Directory identity
- Reconstruction obligation ledgers
- Reconstruction coverage
Development and verification
- Documentation ownership and authoring
- Settings and recovery
- REA limit inventory
- MCP tool design
- Testing REA
- Client and agent verification
- Reconstruction readiness conformance
- Releasing REA
- Testing lanes and provider verification
- Measure MCP catalog costs in Codex
- Static analysis in GitHub Actions
Release migrations
Signal recordings
Generated files and release records
| Path | Owner and update command |
|---|---|
public/product-catalog.json |
Ignored contract projection; npm run docs:generate |
verification/managed-conformance-*.json |
Ignored managed conformance projections; npm run evidence:generate |
error-contract.schema.json |
Tracked schema from contracts; npm run docs:error-schema |
user-visible-errors.csv |
Generated error code and category per domain and provider-owned error case; npm run docs:error-schema |
releases/<version>.contributions.json |
Durable release contribution record; follow the release guide |
Regenerate catalogs and Evidence projections from their canonical source.
Release records preserve the exact commit messages and references for each release.
Guides share authored images in assets/.