Repository navigation
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: The change duplicates dependency traversal and exposes two constants without external consumers.
Must fix
1. Keep dependency traversal in its existing owner
tools/recipes.py:2356 repeats Tree.closure at tools/recipes.py:1440: both decide workspace membership, optional dependencies, dev dependencies and feature defaults. Breadth-first traversal supplies the new shortest-chain requirement without a second owner (R14).
Fixing this now removes a function and keeps future dependency-rule changes in one place.
Replace Tree.closure with this definition, then delete closure_chains:
def closure(self, pkg: Package, features: list[str], dev: bool, default: bool = True, all_features: bool = False) -> dict[str, str]:
"""Workspace packages a target links, each with its shortest dependency chain."""
_, deps_on, _ = self.feature_closure(pkg, features, default, all_features)
seen: dict[str, str] = {}
queue: collections.deque[tuple[str, list[str], bool, str]] = collections.deque()
for d in pkg.deps:
if d.pkg not in self.packages or (d.kind == "dev" and not dev) or (d.optional and d.key not in deps_on):
continue
queue.append((d.pkg, d.features, d.default, f"{pkg.name} -> {d.pkg}"))
while queue:
name, feats, dflt, why = queue.popleft()
if name in seen:
continue
seen[name] = why
q = self.packages[name]
_, q_on, _ = self.feature_closure(q, feats, dflt)
for d in q.deps:
if d.pkg not in self.packages or d.kind == "dev" or (d.optional and d.key not in q_on):
continue
queue.append((d.pkg, d.features, d.default, f"{why} -> {d.pkg}"))
return seenReplace the assignment in why_chains at line 2396 with:
chains = tree.closure(tree.packages[pname], feats, dev, not inv.no_default, inv.all_features)2. Restrict the dense-stem constants to glm5next
crates/model/src/arch/glm5next/roles.rs:62 makes DENSE_GATE and DENSE_DOWN public. Their only callers remain roles.rs and sibling place.rs; the moved checkpoint map uses DENSE. These two API additions have no external consumer (R13).
Restore their scope before another crate starts depending on unnecessary exports:
pub(super) const DENSE_GATE: &str = "ffn_gate.weight";
pub(super) const DENSE_DOWN: &str = "ffn_down.weight";Checked
Duplicates: both traversal bodies and their callers read. Reusing Tree.closure removes one function without adding an owner.
Visibility: all references to DENSE_GATE and DENSE_DOWN are in roles.rs and place.rs; the checkpoint map reads DENSE.
Validation: both Python replacements parse. The proposed traversal matches closure_chains and preserves package reach across 1,184 manifest-derived configurations, covering features, dev dependencies, defaults and two dependency orders. The inline replacement restores base visibility on added lines 62–63.
Notes
Rust/CUDA gates were not executed during validation. The PR body omits the card/driver line and full gate output required for GPU evidence.
Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/gate_serve_start.rs, crates/gpu-gates/src/bin/generate_glm5next.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)
| pub const DENSE_GATE: &str = "ffn_gate.weight"; | ||
| pub const DENSE_DOWN: &str = "ffn_down.weight"; |
There was a problem hiding this comment.
R13: both constants have callers only inside glm5next; the moved checkpoint map uses DENSE. Restore their existing scope.
| pub const DENSE_GATE: &str = "ffn_gate.weight"; | |
| pub const DENSE_DOWN: &str = "ffn_down.weight"; | |
| pub(super) const DENSE_GATE: &str = "ffn_gate.weight"; | |
| pub(super) const DENSE_DOWN: &str = "ffn_down.weight"; |
There was a problem hiding this comment.
Since the last review:
- Dependency traversal: fixed. tools/recipes.py:1440 owns breadth-first traversal, and
why_chainsreuses it.closure_chainsis deleted. - Dense-stem visibility: fixed. crates/model/src/arch/glm5next/roles.rs:62 restricts both constants to their parent module.
Verdict: CLEAN: Both earlier findings are fixed, and no defect survives review of the incremental changes.
Checked
Duplicates: 0 new items; one traversal owner remains. Dryer reports 0 candidate pairs.
Complexity: all 11 crapper reports concern functions unchanged in this incremental diff.
Silent failure: 0 new sites. Optional, dev, default-feature and workspace-membership filters retain their behavior.
Tests: none changed. Python parses. Focused checks of the extracted traversal pass for shortest chains, cycles, empty dependencies and dependency filters. Replacing popleft() with pop() fails the shortest-chain check.
Gates: no pins, thresholds or test cases changed.
Escape catalog: no matching patterns in the incremental diff.
Notes
Full recipe self-tests and Rust/CUDA gates were not run. The PR omits the card/driver line and complete gate output required for GPU evidence.
Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/gate_serve_start.rs, crates/gpu-gates/src/bin/generate_glm5next.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
Not approved: this pull request changes AGENTS.md, which changes the bot, CI or the toolchain and needs a person's approval.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
…o not fetch; narrow-scan reads each side's scan set The hf crate was an edge of model and of every gpu-gates bin, so an hf-only change moved 184 gate keys, 63 of them for recipes that never reach hf. Now: - crates/model-hf holds what the CPU model description does with the hub: the fixture generator's remote fetch, its bin and test, and GLM-5.3-Flash's checkpoint map. The files are moved as they were; only their paths changed. - gpu-gates links bloomery-hf only through the `hf` feature, and bloomery-model-hf through `glm5next-hf`. The bins that fetch or read a checkpoint require them. - With only crates/hf/src/lib.rs changed, the keys go from 184 to 26 and hf's gap from 63 to 0 (`recipes.py gaps --rev origin/main bloomery-hf` is rc 1 on the old tree). tools/narrow-scan.sh: each side scans its own tree's scan set. A bin whose features differ between the sides is named with both sets, and a bin in one set only ends the run at rc 2 before the box. The base cache key reads the base set. The self-test goes from 126 to 133 cases; a mutant where the base takes the head set is red on 11. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K8ndZ5qubx9kYLVxTgbvEq
…'s shortest chain; closure_chains is gone why_chains now calls Tree.closure, so one function owns workspace membership, optional and dev dependencies and feature defaults. Over 592 configurations the reached sets are identical; only the chain strings change, to the shortest. Every gate recipe's key and parts are byte-identical before and after (195 gate-* recipes). glm5next's DENSE_GATE and DENSE_DOWN are pub(super) again: their only users are roles.rs and place.rs. FAIL-first: queue.pop() in place of popleft() turns the why_chains self-test red (gate-gpu-glm5next-twocard's chain). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K8ndZ5qubx9kYLVxTgbvEq
…nto the arch registry Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K8ndZ5qubx9kYLVxTgbvEq
There was a problem hiding this comment.
Since the last review:
- Dependency traversal: remains fixed. tools/recipes.py:1440 owns traversal;
why_chainsreuses it. - Dense-stem visibility: remains fixed. crates/model/src/arch/glm5next/roles.rs:62 keeps both constants private to their parent.
Verdict: CLEAN: No findings remain after applying the review exclusions.
Checked
Duplicates: 0 new items in the interdiff; dryer reports 0 candidate pairs.
Complexity: all 11 crapper reports concern functions whose logic this interdiff does not change.
Silent failure: 0 new sites in the interdiff.
Tests: the relocated GLM test asserts expert source order and reads existing fixtures. Reversing the expert stack would violate its source-order assertion.
Gates: no pins, thresholds or assertions removed or relaxed. Retained serde_json and flate2 entries serve the Qwen reader and its tests.
Escape catalog: none of C1–C4 match the interdiff.
Notes
Rust/CUDA builds and gates were not run. Dryer did not search gpu-gates; this interdiff adds no gpu-gates source. The PR lacks the card/driver line and complete gate output required for GPU evidence.
Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/gate_serve_start.rs, crates/gpu-gates/src/bin/generate_glm5next.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
Not approved: this pull request changes AGENTS.md, which changes the bot, CI or the toolchain and needs a person's approval.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
…ub edge out of model The rebase onto main brought prepare (5a5ac76): its bin and qwen35moe's checkpoint map read the hf crate from bloomery-model, which this branch no longer links. Both move to bloomery-model-hf beside GLM's map, as moved files with import paths changed; qwen35moe's PLE limits become pub for it. The prepare recipes build it from bloomery-model-hf. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K8ndZ5qubx9kYLVxTgbvEq
There was a problem hiding this comment.
Since the last review:
- Dependency traversal: remains fixed. tools/recipes.py:2356 still reuses
Tree.closure. - Dense-stem visibility: remains fixed. crates/model/src/arch/glm5next/roles.rs:62 keeps both constants private to their parent.
Verdict: CLEAN: The new commits preserve the moved checkpoint reader and converter logic, dependencies, fixture paths and gate recipes.
Checked
Duplicates: 0 new definitions; the two exposed PLE constants retain their existing owner. Dryer reports 0 candidate pairs.
Complexity: Qwen Checkpoint::parse, map, layer, Step::apply and prepare run, served_as_hf are unchanged moves. The other nine crapper reports concern earlier commits.
Silent failure: 0 new sites. Zero PLE n-gram size is rejected by Reader::count before subtraction; the moved bounds retain their values and named errors.
Tests: assertions moved unchanged. Fixture roots and direct test dependencies remain valid. Static mutation analysis: reversing the shard-budget comparison breaks the asserted shard lengths.
Gates: no thresholds, assertions or pins relaxed. Both prepare recipes now select bloomery-model-hf; its library recipe covers the moved Qwen tests.
Escape catalog: none of C1–C4 match this increment. No decode, prefill or kernel work changed.
Notes
Builds and runtime gates were not run. Dryer skipped gpu-gates; this increment changes no gpu-gates source. The PR lacks the card/driver line and complete gate output required for GPU evidence.
Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/gate_serve_start.rs, crates/gpu-gates/src/bin/generate_glm5next.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
Not approved: this pull request changes AGENTS.md, which changes the bot, CI or the toolchain and needs a person's approval.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
bloomery-hfwas an edge ofmodeland of every gpu-gates bin, so an hf-only change moved 184 gate keys, 63 of them for recipes that never reach hf.crates/model-hfholds what the CPU model description does with the hub: the fixture generator's remote fetch, its bin and test, and GLM-5.3-Flash's checkpoint map. The files are moved as they were; only import paths changed.bloomery-hfonly through thehffeature, andbloomery-model-hfthroughglm5next-hf. The bins that fetch or read a checkpoint require them.crates/hf/src/lib.rschanged, the keys go from 184 to 26, and hf's gap goes from 63 to 0 (recipes.py gaps; rc 1 on the old tree).tools/narrow-scan.sh: each side scans its own tree's scan set. A bin whose features differ is named with both sets. The self-test goes from 126 to 133 cases.Evidence:
bloomery-serve-ds41,gate_kquantandgate_swapidentical: 0 kernels moved.gate-qdotiq4xs, is red on the base too.🤖 Generated with Claude Code
https://claude.ai/code/session_01K8ndZ5qubx9kYLVxTgbvEq