engine/

The engine combines analysis algorithms, consensus, verification oracles, and exporters. These components support both individual operations and end-to-end pipelines.

Pipelines

  • pipeline.AnalysisPipeline — classic consensus → search → DiffStore → optional verify.

  • app/pipeline/pipeline_runner.run_pipeline (lives in app/, not engine/) — worker-safe orchestrator over an ordered stage registry (consensus → search_reduce → brute_force → escalate → nsweep → emit_plugin; the last three are gated), emitting progress events onto an mp.Queue. See Adding a pipeline stage.

  • candidate_pipeline.reduce_search_space — composable variance-mask (floor default_floor_for_n(N) unless given; skipped below N = 3) → heap gate (heap_policy mask / user_data, when heap roles are passed) → class gate (only when classes are named) → aligned-mask (block density) → entropy-coverage-mask, then regions of at least min_region bytes, O(total_size) memory. The heap methods (scudo, windows_heap, go_heap) build no positional consensus and pair allocator blocks instead; only go_heap applies these gates afterwards, inside its kept slots. See Heap-aware reduction.

Consensus

  • consensus.ConsensusVector — per-byte variance across N dumps; incremental Welford API so dumps can stream.

  • consensus_msl — ASLR-aware path that aligns regions via core.region_align before variance.

Brute force & sweep

  • brute_force.run_brute_force — serial or spawn-safe ProcessPoolExecutor with per-worker oracle import.

  • nsweep.run_nsweep — user-facing N-sweep harness emitting JSON / Markdown / Plotly HTML.

Oracle & verification

  • oracle.load_oracle — dual-shape (verify(bytes) -> bool vs build_oracle(config) factory); refuses world-writable paths, logs sha256 on stderr.

  • verification.AesCbcVerifier — default verifier; VERIFIER_REGISTRY is the extension point.

Exports

  • vol3_emit.emit_plugin_for_hit — synthesizes a Volatility3 plugin from neighborhood variance + reference bytes via architect.pattern_generator.PatternGenerator.

Persistence

  • project_db.ProjectDB — DuckDB + Ibis append-only schema (projects, dumps, analysis_runs, findings).

  • session_store.SessionStore — gzipped .memdiver session snapshots with schema versioning.

Concurrency

Threads for I/O-bound; spawn-context ProcessPoolExecutor for CPU-bound oracle work. Cooperative cancellation via progress.check_cancel / progress.Cancelled in engine hot-loops, gated at stage boundaries by WorkerContext.is_cancelled().