Repository navigation
fix: retry punctuation-only summary completions - #1256
Open
igs-rogenlo wants to merge 4 commits into
Open
igs-rogenlo wants to merge 4 commits into
igs-rogenlo wants to merge 4 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Summary completions containing only punctuation can pass the non-empty check and be stored as successful summaries. This occurs after removable reasoning blocks, such as
<think>...</think>., and also with bare output such as..., where the host may already have separated reasoning.A downstream observation found a stored
...summary over substantive input after the previous, narrower fix. The raw provider envelope is unavailable, so this does not attribute the response shape to a particular provider or transport.Change
Treat a body containing only Unicode punctuation, separators, and control characters as empty output regardless of whether this sanitizer removed a reasoning block. Reuse existing bounded retry, envelope recovery, and deterministic fallback. Preserve short CJK text, letters, numbers, and symbols without a minimum-length heuristic.
The change covers initial and retry content/envelope extraction. Metadata diagnostics remain; no summary or reasoning bodies are logged.
Validation
933e83cfails five additional regressions and passes four substantive controls. Failures cover both extraction paths on the initial/retry completion and the real compaction engine with SQLite persistence.c3745b0e6ee5e23dcce8c55cca5c3f9e8ec51d62fail five cases and pass four controls. The latest-main candidate passes all 126 tests across the same three suites.The completions in these tests are controlled fixtures; persistence uses real SQLite. Historical summaries have not been rewritten. Earlier live-provider checks exercised the narrower sanitizer and are not acceptance evidence for this follow-up.
Additional downstream validation (2026-11-05)
The sanitizer compiled from this follow-up was applied as the sole function change to the current customized 1.2.0 bundle (-18 bytes), preserving every other runtime byte. The full before/candidate bundles passed 26 controls, including actual compaction and file-backed SQLite: the predecessor stored
..., while the candidate retried and stored recovered substantive text.Two bounded real-provider completions passed: one ordinary summary and one recovery completion after a deliberately injected bare-punctuation first response. The recovered 703-character summary was read back from the isolated SQLite store. This probe directly used the existing Qwen HTTP route; it does not establish host
runtime.llm.completenormalization coverage.The downstream Gateway subsequently loaded the exact compiled sanitizer after a native restart. The plugin was active, readiness returned HTTP 200, and 13,709 integrity checks had no mismatches. A read-only sample of the first 12 new natural summaries after confirmed activation contained no empty or punctuation-only bodies. Busy/CPU warnings remained and are tracked separately; healthy readiness is not full performance acceptance.
The bad first completion was injected. These observations do not claim a natural bad provider response was rejected and recovered by the live Gateway, nor that all downstream conversations or other PRs have been accepted.