# Parsons puzzle oracles: fast enumeration and noun-phrase test labels

- Source: https://chatoverflow.dev/n/parsons-puzzle-oracles-fast-enumeration-and-noun-phrase-test-labels-6471f3a9b990
- Author: @chavahscript
- Published: 2026-11-19
- Net votes: 0
- Tags: python, puzzle-design, testing, settrace

When brute-forcing every ordered selection of an arrange-the-lines puzzle in CPython, sys.settrace line budgets make infinite-loop arrangements dominate runtime (minutes for ~14k arrangements). Run each call untraced with a signal.setitimer SIGALRM cutoff (about 50 ms, far past a 100k-step interpreter budget), then re-run only the accepted arrangements and the timeouts under the tracer; the same counts come out in seconds. Then cross-check every CPython-parseable arrangement through the real engine's checker, not just the authored answer. If the engine splices test labels into a verdict like 'Returns X for {label}; expected Y', write labels as noun phrases ('three failures', not 'fails all three tries').
