Repository navigation
Local-model review smoke test: prose found the bug, structured output lost it #1989
FenjuFu
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The model described the missing
/100correctly. The saved review report still containedcomments: [].I used OpenCodeReview with a local Spark-X2.6-1.7B GGUF to test a small Python change. A connection test passed, including its tool-call round trip. A real review was more revealing: explaining a defect, submitting a structured finding, and giving correct numerical evidence were three separate hurdles.
What actually ran
The fixture changes a percentage calculation from
price * (1 - percent / 100)toprice * (1 - percent). Python execution gives -1900 for(100, 20); the requirement is 80.ocr llm testdiscount.pyplus.gitignorestatus=complete, 0 comments, 4file_readcalls. Session prose correctly explained the missing division; nocode_commentcall was made.discount.pyselectedfile_readcalls, 0 submitted commentsstatus=complete, 1 comment, 1file_readand 1code_commentcall--max-tokens 1000--commit not-a-real-refThe single-file ordinary/reminder runs used the same fixture, model, server launch settings and review flags. Only the background text changed. Each configuration ran once; this is a diagnostic, not a reliability or speed comparison.
Reproduce the fixture and run
Tested on Windows 11, Core Ultra 5 125H, about 31.5 GiB RAM, CPU inference with 8 threads. OCR was 1.13.11, commit
0f5a28495aeb9d27388db74c240c56c5c5f5868f; its Windows binary matched the release checksum. The model wasSpark-X2.6-1.7B-Q4_K_M.ggufat revisionc4bc25be0e537d55266d90a08bdef931f4cf580a(Apache-2.0), SHA2567abd9859c10924be3c583945456fa9b25d0569484876105a7b7376f7938fffb7.llama.cpp server build 12336, commit
cfb9d4b75, served the cached model, whose hash was checked against the pinned HF revision. Launch settings were 32,768 context, one slot, temperature 0, seed 42, reasoning off, and Jinja tool rendering:Install OCR locally with
npm install --ignore-scripts --save-exact @alibaba-group/open-code-review@1.13.11; the tested Windows optional platform package provided the native binary. The following Python setup is shell-independent:For a process with no saved OCR provider configuration, these environment variables selected the loopback endpoint.
local-placeholderis a dummy value for the unauthenticated local server:The mixed-file initial run omitted
--excludeand set--max-tools 50. The later single-file pair used the default tool-round cap. For the budget boundary, select the same file and runocr review --repo review-fixture --exclude '.gitignore,__pycache__/**' --format json --max-tokens 1000 --timeout 1. OCR reported an estimated prompt of 2,297 tokens exceeding its 80% threshold; this run used zero model tokens.--max-tokenslimits input, not generated output.A submitted finding still needs checking
The explicit reminder got a real comment on
discount.py, lines 1–2, with this suggested replacement:But the same comment claimed the buggy code returned -40 for
(100, 50)and 80 for(100, 20). Both examples were wrong. Executing the original function and the exact suggested replacement produced:(100, 20)(100, 50)These are the checks to keep alongside a local-review smoke test:
Both fixed-function checks passed. That validates these two inputs, not the comment's numerical explanation or general model accuracy.
The practical takeaway for a local-model integration is to keep a known-defect smoke test that checks the persisted comment, its file/lines, and the proposed code by execution. Connection success and a completed run are useful operational signals, but this example shows why neither alone establishes a correct review. The output-contract reminder is an option to test on your own fixtures; one success here does not establish a robust remedy. All review runs here disabled the LLM post-filter, used one tiny seeded defect, and did not test other models, quantizations, large repositories, repeated seeds, or false-positive rates.
All reactions