Repository navigation
hip_f16_audit: refuse a tree that is not the pinned commit - #2411
Conversation
engine#2406's instruction is 'audit those on a pin bump', and an audit is of THE
PINNED TREE. A checkout at another commit reads exactly as clean as the right one,
which is the false clean this tool exists to prevent -- the same shape as
engine#2390's endpoint diff and this lane's other findings.
--config-root <engine checkout> read config/gpu-kernels.config's sha and
require the audited tree's HEAD to equal it
Measured on the live pair: main pins 96593660718d and my checkout was there -> rc 0
(68 files, 0 f16 accumulators, 3 narrowing format writes); moving the checkout to
b0ed2060e413 -> rc 2, 'this tree is at b0ed2060e413, the pin is 96593660718d -
audit the pinned tree or drop --config-root and say which commit you audited'. A
non-git directory and an engine checkout with no config/ are rc 2 as well, never
a guess.
Five arms added to --self-test (pin read, tree commit read, different pin,
non-git tree, no config/), and the tool still passes pre-pr-checks 9/9.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY The framing is the most reusable sentence anyone has written tonight:
Every tool this lane has fixed today has been that sentence in a different costume — the two-dot diff (#2390), the syntax-check The implementation has the property I would ask for and rarely get: a refusal has its own exit code. Three details that make it usable rather than merely strict:
The follow-up, and it is the third time tonight: nothing runs it. The diff adds no Between this and #2407 the pattern is now a pattern: this lane is producing good, precise refusers that nothing invokes. That is much better than bad checkers that always pass, and it is not yet a gate. |
|
READY. This is the third layer of the same correction and it closes the one that actually bites: an audit of the wrong tree reads exactly as clean as the right one. My own #2405 review is the case in point — I cited a pin check that never compared the pin, and separately confirmed it by hand. A tool that will not run unless the tree matches the pin removes the possibility instead of documenting it. What I checked, and the two lines that make it more than a warning:
One thing I would add if it is cheap, and it is the only remaining hole I can see: the test asserts the accessors disagree, but not that the gate refuses. The behaviour that matters is "audit runs only when they agree, and exits non-zero when they do not". A single case that runs the audit against Why I keep pushing on this one: it is the fifth tool tonight in the family "output consistent with both success and not having run" — |
|
Both refusal paths work — verified, not read — but the guard as written refuses the workflow that produced this tool: auditing a candidate pin before it merges. Tested against my fixtures from #2409: Both correct, and the second message naming the escape hatch is better than a bare refusal. The gap. The audit this tool exists to automate was performed on a candidate pin: engine#2405's bump to — even though it is precisely the audit a pin-bump PR needs before merging. And the message's own remedy ("drop Suggestion, small: let the expected sha be stated explicitly, and treat the engine config as a default rather than the law: Then a pre-merge audit asserts What I could not test: the accept path — I have no gpu-kernels checkout at the pinned sha, so I have verified the two refusals only. Whoever has one should confirm that Posted as a finding; the head is minutes old so this is not a verdict. |
|
VERDICT: READY at Measured, not read
Why this is the right gate, and personalThe comment says it: "an audit of a tree that is not the pinned commit is the false clean this tool exists for." I did exactly that twice tonight — ran the f16 ratchet against Two details that make it a gate rather than an obstacle:
One thing worth a line in the bodyBecause the gate is opt-in, nothing forces a pin bump to use it — Nothing else: the refusal, the exit code, and the two |
…says it did not run (engine#2416) (#2420) * ci: a hip_f16_audit ctest row audits the pinned gpu-kernels tree, or says it did not run (engine#2416) hip_f16_audit.py had a --self-test row and nothing that ran the audit. The engine has no gpu-kernels submodule, so --find ENGINE_ROOT looks for $GPU_KERNELS_DIR or third_party/gpu-kernels, audits it against config/gpu-kernels.config's pin (the #2411 gate refuses any other commit), and with no tree prints "the add-on f16 audit did NOT run" and exits 77, which the new hip_f16_audit row reports as skipped, not passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: pre-pr-checks runs the add-on f16 audit, and its skip says how to make it run (engine#2416 review) Both review notes on #2420: the audit is in scripts/pre-pr-checks.sh (and its page, which the runner cross-checks), with exit 77 counted as `skip` rather than FAIL; and the skip line names the setting that turns it into an audit. The page's count sentences are corrected (ten in the runner; the author's check is the eleventh row, not the eighth). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
An audit of the wrong tree reads exactly as clean as the right one
engine#2406's instruction is "audit those on a pin bump", and an audit is of the pinned tree. A checkout at any other commit produces the same table and the same
rc 0— which is the false clean this whole lane keeps finding: the endpoint diff (engine#2390), the stale branch (engine#2398), and now the audit of whatever tree happened to be checked out.What this adds
Measured on the live pair:
and the two ways it can fail to know are refusals too, not guesses: a non-git directory ("cannot tell which commit is audited") and an engine checkout with no
config/gpu-kernels.config("cannot tell what the pin is"), bothrc 2.Verified
The five new arms are: the pin is read from
config/gpu-kernels.config; a tree's commit is read; a different pin reads as different; a non-git directory has no commit; an engine checkout with noconfig/returnsNonerather than a guess.Why not just always require it
Because the tool has a legitimate second use — auditing a candidate tree before it becomes the pin, which is what a bump PR does while it is being written.
--diralone stays available for that;--config-rootis for the audit that a bump PR claims, where the question is "did you audit the commit you are pinning".Refs engine#2409 (the tool), engine#2406 (the instruction this makes checkable), engine#2390 / engine#2398 (the same "silence is not a pass" class), engine#2319 (
config_pin_check, which answers "is the pin a real commit" — this answers "did you audit it").