Repository navigation
Conversation
The sentence-level Jaccard guard split fenced code on `.` `:` and blank lines and tripped on the first near-duplicate "sentence". Docstrings make that a false positive by construction: `_left_child`/`_right_child` twins share almost every bigram. Streaming the decode-floor MinHeap prompt against nvidia/Qwen3.8-27B-NVFP4 stopped at 660 tokens on three heads with `paraphrased sentence repeat`, while the identical unstreamed request ran to the 1500-token budget with no repetition; the 717-718 "natural stop" the gate's vacuity pin was calibrated on was the same cut. The streaming consumer now tracks ``` fences: inside a block no sentence boundary or 1 KB force-flush is evaluated, the block is hashed once at its closing fence (the design the F22 note describes), and the pending buffer is bounded at 16 KB. Prose outside fences is unchanged, and the token-level period watchdog stays active everywhere. Tests cover docstring twins inside an open fence, a prose loop after the fence, two identical blocks, a marker split across chunks, and the cap. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
Merged into |
3 of 5 tasks
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.
Summary
The streaming sentence-level Jaccard loop guard split fenced code on
.:and blank lines and tripped on the first near-duplicate "sentence". Docstrings make that a false positive by construction —_left_child/_right_childtwins share almost every bigram.Measured (
nvidia/Qwen3.8-27B-NVFP4, GB10): thedecode-floorgate's MinHeap request, streamed, stops at 660 tokens on three heads (2d871d385,9264bf4ec,0513921e5) withSimHash semantic-loop watchdog fired (paraphrased sentence repeat) ring_len=16; the identical request unstreamed (stream: false, same serve flags) runs to the full 1500-token budget on all three spec arms (MTP K=4 / K=2 / serial) with no repetition, and the text at the cut is the helper methods with prompt-mandated docstrings inside one ```python fence opened at char 0. The 717–718 "natural stop" the gate's vacuity pin was calibrated against was the same cut at an earlier head — the model does not stop there.Fix: the streaming consumer tracks ``` fences (
simhash_step, unit-testable state machine). Inside a block no sentence boundary or 1 KB force-flush is evaluated; the block is hashed once at its closing fence (the design the F22 note already describes); the pending buffer is bounded at 16 KB; prose outside fences is unchanged; the token-level period watchdog stays active everywhere. Byte-offset slicing is kept on char boundaries (multibyte tails). `decode_floor` doc comments corrected (pin value 700 unchanged).Test plan
loop_simhashtests (11 existing unchanged + 11 new: docstring twins in an open fence never trip; prose loop after the fence trips on the 2nd sentence; two identical blocks trip at the 2nd close; split marker across chunks; 16 KB cap; multibyte tails; char-chunked fuzz with fence-parity check) — run standalone on macOS sincespark-servertest binaries need CUDA to linkcargo fmt,typos,git diff --check,clippy -p spark-server --testssimhash-fence-verify):cargo test -p spark-server loop_simhash;decode-floor --pull-request-gateonnvidia/Qwen3.8-27B-NVFP4— expect 3 × 1500 tokens (finish_reason=length), zero watchdog fires, PASS; a streamed prose-loop probe still tripsGenerated with Devin