docs(events): define signed event firmware OTA contract - #133
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe event firmware specification adds signed OTA authorization, artifact compatibility and integrity checks, install-action gating, expanded event onboarding requirements, Apple platform status updates, and signing-key and hardware-validation tasks. ChangesEvent Firmware OTA
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant EventFirmwareInstaller
participant SignedOTAContractService
participant ArtifactHost
participant ExistingOTADFU
EventFirmwareInstaller->>SignedOTAContractService: Fetch and verify signed edition contract
SignedOTAContractService-->>EventFirmwareInstaller: Return compatible artifact metadata
EventFirmwareInstaller->>ArtifactHost: Download and verify artifact
ArtifactHost-->>EventFirmwareInstaller: Return artifact bytes
EventFirmwareInstaller->>ExistingOTADFU: Hand off verified firmware
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/features/firmware-edition-event-behavior.md:
- Around line 135-146: Update the production contract example so
standardArtifacts is non-empty and target-complete, or explicitly mark the
example as incomplete; ensure contract validation rejects empty
standardArtifacts and preserves the requirement for an explicit return artifact.
- Around line 334-338: Update the firmware edition event behavior sequence to
re-check device connection and identity immediately before invoking the existing
OTA/DFU flow. Abort when the device disconnects or its identity changes during
download, then revalidate the selected target before handing off the verified
artifact.
- Around line 86-115: Update the client validation for the signed contract to
require payload.edition to exactly match the requested {EDITION} path parameter
before allowing installation. Ensure contract cache entries are keyed by edition
so a valid response for one event cannot be reused for another.
- Around line 348-354: Update the existing-enum event OTA instructions to
require the API signing key’s public key to be pre-provisioned under a trusted
client keyId before enabling OTA. If the key is not already trusted by released
clients, explicitly require shipping a client release containing it before
adding the eventFirmwareOTA.json entry.
- Around line 148-158: Update the artifact-selection contract to explicitly
require non-null `dfuProtocol` and `minimumBootloaderVersion` for nRF52
artifacts, and valid exact `partitionRole` and `partitionScheme` values for
ESP32 artifacts. State that missing or null architecture-specific fields reject
the artifact before compatibility checks.
- Around line 139-150: Define the source-version compatibility contract before
the minimumSourceVersion requirement: specify the accepted version grammar, how
short versions and source-reference suffixes map to a comparable representation,
the comparison semantics, and the behavior for unsupported formats. Ensure
clients apply these rules consistently when enforcing minimumSourceVersion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a037760b-599d-4099-9862-22b72a68e106
📒 Files selected for processing (1)
.github/features/firmware-edition-event-behavior.md
| Selection is exact on `pioEnv`, `hwModel`, and `architecture`, with exactly one | ||
| matching artifact. The client also enforces `minimumSourceVersion` and | ||
| architecture-specific compatibility: | ||
|
|
||
| - ESP32 artifacts are bare application `.bin` payloads for `app0`, never | ||
| factory, merged, filesystem, or OTA-loader images. Their partition scheme | ||
| must exactly match the connected target. | ||
| - nRF52 artifacts are target-specific Nordic DFU OTA ZIPs. The contract names | ||
| the DFU protocol and minimum compatible bootloader. A client that cannot | ||
| establish the installed bootloader's compatibility must not offer in-app | ||
| DFU. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Make architecture-specific fields explicitly required.
For nRF52 artifacts, dfuProtocol and minimumBootloaderVersion must be present; for ESP32, partitionRole and partitionScheme must be valid and exact. The current text describes these requirements but does not state that missing or null fields cause rejection, allowing an incomplete signed artifact to reach compatibility checks without proof.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/features/firmware-edition-event-behavior.md around lines 148 - 158,
Update the artifact-selection contract to explicitly require non-null
`dfuProtocol` and `minimumBootloaderVersion` for nRF52 artifacts, and valid
exact `partitionRole` and `partitionScheme` values for ESP32 artifacts. State
that missing or null architecture-specific fields reject the artifact before
compatibility checks.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Status
Warning
This contract is currently untested with a physical event-firmware OTA round trip. It is a draft for cross-platform, security, and release-infrastructure review.
Summary
flasher.meshtastic.orgwhenever compatibility or trust cannot be proven.Why
The existing event manifest can describe branding and link to a firmware bundle, but it cannot safely authorize an app to write executable bytes. All clients need one shared contract for release identity, trust, exact-target selection, integrity verification, and returning a node to standard firmware.
Validation
git diff --checkDependencies
Deployment Notes
The contract must not be activated until a project-owned Ed25519 release key is provisioned, its public key is shipped in clients, and every listed artifact has completed the hardware validation matrix.
Summary by CodeRabbit