Repository navigation
Conversation
…rena, counted_arena_bytes) qwen3moe::place carried `machine` (placed_on at the m = 1 scratch plus an arena) and `counted_arena_bytes` (the scratch past the m = 1 scratch), and qwen35moe's fixture spelled `SCRATCH + arena` out again. Both now have one owner beside `placed_on`: `workstation::placed_with_arena` and `workstation::counted_arena_bytes`. The qwen3moe copies are gone and their callers (the gates' shared placement, the qwen35 open, the Qwen3 bodies' refusal of an arena past the plan's count) call the owner. `placed_on` keeps its scratch argument. A move: no kernel, launch or byte formula changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: The move leaves a duplicate scratch reader and an unnecessary builder layer.
Must fix
1. Use the common scratch reader on the Qwen3.8 path (kind B)
workstation.rs:285 and qwen35moe/place.rs:1173 both compute card.scratch_bytes.saturating_sub(SCRATCH) and document the same arena-byte contract. R14 requires one owner. The Qwen3.8 loader still uses the per-model copy.
Consolidating now removes one function while this rule's ownership is being changed.
Delete counted_ubatch_bytes, its documentation and attribute from qwen35moe/place.rs. Replace its sole call at body38.rs:1313 with:
let counted = model::placement::workstation::counted_arena_bytes(spec);2. Fold the sole-use builder into placed_with_arena (kind B)
workstation.rs:277 forwards to placed_on. Every other caller of placed_on has moved, leaving two public builders for one operation. The raw-scratch builder has no independent user. This violates the fewest-elements contract and R13's public-visibility rule.
Folding it now removes one function and an unused public entry point.
Delete placed_on and its documentation. Keep #[must_use] on placed_with_arena, describe its SCRATCH + arena contract directly, and use this definition:
pub fn placed_with_arena(spec: CardSpec, layers: usize, arena: u64) -> Machine {
let mut machine = plan_on(spec, layers);
let card = &mut machine.cards[0];
card.token_embedding = true;
card.scratch_bytes = SCRATCH + arena;
machine
}Checked
Duplicates: 2 relocated functions checked with Grep; the reader duplicate is above. Dryer reported 0 pairs.
Complexity: crapper flagged no functions; neither moved body adds branches.
Silent failure: 1 saturation site followed through both loaders and 3 gate consumers. Insufficient scratch reaches a named GpuError::shape; gates compare the counted bytes with the arena requirement.
Tests: by inspection, dropping + arena at workstation.rs:278 fails the card assertion at :1615; returning zero at :286 fails :1599. Gate lookup changes preserve their accounting comparisons. The context-halving helper retains its existing assertions.
Gates: no threshold, pin, case or test removed or relaxed.
Escapes: none of C1–C4 matched.
Performance: the changed executable paths run during planning and loading; no per-token work changes.
Notes
Review and mutation checks were static; builds and gates were not run here. The PR body reports gate results but lacks the required nvidia-smi output and exact just gate-* commands with output. GPU evidence is recorded as false.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen35moe_e2e.rs, crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen35_open.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)
|
Narrow list and the gates this PR kept (asked for by the lead). Narrow result. The gates that run the changed host path are the 20 recipes that read the four changed gate files as their own targets ( Run so far (7 of the 171, all green): Not run: the other 146 of the 171 (list: This comment was written by a bot (a Claude Sonnet 5.5 agent in the Claude Code harness) under the lead's direction. |
… directory crates/model/src/arch/qwen35moe/fixture/qwen35moe.rs had no row, so a change to it kept the full list (just affected --narrow: 'no row of tools/gate-paths.tsv maps it'). python3 tools/recipes.py reach names two gates that reach it through a dependency, gate-gpu-gemma-embedding2-e2e and gate-fixture; the other 147 of the 150 gates that link the model lib do not. The row covers the directory and lists the two. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Since the last review: the new commit adds one fixture-subtree gate-selection row at tools/gate-paths.tsv:154.
Verdict: CLEAN: No must-fix finding remains within the incremental diff.
Checked
Duplicates: 0 new functions, types or constants; dryer reported 0 pairs.
Complexity: crapper reported no qualifying changed functions.
Silent failure: no executable error-handling code changed.
Tests: no tests changed; mutation review does not apply to the added table row.
Gates: the row maps the fixture subtree to gate-fixture and gate-gpu-gemma-embedding2-e2e. No threshold, assertion or test case changed.
Escapes: none of C1–C4 match the added row.
Performance: tool metadata only; no hot path changed.
Notes
Validation was static; builds and gates were not run. The PR body lacks the required nvidia-smi output and exact just gate-* commands with output. GPU evidence remains false.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen35moe_e2e.rs, crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen35_open.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 18 call-site gates (the recipes that run the four changed gate files as their own targets, beyond the first 7), as PR evidence. Box: RTX 3090 and RTX A6000, driver 615.71.09, head Fixture tier,
The 10 the fixture tier deferred by name (real-only 4, real-file 5) or had no fixture for ran in the real tier on the real files,
Also pushed: a This comment was written by a bot (a Claude Sonnet 5.5 agent in the Claude Code harness) under the lead's direction. |
# Conflicts: # tools/gate-paths.tsv
|
Merged origin/main into this branch (
This comment was written by a bot (a Claude Sonnet 5.5 agent in the Claude Code harness) under the lead's direction. |
There was a problem hiding this comment.
Since the last review: no must-fix or non-blocking items were open. The fixture selection row now also selects gate-fixture-budget.
Verdict: CLEAN: The placement refactor preserves the scratch formulas, caller guards and machine layout.
Checked
Duplicates: 2 relocated functions checked against existing owners; no new duplication introduced. Dryer reported 0 pairs.
Complexity: crapper flagged no functions; the moved functions remain straight-line calculations.
Silent failure: 1 moved saturation site followed through both GPU loaders; an arena above the counted budget returns a named shape error.
Tests: static mutation review of workstation.rs:1599 and :1615 rejects dropping SCRATCH or arena at :278, and returning zero or raw scratch at :286. The unlisted runner-test change is caught by the existing contrib-check t0 self-test and is excluded under the review rules.
Gates: no threshold, tolerance or assertion was relaxed; the fixture row adds gate coverage.
Escapes: none of C1–C4 match the tree changes.
Adversarial checks: empty-card plans retain named errors; zero-arena planning and the shared type re-exports preserve base behavior. Changes affect load-time planning, not decode or prefill execution.
Notes
diff.patch contains 65 paths and overlaps files.txt only at tools/gate-paths.tsv. Review used direct tree comparisons. files.txt also omits the change to tools/ref/source-inspection-test.py.
Validation was static; builds and gates were not run. GPU evidence lacks nvidia-smi output, model paths and exact just gate-* commands. Its reported head hash differs from pr.json.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen35moe_e2e.rs, crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen35_open.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)
|
Superseded by #508 (rebased onto main). |
What and why
A placed load's machine and the arena the body counts in its scratch were laid out by a qwen3moe-only wrapper (
qwen3moe::place::machine,counted_arena_bytes). The qwen35moe fixture, the two gpu bodies' load checks and four gate files called it. Any family that places one card the same way would have copied it.This moves both into their common owner,
workstation:placed_with_arena(spec, layers, arena)isplaced_on(spec, layers, SCRATCH + arena), andcounted_arena_bytes(card)is the card's scratch pastSCRATCH. The qwen3moe copy is gone and every caller reads the common one. No kernel, launch or byte formula moves.Release notes: internal — one owner for the placed machine's arena.
Per-model copies
crates/model/src/arch/qwen3moe/place.rsmachineandcounted_arena_bytes(they were at lines 43 and 50 of the base file).crates/placement/src/placement/workstation.rs, the common owner.Move proof
just canon-check 402f9abc6on the box:canon-check: 3 bins, 908 entries: 908 identical, 0 reordered-only, 0 differs, 0 only-on-one-side; rows equal (jit columns not compared: no-jit both). Bins scanned:gate_glm5next_e2e,gate_kquant,gate_swap.just checkrc 0 andjust lintrc 0 on the box. Of its 62warning:lines none points at a line this change touches (the one inqwen3moe_place.rsis main's dead-codedense_shortage_halves_the_default_context).GPU Evidence
Box: RTX 3090 and RTX A6000, driver 615.71.09. Base
402f9abc6(origin/main), headdc729e8e3. All jobs through the box queue,tools/gate-batch.sh --round-ledger.Fixture tier,
DONE total=7 red=0 tier=fixture wall=924s deferred=12 real_only=1 real_file=1:gate-gpu-gates-libs2386, A6000, rc 0:test result: ok. 122 passed; 0 failed; 3 ignoredandok. 5 passed.gate-gpu-libs2387, 3090, rc 0:ok. 273 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out(and three moreokresults).gate-gpu-qwen35moe-e2es2392, A6000, rc 0:gpu-gate.sh: gate_qwen35moe_e2e ran 17 s (exit 0).gate-qwen35moe-metas2396, A6000, rc 0:ok. 2 passed.gate-qwen3moe-metas2395, 3090, rc 0:ok. 5 passedandok. 3 passed.The two gates the fixture tier defers by name ran in the real tier on the real files,
DONE total=2 red=0 tier=real wall=326s:gate-placements2402, 3090, rc 0:ok. 11 passedandok. 138 passed.gate-gpu-qwen3moe-e2es2401, A6000, rc 0:gpu-gate.sh: gate_qwen3moe_e2e ran 118 s (exit 0).Code shape
One owner for the placed machine's arena in
workstation; the callers' docs name it. No comment carries a date or an issue number. No gate or lint was relaxed.This PR was written by a bot (a Claude Sonnet 5.5 agent in the Claude Code harness) under the lead's direction.
🤖 Generated with Claude Code