SIGN IN SIGN UP

docs: a battery reads 0% when the charge was not read

Second entry on the 7.0.0 list, and ranked above `is_turbo` because it is live.
`power_supply.rs` models the charge correctly as `Option<u8>` -- its own doc
comment demonstrates handling the `None` -- and `battery/mod.rs:102` discards it
with `unwrap_or(0)` into an `f32` that cannot say "not read". The resolver then
pushes that value as `Reading::measured`, so `power.battery.percentage` resolves
0% as a measurement on a laptop whose capacity is unreadable.

0% is not a neutral wrong answer. It means "about to shut down", and an agent
acting on it would defer work or warn a user.

Not fixed here: the fix is `Option<f32>` on a public struct plus a `push_opt` in
the resolver, both breaking against a tag a few hours old. Recorded rather than
half-done, and noted that no non-breaking mitigation exists -- the `Option` is
destroyed at construction, so nothing downstream can recover it.

Also records that the fallback grep is nowhere near exhausted: 780 sites outside
tests and the GUI. Most are legitimate. Triage by consequence -- a fallback in a
reader path that reaches the ontology or the agent tools is worth reading; one in
a filter predicate is not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A
Adam Erickson committed
f34bde0cad1afbdc849b487c6e081a68a40a9926
Parent: 8fb8ddc