Skip to content

Deadline-paced software transitions - #2

Merged
leiklier merged 2 commits into
masterfrom
fix/ramp-pacing
Jul 26, 2026
Merged

Deadline-paced software transitions#2
leiklier merged 2 commits into
masterfrom
fix/ramp-pacing

Conversation

@leiklier

Copy link
Copy Markdown
Owner

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_lock contention 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

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>
@leiklier
leiklier merged commit c6b5398 into master Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant