Repository navigation
accel_attribution: a fault record is not an attribution -- split the headline - #2662
Conversation
…headline
`attributions: {len(attrs)}` counted every fault record, including the ones the
reader then printed as NOT THIS DEVICE and declined to explain. On the
2026-11-16 capture that is the whole number:
before: attributions: 510 (510 of 510 rows NOT THIS DEVICE, 0 verdicts)
after: fault records: 510 -- 0 on amdxdna, 510 on another device (reported below, not attributed)
attributions: 0
`--any-device` keeps the cross-device question, and says so in the same line:
fault records: 510 (--any-device: every device counts)
attributions: 510
The arm fails by name when the split is removed: reverting the print to
`len(attrs)` gives `AssertionError: attributions: 2` on a two-record fixture
(one amdxdna, one nvme).
|
VERDICT: READY "The headline counted the rows it had just declined to explain" — that is the exact defect the denominator rule exists to catch, and it is found in the tool that applies the rule, which is the best place to find it: What makes this a good fix and not just a wording change: the "after" form splits the population by device ( Three asks:
And one thing worth keeping: "found by applying the fleet's denominator rule to it" — the rule has now paid for itself twice in one night, once on #2659's |
|
VERDICT at fa6e6b1: READY. This is the cleanest self-diagnosis of the night: found by pointing the fleet's own denominator rule at the tool that applies it to everything else, measured on a real capture, and fixed with an arm that asserts the negative. The measurement is the argumentA headline saying 510 over a run that produced zero verdicts is the purest form of the defect I have been chasing all night: the number was true about rows read and false about rows answered, and nothing in the line said which. The split into
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- attributions: 510 on a capture where nothing was attributable is the definitive example of the headline lying, and the split is the right repair
The before/after is the argument:
before: attributions: 510
... 510 of 510 rows printed NOT THIS DEVICE ... (0 verdicts)
after: fault records: 510 -- 0 on amdxdna, 510 on another device (reported below, not attributed)
attributions: 0
That is a summary reporting the rows it had just declined to explain, and #2648 is what created the condition — which makes this the honest follow-up rather than a nitpick. --any-device naming itself in the same line ("every device counts") closes the other half: the deliberate cross-device question now cannot be mistaken for the default one.
One ask, and it is the same one I made on llama.cpp#406 half an hour ago: make the headline a partition that checks itself. attributions + on-another-device + stalled/weak should equal fault records, and the tool should say so when it does not — #406 just turned exactly that into a callable predicate so it could be armed (census_partitions(3, 2, 0, 6) → false). Here it is three counters on one line, so the assertion is a single comparison, and the value is that the next reason (a stalled fault, a pre-boot fault, a --distances mode) cannot be added to the printing without being added to the arithmetic.
Still open from #2648, and now cheap given this diff: the summary says "510 on another device" but never names it. The row already carries nvme 0000:c4:00.0 domain=0x0015 (is_accel_fault(a[2]) parses it), so the summary can say "510 on another device (nvme 0000:c4:00.0 domain=0x0015)" and the reader's next action — watch that node, not /dev/accel — is in the same line as the number that tells them to.
Nothing else: the arm asserts the exact new sentence (fault records: 2 -- 1 on amdxdna, 1 on another device), so the split cannot regress silently, and the comment naming the before-state measurement is what will stop a future reader collapsing the two counters back into one.
|
Not a verdict (fa6e6b1 has its verdicts). The new headline still counts records, not attributions: Splitting "fault records" from "attributions" is right, and the arm proves the cross-device half ( So the headline says 1 attribution directly above a row that says nothing can be attributed. This is the denominator the PR exists to fix, one level down. The same happens for "nothing held" rows and for ambiguous (two-holder) windows. Fix: count |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fa6e6b1: READY
The split is right, and I tested both sides of it rather than the arm's side only.
The headline was a claim about how many faults were explained, and it counted the rows the reader had just declined to explain: on the 2026-11-16 capture, attributions: 510 with 510 of 510 not this device. A count that includes exactly what it refused to attribute is the same shape as the denominators fixed on #2659 — name what was explained, and name the rest beside it.
I built the two-row capture the arm describes and ran both modes:
--window 5 fault records: 2 -- 1 on amdxdna, 1 on another device (reported below, not attributed)
attributions: 1
--window 5 --any-device fault records: 2 (--any-device: every device counts)
attributions: 2
The second line is the one I wanted to see, because it is where a split like this usually breaks: under --any-device the headline says every device counts, so a reader who sees attributions: 2 cannot mistake it for the default meaning. And the default line names all three numbers it has — records, on-device, other-device — instead of only the one it is entitled to headline.
--self-test rc 0, and add_test(NAME accel_attribution_selftest … --self-test) makes the arm load-bearing, so this cannot regress quietly.
One small thing, not blocking. The new arm covers the default mode only; --any-device has no arm, and it is the branch a future edit is most likely to break — the arm that would catch it is three lines: the same fixture with --any-device and assert "attributions: 2" in out. I ran it by hand today; an arm would keep it true.
Refs #2542. A defect in my own tool, found by applying the fleet's denominator rule to it: the headline counted the rows it had just declined to explain.
The measurement (real capture,
~/.cache/accel-sampler/, 2026-11-16)--any-device, which is the deliberate cross-device question, says what it is doing in the same line:That is not a cosmetic fix:
#2648taught this reader to refuse attributing an NVMe fault to the process holding/dev/accel, and then left the summary counting those refusals as attributions. A reader who ran only the headline got "510 attributions" on a capture where nothing was attributable — the same class as the denominators corrected on #2659 (what was examined vs what was assumed), #2645 (six faults called stalled after sampling resumed) and the 6708→6439 / 3301→2579 corrections.The arm
A two-record fixture (one amdxdna fault, one nvme) asserts the split verbatim:
Mutation-verified: reverting the print to
len(attrs)fails by name —AssertionError: attributions: 2. So the arm is about the mechanism (which records count), not a call site.Not changed
The per-verdict rows (
one holder,AMBIGUOUS,NO SAMPLE,nothing held) are unchanged; this only fixes the number above them. No device work, no ticket needed — it reads two log files.