Trace and compare behaviour
port_traceRecords chosen node properties per physics tick in original and ported engines, then compares traces to identify first divergence, max/mean error, and whether integration or timing differs.
Instructions
action:"harness" returns (and with out writes) a small logger for the engine (ReversePortTrace.gd/.cs/.js/.h) that records the chosen properties of one node per physics tick to JSON with a fixed seed and tick rate. Run it in the original and in the port from the same start, then action:"compare" {a, b, tolerance} resamples both by time (different tick rates are fine), reports per property the first divergence, max and mean error and whether the error grows (integration differs: delta, damping, gravity, friction), differs from tick 0 (units, axes, spawn) or jumps at one moment (an event happened differently). port_verify already flags timing/randomness/order differences statically; this is the runtime proof.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "port_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | compare: trace JSON from the original. | |
| b | No | compare: trace JSON from the port. | |
| out | No | harness: write the logger to this file. | |
| node | No | harness: node path to watch (default the harness's target). | |
| ticks | No | harness: ticks to record (default 300). | |
| action | No | harness (default) or compare. | |
| engine | No | harness: godot, unity, threejs or unreal. | |
| axisMap | No | compare: reorder/negate b's vector components, e.g. ["0","2","-1"] maps b=[x,y,z] to [x,z,-y]. | |
| tolerance | No | compare: allowed error per sample (default 0.01). | |
| properties | No | harness: properties to log (default ["position"]; velocity, rotation, custom fields). |