Skip to content

fix: preserve truncated Laguna thinking as reasoning - #152

Draft
hallerite wants to merge 2 commits into
mainfrom
fix/laguna-truncated-thinking
Draft

fix: preserve truncated Laguna thinking as reasoning#152
hallerite wants to merge 2 commits into
mainfrom
fix/laguna-truncated-thinking

Conversation

@hallerite

@hallerite hallerite commented Sep 5, 2026

Copy link
Copy Markdown
Member

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_thinking configuration. The shared helper
keeps 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

  • 37 focused XS-2.1/M.1 tests passed, including 16 new cases across all four Laguna renderers.
  • 523 Laguna cases passed across parsing, robustness, parity, roundtrip, sampled masks,
    content masks, message indices, and tool argument type preservation; 8,112 unrelated cases deselected.
  • 27 renderer client transport tests passed.
  • Native changed-file Ruff check/format and git diff --check passed.
  • Offline saved-token audit: all 40 affected outputs remain reasoning-only through the actual
    TrainClient conversion and SDK serialization boundary, preserving sampled IDs/logprobs.
  • Tokenizers were loaded from official assets; no model weights or tokenizer settings changed.
    Existing SWIG/torch deprecation warnings remain. Type checking has not been run (ty absent
    from 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.

Base automatically changed from fix/forward-generate-usage to main September 5, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant