Files
kdm-re/tools/wave

tools/wave — per-function grind tooling

Four CLIs over re/rvadb.json and re/<mod>/*_rvadb.json, built on a shared loader (rvadb.py). Every tool reads the database(s) fresh on each run; none of them write to a database or claim an RVA — claiming stays orig -> reimpl committed by a worker per docs/reconstruction-loop.md section 1 step 0.

  • sharder.py — dispatch-only leaf-first sharder. Restricts the call graph to status=orig functions, condenses mutual-recursion cycles through scc.py into one unit each, and emits disjoint shards ordered so a callee's shard position never follows its caller's, clustered by owning_module_guess where the dependency order leaves a choice. python3 tools/wave/sharder.py re/rvadb.json --shard-size 50
  • scc.py — Tarjan's algorithm over any {node: [callees]} JSON graph, used by sharder.py and usable standalone to prove a cycle groups as one unit. python3 tools/wave/scc.py graph.json
  • callspec_scaffold.py — for one (db, rva) pair, emits a compilable MinGW C++ reconstruction stub (pinned per docs/conventions.md) plus a Python CallSpec harness scaffold shaped like prove_box/prove_elev in tools/unicorn_diff/prove_t11.py. python3 tools/wave/callspec_scaffold.py re/rvadb.json 0x001ab640 --out-dir /tmp/scaffold
  • coverage_ledger.py — verified/function_count per program across every database present, plus the roster's missing programs as "pending export", with decile checkpoints for gamekdm (the primary target) and quartile checkpoints for companions. python3 tools/wave/coverage_ledger.py
  • constants.py — the section 3b compute ceilings (concurrent wine cap, per-function timeout, build-once-per-wave, cheap-first ordering) as typed constants, each citing the doc line it encodes.