Repository navigation
chore: bump v0.2.7 - #830
Merged
Merged
Conversation
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
JinyanYi
pushed a commit
to JinyanYi/sglang
that referenced
this pull request
Jun 23, 2026
Update full-test-npu.yml
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 24, 2026
…iant is armed Follow-up to 14c275e, on evidence found while dating the edge for sgl-project#830. sgl-project PR 31902 (Yiqi Yang) diagnoses this exact defect and installs the same gate at the same line: 30043ca 2026-07-21 [UnifiedTree] fix: drop prefetched host refill under an un-backed-up parent f198ebf 2026-07-22 [UnifiedTree] gate prefetch-refill drop to write-through, log it, inline tests It is NOT merged. Neither commit is an ancestor of upstream/main at 95f5ecd (2026-08-24), the gate is absent from that file upstream today, and the PR's 150-line regression test does not exist in this tree. So the defect is live upstream, no OSS sync could have carried a repair into this fork, and 14c275e was an independent rediscovery rather than a lost merge. Recording the process miss plainly: the standing rule is to check upstream PRs BEFORE building. The sgl-project#841 prior-art gate covered this fork's history, docs and catalog but not upstream PRs, so the same fix was written twice. The one place upstream's version is better is adopted here. Its second commit gates the drop to a non-write_back policy, and that is correct on both counts: * sanity_check arms the parent invariant only when the policy is not write_back (unified_radix_cache.py:3899-3903), so under write_back there is no assertion to satisfy; * the orphan hazard is absent there too -- _evict_device_leaf writes an un-backed leaf back and returns instead of deleting it, so no edge is ever popped above a backed child. Declining under write_back therefore refused a harmless insert and cost retention for nothing. The rig runs write_through, so live behaviour is unchanged. Kept deliberately divergent from the PR: the unadopted host span is released by the CALLER via host_span_unclaimed rather than freed inside the tree method. Both are correct and free the same rows exactly once; keeping one owner for the span suits this fork's accounting. Tests: 9 (was 8). New test_write_back_policy_still_adopts_the_tail asserts the tail IS adopted under write_back and that the checker stays quiet. Mutant-proven: removing the write-policy condition fails that test and only that test (1 failed, 8 passed). Full file 9 passed. ruff check clean, ruff format clean, codespell clean.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 24, 2026
…g but the census Half of the new validation metric. Once the flip carries no KV, cutover-blocking time is FENCE + WEIGHTS REFILL and nothing else. The refill has been in the stats dict since sgl-project#690 and now names its own bound (sgl-project#856 a). The fence had no entry at all. Its cost was visible only as a census SEGMENT -- the delta between the `flip_writeback` and `hicache_quiesce` marks, 74.8 ms on W25's binding rank -- which is a subtraction between two marks that nothing reading `last_stats` can perform. Meanwhile `maybe_flip_writeback` was already RETURNING a `FlipWritebackReport` carrying `elapsed_s`, and the seam used it as a bare truthiness test and dropped the number. So this adds no measurement. It stops discarding one. `writeback_fence_ms` goes in the stats dict and deliberately NOT into the DONE line's parenthesised list, by the same rule `drain_ms` follows and cites: ANALYSE_830 section 10's reproduction regex pins that list ending at "cutover N ms)", and silently breaking a documented grep is the failure sgl-project#830 existed to repair. None, NEVER 0.0, when no fence ran. The fence is skipped outright without a canonical store, and a defaulted zero would report such a flip as fully fenced while nothing had been persisted -- the sgl-project#606 defaulted-measurement shape, in the one place where believing it means losing KV. "This cost nothing" and "this did not happen" are exactly the two readings a seam census must keep apart. THE CAN-FAIL TEST KILLED MY FIRST IMPLEMENTATION, which is the reason it was written. `_writeback_fence_ms` first caught only (AttributeError, TypeError, ValueError); `test_an_instrument_never_raises_into_the_seam` feeds it a report whose `elapsed_s` property raises RuntimeError, and that escaped -- straight into a cutover with requests already parked. The catch is now broad, with the narrowing recorded as the thing that was tried and refuted, because this runs where the module's standing rule is that an instrument may cost a missing line and never a flip. A genuinely free fence still reads 0.0, not None, so the broad catch did not swallow the distinction the file exists to protect. TESTS (hermetic, CUDA_VISIBLE_DEVICES=""): test_writeback_fence_ms_856.py 6 passed, 4 subtests managers -k "flip or seam or phase or writeback or economy or layout or band" 1234 passed, 169 subtests, exit 0 ruff check + format clean Nothing else pins the stats dict's shape: a tree-wide grep for `last_stats` / `drain_ms` / `seam_waves` across test/registered/unit/ returns only this new file.
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.
Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help.
Motivation
Please explain the motivation behind this PR and the goal you aim to achieve with it.
Modification
Briefly describe the changes made in this PR.
Checklist
pre-commit run --all-filesor other linting tools are used to fix potential lint issues.