Skip to content

fabric: efficiency and discipline fixes#43

Open
lePereT wants to merge 17 commits into
fabric-securityfrom
rt-fixes
Open

fabric: efficiency and discipline fixes#43
lePereT wants to merge 17 commits into
fabric-securityfrom
rt-fixes

Conversation

@lePereT

@lePereT lePereT commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

I've taken the initial Fabric/update implementation and pulled it back into the shape of the original dc-go design: reactors remain shallow, readiness-driven, and non-blocking. HAL serial_raw is again only a UART/session byte pump; it no longer contains timing-based quiet drains. Fabric no longer relies on OTA quiet windows or silence periods to avoid corrupting transfers. Bus readiness is now coalesced through a SubscriptionSet, so Fabric can wake on real events without polling a periodic tick
(or adding a goroutine per subscription).

The transfer path has also been made much more efficient. Fabric no longer buffers a whole firmware image in RAM (possibly lethal on an RP2350). It streams chunks into an updater-owned A/B staging sink, asks for the next UART chunk only after the sink has accepted the current one, and uses a serialised sink worker so WriteChunk, Commit and Abort cannot race each other (RPi FW prob handles this but dangerous). Longer work such as flash staging, streamed commit and updater stage calls no longer runs inline in the Fabric session loop; completions and deadlines are explicit events. This restores the actualy boundary: Fabric owns the protocol and pacing, the updater owns verification and flash state, and neither leaks blocking work into the other’s reactor.

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