Repository navigation
levers: --levers says whether each lever applies to the binary and seat; a lever read in place is checked by its kind at main, and one the binary does not read is named as not applied - #890
Conversation
…at; a lever read in place is checked by its kind at main, and one the binary does not read is named as not applied A Direct row now says who reads it: every binary (the host tier's POISON, STEAL, PROFILE and QDOT_AVX512, read below any main as the pool's two are), or the binaries that name it among the levers they act on. A binary's reading parses every Direct lever set by the row's kind, as a Parsed one (a Text value stays its owner's), so a value its kind does not take is refused at the start instead of where a load reads it. A well-formed Named one the binary does not read does not stop the start, since one environment may carry the levers of several models: a line on stderr says it is not applied and where it is read. A Parsed lever left out of the list is refused as before. --levers prints every line even when the reading refuses, with a column for whether this run applies the lever (yes, no, refused) and the value set, then returns the refusals as a start without it would. The binaries and seats whose path reads BLOOMERY_QWEN3_UBATCH (the qwen3, qwen38 and decide seats, generate_qwen3moe and the gates that open a qwen3moe body) and BLOOMERY_DSPARK_CARD (the ds41 seat and its gate and soak, generate_ds41, gate_deepseek41_twocard) name it.
There was a problem hiding this comment.
Verdict: CLEAN: I built no failure path for the lever reading that survived a check, and I found no proven duplicate, unneeded element or relaxed gate.
Non-blocking
⚠ The "seat list breaks" test covers one spelling: bloomery_serve_qwen38.rs:400. DIRECT_READS is a hand-made list and the check is src.contains("ubatch_rule(a."). If the seat reads a second Direct lever, or reads UBATCH_ENV through ubatch_asked(), nothing turns red, and --levers prints no for a lever the seat applies. The PR body says the test breaks when the seat reads the lever "through ubatch_rule without listing it"; that holds only for this call text. Direction: say so in the body, or scan the seat source for each Readers::Named row's reader function.
⚠ Nothing guards the gate-binary lists: for example gate_qwen38_nodes.rs:1717. Each repeats ubatch::UBATCH_ENV. A bin that starts to read the lever later prints a false "is not applied" line. A bin that stops keeps a stale entry. Both are non-fatal. Also shared/routed_legs.rs:660 is common code, and it now names a qwen lever (tools/model-tax.tsv qwen 21 to 22, limit 24). The PR does not say which architecture fact forces this.
Checked
- Duplicates: 4 new items checked (
Readers,Reading,Kind::taken,not_named); none duplicated. dryer found 0 pairs; it did not searchcrates/gpu-gates, so I grepped it by hand. - Complexity: crapper flagged
reading(new, 46) andtable_is_a_line_per_lever(8 to 13).readingis the oldreadwith the Direct arms added to onematch: one owner, no split asked. The test growth is mild. - Silent failure: 5 sites followed (Direct
Kind::TextvalueNone; unsetacts: falseentry;--leverswith a refusal;_ => continuefor other scopes;Everylevers now refused for a wrong form). No script undertools/or the justfile sets a value the kinds refuse. - Tests: mutants run in my head. Direct skipped at main, unread Named refused, Every counted as unread, and swapped table cells each turn a test red.
- Gates: no band or tolerance moved.
- Hot path: none (start-up only). Escape catalog: no pattern matched.
Notes
- The PR body's hashes (
54e1f3f,088286a) are not the head (03a5613) or base (2f27e83). The GPU checks ran on earlier revisions, andcargo clippywas not run on the head. I setevidenceto false ingpu.json.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/bloomery_serve_qwen38.rs, crates/gpu-gates/src/bin/gate_deepseek41_twocard.rs, crates/gpu-gates/src/bin/gate_gemma_embedding2_serve.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
--levers가 각 lever를 이 binary와 seat가 실제로 쓰는지 보여 주고, 값 형식이 틀린 lever는 시작할 때 거절합니다.Part of #565.
What and why
On upstream main, a lever that the code reads in place (the registry's "in place in" rows) is never checked at start.
BLOOMERY_WEIGHTS=anonandBLOOMERY_QDOT_AVX512=2both print-in the--leverstable with no refusal, so a mistyped value goes through, and a lever set beside a binary that ignores it looks the same as one that works.This change makes
--leversprint, for every lever, whether this binary (onbloomery-serve, this seat) applies it:yes,noorrefused, then its value. At start, a lever read in place has its value checked by its registry kind, as a parsed lever already is. A value of the wrong form is refused by name with what the lever takes, and the process exits 1. A value of the right form that this binary or seat does not read does not stop the start, since one environment often holds levers for several models. It prints one line on stderr saying the lever is not applied and where it is read, and the table showsnowith the value. A parsed lever outside a binary's list is still refused, as before.Site::Directrows incrates/levers/src/registry.rsgain abyfield:Everyfor the four levers the host tier reads under any binary,Namedfor the rest, which the binary or seat that reads them lists in itsacts_on. The lists name a lever through the reader's own constant (UBATCH_ENV,DRAFT_CARD), so the name has no second copy. The qwen38 seat's list test also breaks when the seat readsBLOOMERY_QWEN3_UBATCHthroughubatch_rulewithout listing it. TheLeversparagraph indocs/BUILD.mddescribes the new column and line.Release notes: Fixed:
--leversshows whether each lever applies to the binary and seat, a lever read in place is refused for a value of the wrong form, and one the binary does not read is reported as not applied.Code shape
acts_on, with no new table.Kind::takenis the one check of a value, and the override path's copy of its text branch calls it.crates/leversand the startup lever lists of serve seats and gates.not_parsedbecamenot_named, and nothing it replaced is left.tools/model-tax.tsvbaseline forshared/routed_legs.rsgoes from 21 to 22, under its limit of 24.cargo fmtandcargo clippyon what I touched: I ran the format check on the later revision (below). I did not runcargo clippyon the head.Duplication found or removed (
path:line): none. The two copies of a lever's text branch (the main path and the override path) are now one call toKind::taken.What I ran
Head
54e1f3f20c5f404817ec563f869e79f6850e40b5, base088286a775141f3de3c5c6f8f5473ac596ed1e11. The checks below ran on earlier revisions of this patch. The later revisions drop two list entries from gate binaries, add one command-line test and rebase; the lever logic is the same. I did not rerun the GPU-machine checks on the head itself.Lever tests on an earlier revision:
On the later revision, with the added command-line test,
test-bloomery-leversandfmtfinished with rc 0 in the repository's contributor checks. On the earlier revision,check-leversandcheck-model-taxboth finished with rc 0.Each new test breaks when its behavior is removed. Three one-line mutants of
crates/levers/src/lib.rs, run against the tests:just gate-q38-serve-ruleson an RTX 5090 machine includes these tests:To reproduce on the qwen38 seat, run
bloomery-serve-qwen38 --leverswith the environment named on each case. The table rows below are trimmed to the lever each case is about; the real output is one line per lever.The qwen38 seat's list test fails when
UBATCH_ENVis taken out of the list, withBLOOMERY_QWEN3_UBATCH is read by the seat but not in ACTS_ON. Two gate binaries that start a seat list the lever their seat reads, so--leverson them shows it as applied:With the old empty list, the same command printed
is not applied: this binary (gate_qwen3_dspark) does not read it.Not run: a timed measurement, since the change only reads environment variables at start and touches no decode or prefill path; the repository's
verifyprofile, which this checkout does not have; and a GB10 compile, since no device code changed.Hardware
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.