Skip to content

feat: support gptj style rope in llama - #584

Merged
merrymercy merged 1 commit into
sgl-project:mainfrom
lxuechen:main
Jul 3, 2024
Merged

merrymercy merged 1 commit into
sgl-project:mainfrom
lxuechen:main

Conversation

@lxuechen

@lxuechen lxuechen commented Jul 3, 2024

Copy link
Copy Markdown

No description provided.

@merrymercy
merrymercy merged this pull request into sgl-project:main Jul 3, 2024
hzwzwzw pushed a commit to hzwzwzw/sglang that referenced this pull request Jul 2, 2026
Signed-off-by: Hank Han <hanhan7630@outlook.com>
efschu added a commit to efschu/htsglang that referenced this pull request Aug 14, 2026
…te could not run

Q2 is decided on the ALLOCATED column as the analysis specified: across every
weights_refill stage, free drops and allocated moves 0 MiB -- max |d_alloc| = 0
over 594 seam-census flips on two different cuts. S1 and S2 both require
allocated to rise. S3 (the VMM commit in arena_carrier.set_active_prefix) is the
mechanism, and Q1 independently shows the arena IS such a reservation:
allocated exceeds the card's physical total on all three ranks, and
PYTORCH_CUDA_ALLOC_CONF is unset, so expandable-segments is not the explanation
the analysis offered.

P2 is the result that changes the ticket. --pp-solve-cut could not execute at
all -- three defects, two fixed here red-first, the third a card-rate
measurement pass that nothing in the tree produces (sgl-project#584's shape, the same root
that failed sgl-project#363). Fed borrowed measured rates it admits 37,14,13, not the
40,12,12 two windows were spent on, so the +25.5% is retired per section 6a.
Fed the M0 census instead it admits nothing at all -- the solve has a free
parameter (which boot's census calibrates it) that was not being reported.

W1 certified that cut CLEAN at +2560 MiB with 0 corridor samples below 1024
over 16473 ticks per card, and remains NOT CERTIFIED (C2): one window cannot
bound a variance. That is the pre-registered answer, not a shortfall.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 14, 2026
…erning answer is a refusal

First execution of --pp-solve-cut end-to-end through the wired handler on this
rig. The pass ran on all three cards and put measured rates on disk keyed by
UUID; the gate then answered, and under RUNSHEET 6b the answer is a REFUSAL,
which per 5.1b outcome (3) IS the result. No W2 window was owed and none ran.

MEASURED (m584/card_rates_by_uuid.json):
  5090 GPU-31d7ef41 0A:00.0  203.57 TFLOPS  1661.7 GB/s
  3080 GPU-5c648f96 05:00.0   51.14 TFLOPS   716.6 GB/s
  3080 GPU-62dbbae1 0B:00.0   50.81 TFLOPS   717.4 GB/s
All THROTTLED, correctly: this rig runs deliberate power caps (200/320 W,
400/600 W), so these ARE its operating rates.

THE BORROWED RATES WERE STALE. Against s50's numbers that R12 injected by hand,
bandwidth reproduces to the decimal (3080 717.4 vs 717.4) while GEMM does not
(5090 -12.2 %, 3080 -22.5 %) -- the direction and rough magnitude of the
2026-08-05 power-target reduction. The 37,14,13 admission rested on
pre-power-cap compute rates. A second, independent reason the old numbers do
not describe this rig, alongside 6a's change-of-cut retirement.

P2, pool 280000, budget 31400,19300,19300:
  M0 (most demanding)  REFUSED     M1  ADMITS 37,14,13     W1  ADMITS 37,14,13
The admitted cut is UNCHANGED at 37,14,13 despite the -12/-22 % rate move, so
on this shape the choice is driven by memory feasibility, not compute balance.
6b takes the most demanding census: REFUSAL. Independently, the M1/W1-admitted
cut fails C2' against the pooled-worst transient by -3643.3 MiB, so the refusal
does not depend on which route a reader prefers.

LEVER ARITHMETIC, swept against the REAL census rather than a fixture:
  L1 --rank-gpu-memory-mib   EXHAUSTED BY PHYSICS. Refuses at the 5090's entire
     NVML total (32607), and refuses even with every card at full nameplate
     (32607,20480,20480): 39968 MiB needed against 48684 usable. The aggregate
     FITS by 8716 MiB and the solve still fails -- it is a CONTIGUITY/PACKING
     result, which R12 suspected and this measures. There is no budget left.
  L3 --max-total-tokens      CONFIRMED NOT A LEVER, now on metal: 280000 ->
     20000, every one refused. 5.1a asserted this from a fixture proxy.
  L2 seam                    THE ONLY RECOVERING LEVER. Threshold ~515 MiB
     against the measured 1838 -- a 1323 MiB / 72 % reduction -- and it then
     selects a THIRD cut, 29,19,16. Independently close to 5.1a's fixture-
     derived "~500 MiB". Any throughput number would again be retired.

sgl-project#363 FLIP TARGETS, counted (bonus, not the protocol):
  card probe now visible to the planner's own lookup   YES, 3 cards with rates
  flip targets from planner candidates                 0
  ... with per-stage measurements present              2 stages, 1 flip target
The card-rate half CLEARS sgl-project#363's blocker-one precondition -- the
PlannerFeedUnavailable('no card probe on disk') every rank logged is gone -- and
does NOT produce flip targets, because build_stage_table refuses a
solved-but-unmeasured candidate (sgl-project#578/sgl-project#360). The sgl-project#363 verdict predicted this
hermetically; it is now confirmed with a real probe on disk. The remaining gap
is the OTHER half of sgl-project#584's pass: per-stage A-vs-A gain, band and instrumented
flip cost. Q2b proves the machinery works the moment those exist.

Evidence /spinning/evidence-631/m584/: card_rate_pass.log, card_library.json,
card_rates_by_uuid.json, nvml_identity.csv, p2_measured_rates.txt,
p2_levers_m0.txt, p2_levers_binding_fine.txt, p2_levers_ceiling.txt,
p2_seam_lever_m0.txt, p2_seam_threshold.txt, check_363_flip_targets.txt, and
the drivers that produced each.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 14, 2026
…efusal, write-path fix, stale-rate fingerprint
efschu added a commit to efschu/htsglang that referenced this pull request Aug 14, 2026
…measurement canon and flip cost in the act rule
efschu added a commit to efschu/htsglang that referenced this pull request Aug 14, 2026
…le against its own card

FOUND ON METAL, R13 act window, by the runsheet's own first step. The card-rate
pass was re-run so the rates would carry the new environment fingerprint. It
measured all three cards; --show then reported the 5090 FRESH and the 3080
permanently UNKNOWN -- 'NVML reports no current environment for this card to
compare against' -- for cards NVML could see, seconds apart, in the same pass.
Re-running the pass could never have fixed it.

A CROSS-BRANCH SEAM, and the reason this batch's two halves had to meet:

  * fix/card-library-guards resolves a card by CAPACITY, because the driver
    calls both the 10 GB and the 20 GB RTX 3080 'NVIDIA GeForce RTX 3080' and
    the 20 GB cards were silently resolving onto the 10240 MiB seed entry. So
    this rig's profile is named 'RTX 3080 20GB'.
  * rate_env dates a stored rate by looking the card NAME up in a table of live
    environments keyed by the raw NVML name, 'RTX 3080'.

Exact-key lookup, two names for one card: permanent UNKNOWN for every
capacity-disambiguated profile, on the very feature whose point is to say
whether a rate is current. The 5090 escaped only because nothing collides with
it, which is what made it look card-specific.

The relation is not invented here. CardLibrary.variants already states it -- a
key matches when it equals the request, extends it, or is extended BY it -- and
the lookup now uses that, at a token boundary, so RTX 3080 does not match
RTX 3090 and RTX 308 does not match RTX 3080. Loosening the LOOKUP does not
loosen the VERDICT: what is found is still compared term by term.

Red-first: 6 of the 11 new tests failed before the change and the 5 guard tests
passed, i.e. the reds were exactly the variant cases. After: 11 pass, and
card_library_guards + card_rate_pass_584 unchanged at 46 passed / 6 subtests.

Confirmed ON METAL, not only hermetically: --show now reads
  RTX 3080 20GB: 50.97 TFLOPS / 716.2 GB/s [FRESH] driver 595.58.03, 200 W
  RTX 5090:     203.42 TFLOPS / 1661.6 GB/s [FRESH] driver 595.58.03, 400 W
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 15, 2026
The boot-time half of the corridor law, with the can-fail corpus this window
collected. `corridor_guard` polices ALLOCATIONS at runtime; this polices the
CONFIGURATION, once, before serving, and asks two questions rather than one:
is the predicted resting position inside the band, and IS THE PREDICTION WORTH
ANYTHING.

BOTH DIRECTIONS FAIL. "~1024 MiB free per card, and best-filled" has two
halves, and only the lower one was ever enforced. Measured on this rig:
31800,14000,15600 rested at 3545/5210/4325 MiB -- ~12.8 GiB idle -- and
nothing refused it, because nothing was asking.

UNVERIFIABLE IS THE POINT. A resting position that cannot be predicted is not
thereby compliant, and on a pipeline topology this tree cannot predict one:
key_solver and corridor_vector are TP/DCP-group only with no pp_size concept,
--rank-kv-ratio corridor cannot engage at tp_size=1, auto-performance is
refused under pp_size>1, and nothing anywhere predicts at-rest free per card
offline. `predict_from_planner` therefore returns UNKNOWN with the gap named
and pointing at planner/pp_cut.solve_pp_cut, which is PP-aware and already
carries corridor_mib as a hard floor -- the natural host for the missing
solve. The gate refuses rather than certifying a corridor nobody computed.

That refusal is the whole reason the module exists. Every member of the
silent-falseness family found this window has one shape: something that could
not answer returned the answer that looks like success -- the corridor audit
that never armed and so never reported a breach, the seam record that made a
cold boot look measured, the KV rung that read a configured row count and
called it physical backing. A gate that passed when it could not see would be
the next member rather than its keeper.

CAN-FAIL CORPUS, five configurations this box actually booted today, each
stating which way the gate must fail:

1. 31800,14000,15600 at 3545/5210/4325 -> ABOVE_CEILING (the shipped vector)
2. 31800,15800,17700 at 1223/3010/1751 -> ABOVE_CEILING, and gpu0 IN_BAND on
   its own: the group verdict is the WORST card, never an average, which is
   how five breaches on one card hid behind two comfortable ones in sgl-project#656
3. the cold-boot seam-record fluke -> UNVERIFIABLE: one draw of a two-valued
   process (620000 then 406600 tokens from one command line) is not a
   measurement, whatever it was read from
4. the dead audit -> UNVERIFIABLE: 57 and 15 external breaches against ZERO
   in-process breach lines
5. 31800,19000,19000 at 1763/2572/2891 -> ABOVE_CEILING. This is the
   configuration this window ACCEPTED, and it is in the corpus anyway,
   because the gate has to say it about the boot its own author signed off.
   Its under-load minima (905/2272/1401) put gpu0 in band with nothing below
   the floor, which is why the gate judges the RESTING position.

Also: the band edges are now rounded rather than truncated, so they are
symmetric about the centre and match the band as declared (819-1229) instead
of quietly sitting at 1228.

485 pass across the enforcement corpus, the threshold pair and mem_ledger.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 15, 2026
sgl-project#584 provenance: SOLVED, not CONFIGURED. Every input below is measured on
the combined boot, not inherited from module constants fitted to another
checkpoint.

  C_roundtrip  5.918 s   21 PHASE-FLIP DONE records, slowest rank per
                         direction, three complete tp_to_pp -> pp_to_tp
                         round trips: 5901.0 / 5912.9 / 5939.8 ms, spread
                         0.7 %
  r_pp         4036 tok/s  PP may not decode under prefill_in_tp purity, so
                         PP wall minus its opening seam IS prefill time:
                         85,233 tokens over 30 s less 8.88 s of seams
  r_tp         1001-1196 tok/s  from prefill actually running in TP (a TP
                         phase's wall clock is mostly decode, so it cannot
                         be read off the phase): GATE B put 72,000 tokens
                         through TP at TTFT 71.9 s; pre-fix baselines on the
                         same model gave 1194 and 1196

  P* = C / (1/r_tp - 1/r_pp) = 7878 .. 10059, centre 8949

The booted ladder [7004, 10506, 11674, 12257, 12608] therefore sits at
0.78 .. 1.41 x P*, and the margin above P* is not chosen -- it IS the derived
(1+2B)/(1+B), bounded by 2.

For the record, in the same units, the ladder this branch replaces:
  7004 / 39835 / 72666 / 105498 / 138329
  = 0.8 / 4.5 / 8.1 / 11.8 / 15.5 x break-even
The top rung demanded fifteen times the backlog at which flipping already
pays for itself.

One real mis-calibration exposed: flip_cost_s is booted at 3.2 s while the
seam measures 5.918 s here, so the B=0 rung sits BELOW break-even and the
gate fires slightly early with nothing decoding. Re-deriving N from the
measured seam gives [8949, 13423, 14915, 15660, 16108] and fixes the whole
ladder at once. Not applied in this commit: it is an env change to the boot,
not a code change, and the window belongs to 662-F4.

The 2x bound holds against the P* a ladder was solved from. Across the width
of the r_tp band the worst case is 1.8 x (8949/7878) = 2.045 -- recorded
rather than asserted away, and the reason r_tp deserves a dedicated ladder
run rather than a single TTFT.

Tests: 142 passed, 74 subtests.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 15, 2026
Sixth member of the can-fail corpus, and the first one this window found in
another strand's code rather than my own.

The phase policy's break-even ladder is derived from three measured knobs --
seam cost, PP prefill rate, TP prefill rate. An operator set them; the
derivation read the module CONSTANTS instead; and the boot logged a ladder
that looked solved and was not. With the measured 5.918 s seam it printed
[7004, 19430, 21589, 22669, 23316] where the solve gives
[7878, 11817, 13130, 13786, 14180], and rung 0 had not moved at all because it
was still the constant's number. Fixed on the policy side in dba4ab8;
verified here in-process, knobs set: N moves 7004 -> 7878, so the inputs now
reach the number.

Nothing was wrong with the solver and nothing was wrong with the inputs. The
value simply had a provenance nobody checked -- which is this corpus's entire
subject, and the same shape as its other five members: the corridor audit that
never armed and so never reported a breach, the seam record that made a cold
boot look measured, the KV rung that read a configured row count and called it
physical backing.

`derived_provenance` makes the check mechanical: inputs supplied AND the value
differs from what the defaults alone produce -> SOLVED; inputs supplied and it
does NOT differ -> DEFAULTED, because they demonstrably did not reach it; no
inputs -> DEFAULTED, honestly. Wired through `weakest`, a DEFAULTED input drags
the whole verdict down, so a boot cannot be certified on a number whose knobs
never arrived.

The one false negative is deliberate and documented: inputs that happen to
reproduce the default exactly report DEFAULTED. Under-claiming provenance is
the safe direction -- refusing a correctly-configured boot is cheaper than
certifying a silently-unwired knob.

21 pass.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 15, 2026
…spills for it

THE BOOT WITH THE LEAST INFORMATION RESERVED THE LEAST. Measured on metal
2026-08-15 (boot_maxfill.log): with a COLD seam record the sizer charged no flip
term at all and filled the pool to the corridor law. Rank 1 came up with ~875
MiB free against a ~1536 MiB arming floor, so tp_to_pp was refused on every arm,
every prefill stayed in the TP layout, and NOTHING AT RUNTIME COULD RECOVER IT
-- the pool is fixed at boot. The operator had to hand-pin --max-total-tokens.
A planner that has every input for a number must not need to be hand-corrected
for it.

THE MECHANISM. SeamReserve.active is False when every MEASURED field is zero,
which is exactly a first boot, and seam_adjusted_budget_bytes returned the
budget unchanged on that branch.

TWO QUANTITIES WERE CONFLATED, AND SEPARATING THEM IS THE WHOLE FIX:

  the seam RESERVE  what a flip COSTS WHILE IT RUNS. Knowable only by
                    measurement; legitimately zero on a first boot.
  the arming FLOOR  the LEVEL the gate compares against. Derived from the
                    corridor law the operator already stated, and knowable at
                    boot on every rig.

A cold record means the first is unknown. It never meant the second was. Folding
the floor into the reserve as a "cold default" would make a derived constant
look like a measurement -- the sgl-project#584 derived_provenance defect, which this chain
has already paid for once -- so it is a separate term, charged on every flip
boot, cold or stored.

WHAT THE POOL OWES IS THE DIFFERENCE, NOT THE FLOOR. The sizer already holds the
law free, so charging the whole floor would reserve the corridor twice and cost
the pool a gigabyte it does not owe -- the same double-count required_free_bytes
refuses with its max. The per-rank free target becomes
max(law, arming floor + load margin). A rig whose arming floor sits below its
corridor is sized exactly as before, and a caller that passes no floor gets the
previous arithmetic byte for byte.

AND AT RUNTIME, THE FLOOR IS SPILLED FOR BEFORE IT IS REFUSED FOR. "It can
always be spilled" is true BEFORE arming, and only before. A correctly planned
instance never reaches this path; what reaches it is the transient a sizer
cannot see -- a co-tenant, a capture peak, a rank that drifted. Refusing an arm
for a condition one ladder call could fix turns a recoverable dip into a phase
the instance cannot enter, which is the same defect one layer up. So a short
floor asks the existing CorridorGuard ladder for relief, and only a shortfall
that survives a bounded number of attempts refuses -- loudly, naming how much
was short and what the ladder actually freed.

THE ORDER IS THE HARD CONSTRAINT. Relief runs strictly before the arm: nothing
is armed, no rank has entered the seam, no collective has been reached, and the
staged fund does not exist yet to be pulled out from under. Spilling once the
flip has begun is the evictable-seam-fund mistake that produced the
served-nothing class in sgl-project#656 boots E/G. This rung is ADDITIONAL to the seam
gate, which still owns the in-window ladder at the last point before the
no-return region.

RANK-LOCAL BY CONSTRUCTION, AND THAT IS SAFE. A rank that refuses here does not
arm, which the consensus round already handles -- arming is reduced across the
group. No collective is added, so none can desync.

The ask is the floor MINUS the law the guard already defends: ensure_headroom
guarantees free_after - want >= law, so asking for the whole floor would spill a
second corridor for nothing.

AN UNREADABLE INSTRUMENT MAY NOT BLOCK A FLIP. A probe that raises, a missing
guard or a ladder that falls over all let the arm proceed on the seam gate's own
ladder: failing to MEASURE the floor is not evidence that it is SHORT, and
refusing on a bad reading would turn it into a permanently stuck phase. Bounds
are counts, not clocks -- the ladder is synchronous -- and a malformed or zero
bound falls back to the default rather than refusing without ever asking.

Tests: 25 cases, can-fail proven by mutation:
  sizer does not charge the floor (the metal defect restored) -> the cold-boot
    assertion fails, alone and by name
  the arm refuses a short floor without asking the ladder (the behaviour the
    order forbids) -> 8 fail
No regressions: 544 pass across the seam/corridor/purity/kv/sizer suites, with
the same 2 pre-existing failures before and after.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
… stub under the bugs-first order

Neither verdict is finished; the absorption mapping both turn on is the
undone part. Parked rather than polished so the resume starts from the
evidence instead of from scratch.

Two findings worth not losing: sgl-project#363's own ACT verdict R3 postdates the
sgl-project#656/sgl-project#657/sgl-project#658 successors and still did not close, and the per-rank ms/round
ladder floated as its successor scope already exists and already answered
NEGATIVE (-3.16 % inside a 4.43 % band). For sgl-project#584, auto-measurement and a
mechanically enforced single authority look delivered; dynamic recalculation
is the unresolved pillar.

Both qwen sweeps were stopped by the same order before returning findings, so
this is desk evidence only.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…dge stops answering all-unavailable

DIAL SIDE -- vram_dial.reclaimable_bytes_for(participant, floor_rows). A LIVE
read: full_pool_backed_rows (the bound eager launches actually pass, the same
quantity verify_pool_reached_capacity checks a commit against) times
_pool_row_nbytes (the pool's real per-row K+V bytes), minus the floor.

floor_rows is REQUIRED AND NOT DERIVED THERE. There is no per-pool floor
authority in that module -- the dial's floor is a card-level NVML measurement
(_measure_local_floor_bytes) taken at boot -- and inventing a per-pool one
would create a second authority for a number sgl-project#584 says has exactly one. A
caller without a floor gets None, which the bridge turns into a named refusal.

REGISTER SIDE -- OffloadRegister.reclaimable_bytes(offload_class), mirroring
latency_term_ms's lock-and-filter shape so the REGISTER answers about itself
rather than the bridge re-deriving its accounting from outside. Resident AND
not hot: parked bytes are already gone (counting them promises the same bytes
twice), and park() refuses hot items unconditionally, so hot bytes are
resident but NOT reclaimable -- including them would hand a caller a figure it
cannot spend. An unanswerable hotness predicate counts as HOT: the safe
direction is refusing to reclaim, never assuming free to move.

THE DISTINCTION THE CUT TURNS ON: ProbeUnavailable vs zero. Zero is a
MEASUREMENT ("at its floor" / "nothing resident"); a failed probe is the
ABSENCE of one. Both probes return None/raise rather than 0, and the bridge
turns that into a NAMED refusal. Collapsing them would remove a real source
from an elastic plan while looking like it was considered -- the sgl-project#606
defaulted-measurement defect, which this strand has now refused in four
separate places.

HONEST LIMIT, unchanged and restated in the analysis: the hermetic proof
exercises the PLUMBING with faked dial/register state. No live number's
correctness is claimed. In particular the dial probe is only as right as the
floor its caller supplies, and no caller supplies one yet -- that is the
window item section 4 already names.

ALSO ADDED (section 8, SKETCH ONLY, no build): the cold-direction policy that
would consume the bridge -- idle event -> query -> refuse rather than take a
partial -> GDN vacate first (cheap) -> dial grow below the captured bound ->
stop rather than attempt a re-capture. Debounce rationale is #704a's jump
price: a rung change costs a full ~1575 ms arena refill, so an idle/hot flap
across a rung boundary pays it twice for no net capacity; hysteresis on the
event plus a rung-crossing cooldown, the same reasoning
SpillCooldownRegistry already carries for the spill/restore pendulum.
Anything requiring a geometry flip stays design-only, dependency named
(sgl-project#677 arming-floor budget).

Tests, hermetic (CUDA_VISIBLE_DEVICES="", no CUDA, no boot):
  test_coresidency_registry_553.py  30 passed (16 Cut 1 + 14 Cut 2)
    MUTATION: making a failed probe collapse to 0 fails 3 -- including the
    pin that a MEASURED zero and an UNMEASURED one stay distinguishable
  test/registered/unit/managers/  13 failed / 2247 passed -- failures
    unchanged from the pre-existing 13-failure baseline, passes 2233 -> 2247,
    exactly the 14 new pins
  offload-register suites: 129 passed (I added a method to that class)
  ruff + codespell clean.

Same branch (feat/553-elastic-coresidency). Desk only, no boot, no GPU.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…d I was too generous on auto-measurement

A delegated parallel-authority sweep completed after the verdict. Everything
load-bearing below I re-verified myself at the code. It confirms all three
verdicts and makes two of them wrong in the direction of being too kind.

(a) IS MORE SEVERE THAN "FOUR CONSTANTS". enable_vram_ledger defaults to FALSE
(server_args.py:2456) and even when on is reachable only from one flag
combination (--rank-gpu-id --rank-tp-ratio auto). Its own flag help names the
ledger and the legacy demand model as two ALTERNATIVE models selected by a
switch -- and the switch defaults to legacy. So for effectively every boot the
actual VRAM authority is the heuristic at server_args.py:12765-12801, deriving
mem_fraction_static from a direct device-capacity query minus hand-set
constants (512, activation_tokens*1.5, tp*pp/8*1024, reserve_for_graph_mb,
reserve_for_deepep_a2a_mb). My verdict named four stray constants; the larger
finding is that the ledger is not the default authority at all.

ITS OWN ADVERTISED CANONICAL ACCESSOR IS DEAD CODE: kv_pool_mib_per_rank
(mem_ledger/contract.py:85-107, exported in __all__) has ZERO callers --
verified. The real integration point is _vram_ledger_non_kv_per_gpu
(server_args.py:12123-12159), which publishes non-KV overhead per GPU while the
CALLER derives the rank budget. The module documents one contract and the tree
uses another.

A SILENT POST-HOC OVERRIDE CONTRADICTS A DOCUMENTED INVARIANT, and this one is
a bug candidate rather than an inventory item: server_args.py:14107 applies
mem_fraction_static *= 0.85 for aiter + context_len > 8192 unconditionally on
how the fraction was set -- including after --rank-gpu-memory-mib set it per
rank under a docstring saying "no further utilization ceiling or safety factor
is added here" (server_args.py:9758-9777). On that path the guarantee is false.

(b) I WAS TOO GENEROUS. I called auto-measurement "delivered with one honest
qualification". The qualification is larger: measured.py is gated by
SGLANG_VRAM_LEDGER_MEASURED, OFF BY DEFAULT (its docstring says the tree is
byte-identical without it), it calibrates exactly ONE term (cuda_context_bytes
via POST_TO_RESIDUAL), and residual_overrides() is called only from the offline
probe CLI, never from the live boot solve. What stands is the DISCIPLINE -- the
engine refuses to default an uncalibrated residual, measured.py refuses to
calibrate an unstable term -- but "Auto-Messung" as a delivered property is one
field, off by default, offline-only.

AND THE LEDGER'S OWN CONSTANTS ARE NOT ALL MEASURED. My R1 gate excludes
mem_ledger/ by design (constants belong there), and that scope hides an R2
question: LOAD_TRANSIENT_REFERENCE_MIB = 70, whose docstring says "PROVENANCE,
STATED IN FULL BECAUSE THIS NUMBER IS INHERITED AND NOT MEASURED BY ANYTHING IN
THIS TREE"; and GRAPH_MIB_PER_CAPTURED_TOKEN = 2, which the same file records
as measured 3.3-3.8x LOW ("192 MiB booked against 633-730 MiB actually taken").
The second is sharper: a term the ledger KNOWS is wrong by a factor of three,
still shipped.

FURTHER COMPETING AUTHORITIES outside the planner entirely: dsa_indexer.py:354
(_MQA_LOGITS_TOTAL_MEM_FRACTION = 0.3 over torch.cuda totals),
registry/adapters/class1_srt.py:190 (the registry's own NVML-fraction admission
estimate, with the real planner wired in only as an explicitly non-blocking
second opinion), and the MLX backend (outside the ledger's CUDA/NVML scope).

REVISED FOLLOW-ON ORDERING. The four-constant retirement I listed first is no
longer the highest-value item: (1) decide whether the ledger becomes the
default, or accept that sgl-project#584's promise is scoped to an opt-in path and say so
-- a user decision, and every other item is smaller than it; (2) fix the
*= 0.85 override (S), it falsifies a documented guarantee; (3) resolve
kv_pool_mib_per_rank (S) -- wire it or delete it, a dead canonical accessor
teaches the next reader the wrong contract; (4) then the constants and audits.

R1 gate re-run: 7 passed + 29 subtests. codespell clean. Desk only.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…unification

sgl-project#612: declare the decoupled_kv construction site in RUNTIME_COMMUNICATOR_GROUPS.
Declaration completeness only -- the contract checks construction SITES, and
initialize_decoupled_kv_group has no production caller yet, which the entry
says rather than implies. No behaviour change.

sgl-project#584: file both constants the newly-merged ratchet caught, with differentiated
verdicts rather than a baseline bump. planner/boot_instruments.py::
_CHAIN_TOLERANCE_MIB is NOT A DEMAND DECISION and the call site was read to say
so: it is the rounding slack for verifying the budget-chain identity, reserving
nothing. managers/phase_flip_seam_reserve.py::DEFAULT_ARMING_MARGIN_MIB is
NEEDS AUDIT: it genuinely gates a VRAM decision, its own comment argues it is
an instrument tolerance, and that call belongs to the sgl-project#662-F4 owner.

TICKET_702_unify_revisions.md files the decision that stopped fix/602-fill-side:
WorldMemory canonical (boot 2 validated it), PhasePoolModel's attention-layer
divisor and sgl-project#723 frontier completeness ported as an EXTENSION, never a parallel
model. The four mechanical resolutions from that aborted merge are recorded so
the next attempt does not re-derive them.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
Merged the serving lineage in. Three doc conflicts: exec won two on CONTENT,
not category -- its edits correct my own run-card (--hicache-size takes an
integer number of gigabytes, so my '5G' would have failed the boot the card
exists to drive) and retract a NOTE_545 claim with a real attach/detach run
behind it. Docs-keep-mine would have shipped a bad flag value.

sgl-project#630 did NOT clear, and the reason is a cross-lane contradiction rather than a
missing patch: sgl-project#703 removed the PARSE-TIME blocker because the runtime twin was
gone (7336c08), exec restored the runtime twin (90e84ad), and restoring
the parse-time one would refuse the very boot this train's own run-card tells
F4-r4 to perform. Left failing with the decision named.

sgl-project#612 declared, sgl-project#584 both constants filed with differentiated verdicts.

New: exec's double-billing fix reds two sgl-project#550 admission tests. Its credit-back is
sound only under the invariant its own comment states (registration follows
allocation); sgl-project#550's fixture registers without allocating. Not patched -- either
the fixture is impossible or the credit-back under-charges, and rewriting one
lane's test to match another's model would erase the question.

Zero UNEXPLAINED new failures: three remain, each with cause and owner.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…, and a lift has THREE twins

Part 2 completes the sweep begun in 46e3e30. Scope as stated there: 181
candidate lines over python/sglang/srt (tests excluded), 170 fork-owned.

HEADLINE: the TREE is healthy on this axis. Zero DANGLING guards -- every
ticket citation resolved to a real commit history or a checkable artifact --
and zero guards needing a lift decision. The rot is concentrated in the
planner's REJECTION REGISTER, which part 1 covered.

THE ONE VERIFIED STALE-TEXT, fixed: server_args.py:2275 said park-tier routing
happens at exhaustion sites "once the sgl-project#236 budget lands". sgl-project#236 landed;
park_instead_of_demote is live and called at kv_session_offload.py:3404. The
conditional clause is dropped.

A CLASSIFICATION I REJECTED AFTER CHECKING IT MYSELF, and the reason it matters
more than the row does. The sweep flagged barlink_path_rates.py:21 ("the
measurement does not exist yet") as stale because sgl-project#278 closed and
load_nccl_reference is implemented. That is wrong: the LOADER existing is not
the MEASUREMENT existing. The scripts that would produce the data exist
(scripts/gpu_battery/s06_nccl_reference.*, scripts/probe/nccl_reference.py), no
data file does, and the consumer at :448 explicitly handles that case by
keeping the paths PLACEHOLDER. The docstring is CORRECT. Fixing it would have
replaced a true statement with a false one -- which is the exact failure mode
this axis is most likely to commit, so it is recorded rather than quietly
dropped.

THE SHARPEST FIND, and it is on this audit's own axis turned against the test
suite: test/registered/unit/server_args/test_phase_flip_args.py:88 still
asserts that enable_hierarchical_cache=True raises a ValueError matching
"sgl-project#630". sgl-project#703 stage 2 REMOVED that blocker. The test is RED on
train/0817-control right now -- verified failing at the untouched base commit
with both my edits reverted, so it is not this sweep's doing.

That upgrades a lesson the sgl-project#703 lift already half-knew. That lift was careful
about TWINS: it moved the parse-time and runtime clauses together because
"fixing only the runtime clause is not enough ... both must move together or
the flag is still unusable". THERE WAS A THIRD TWIN. The test pinning the gate
did not move, so a careful lift still left behind a red test asserting the
presence of what it had just deliberately removed.

So the lift-evidence bar in the audit gains a fifth item: the tests that pin a
gate move WITH it. Two twins were not enough; there are three.

NOT FIXED HERE: rewriting a test assertion is not behaviour-neutral for the
suite, so it falls outside this sweep's one permitted write. Filed as its own
item, with the repair named (drop the sgl-project#630 row from that loop and point at
test_hicache_bounded_waits_630.py, which the code comments already name as the
active protection).

COUNTS, with one discrepancy I am NOT resolving by picking a side: I counted 21
provenance-shaped lines inside my 181-line candidate union; the sweep counted
187 across the whole tree without that pre-filter. Different denominators, both
defensible, neither reconciled line by line. Both agree on the shape -- the
large majority of #NNN mentions are settled narration and only a handful are
live conditions that could expire. Stated rather than averaged.

STILL-VALID substantive set spot-checked: the HiCache phase-rebind refusal
(nothing in the tree ever sets the host pool it waits for), the sgl-project#578
stage-table refusal (reads liftable in isolation; the full trace shows sgl-project#584's
canon fills what it can and this raise is the designed fallback for what it
cannot), the sgl-project#452 CUDA-graph refutation (reconfirmed three times, never
reversed), the KVSO/HiCache opt-in gate, and topk>1 under uneven DCP.

Two loose citations named: layers/dcp/owner.py:127 and
layers/attention/triton_backend.py:432 both cite "sgl-project#76", which is an unrelated
ticket -- scale analogies written as if they were pointers. The guards are
valid; the citations misdirect a reader exactly as the drifted anchors do.

Suite: server_args 663 passed, 91 subtests, 1 failed -- the pre-existing
test_v1_blockers_named above, verified identical at the untouched base.
Catalog updated same step. codespell clean.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
Two guards and a correction to my own audit.

1. PPMissingLayer refuses when invoked under non-contiguous ownership.
Its forward returns its FIRST argument, which was harmless only because
it was never called: loop bounds and ownership were the same thing, so
placeholders sat outside the iterated interval. A gapped set puts them
inside it. The unpack shapes then raise a confusing ValueError, but the
single-assignment shape -- orion.py:270, persimmon.py:253,
phi3_small.py:356 -- SILENTLY substitutes the positions tensor for the
hidden states. Placeholders built in the set branch of make_layers are
armed at construction and raise, naming the layer and pointing at
owned_layer_ids. Contiguous ownership arms nothing, so the default path
keeps the pass-through byte-for-byte.

This is why the other ~33 model loops are NOT converted here. They cannot
be executed on this rig, so edits in them would be unverifiable -- the
same argument that keeps the 19 vendor NPU sites untouched, now stated in
the DESIGN doc. The guard makes a missed loop a named error at first
forward rather than a corrupted hidden state, for all 33, without editing
any of them.

2. The PD descriptor refusal was INCOMPLETE. shard_start_global covered
the layer-shard path; the plain prefill path builds the same contiguous
(start_layer, end_layer) pair from the pool and the receiver slices its
buffer lists with it, with no guard at all. Both now call one shared rule
(refuse_noncontiguous_layer_descriptor) so they cannot drift apart.

3. My §3.1 audit's scope claim was wrong. It counted ~100 translation
sites and placed them in mem_cache/, model_runner.py and
swa_memory_pool.py. There are raw `- start_layer` translations outside
that scope: aiter_utils.py:147-148 and flashinfer_backend.py:2845-2851
and :3321-3329. The flashinfer pair is on THIS rig's backend and on the
hybrid linear/full attention path the family plan uses. They are FILED,
not converted: both compose the subtraction with a second translation
(_transfer_full_attention_id) whose interaction with set ownership I have
not established, and forcing an ambiguous site is what the rules of
engagement forbid. They remain the outstanding silent-wrongness risk and
are named as the next slice in the doc. Several further span-iteration
sites are recorded there too; all fail LOUDLY under a set, so they rank
below the flashinfer pair.

Tests: test_pp_missing_layer_refusal.py 11 passed + 3 subtests,
test_pd_descriptor_refusal.py 6 passed. Red-first on both. Can-fail
proven on five arms: placeholder passes through instead of refusing -> 8
failed; make_layers forgets to arm -> 4 failed; arming leaks into the
CONTIGUOUS path -> 4 failed; shared rule answers instead of refusing -> 3
failed; plain PD path left unguarded -> 1 failed.

That last arm initially did NOT fail: my wiring pin asserted the name
appeared in the module source, which the import line alone satisfied. Same
mistake as the sgl-project#584 pin -- counting mentions instead of stating the
invariant. Re-pinned on the source of _init_kv_manager, and re-proven.

Regression: 95 passed + 242 subtests across all seven suites of this
work. The distributed unit dir shows 18 failures, identical at HEAD and
with this change (verified per-suite: 8/7 on uneven_dcp_pool_geometry,
10/22 on the other two) -- zero new. A first baseline attempt reported
"0 failures at HEAD" and I nearly recorded an 18-failure regression from
it; that run had been truncated by its own timeout. black/isort/codespell
clean.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 18, 2026
…h too

Law sgl-project#584 makes the planner/ledger the sole VRAM authority, so this boot drops
the hand-picked --rank-gpu-memory-mib vector and lets the now-calibrated
ledger size each rank from real free VRAM. That moves sizing onto the other
branch of profile_max_num_token -- the one that takes available memory minus
slack -- where the corridor holdback was not applied.

Without it a gapped boot spends the whole CARD instead of the whole BUDGET
and arrives at the same OOM by the other road. Same predicate, same gate,
both branches.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 22, 2026
…by hand

--hicache-host-role staging (bfabd2d) refuses --hicache-ratio and requires
an explicit --hicache-size. That refusal is only worth having if the number
it demands comes from somewhere; a hand-picked --hicache-size is exactly the
pool pin the planner's sole authority over the memory budget (sgl-project#584/sgl-project#785)
exists to prevent.

planner/hicache_staging.py derives it. Two consumers, and sizing for one of
them silently breaks the other:

  * WRITE STAGING, a bandwidth-delay product: a page stays pinned from the
    moment it is handed to the storage backend until the write acks, so the
    resident set is drain rate x that residency, widened by a burst margin
    (write-through arrives in bursts, the drain is steady).
  * READ LANDING, which scales with CONCURRENCY, not bandwidth: a prefetch
    takes its destination slot from mem_pool_host.alloc() BEFORE the storage
    read is issued (hiradix_cache.py's _prefetch path). Sizing from the write
    side alone yields a tier that is correct and quietly serialises prefetch
    -- invisible to every capacity metric, visible only as latency.

The tier takes the larger, rounded UP: rounding down would emit a tier
smaller than the derivation justifying it.

NO RIG FIT. Drain rate and latency are PARAMETERS, not constants. The planner
probes rather than carrying a measured vector from one box to another, so
nothing in this module encodes what this rig happens to do (~0.5 GB/s on its
ZFS-backed file tier); that figure appears only as a test input.

WHAT THIS DELIBERATELY REFUSES TO DO. If write-through produces bytes faster
than the backend drains them, NO finite size holds -- residency is set by the
drain, so a faster producer grows the in-flight set without bound. sustainable()
answers that question so a caller can refuse instead of emitting a number that
cannot be correct. The remedy there is backpressure at the producer, a runtime
mechanism and not a size. Note sgl-project#720's ReadBufferPool made the OPPOSITE choice
on purpose for reads -- on exhaustion it allocates a fresh uncounted buffer
rather than blocking, trading "a bounded spike for an unbounded latency" --
which is right for a prefetch worker and wrong for a write path under a RAM
budget, where re-inflating the pinned footprint is the failure the budget
exists to prevent. That ring is the next posten, not this one.

fits_pinned_host_budget() asks the sgl-project#729 authority and registers the post like
every other pinned producer, so a tier that does not fit is refused where it
is derived rather than discovered at allocation.

Also: docs/dev/NOTE_810_dangling_design_706_c1.md records that
DESIGN_706_BOOT cites a DESIGN_706_constraints document (C1/C1a) that exists
nowhere in the tree. sgl-project#810's premise is quoted verbatim at the citing site and
does not depend on it, but the supporting argument is unrecoverable. Recorded
rather than reconstructed: rebuilding it from four citation fragments would
read as primary evidence while being inference, and the next reader would
cite it as the original. The tasked "add to DESIGN_706-C1" cannot be executed
until the target exists.

Tests: test/registered/unit/planner/test_hicache_staging_810.py, 19 new cases,
hermetic (CUDA_VISIBLE_DEVICES=""). FIVE mutants, all dying on the intended
tests:
  read consumer dropped (write-only sizing) -> 1 failed
  rounds down instead of up                 -> 1 failed
  zero-drain guard removed                  -> 2 failed
  burst-margin floor removed                -> 1 failed
  sustainability predicate inverted         -> 2 failed
Source green again at 19 passed; 28 passed together with the role gate.

Suite: test/registered/unit/planner/ is 2889 passed / 1 failed after this
change. The single failure is test_rejected_evidence_pins.py's sgl-project#797 evidence
assertion, confirmed PRE-EXISTING by re-running it on a clean checkout of
dd6967c with these files removed -- same test, same assertion. No
pre-existing test changed status. ruff/black/codespell clean.

Not wired to a probe yet, and named so it is not assumed: nothing measures
the drain rate automatically, so a staging profile still needs the number
supplied. Measuring it needs load against a running server, which belongs to
another strand's boot window right now.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 22, 2026
…ount the refusals

A staging host tier is small on purpose, and nothing at runtime bounded what
write-through put into it. The tier itself did, by running out -- which is not
a bound but two silent failures. The read consumer starves: a prefetch takes
its landing slot from mem_pool_host.alloc() BEFORE issuing the storage read, so
a tier full of undrained write-through pages makes it evict, retry, truncate
and abandon; a correct miss, invisible to every capacity metric and visible
only as latency. And the write refusal itself is silent: write_backup learns
about exhaustion by reading a None back out of an allocation that already
happened, then -- with no rank-uniform floor published -- takes evict_host(), a
RANK-LOCAL tree edit, which is the sgl-project#645 divergence.

NOT sgl-project#720's ReadBufferPool. Its acquire() (read_buffer_pool.py:99-105) answers
exhaustion by allocating a fresh UNCOUNTED pinned buffer, deliberately:
"stalling the prefetch worker to save memory would trade a bounded spike for an
unbounded latency". Right for a prefetch worker, and precisely wrong for a
write path under a RAM budget -- the footprint that overflow re-inflates is the
one --hicache-host-role staging exists to cap. StagingWriteRing never
allocates; its only outcomes are admitted and refused-and-counted.

THE RESIDENCY IS TWO-PHASE, and only one phase is refusable. write_backup
allocates the host slots; write_backup_storage calls node.protect_host() and
the protection drops only at the backup ack (ongoing_backup.pop ->
release_host). The bandwidth-delay product that planner/hicache_staging sizes
the tier from is the SECOND phase, so a ring spanning only the device->host
copy would claim a bound it does not have. Phase one is admit(), taken before
any allocation, where a refusal is actionable. Phase two is occupy(), which
cannot be refused -- the page is already resident, so refusing would free
nothing and merely hide the drain queue from the next admission.

Phase two is keyed by the STORAGE OPERATION, not the node, and that is not
cosmetic: in UnifiedRadixCache one write-through ack fans out into several
storage backups after a node split, each with its own id, and lock_node is by
then no longer among publish_nodes. A node-keyed charge would be stranded
there -- and a leak shrinks the ring permanently, a strictly worse failure than
the overshoot it protects against. So the node-keyed charge is retired at
exactly one site (_finish_write_through_ack) before the hand-off.

CAPACITY WITHOUT A NEW NUMBER. The read consumer is already bounded at runtime
by cache_controller.prefetch_capacity_limit = int(0.5 * mem_pool_host.size).
Both consumers share one tier, so the write bound is that number's complement.
The module introduces no constant of its own and does not become a second
sizing authority beside the planner (sgl-project#584/sgl-project#785). Built after
_symmetrize_prefetch_capacity(), so the bound derives from the group-agreed
number: a rank-dependent admission bound on this path is the sgl-project#645 defect.

No hysteresis, deliberately: a refused backup is not lost work (the node stays
in the tree and the next insert offers it again), so there is no thrash cost
for a watermark to damp, and a resume fraction would be an invented number.

Wired into both cache classes that have a construction site -- HiRadixCache
(registry.py:115) and UnifiedRadixCache (registry.py:191). HiMambaRadixCache
has none, stated at registry.py:108-109.

Default unchanged: the ring is built only under --hicache-host-role staging.
Under retention -- the default -- the attribute is None and every call site is
one `is None` test. The diff is purely additive.

Tests: test/registered/unit/mem_cache/test_staging_write_ring_810.py, 33 cases,
hermetic (CUDA_VISIBLE_DEVICES=""). Both real write_backup implementations are
driven UNBOUND over a fixture, in both directions: a ring with room admits
exactly as before, a full ring refuses, and a refusal is shown never to reach
evict_host and never to call cache_controller.write. The drain edges are driven
through the real write_backup_storage and the real
_drain_storage_control_queues_impl.

Mutants, 15, all confirmed dying:
  hiradix admit gate inert                     -> 4 failed
  hiradix abort on failed write removed        -> 1 failed
  hiradix abort on floor refusal removed       -> 1 failed
  hiradix drain-phase occupy removed           -> 2 failed
  hiradix release at D2H ack removed           -> 1 failed
  hiradix release at backup ack removed        -> 1 failed
  hiradix release on forced detach removed     -> 1 failed
  unified admit gate inert                     -> 2 failed
  unified abort on failed write removed        -> 1 failed
  unified drain-phase occupy removed           -> 1 failed
  unified release at backup ack removed        -> 1 failed
  unified release at D2H ack removed           -> 1 failed
  role gate removed (retention gets a ring)    -> 2 failed
  capacity is the whole tier, not the complement -> 2 failed
  exhaustion allocates instead of refusing     -> 8 failed
Source green again at 33 passed.

"unified release at D2H ack removed" SURVIVED the first battery at 32/32 green:
that call edge was untested. The test it now dies on
(UnifiedDrainPhaseTest.test_the_two_phases_do_not_double_count_one_page) was
added for it. Without the mutant round a leak edge would have shipped unchecked.

ruff/black/codespell clean on the new files; the modified files carry 372 ruff
findings before and after this change, i.e. none in these hunks.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 23, 2026
…gl-project#821, sgl-project#823, sgl-project#824, sgl-project#770/sgl-project#812, sgl-project#815; close the section 18 breach

Merge-checklist duty for the five wave-2 stages on this branch (fix/801,
fix/824, feat/770, feat/822, fix/815). Mechanism text is taken from the
commits' own measured evidence, not restated from ticket titles.

WHAT WAS ALREADY THERE, checked before writing rather than after. feat/822
catalogued ITSELF mid-train -- 21ff075 carries +49 lines of this file -- so
sgl-project#822 already has a complete section 3 entry including the sgl-project#816 clamp
firing-rate baseline. No second sgl-project#822 entry was written. sgl-project#801, sgl-project#815, sgl-project#821,
sgl-project#823, sgl-project#824 and sgl-project#770 had zero prior mentions; sgl-project#812 was name-checked inside the
KV-backing-relief bullet as a consequence of the cap, with no entry of its own.

SECTION 12, five new families:

  Said-once (sgl-project#823) -- a fact that changes during a process, reported once at
  the moment it first became true, is a stale label afterwards. Both instances
  live in _update_uniform_pool_budget: the floors' coverage said three times
  at startup and never again through four cutovers in 55 s, and a divergent TP
  queue head logged as an event when it is a duration. The mutant that makes
  the case: disabling the recovery edge left all 14 tests green before the
  streak was extracted.

  Blind-instrument (sgl-project#821) -- the scheduler watchdog's activity predicate reads
  exactly the two values a rank parked in the dict receive freezes, so the
  instrument best placed to see the wedge is the one structurally unable to.

  Non-monotone-source (sgl-project#824) -- a monotone guarantee (the protected prefix)
  derived from a non-monotone tracker (mamba_last_track_seqlen). Landed as a
  measured assertion, cache_protected_len=16384 against page_aligned_len=8192.

  Invariant-for-funding (sgl-project#770, sgl-project#812) -- a group-derived per-rank floor asking
  PP1 for 102.9% of its own cap, and the withdrawal of a floor clamp that
  bought funding by breaking the levelling invariant (1 failed with, 12 passed
  without).

  Stub-drift (sgl-project#815) -- ten helpers drifted behind named commits, and the rule
  the repair follows: faithfully or not at all. This entry also RECORDS why
  seven cases in test_pp_flip_slot_hold_631.py are deliberately left red -- the
  faithful stub is a real rank identity, which drags the whole
  admission-receive path in with it. That is documentation of a known state,
  not a claim that it is fixed.

Plus a NUMBER-COLLISION note, because the log is ambiguous without it:
9d13bf0 is subject-tagged [sgl-project#824] and names its test file _824.py but is
canonically register-sgl-project#823 (floor-scope reporter, strand 16f, arriving on
fix/801-admission-recv-liveness); the canonical sgl-project#824 is 658d0c1 on
fix/824-chunked-prefill-protected-len. No rebase, so the titles stand and the
mapping is written down instead.

SECTION 7: sgl-project#801's dead-peer measurement, which REFUTES the premise under the
sgl-project#816 survivor analysis -- an exited or SIGKILLed peer makes the admission
receive raise after 1.02 s, while alive-never-sends and SIGSTOP both block
unbounded, so a rank silent for 119.7 s was not waiting on a corpse.

SECTION 2: the funding authority (sgl-project#770/sgl-project#584/sgl-project#819) -- one question, posts
declared by name, the three priced losses (L1 the unreachable 2638 MiB, L2 a
3437-row ask against 8192-row granularity returning a silent zero at 65% of
the shortfall, L3 claimed=0 against an accounted 107 MiB), and the arming
floor solved rather than asserted (512 MiB reserve needs 1523 against a 1229
ceiling = structurally unreachable; 218 is the largest that fits). sgl-project#819's
break-even carries its provenance because X and P are env-overridable
defaults that are never runtime-measured.

SECTION 18 -- THE BREACH, CLOSED. Rule 5 says a PR adding a reusable module
adds its entry in the SAME PR. Three modules had landed without one:
kv_row_ownership.py (sgl-project#822), funding_authority.py (sgl-project#770), uniform_floor_scope.py
(sgl-project#823). prefetch_ballot.py (#791b) had the same gap from an EARLIER merge and
is added here labelled as backfilled -- the provenance is stated rather than
quietly absorbed, because the checker only tests citations that EXIST, so a
missing entry costs nothing and is exactly the failure mode rule 5 cannot
catch.

Each entry says what is NOT wired, in those words. Both authorities are so far
consulted only for the arming floor, the census and the retire/audit pair; the
clamp firing-rate metric, format_violations, diagnose_floor_band,
uniform_absolute_floor and slack_above_uniform_floor have no production caller
at this commit. Recording an unwired export as wired is how a catalog becomes
a liability. One trap recorded: funding_authority's docstring at :56 names a
solve_funding function that does not exist -- the solve is can_fund at :378.

TWO DEFECTS FOUND WHILE WRITING, both fixed here:

  1. Section 18 cited `watchdog.py:88`, which resolves to
     python/sglang/srt/watchdog.py -- a file that does not exist in this tree.
     The intended target is turnkey/watchdog.py:88 (the retired generation
     probe), now qualified. This was a live red test, not a cosmetic issue.
  2. The sgl-project#822 section 3 entry cited kv_backing_relief.py:504 for
     exposure_over_backing; :504 is a docstring line and the def is at :547.
     The entry landed already drifted. Corrected, with the drift noted in
     place per the header rule that the code wins.

TESTS. test/registered/unit/docs/test_building_blocks_catalog_538.py, the
mechanical section-18 pointer checker: 91 passed / 1 failed BEFORE (the
watchdog.py:88 breakage), 101 passed / 0 failed AFTER. The ten new cases are
the ten new citations, and every one resolves. The indicator is proven in both
directions without needing an injected mutant: it was red on a real bad
pointer of exactly the class it claims to detect, and is green now.
codespell on the file: clean.
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.

2 participants