2.5 KiB
Independent review: fractional viewport test correction
2026-09-13, /root/source8_s2a_review. Reviewed frozen feab2020d8e5b6bfdb59c86ab4aee161617b8b6f atop bebf9f594c6722200e95e92be2734acbea0dd700, clean .local/rs. No compiler, GUI, source edits or new runtime outcome.
Source correction approved for rerun. The actual bebf preview gate exits101, four passed/one failed. The failing new test stops at its pre-Details assertion at line458: actual stored viewport report114.09999 versus measured widget-operation translation114.0. It has not yet exercised the restore assertions, so this failure is not evidence of a restoration defect.
Installed Iced0.14.2 src/scrollable.rs:1739–1748 returns fractional absolute viewport state. Its operate at538–558 supplies State::translation, whose vertical component rounds at1872–1901. The test's Geometry operation directly records that translated Vector. For this top-anchored vertical Scrollable and unchanged layout, comparing the raw report with its rounded display translation was the wrong test oracle. scroll_to at1843–1851 stores the absolute offset without rounding it.
The complete correction changes only this test file (+10/-6). It extracts the actual emitted report, requires finite positive input, checks report.round() exactly equals measured translation, and compares both stored-offset observations with the exact original report. It preserves exact rendered before/after equality before any rescrolling, both real Details remount and fast round trip, same page/approval, stale-report rejection, interaction/camera/allocation and complete evidence invariants, and explicit navigation reset to0. There is no epsilon, weakened restoration expectation, synthetic report replacement or production change.
Falsifier: a report that is rounded prematurely by the controller fails exact stored-report equality; an incorrect restore fails exact translated before/after equality; no real scroll fails the positive/nonzero measurements. The new correction itself remains UNRUN in this source review. The original4/1 failure must remain preserved, separately from any later result.
Source file SHA256 856d73b370747f86e078b6e23f4eee58bf45038cb08e0d70929b6486355fbc00 (19622 Git-blob bytes). Original failed log SHA256 430f6497303978be894e231312e0c70d2762cf0afeef1d9a08e6318073c2e701; receipt SHA256 8694d1dc46edc942abf0a5d8d8b86423c1f60e1d3ac6c2e1c91424196535817e. This note supplements the original scroll-fix source review without revising its historical UNRUN statements.