python-vibe

ask, test, fix, add

GitHub

Research: can a 0.5B LoRA vibe-code and review a real repo?

Weights: YauhenBichel/python-vibe-0.5b (step-100 adapters, public). Code: this repo. Related issues: #8 (guard evasion), #9 (45 pairs vs style prior), discussion eval protocol.

The harness stays deterministic. This note is measurement and product shape, not a second LLM on the serve path.

What we trained

Held-out laptop vibe coding

scripts/run/vibe.py generates through the guard, writes scratch/last.py, /run executes it, --then sends the traceback back once.

Task Result
Weekday name for 2026-08-29 Called missing main(), or used month as a weekday index
Count .md files Missing main() / missing Path import / rglob(".md") instead of *.md
Same jsonl prompt as training Filtered the word "bad", not json.loads
Tiny greet() docstring apply Wrote """hi {name}""" — applied, but junk

Ollama qwen2.5-coder:0.5b (no LoRA) failed the same class of bugs. The adapter is a thin style prior, not a pair that finishes a new script in one shot.

Reviewing a real project (OpenSRE)

A large first-party Python repo (thousands of files) does not fit. The 0.5B window holds one small .py file (~200–2500 bytes).

A review of tools/system/fleet_monitoring/provider_ids.py returned no issues (that file is clean). Nothing was written.

A naive “smallest 100 files” scan hit empty __init__.py and config/.venv packages. list_small_py_files now skips .venv / site-packages and files under 200 bytes. That yields 100 first-party files in the 200–2500 byte band.

Batch: 100 files without reloading MLX

scripts/measure/batch_review.py loads the LoRA once, then walks --limit files (default 100):

  1. Review each file (no rewrite).
  2. If --fix and the review is not no issues, request a full-file rewrite and apply_source (or skip on a missing fence / tiny overwrite).
  3. Append one JSON line per file to scratch/batch-review.jsonl.

This is a loop, not a repo agent. A 100-file --fix on OpenSRE will invent edits. Run review first; read the report; then --fix only if you accept that.

PYTHONPATH=src python scripts/measure/batch_review.py \
  --project /path/to/your/app \
  --limit 100

What we shipped in code (this change set)

What we did not claim

Useful next measurements