fix: preserve truncated Laguna thinking as reasoning - #152
Draft
hallerite wants to merge 2 commits into
Draft
Conversation
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.
Change
Respect Laguna's configured prefilled thinking state when parsing sampled completion tokens.
Thinking-enabled generation prompts already end in
<think>. If generation truncates before</think>, the entire sampled completion remains reasoning, even without another opening marker.It must not become final content or executable tool calls.
Previously this missing case fell through to content parsing. In an offline audit of 156 completed
OpenSeeker episodes, 34 unclosed checkpoint outputs satisfied the harness's summary acceptance
predicate, despite being unfinished reasoning. Six ordinary work calls were also affected.
Two inspected continuations then produced handoff summaries instead of research answers.
Both Laguna parser entry points pass their typed
enable_thinkingconfiguration. The shared helperkeeps its existing default for direct callers. Closed-thinking and no-thinking content behavior
remain covered; generic plain-content fixtures explicitly select no-thinking for S-2.1.
No sampling, rendering, token IDs, logprobs, budgets, or training numerical settings change.
Stacked on #151 (usage forwarding). This is separate from nano-rlm's exact caller-request retention.
Validation
content masks, message indices, and tool argument type preservation; 8,112 unrelated cases deselected.
git diff --checkpassed.TrainClient conversion and SDK serialization boundary, preserving sampled IDs/logprobs.
Existing SWIG/torch deprecation warnings remain. Type checking has not been run (
tyabsentfrom the research environment).
Isolated worktree, unsigned commit. Existing frozen evaluations are unchanged. A fresh three-task
behavioral canary started at 12:06 UTC with only the renderer pin changed; outcomes are pending.
This is not a claim that summary quality or RL readiness is solved.