fix(patch): repair spec-capture-ascend-mount.patch hunk headers - #776
Open
curnane-lab wants to merge 2 commits into
Open
fix(patch): repair spec-capture-ascend-mount.patch hunk headers#776curnane-lab wants to merge 2 commits into
curnane-lab wants to merge 2 commits into
Conversation
curnane-lab
marked this pull request as ready for review
August 20, 2026 02:21
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.
Motivation
The companion patch merged by #722 (
patches/sglang/v0.5.14/spec-capture-ascend-mount.patch) does not apply. Its first hunk header declares 31 new-side lines while the body carries only 28 - a pre-merge edit shortened a comment from 5 lines to 2 without updating the header - so every fresh Ascend setup frommainaborts with:Separately, a8c0993 ("feat: enhance spec_capture_sink with dynamic pinning configuration", merged into
mainvia #698 nine hours after #722) moved thewith_hard_pinguard into the base patch, leaving this patch's second hunk context stale (patch does not applyeven once the header is fixed).Two gaps in the Ascend docs then made fresh setups fail even with a valid patch: the documented
git applycommand lacks-p2(it fails withNo such file or directoryagainst an installed SGLang), and the doc never explains how to install Mooncake on Ascend in the first place.Modifications
Regenerate the patch against the current
v0.5.14base - the Ascend behavior itself is unchanged:@@ -81,18 +81,31 @@->@@ -87,18 +87,28 @@(line numbers re-based, new-side count fixed).@@ -106,6 +116,25 @@); the old pin-guard exchange is dropped because the base patch now shipswith_hard_pin/with_soft_pinhandling itself.indexline updated to the current base.docs/basic_usage/Ascend/ascend_npu.md(+37/-1):-DUSE_ASCEND_DIRECT=ONas fallback), with verification commands for bothmooncake_masterandmooncake.store.git applyneeds-p2against an installed SGLang.Related Issues
Validation
git apply --checkbefore / after:main(395-line sink)corrupt patch at line 41(exit 128)corrupt patch at line 41(exit 128)The patched sink compiles, the Ascend mount logic (
allocate_and_mount_segmentwithlocation="cpu") lands intact, and the base'swith_hard_pin/with_soft_pinfallback is preserved. CUDA hosts are unaffected: the Ascend path activates only whenASCEND_RT_VISIBLE_DEVICESis set, otherwise thesetup()arguments are identical to the base.The
-p2fix mirrorsscripts/apply_sglang_spec_capture_patch.sh, which already strips thepython/prefix for installed SGLang trees (samedirname(dirname(sglang.__file__))root): without-p2the companion patch fails withNo such file or directory; with it, both install layouts (site-packages and editable source) apply.Accuracy Test
N/A - file repair only; no runtime code changed.
Benchmark & Profiling
N/A.
Checklist
.patchfiles are excluded from whitespace hooks by repo config; verified the file applies cleanly.)ascend_npu.mdgains the Mooncake install section and the corrected-p2apply command.)