Repository navigation
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.
After a sampled
</assistant>or〈|EOS|〉, Laguna XS.2 and M.1 bridges append the next role immediately, producing</assistant><user>where the checkpoint template requires</assistant>\n<user>.Append the missing separator as unsampled scaffolding after a clean stop. Preserve the sampled prefix and the existing truncated-turn closure. The existing bridge suite now covers both checkpoints, user/tool continuations, both stop tokens, and truncated completions.
Validation: 8 new seam cases failed before the fix; all 12 pass afterward. The complete bridge, Laguna M.1, and Laguna XS-2.1 suites pass: 175 passed, 36 existing skips. Ruff, formatting, and pre-commit passed.
Stacked on the tool-string fix solely to provide the prerequisite base for #188; this PR's own diff contains only the Laguna fix and its regression cases.
Note
Fix
LagunaXS2Renderer.bridge_to_next_turnto separate turns after clean stopsWhen the prior prompt and completion end with an assistant-end or EOS token,
bridge_to_next_turnin laguna_xs2.py now emits a newline at the start of the extension before the next message. The synthesized assistant-end and newline for turns without a stop token are unchanged. Adds a parametrized test in test_bridge.py covering assistant-end, EOS, and missing-stop cases followed by user or tool messages, checking that prior tokens are preserved and the extension starts with the expected separator.Macroscope summarized ec216ed.