feat(profile): make applied settings reversible; rewrite the handoff
`simon tune --apply` could change a machine and had nothing that could change it back. `ApplyHandler` could only write, and `ApplyOutcome` recorded only what was requested -- so the value being overwritten was gone the moment it was overwritten. An autonomous tuner that moves a machine in one direction only is not something to leave running. Adds `ApplyHandler::read_current`, `ApplyOutcome.previous`, `profile::apply::revert_setting` and `tuning::serve::revert_cycle`. A revert goes back through `apply_setting`, so it is confirmed and audit-logged on the same terms as the write it undoes -- an autonomous loop with an unconfirmed way back would be a write path with no confirmation. Where no prior value was recorded, revert refuses rather than writing a default. Putting a machine into a state it was never in is worse than leaving it where the caller put it, and it is the same rule the tuner already follows for values: never a number this crate made up. `read_current` is implemented for the Windows active power scheme and verified on hardware -- it returns the GUID that `profile explain` reports through unrelated code in profile::cpu. The Linux cpufreq reader is written by inspection and has never run; the code and HANDOFF.md both say so. `ApplyOutcome.previous` is `#[serde(default)]`, so audit records written before this still deserialise; a test pins that. HANDOFF.md is rewritten for 5.0.0: the 4.0.x rows are marked withdrawn, the Dewey item records why the port was reversed and what would have to be true to try again, the two Dewey bugs are kept as findings for that repo rather than as live guidance here, and the new open item names what is left to close the tuning loop -- and warns that a loop inventing its own success criterion is the optimiser equivalent of a model picking a power limit. Also records the session's actual lesson: 839 tests stayed green through four releases of a GUI that opened at 800x600, clipped every value off the edge, responded to no clicks and reported no GPUs on a three-GPU machine. Nothing failed because nothing was asked. 854 tests, 0 failures. clippy -D warnings clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A
Adam Erickson committed
833df1e5ee27a316dd7bcc782f7f9c66bfcc6061
Parent: cbab881