Repository navigation
tools: resolve model profiles and keep failed-arm logs unique - #736
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: fixture selection retains a second inherited-profile validator after adding the shared resolver.
Must fix
1. Remove the duplicate inherited-profile validator
tools/recipes.py:8329 repeats the validation in profiles(). For an invalid inherited name, that method raises RecipeError and the handler immediately below returns the same None. The extra branch and mac variable have no effect. This is a kind B defect under R14.
Remove them now so subsequent profile-rule changes have one owner. Replace lines 8327–8331 with:
rows, _ = self._fixture_table
dirs: set[str] = set()Checked
Duplicates: both cited validators confirmed. The fix removes the extra check and variable without adding an abstraction.
Complexity: no changed Rust functions; diagnostics report that dryer and crapper did not run.
Silent failure: the inherited-profile error path returns the same None through the existing RecipeError handler. The fixture-table parser guarantees a valid fallback name.
Tests: the validator compared 25 isolated fixture-selection cases before and after the proposed removal; all matched.
Gates: no threshold or tolerance moved; the PR supplies FAIL-first results for both fixes.
Escape catalog: C1–C4 provide no exception affecting this finding. No ledger lessons are in force.
Notes
Full self-tests were not run by the validator; validation used isolated in-memory checks.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
c4ee12a to
13e1152
Compare
There was a problem hiding this comment.
Since the last review: must-fix 1 is fixed. tools/recipes.py:8327 removes the duplicate validator and its variable. profiles() owns profile validation.
Verdict: CLEAN: the interdiff resolves the earlier finding and preserves fixture selection in the checks performed.
Checked
Duplicates: 0 new items; the duplicate validation is removed. No dryer pairs were available.
Complexity: the existing function loses a branch; no function is added.
Silent failure: 2 error paths followed. Unresolved fixture selection retains all fixture rows; key construction returns the named profile error.
Tests: the validator confirmed 120 isolated before/after fixture-selection cases matched, including invalid and empty overrides, multiple calls, and unresolved parameters. Seven fallback and table-loading checks passed. No tests changed in the interdiff; no new mutation check applies.
Gates: no pins, thresholds, or test clauses changed in the interdiff.
Escape catalog: C1–C4 do not match the interdiff. No ledger lessons are in force.
Notes
Dryer and crapper did not run because no Rust file changed. Full self-tests were not rerun; validation used production functions extracted and executed in memory.
🔨 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. |
레시피 입력 목록이 모델 프로필 파일을 정확히 따라가도록 고치고, 실패한 arm의 로그가 서로 덮어쓰이지 않게 하는 도구 수정입니다.
Part of #565. Tracked in #699.
What and why
Two defects in the workspace tools, both fixed here.
BLOOMERY_MODEL=${BLOOMERY_MODEL:-name}had the literal text turned intotools/ref/models/${BLOOMERY_MODEL:-name}.sh. The real profile was never listed as an input, so a change to it did not invalidate the recipe's key. The same raw text fed the run-script list and the fixture-directory choice, and a recipe with several box calls only kept the last call's profile.RecipeCommands.profilesintools/recipes.pyis now the one place that resolves profile names. It tells a default (${BLOOMERY_MODEL:-name}) from an environment override, keeps every profile of a multi-call recipe, and raises an error that namesBLOOMERY_MODELfor any expression or path fragment it cannot resolve.Graph.inputs,KeyContext.run_scripts, the key's file list and the fixture-directory choice all call it. Static analysis keeps a recipe parameter such as{{FAMILY}}as a wholetools/ref/models/dependency, as before.arm_failintools/ref/cold-blocks.shbuilt the file name from the label and key, so two labels that differ only by a character the name rewrites (a/banda:b) shared one file, a retry of the same label overwrote the earlier log, and a long label made the write fail. The log is now created withmktemp, so the name is short and unique. Its first line records the round, label, key and exit code, and the full output follows. If the file cannot be created or written, the FAIL row sayscannot save full outputand names no path.The arm-log defect came in with a969d43 and moved to the shared helper in e489392. The profile defect came in with e505aa2.
No Rust, GPU or engine path changes, and nothing about speed is claimed.
Release notes: Fixed: recipe input keys follow the real model profile files, and an erroring cold-block arm keeps its own full log.
Code shape
FAMILY_NAMEandRecipeError.BLOOMERY_MODELlookups inGraph.inputsandKeyContextthat built a path from raw text are replaced by the one method.BLOOMERY_MODEL, and a log save that cannot complete is stated in the FAIL row.cargo fmtandcargo clippy: not applicable, the change is in Python and Bash only.Duplication found or removed (
path:line): none found.python3 tools/dup-scan.pyfinds no Rust candidates.What I ran
The tests are in the two files' own self-tests:
tools/ref/cold-blocks.sh --self-testgained cases for name collisions, a repeated label, a 300-character label, a key that contains a slash, and a create that cannot complete and a write that cannot complete.tools/recipes.pygainedprofile_inputs_self_test, run from the basics self-test. It covers a plain name and the default form, each with no override, an empty override and a real override. It covers two box calls in one recipe, unresolved expressions (${OTHER:-deepseek41},$BLOOMERY_MODEL,../deepseek41), and the real recipesbench-cpu-v41-host-check,time-cpu-v41-host,depth-gpu-qwen3moeandtime-dma-dram.These tests were first run against the original
arm_failand the original profile reader. Both fail:On this head, on a Linux CPU host:
git diff --checkis clean. The widertools/check-*.shscripts were not run here; they are the maintainers' checks.Hardware
None needed. The checks ran on a Linux CPU host and use no GPU.
What I ran into
An expression other than a plain name or
${BLOOMERY_MODEL:-name}now stops the recipe key with an error. The four recipes listed above, which use the default form or several box calls, resolve without error. This does not block the PR.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.