Record original JS behavior as replay cases
migrate_recordRecord observed Node.js behavior for generated edge cases and semantic traps as JSONL cases, enabling replay against a Java port to verify migration parity.
Instructions
Run the original JS unit under Node on generated edge cases and the five semantic traps (undefined/null, UTF-16 code units, number formatting, sort/iteration order, date parsing), recording observed behavior as JSONL cases (cases/.jsonl) that migrate_replay replays against the Java port. Inspiration: rust-anything (MIT).
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": "migrate_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | Optional path to the Node executable (default: JAVABYTES_NODE env or 'node') | |
| path | No | Path to the original .js/.mjs/.cjs unit to record (inside an allowed root) | |
| traps | No | Optional comma-separated subset of traps to include (default: all five): undefined_null, utf16_units, number_format, sort_order, date_parse | |
| output | No | Optional .jsonl file path for the cases (default: <dir>/cases/<unit>.jsonl; must end with .jsonl) | |
| functions | No | Optional comma-separated export names to record (default: all exports) | |
| timeout_seconds | No | Node run timeout in seconds (default 30) | |
| cases_per_function | No | Trap tuples per function beyond the no-arg case (default 6) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| success | Yes |