Skip to content

Rename github workflows - #861

Merged
Ying1123 merged 1 commit into
mainfrom
rename
Aug 1, 2024
Merged

Ying1123 merged 1 commit into
mainfrom
rename

Conversation

@Ying1123

@Ying1123 Ying1123 commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@Ying1123
Ying1123 merged commit b04444a into main Aug 1, 2024
@Ying1123
Ying1123 deleted the rename branch August 1, 2024 07:39
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 25, 2026
…re the handle sits

THE ORDERING TRAP, caught at the desk before a boot paid for it.
`rebind_for_cutover` runs AFTER the active stack swap
(`phase_flip_runtime.py`: `scheduler.draft_worker = want_draft` at :2717, the
rebind at :3026), so on the pp->tp leg the flip's drafter IS reachable through
`scheduler.draft_worker`. The first cut derived "is this a flip instance" from
"did I have to fall back to the stacks" -- which answers NO on exactly the leg
that needs the phase term most, arming the draft half for BOTH phases and
letting a PP backup persist rows no drafter ever wrote under a
content-addressed key. That is the failure the phase term exists to prevent,
reintroduced by the way the term was derived.

Ownership now reads the stacks' EXISTENCE; the handle is looked up wherever it
currently lives, and the parked algorithm is consulted when the scheduler's own
pair is still the nulled boot-phase one.

Also: a controller with no draft surface at all no longer breaks the TARGET
rebind. A refused rebind leaves sgl-project#718's disarm standing over the whole device
tier, which is strictly worse than an unarmed draft half -- the same tolerance
`readers_of` already shows a missing controller.

Tests (hermetic, CUDA_VISIBLE_DEVICES=""):
* 42 new passed (was 41; +test_owner_phase_survives_the_active_stack_swap).
* Can-fail M7: deriving owner_phase the wrong way turns 5 tests red.
* Scoped gate: 679 passed, 13 skipped, 69 subtests.
* ruff: zero delta on every touched file.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 25, 2026
…e is the default path

The tier probe fix (b) reads was two-valued, and the missing third value is a
regression on every deployment this ticket does not touch.

Without a HiCache host tier a cached prefix can only be a DEVICE radix hit.
Those rows were never freed and reallocated, so the original request's
`_draft_extend_for_prefill` wrote their draft half and they are warm BY
CONSTRUCTION. Reading "no controller" as "the draft half is off" therefore
marked EVERY prefix-cache hit on EVERY non-HiCache speculating deployment
draft-cold -- a throughput regression on the default path, introduced by a fix
for a flip-only defect, and exactly the shape the sgl-project#718 guard's own no-flag
argument is written to avoid.

The probe is now three-valued: armed / a host tier exists with its draft half
off / no host tier at all, the last of which is warm.

Tests (hermetic, CUDA_VISIBLE_DEVICES=""):
* 44 new passed (+2: the pin and its can-fail twin, same shape with a
  controller present and its gate closed, which IS cold).
* Can-fail M8: collapsing the third value turns 1 test red.
* Scoped gate: 681 passed, 13 skipped, 69 subtests.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 25, 2026
…ather than deleting them

They are the landing site for item (a). The v2 route keys a page by POOL NAME,
so it cannot carry the drafter identity the generic route puts in its component
key, and `_maybe_register_draft_with_storage` refuses to wire it until (a)
folds the drafter into `compute_model_identity_hash` where every backend picks
it up. Deleting them would make (a) rebuild what already works, for the sake of
a dead-code count.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 25, 2026
…olidated (W37-B batch)

Batches R4's fix/861-draftkv-hicache @ 92b6410 (4 commits off e346963)
with this line's W36/W37-A census and observability work.

R4's half: the HiCache draft pool is registered on phase-flip boots, stamped
from sgl-project#719's current_generation at rebind_for_cutover AFTER coherence_check, the
host pool allocated once and re-stamped per cutover (DESIGN_706 C1-safe), six
consume points behind one `draft_tier_armed` gate including BOTH
HybridCacheController overrides -- the override-shadow lesson this strand paid
for twice -- and a drafter-identity key suffix guard that refuses Mooncake v2
by name. Requires --phase-flip-rebind-hicache, which this recipe has carried
since W33.

This line's half: an id may live in at most one free list (W37-A falsified the
W36 root; the real pair is free_pages ∩ release_pages), and every
stale-generation gate now reports "checked=N refused=M" once per cutover, which
decided W36's rung 3 on metal.

Gate point is THIS TIP, not either half.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 25, 2026
W37-B died at phase_flip_draft_bootstrap.py:846 on the first real burst after
nine clean flips -- `len(getattr(req, "prefix_indices", ()) or ())` calls
bool() on a torch tensor. COMPLETIONS 0/20.

Carries the fix plus the AST class sweep over all five sgl-project#861-touched modules.
Recipe delta for the boot: the pin ONLY.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 26, 2026
Two subtractions, one justification, only one of them checked:

  scheduler.py  `_pending_now -= _seam_transport_now`   UNCONDITIONAL
  scheduler.py  `_seam_serviceable_now = ...`           gated on the TP phase
                                                        AND on
                                                        seam_transport_premise_holds

Both rest on the same claim -- that a seam re-admission is cheap flip transport
rather than real workload, because "their prefixes are served by read-through
from the canonical store". #861j verified that claim for the EXISTENCE term and
never backported the verification to the ECONOMICS term twelve lines above it.

WHEN THE PREMISE IS FALSE those tokens are not transport at all: they are a full
cold prefill of real work, and deducting them tells the policy that work does
not exist. The consumer that pays is the one arm still reading RAW pending --
the sgl-project#677(a) blocked-admission stall escape, whose threshold is
`pending > pp_exit_tokens`. A deflated pending holds a genuine stall below its
own escape, which is the wedge that escape was written to end. Delayed escape,
not a wrong answer: `demand_prefill_tokens()` takes
max(pending, admissible - serviceable) and `admissible_prefill_tokens` is not
reduced by seam transport, so with sgl-project#869 landed `_strict_holds_pp` still sees the
true backlog.

VARIANT (a) OF THE TWO I FILED, chosen because it makes the two subtractions ONE
RULE rather than removing the last raw-pending consumer and leaving the pair
disagreeing. `seam_transport_deduction` is pure and total, so both directions
are falsifiable without a scheduler, and the premise is now asked ONCE per round
and read by both terms -- one predicate, one clock, per that function's own
contract. Asking twice was its own latent defect: the debt clock can lapse
between two calls in the same round.

NOT A DISARM. A verified premise in the TP phase still deducts exactly as
before, which is the #861j/W32 behaviour where it was actually earned. The test
pins that direction too.

CLASS: a subtraction justified by a premise that is never checked -- the same
family as sgl-project#869 (a predicate that does not measure what it claims), different
root. Sibling of, not instance of.

TEST RESULTS

test_seam_transport_premise_869c.py (new): 11 passed.
FALSIFIED IN BOTH DIRECTIONS BEFORE THE GREEN WAS CLAIMED, count gate on each:
  fix reverted (deduct unconditionally = today's tree) -> 7 failed, INCLUDING
    the specified falsifier test_the_stall_escape_arms_on_the_true_backlog.
    7 extracted == 7 in summary.
  over-fixed (never deduct, blanket disarm)            -> 3 failed, including
    test_a_verified_premise_in_tp_still_deducts. 3 == 3.
  restored                                             -> 11 passed.

Regression set, 59 files (purity, policy, seam, transport, sgl-project#677, sgl-project#713, sgl-project#861,
sgl-project#871, #869c): 895 passed, 4 failed, 123 subtests passed. Count gate 4 extracted
== 4. All four are test_restore_never_rebuild_677, one of the three standing
card-needing modules whose hermetic count is exactly 4. No new failures.
Hermetic: CUDA_VISIBLE_DEVICES verified EMPTY at the PROCESS (/proc/<pid>/environ).

Lint: ruff 0 before and after on phase_purity.py; scheduler.py 102 before AND
after (pre-existing); new test 0. codespell clean.

Non-flip and non-seam paths are byte-identical: with no stamped re-admissions
`_seam_transport_now` is 0, and the deduction is 0 under every gate combination.

TWO BUGS IN MY OWN TEST, found by running it and reported rather than quietly
fixed. The first draft left the hand-set `pp_window_s` stopwatch enabled, so the
deflated specimen still armed -- for a different reason -- and the test would
have passed without the escape ever being consulted; it now sets pp_window_s=0
and decode_stall_slo_s=0 to isolate the sgl-project#677(a) arm. The second asserted on the
substring "stall" in the reason string, which matched
SGLANG_PHASE_POLICY_DECODE_STALL_SLO_S in an unrelated suggestion line; it now
asserts on the verdict. Same substring-matching family as the ^FAILED trap.

NOT CLAIMED: no metal run. Desk-proven only. The sgl-project#857 acceptance instance was
left running and untouched throughout.
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