Repository navigation
xhci_boot_capture: say which of engine#823 two faults the boot shows, not just the states - #2232
Conversation
…s, not just the states The capture has always recorded `runtime_status` per controller (the loop writes it), so the datum was never the gap. What #823's 2026-11-10 audit found missing is the sentence: a fourth controller read `resuming` while the other three were `active`/`D0`, and that is a DIFFERENT fault from a controller that was never woken. A resume in progress cannot report a connect on its port, so a plug test on that boot reads "no device" for a reason the keep-awake fix does not address - and the owner's next stick run would have drawn the wrong conclusion from a table of four states. xhci_verdict_line <bdf> <control> <power_state> <runtime_status> resuming|suspending -> a transition that did not settle; this boot cannot answer the plug question suspended + auto -> the keep-awake rule did NOT hold it (that IS the fix not applying) suspended + on -> held out of D0 deliberately, not a fault on its own active/empty -> settled anything else -> UNKNOWN, counted apart from settled Unknown is its own bucket on purpose: a state this tool cannot name is a state it cannot vouch for, so it must not be counted as settled (the rule engine#1599/#2039 apply to an unreadable input). `$out/verdict.txt` carries the per-controller lines, a four-way count, and - when any controller is in transition or unreadable - the sentence that this boot cannot answer the plug question. It is a function rather than an inline block so the three classifications can be driven on a fixture without a device. Verified on a four-controller fixture in the audit's own shape (one active, one suspended-by-policy, one suspended-under-auto, one resuming) through the script's own sed: 2 settled, 1 not kept awake, 1 in a transition, 0 unreadable, each with its line. bash -n clean; copyright check clean.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY at I verified What this adds, checked one by one:
Two notes, neither blocking:
|
|
VERDICT: READY at The gap was expressiveness, not data
That is the correct diagnosis of my own tool's weakness. The 2026-11-10 audit's finding — a controller reading The ladder, in the order that mattersThe third line is the one that keeps the tool from crying wolf — a controller deliberately held is not a fault — and the fifth is the doctrine I would want in any capture:
Driven through the script's own
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 9d0a265: READY
This is the distinction #823's row needed and could not get from the tool it had. xhci_verdict_line(bdf, control, power_state, runtime_status) turns the four facts the capture already collects into one line per controller, so a boot says which of the two faults it has rather than leaving the reader to infer it from a table.
That matters because #823's two halves have opposite fixes: a controller in D3cold with control=auto is the keepawake rule not holding, while the same controller with control=on and still suspended is a firmware/PM path Linux cannot reach. Both print the same power_state in a raw dump; the verdict line is what separates them, and separating them is what stops the next reader from chasing the wrong hypothesis — which is exactly what I did on that issue when I read 3 of 4 not in D0 as a rule failure on a boot where the rule was not installed.
A one-line-per-controller verdict is also the shape that survives being pasted into an issue comment, which for a capture tool is the only form its output ever takes.
#823's 2026-11-10 audit recorded a finding that the capture tool could not express: one controller readruntime_status=resumingwhile the other three wereactive/D0, and that is a different fault from a controller that was never woken. A resume in progress cannot report a connect on its port, so a plug test on that boot reads "no device" for a reason the keep-awake fix does not address.The capture has always written
runtime_statusper controller — the datum was never the gap. What was missing is the sentence. The owner's next stick run would have looked at a table of four states and drawn the wrong conclusion from it.What this adds
$out/verdict.txtcarries the per-controller lines, a four-way count, and — when anything is in transition or unreadable — the sentence that this boot cannot answer the plug question.Unknown is its own bucket on purpose. A state this tool cannot name is a state it cannot vouch for, so it must not be counted as settled — the same rule
#1599/#2039apply to an unreadable input. My first draft counted it as settled; the fixture caught it.It is a function so it can be tested without a device
Verified on a four-controller fixture in the audit's own shape, driven through the script's own
sed(not a paraphrase of it):bash -nclean,tools/copyright.py --checkclean.Scope
One file,
tools/xhci_boot_capture.sh, no new dependency, and no device needed to review it — which matters for this row because its remaining step is the owner's plug test on the board. Nothing here changes what the capture collects; it adds the reading, and it names the audit in the message so the next person can find the measurement behind it.