Repository navigation
Behavioral Evidence
Structural checks say a candidate looks like the old function. Behavioral checks run it. They're independent of
every structural check, and high-criticality hooks require one (How It Works). Details: design §7.3 in
docs/design.md.
There are two kinds.
Run the same scenario on the old build with the original hooks and on the new build with the candidates, and compare the calls hook by hook.
-
Repair with
--trial-out: hooks in review whose only missing evidence is behavioral get trial bindings to their candidate.pbeta repair --old old.json --new new.json --hooks hooks.toml --new-binary new\app.exe --out hooks.new.toml --trial-out hooks.trial.toml --store store.json
-
Run the scenario on both builds with a tracing hook DLL, producing
old.jsonlandnew.jsonl. The corpus's hook DLL (corpus/hooks/hookdll) is the reference implementation. -
Repair again with the traces:
pbeta repair --old old.json --new new.json --hooks hooks.toml --new-binary new\app.exe --out hooks.new.toml --store store.json --old-trace old.jsonl --new-trace new.jsonl
pbeta trace-diff --old old.jsonl --new new.jsonl --hooks hooks.trial.toml shows the comparison on its own: a hook
that behaved differently, didn't fire, wasn't attached, or was applied while in review.
A trial manifest is for test runs only: repair refuses one as input and header won't emit one.
Record real calls on the old build, then replay each recorded case on the candidate in the new binary.
-
pbeta harness-spec --hooks hooks.toml --analysis old.json --out record-spec.jsonwrites what to capture per hook: argument slots and what pointers point to (struct layouts fromanalyze --pdb).--redact hook.paramkeeps a parameter out of the recording. -
Run the old build with the recording hook DLL (
PBETA_RECORDdirectory). -
Replay:
pbeta repair ... --new-binary new\app.exe --cases <recording dir> pbeta replay --cases <recording dir> --binary new\app.exe --old-rva 0x1600 --new-rva 0x2900 --old-analysis old.json --new-analysis new.json
Replay needs the emulator feature (Installation). Recorded structs are translated by field name between the
builds' layouts, and globals are placed by PDB name, so both builds' PDBs help a lot. replay --others replays the
cases on every other function as a control: only identical code should pass.
Limits are listed in FAQ.
Permanent Beta is Apache-2.0. Found something wrong on this page? Open an issue.
Getting started
Using it
Integrations
Project