Deadline-paced software transitions - #2
Merged
Merged
Conversation
Fixed-interval stepping stretched fades by real per-write latency (~1.8x through an ESP BLE proxy at ~130 ms/write, measured live). The ramp now derives each level from elapsed wall-clock time toward the deadline and skips levels when writes run slow, landing on target at ~duration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pre-existing upstream nesting (legal only on 3.12+/PEP 701) broke the 3.11 CI matrix leg on import. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live soak finding (2026-07-26): a 10 s fade completed at ~19 s. Root cause: the ramp emitted a fixed 150 ms-interval step list, but each write costs its own ~130 ms through the ESP bluetooth proxy, so effective step time was ~280 ms — fades ran at ~1.8× the requested duration, and mid-window sampling made short fades look like no-ops (intermediate LASTDATA echoes are also coalesced under rapid writes).
Fix:
ramp_level(start, target, duration, elapsed)— each tick writes the level the fade should be at now; slow writes skip levels instead of stretching. Lands on target at ~duration on any link speed, and emits fewer mesh writes on slow links (less_ble_lockcontention for other lights).Verified: 31 tests incl. a slow-writer regression (100 ms/write, 1 s fade → completes <1.5 s, ≤8 writes). Physical behavior verified on the live mesh via the true-state poll before/after.
🤖 Generated with Claude Code