/** * Runs the `rules` arm of test-log admission over your own shell results and reports what folding exact repeats * saves. No judge is called: the judge provider throws if it is ever asked. * * node kyrn/spikes/judge-bench/test-log-repeats.ts shell-results.jsonl * BASH_TOOL=1 node kyrn/spikes/judge-bench/test-log-repeats.ts ci-steps.jsonl * * Input: one JSON object per line, `{"command": "...", "output": "..."}`, the command as the agent ran it and its * output as the agent received it. With BASH_TOOL=1 the output is a command's whole output, such as a CI step's log, * and is first cut the way mu's bash tool cuts it (the last 2,000 lines or 50 KB, with its notice), since that is * the text admission sees. Only results mu would see as test logs count: 4,000 characters or more, a test runner in * the command and a run summary in the output (`isTestLog`), the same checks as the admission feature. A record may * carry `source` (reported apart) and `run`; with ONE_PER_RUN=1 only the first test log of each run counts, so a * failure repeated across a CI matrix counts once. * * Prints totals per runner and checks that every folded log comes back byte for byte: the line references in its * markers are expanded from the original, and any other omitted lines are taken from the archived original. * Prints no log text. Needs Node >= 23.6. Writes results/test-log-repeats-