Skip to content

Expose split lighting frame and replica observability - #9

Merged
colonelpanic8 merged 4 commits into
glove80-rmk/lighting-v2from
work/lighting-observability
Aug 7, 2026
Merged

Expose split lighting frame and replica observability#9
colonelpanic8 merged 4 commits into
glove80-rmk/lighting-v2from
work/lighting-observability

Conversation

@colonelpanic8

Copy link
Copy Markdown
Owner

Adds the generic RMK surface needed to diagnose split-lighting replication without blocking the host path.

  • reads back the frame each output last presented, including remote nodes through a bounded board port
  • exposes cached central/peripheral replica state, digest attestation, freshness, and recovery health
  • keeps board hooks additive and unsplit behavior explicit
  • documents refresh-on-read and freezes the postcard wire shape with size/snapshot coverage

Validated with:

  • cargo nextest run -p rmk --features rynk,storage,lighting (629 passed during candidate verification)
  • cargo test -p rmk-types --features host (95 passed)
  • focused Rynk lighting handler tests (5 passed)
  • cargo check --manifest-path rynk/Cargo.toml -p rynk --lib
  • downstream Glove80 LH/RH and Go60 LH/RH release builds

The engine could report what it holds but never what the LEDs show. On a
split renderer replica those are different questions: the replica renders
from a snapshot that can go stale, and nothing observable distinguished a
stale replica from a correct one.

Record each render's revision and lighting context, promote it when the
output acknowledges the write, and page the committed frame back through
`ReadFrame`. The committed frame is post-`OutputTransform`, so what comes
back is what the driver was handed rather than the pre-brightness
composition.
Two new lighting endpoints for diagnosing a split renderer replica from
the host: `GetLightingFrame` pages back what one node last presented, and
`GetLightingReplicaStatus` returns both sides of the replication
handshake in one read.

`LightingFeatureFlags` is out of bits, so these are discovered by
probing — firmware without them answers `UnknownCmd`, which is the
documented downstream path anyway. Existing layouts and the upstream
protocol version are untouched.

A remote frame page has to be reassembled from split application packets,
whose queues are shallow and lossy, so the page holds 24 cells rather
than the ~80 the payload budget would allow. Availability is encoded
explicitly: `Option` for never-observed values, and two appended
`LightingError` variants separating "no such node" from "that node could
not answer".
Wires GetLightingFrame and GetLightingReplicaStatus through the host
service: the local half answers from its own engine, the peripheral
through the board-provided remote-frame and replication-status ports,
and the loopback integration tests drive both endpoints end to end.
Native rmk-types and rynk_lighting suites pass; the cross-feature
matrix and no_std target checks have not run yet.
@colonelpanic8
colonelpanic8 force-pushed the work/lighting-observability branch from 57c7019 to da04121 Compare August 7, 2026 06:00
@colonelpanic8

Copy link
Copy Markdown
Owner Author

Verification update: this topic is now rebased onto upstream 65df1577 and consumed by locked assembly tree a0d400e4. The generated assembly passes 665/665 relevant RMK nextest cases. On a Glove80 central-half hardware canary, repeated replica-status/brightness reads and a full lighting read remain stable without USB re-enumeration; frame read correctly returns Locked without physical unlock.

@colonelpanic8
colonelpanic8 force-pushed the glove80-rmk/lighting-v2 branch from dfdafb1 to f5202f3 Compare August 7, 2026 19:58
@colonelpanic8
colonelpanic8 merged commit 4fe4754 into glove80-rmk/lighting-v2 Aug 7, 2026
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