docs: walk-free STM32 plan (read-side freshness decision + migration batches)#514
Merged
Conversation
Design doc for making the per-cycle peripheral walk structurally unnecessary so derive_walk_deletable() flips on user-compiled firmware, not just curated demos with a hand walk_deleted flag. Part 1 recommends batch-boundary read freshness (< one-interval staleness) implemented via interior-mutability sync-on-read against a bus-published Arc<AtomicU64> clock; rejects the &mut read choke point on blast radius. Includes a SPIKE integration test proving the mechanism compiles against the real Peripheral trait and is byte-exact at batch boundaries, bounded by < interval mid-batch. Part 2 inventories the 49 invaders-bus walkers (28 inert Class-A + 21 real-tick Class-B across 8 model types) with per-class exemplars, migration order, and PR batches B0-B8 each with a walk-on@1 vs scheduler@64 differential gate. Part 3 gives the walk_deleted deprecation path.
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.
Design doc for the walk-free campaign: make the per-cycle peripheral walk structurally unnecessary so ANY firmware gets interval-64 batching, not just curated demos with a hand walk_deleted flag.
Decision: batch-boundary read freshness via interior mutability (Arc published cycle clock; ≤ one-interval staleness on raw counter reads, event-observables byte-exact via absolute deadlines + batch clamps). The &mut-read alternative is rejected on measured blast radius (134 Peripheral impls, ~1800 read call sites) and, fatally, the fetch_slice/observer aliasing model. Includes a committed spike test proving the pattern compiles and holds its bounds against the real trait.
Inventory: 49 walkers = 28 inert Class-A instances (needs_legacy_walk=false assertions only) + 21 real-work instances across 8 model types (systick, timers, dma, i2c, adc, exti, scb, bxcan), each mapped to an existing migration exemplar. Batches B0-B8 with per-batch differential gates (walk-on@interval-1 vs scheduler@64, armed-peripheral firmware).
Endgame: derive_walk_deletable flips true per-board as batches land; walk_deleted becomes a deprecated escape hatch.