Repository navigation
fix(release): weld plugin-review v2026.265.0505 — the measured-best sampling defaults - #626
Conversation
… engine Bump the WELDED plugin-review pin from v2026.263.1956 -> v2026.264.1425 so the next charly release's plugin bundle carries the rewritten review engine (merged #16): - ONE path: assemble the COMPLETE PR context (body, EVERY changed file's full diff, commits, EVERY comment) into ONE message and make ONE model call — no tool loop. The loop fragmented the context and reasoning is not re-sent between turns, so the synthesis turn re-derived everything (measured: 371 KB of reasoning over three runaway turns, 8m25s, no verdict at cap on a 25-file PR). The ONE-message design produced a verdict from ONE call (measured live: 1m24s action-review#7, 2m55s spec#140, 3m6s this 43-file PR). - The prompt is EMBEDDED (prompt.md); every model-behaviour knob is an AI_REVIEW_* env var. - Removed: the plan executor, fixture mode, the verb:pr duplicate (plugin-gh's verb:gh is canonical), schema/params, and the retry experiments. - Fail-closed verdict contract: Run exits 0 ONLY for a single verdict. The org validator runs `charly review` from the pinned charly release, so merging #16 alone changed nothing in the running gate — this weld is what makes it reach it. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
The diff's comments said the embedding release is 'not yet welded' while the body said the pinned release already runs the ONE-call engine. Reconciled: the currently-pinned engine reads REVIEW_PROMPT_PATH and the plain 'charly review --out' form is accepted by BOTH it and the new engine, so the invocation is weld-independent; REVIEW_PROMPT_PATH is the one transitional env, removed when opencharly/charly#626 (plugin-review v2026.264.1425) is welded. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
validator INCONCLUSIVE — no review verdict was produced (not a BLOCK; no code finding)The gate could not obtain a review verdict on this run, so it produced no code finding. This is not a BLOCK and the PR is not being rejected — but the required check stays RED on purpose: unreviewed code must never merge.
Root cause. The ENGINE sent no generation bound ( Durable remedy.
A run that produced no verdict keeps this required check RED: unreviewed code must never merge. Diagnostics (tail of the review log) |
validator INCONCLUSIVE — no review verdict was produced (not a BLOCK; no code finding)The gate could not obtain a review verdict on this run, so it produced no code finding. This is not a BLOCK and the PR is not being rejected — but the required check stays RED on purpose: unreviewed code must never merge.
Root cause. The ENGINE sent no generation bound ( Durable remedy.
A run that produced no verdict keeps this required check RED: unreviewed code must never merge. Diagnostics (tail of the review log) |
…ampling defaults Bump the welded plugin-review pin v2026.264.1425 -> v2026.265.0505, which carries opencharly/plugin-review#18: the single measured-best model-behaviour default set (temperature 1.0, top_p 0.95, frequency_penalty 0.5, presence_penalty 1.0) shipped identically across config.go, charly.yml and the org environment. Previously the engine sampled at temperature=0.2 (near-greedy) and collapsed into degenerate repetition (one token repeated 2,533-38,472x, no verdict). The four-value set measured 0 collapses in 26 runs vs 1 in 17 at the sampling alone.
[step: review]Review — PASSHead SHA: Change class: release pin — one line in Security screen: PASS — no secrets, no egress, no obfuscation, no guardrail weakening. The pin moves within the same repo ( Checklist: All applicable rules PASS or NA.
Comments considered: #5762657896 and #5762809531 ( Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
… N BLOCKs (#104) * feat(validator): invoke the review engine directly + auto-close after N BLOCKs Two coupled changes to the org-wide pr-validator workflow. 1. DIRECT INVOCATION. Replace `charly review --plan "$REVIEW_PLAN_PATH"` with `charly review`. The engine that is welded into the pinned charly release assembles the complete PR context and makes ONE model call — the plan executor (and its `review-plan.yml` that wrapped a single review step) is gone. The old engine also accepts the plain form, so this is safe to land BEFORE the weld. REVIEW_PROMPT_PATH is still exported for a future engine that reads one; the current engine's rulebook is embedded in the plugin (no file read). 2. AUTO-CLOSE after N BLOCKs (AI_REVIEW_AUTO_CLOSE_AFTER, default 5; 0 disables). A PR that keeps collecting BLOCK verdicts — because the author re-pushes without fixing the raised findings — grows its own comment thread, which is exactly what drives the reviewer's context into a runaway. The step counts the PR's own "## Review — BLOCK" verdict comments (no external state), and at the threshold posts a notice telling the author to open a NEW PR with every finding already fixed, then closes the PR. It runs BEFORE the BLOCK gate so the close + notice land before the check fails. R10 coverage (the gate's own harness, .github/tests/validator-gate-harness.py): both branches are asserted by new scenarios — at-threshold (closes + posts the notice) and below-threshold (does not). The harness runs the REAL `run:` bodies against fakes for charly/gh; 238 assertions across 15 scenarios, ALL PASS. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(validator): page-correct BLOCK count, truthful comments, plain-form proof Round 2 — addresses all three findings from the validator BLOCK on the first head. 1. R10/B18 — the auto-close count was WRONG for multi-page threads, and the harness could not catch it. `gh api --paginate ... --jq '[.[]|…]|length'` applies the filter PER PAGE (that is what `--slurp` is for), so a thread with >30 comments yielded several numbers joined by newlines; the numeric guard rejected it and SILENTLY DISABLED auto-close on exactly the long threads the feature exists to bound. Verified live: a per_page=10 request printed `10\n10\n10…`. Fix: `gh api --paginate | jq -s '[.[][] | …] | length'` collects the pages into ONE array first (verified: 53 with and without forced pagination). The harness's fake gh now emits REAL JSON pages and a new `auto-close-multi-page` scenario (5 BLOCKs among 60 others at page size 30) asserts the PR is still closed — it FAILS against the old per-page form. 2. R5/B5 — the new header comment was false and contradicted the body: it claimed "the prompt is EMBEDDED in the plugin, so this workflow passes no plan/prompt path", while the diff still passes REVIEW_PROMPT_PATH. The CURRENTLY-pinned engine DOES read that env (verified: `strings` on the v2026.263.2131 plugin finds REVIEW_PROMPT_PATH, and a live run used it). Corrected both comments to say the pinned engine reads the file, the next (embedded-rulebook) engine ignores it, and the env is removed in the pin-bump that welds it. 3. A2/A3/R10 — the load-bearing "the old engine also accepts the plain form" claim is now PROVEN, not asserted. Ran the PINNED release plugin (v2026.263.2131) with the plain `charly review pr 7 --repo …` form (no --plan): it completed and produced `Verdict: BLOCK` (pasted in the body). Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(validator): state the pinned engine's state once, consistently The diff's comments said the embedding release is 'not yet welded' while the body said the pinned release already runs the ONE-call engine. Reconciled: the currently-pinned engine reads REVIEW_PROMPT_PATH and the plain 'charly review --out' form is accepted by BOTH it and the new engine, so the invocation is weld-independent; REVIEW_PROMPT_PATH is the one transitional env, removed when opencharly/charly#626 (plugin-review v2026.264.1425) is welded. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(validator): forward the FULL review-knob surface (incl. sampling) Audit found the workflow forwarded only 13 of the env knobs the review engines read. Both the currently-pinned engine (plugin-review v2026.263.1956) and the new ONE-call engine (v2026.264.1425) read MORE, and the union must be forwarded or an operator cannot configure them from an org variable: new engine missing: AI_REVIEW_CONTEXT_MARGIN, _CONTEXT_TOKENS, _FREQUENCY_PENALTY, _PRESENCE_PENALTY, _PROMPT_EXTRA, _POST_COMMENT, _STOP, _TEMPERATURE, _TOP_P pinned engine missing: AI_REVIEW_CONTEXT_MARGIN, _CONTEXT_TOKENS, _SESSION_ID, _TEMPERATURE CRITICAL: AI_REVIEW_TEMPERATURE and AI_REVIEW_TOP_P were NOT forwarded, so the sampling values could not be set (or tuned) from an org variable at all. They are now forwarded, and the engine's vendor-recommended defaults (temp=1.0, top_p=0.95) plus the repetition-guard penalties are all org-tunable. AI_REVIEW_OUT is deliberately NOT forwarded (the step passes --out explicitly). Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs(validator): name the shipping engine, not the weld target; reconcile the comment count - The review step name said 'one model call', which describes the welded embedded-prompt engine, not the engine actually shipping in the org pin. Name the shipping behaviour (assemble context, verdict). - The header said 'ONE PR comment'; a policy auto-close step posts a second, distinct notice. Say 'ONE review comment' and note the separate notice. - The weld PR (charly#626) is merged; reword the REVIEW_PROMPT_PATH note to the pin state rather than the prospective weld. * fix(validator): render the ACTUAL BLOCK count in the auto-close notice; cover it The headline bound $THRESHOLD while the body said $blocks, so a PR with 8 BLOCKs read '## Auto-closed: 5 unanswered BLOCK verdicts' next to 'received **8**' — a false statement emitted by the gate. Bind the headline to $blocks and add the auto-close-over-threshold-count scenario (block_count=8), which FAILS on the old args and passes on the fix. 259 assertions / 17 scenarios. Also correct the ACTIVE-knob inventory to the real org pin (v2026.263.2131 welds [email protected]) and mark the sampling/penalty knobs inert until the pin moves. * docs(validator): correct the ACTIVE/INERT knob inventory against measured strings The header marked AI_REVIEW_TEMPERATURE INERT, but `strings` on the pinned bundle (v2026.263.2131 -> [email protected]) finds it — it is ACTIVE. Also drop the false pointer 'the evidence is in this PR's body' (the body must carry that strings output, and now does). --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
Bump the welded
plugin-reviewpin fromv2026.263.1956→v2026.265.0505so the next charly release's plugin bundle carries the fixed review-engine defaults (mergedopencharly/plugin-review#18).The branch also passed through
v2026.264.1425(the ONE-call engine rewrite); that intermediate value is wholly superseded and is not in the net diff. The net change frommainis one line:v2026.263.1956→v2026.265.0505.The fix (#18): the engine sampled at
temperature=0.2, a near-greedy choice that collapsed into degenerate repetition — once a high-probability token (Hmm.) won the argmax it self-reinforced and the model emitted it thousands of times (measured2,533–38,472×) with no verdict. #18 ships the single measured-best default set fordeepseek-v4.1-flash, identical acrossconfig.go,charly.yml var:and the org environment:temperature1.0top_p0.95frequency_penalty0.5presence_penalty1.0The four-value set is the configuration that measured 0 collapses in 26 runs (versus 1 in 17 at the official sampling alone). The same PR adds
TestOfficialSamplingDefaults,TestModelDefaultsMatchCharlyYML(lockscharly.ymlto the Go constants) andTestSamplingTrace(the debug trace now prints the resolved sampling).Why this PR is the unlock. The org PR validator runs
charly reviewfrom the pinned charly release (charly-linux-amd64+charly-plugins-linux-amd64.tar.gz), not fromplugin-review@main. Merging #18 alone changed nothing in the running gate — this one-line weld is what makes the fixed defaults reach it. Precedent:#622/#624were the same one-line weld for the previous engine fixes.How tested
Both tags exist on
mainand carry the intended content.v2026.265.0505is the squash-merge of #18;v2026.264.1425is its ancestor (superseded, not in the net diff):Local gate — the repo's Go gate includes
packaging_test.go, which asserts the packaging variant plugin sets cover exactly the entries inscripts/host-command-plugins.txt:The net diff from
main(the pinned change):Rulebook compliance
/charly-internals:git-workflowloaded.temperature=0.2; this weld carries that fix.scripts/host-command-plugins.txt.fix/branch; no force-push; no direct push tomain.N/A — a one-line pin file change; the artifact is the release bundle built from this pin, and the plugin's own ADE plan/tests cover the engine (proven in #18).Change classification
scripts/host-command-plugins.txt) — one line.TestPackaging|TestRelease).analysed on a live system— both tags' existence and content were read from the plugin-review repo; the full release build is the post-merge step.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)