Skip to content

fix: reduce wasted 0.0 children from bad transposes and bare harness calls - #880

Merged
devdanzin merged 1 commit into
mainfrom
fix/reduce-wasted-broken-children
Jul 1, 2026
Merged

devdanzin merged 1 commit into
mainfrom
fix/reduce-wasted-broken-children

Conversation

@devdanzin

Copy link
Copy Markdown
Owner

Summary

Follow-up to the 0.0-score investigation. Two independent causes of children that die before warming the JIT:

  1. BlockTransposerMutator created use-before-def. It moved a random 3-statement block to a random position with no regard for name dependencies, frequently placing a variable/class/function use before its definition → UnboundLocalError. It now only moves a block that is independent of the rest of the body (no bound/loaded name crosses the block boundary) — safe by construction.

  2. 2/3 seed families invoked the harness bare. Only the uop family wrapped the call; bug_pattern wrapped the harness body but called it bare, and synthesize had no wrapping — so ordinary breakage (use-before-def, TypeError, IndexError) escaped to module level and exited the process 1. bug_pattern/synthesize seeds now emit a wrapped call, and FuzzerSetupNormalizer wraps any bare top-level uop_harness_*() call so existing corpus lineages self-heal.

Impact (reproduction over the real jit_run9 corpus, 200 children / 8 parents)

outcome before after
clean 116 (58%) 186 (93%)
UnboundLocalError (non-sys) 28 0
TypeError 18 0
NameError 15 0
IndexError 3 0
timeout 15 14

Test plan

  • BlockTransposerMutator: _collect_names, skips cross-dependency transpose, keeps independent transpose, runtime no-UnboundLocalError.
  • FuzzerSetupNormalizer: wraps a bare uop_harness_*() call; leaves the uop for/try loop untouched.
  • jit_seeds: bug_pattern and synthesize invocations are wrapped in try/except.
  • Full suite 2169 passed; ruff clean; mypy lafleur/ adds no new errors.

Closes #879

🤖 Generated with Claude Code

…calls

Two independent causes of children that die before warming the JIT (0.0 score):

1. BlockTransposerMutator moved a random 3-statement block to a random
   position with no regard for name dependencies, frequently placing a
   variable/class/function use before its definition -> UnboundLocalError.
   It now only moves a block that is INDEPENDENT of the rest of the body
   (no bound/loaded name crosses the block boundary), which is safe by
   construction.

2. Only the uop seed family wrapped the harness invocation. The bug_pattern
   family wrapped the harness body but called it bare, and synthesize had no
   wrapping, so ordinary breakage (use-before-def, TypeError, IndexError)
   escaped to module level and exited the process 1. bug_pattern/synthesize
   seeds now emit a wrapped call, and FuzzerSetupNormalizer wraps any bare
   top-level uop_harness_*() call so existing corpus lineages self-heal.

On a reproduction over the real corpus these raised the clean-run rate from
58% to 93% (all escaping UnboundLocalError/TypeError/IndexError eliminated).

Closes #879

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devdanzin
devdanzin merged commit d8beab3 into main Jul 1, 2026
0 of 2 checks passed
@devdanzin
devdanzin deleted the fix/reduce-wasted-broken-children branch July 1, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce wasted 0.0 children: BlockTransposer creates use-before-def, and 2/3 seed families invoke the harness bare

1 participant