Repository navigation
Conversation
…age's dependencies name, and a feature word no selected package can take is refused by name Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eferred where that fact is unset, and stays strict where it is set Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ted in levers-direct.txt Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: NEEDS_ENV writes the variable name twice and carries a function pointer that one row does not need.
Must fix
1. NEEDS_ENV states one fact twice and holds an element it does not need
crates/refset/src/arch/mod.rs:96-105: the row names "BLOOMERY_CARD_ALL_EXPERTS" (line 98), and card_all_experts names it again (line 104). The third tuple field (fn() -> bool) and the function exist only to read that same variable. Two copies in one diff are a finding, and the function pointer is an element with one user. Nothing here needs a per-row predicate: the table already has the variable name, and the check is "set and not empty" for every row (the same rule as needs-env.sh). Today, if someone edits one of the two names, the table and the check disagree and nothing turns red: the unit test compares only the table's name with the justfile.
Fix: the table holds (family, var), and deferred reads the variable. This removes one function and one tuple field.
static NEEDS_ENV: &[(&Family, &str)] = &[(&qwen4exp::nvfp4::HF, "BLOOMERY_CARD_ALL_EXPERTS")];
#[must_use]
pub fn deferred(f: &Family) -> Option<&'static str> {
NEEDS_ENV
.iter()
.find(|(g, _)| std::ptr::eq(*g, f))
.map(|&(_, var)| var)
.filter(|var| std::env::var_os(var).is_none_or(|v| v.is_empty()))
}Also in the test (line 264): .map(|&(f, var)| (f.name, var.to_string())). The use line does not change.
Non-blocking
⚠ No test turns red if deferred is inverted: arch/mod.rs:114. Mutant: .filter(|…| set()) instead of !set(). The table test compares names only. The two checks that would catch it (hw_every_set_in_place_is_its_familys, refset-check) run on the box, and only show it as a changed count. The PR body says the strict case (variable set → 4 FAIL, rc 101) was run by hand; a test would keep it. Direction: only if you can do it without a new parameter or layer; otherwise leave it.
Checked
- Duplicates: 4 new items checked (
NEEDS_ENV,deferred,card_all_experts,depends_on), plusneeds_env_of; the variable name repeats inside the diff (must fix 1). No existing owner of "family waits on a variable" found. dryer: 0 pairs. - Complexity: crapper flagged nothing.
- Silent failure: 3 sites followed (deferral by unset variable, the
fp == pname/depends_ondrops inresolve_call,needs_env_ofreturningNone). A deferral is named in output and counted in the summary line; a feature word dropped for a package is covered by the named error inTree.resolve.refset-check <family> <paths>skips deferral by design. - Tests:
needs_env_rows_are_the_families_whose_consumers_open_with_needs_envprotects the table against the justfile: removing the row, or changing the variable in the justfile, turns it red. The new_st_basicscases: dropping thedepends_onfilter inresolve_callturnswantred; dropping the newelifinresolveturns thejcase red. - Gates: no pin, band or tolerance moved.
tools/levers-direct.txtrow added for the new env read; matches the existinggatestomlrows. - Escape catalog: no pattern matched (no shell changed).
- Hot path: none (tools and a reference-set check).
Notes
- No
nvidia-smiline or commit hashes in the body; the change touches no GPU crate, so no speed or card claim is made.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
On must-fix 1: the suggested form is the round's first version. |
There was a problem hiding this comment.
Verdict: CLEAN: the new commit answers the earlier must-fix; it only changes a doc comment.
Since the last review:
- Must fix 1 (
NEEDS_ENVnames the variable twice, one function pointer): answered by the author. The new comment at arch/mod.rs:102-103 saystools/check-levers.shreads a variable only by a literal or a same-file const. I checked check-levers.sh:125-171. The claim is true. My suggested fix (var_os(var)withvarfrom the table row) would be red there ("reads a variable whose name is not a literal"). I withdraw it. - Non-blocking item (no test turns red if
deferredis inverted, arch/mod.rs:115): still open, not answered. It stays non-blocking.
Checked
- Duplicates: no new item in this commit (a comment only). The earlier batch stands; dryer: 0 pairs.
- Complexity: crapper flagged nothing.
- Silent failure: no code changed; the earlier 3 sites stand.
- Tests: none added or changed in this commit; the earlier mutation result stands.
- Gates: no pin, band or tolerance moved.
- Escape catalog: no pattern matched (no shell changed).
Notes
- No
nvidia-smiline or commit hashes in the body; the change touches no GPU crate and makes no speed claim.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Two checks were red on main.
1. mac-static feature combos.
tools/recipes.pyresolve_callsplit a multi-package call (-p bloomery-device -p bloomery-metal --features bloomery-metal/...) per package and gave every feature word to each package. cargo refusesbloomery-metal/...on-p bloomery-devicealone (rc 101). Now each split shape keeps only words its package's dependencies name, andTree.resolverefuses by name a word no selected package can take. Self-test cases added to_st_basics; red on the old code, green now.2. gate-refset and refset-check. The
hf-qwen4exp-nvfp4sets are not on the box by design: their only consumer,gate-gpu-qwen4exp-nvfp4, opens withneeds-env.sh … BLOOMERY_CARD_ALL_EXPERTSand is deferred by name here. The in-place checks still demanded them (4 FAIL, rc 101). ANEEDS_ENVrow now names that family as deferred where the variable is unset; withBLOOMERY_CARD_ALL_EXPERTS=1the check is strict as before (4 FAIL, rc 101). A test holds the table to the justfile's needs-env recipes.Evidence (box, this branch):
just gate-refsetrc 0,226 set(s) in place, 0 failed, 1 deferred, 309 passed;just refset-checkrc 0,390 set(s), 0 failed, 1 deferred.Found by the nb43 session; fixed by a Sonnet round, reviewed and finished by the lead.
🤖 Generated with Claude Code