Skip to content

cfu-service: Create basic updater struct#809

Open
RobertZ2011 wants to merge 1 commit intoOpenDevicePartnership:v0.2.0from
RobertZ2011:cfu-basic-updater
Open

cfu-service: Create basic updater struct#809
RobertZ2011 wants to merge 1 commit intoOpenDevicePartnership:v0.2.0from
RobertZ2011:cfu-basic-updater

Conversation

@RobertZ2011
Copy link
Copy Markdown
Contributor

@RobertZ2011 RobertZ2011 commented Apr 20, 2026

Use the existing CFU logic in type-c-service to create a struct that can perform CFU updates on anything that implements a basic FW update trait

@RobertZ2011 RobertZ2011 self-assigned this Apr 20, 2026
@RobertZ2011 RobertZ2011 changed the base branch from main to v0.2.0 April 20, 2026 23:38
@RobertZ2011 RobertZ2011 linked an issue Apr 20, 2026 that may be closed by this pull request
@RobertZ2011 RobertZ2011 force-pushed the cfu-basic-updater branch 10 times, most recently from b85dac7 to 6ef757d Compare April 21, 2026 22:42
@RobertZ2011 RobertZ2011 requested a review from Copilot April 21, 2026 22:45
@RobertZ2011 RobertZ2011 changed the title Cfu basic updater cfu-service: Create basic updater struct Apr 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new fw-update-interface crate providing a minimal firmware update trait (plus mocks), and adds a “basic” CFU updater implementation in cfu-service that bridges CFU protocol messages to that trait (with customization + tests). Also updates CI clippy feature-powerset runs to avoid std/mock feature combos on non-std targets.

Changes:

  • Add fw-update-interface crate with basic::FwUpdate + mock implementations and unit tests.
  • Add cfu-service::basic updater + event receiver, plus a Customization trait and mock to validate offers; add end-to-end tests for basic flows.
  • Update workspace/locks and tweak cargo hack CI invocation for target-specific feature skipping.

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
fw-update-interface/src/lib.rs New no_std interface crate root with optional mock module
fw-update-interface/src/basic.rs Defines basic FW update trait + error type
fw-update-interface/src/mock/mod.rs Exposes mock module
fw-update-interface/src/mock/basic.rs Provides mock FwUpdate implementor + tests
fw-update-interface/Cargo.toml New crate manifest + features/dev-deps
cfu-service/src/lib.rs Exposes new basic/customization modules and optional mock
cfu-service/src/customization.rs Defines common CFU offer validation trait
cfu-service/src/mock/mod.rs Exposes CFU customization mock module
cfu-service/src/mock/customization.rs Adds customization mock + tests
cfu-service/src/basic/mod.rs Implements the basic CFU updater bridging to FwUpdate
cfu-service/src/basic/event_receiver.rs Adds event receiver with timeout/recovery ticking + tests
cfu-service/src/basic/test.rs Adds async integration-style tests for basic updater flows
cfu-service/Cargo.toml Adds deps/features and dev-deps for new tests
Cargo.toml Adds fw-update-interface to workspace members/deps
Cargo.lock Updates workspace lockfile for new crate/deps
examples/std/Cargo.lock Updates example lockfile to include new crate
examples/rt685s-evk/Cargo.lock Updates example lockfile to include new crate
.github/workflows/check.yml Adjusts clippy feature-powerset run to skip mock,std on non-std targets

Comment thread .github/workflows/check.yml Outdated
Comment thread cfu-service/src/basic/mod.rs Outdated
Comment thread cfu-service/src/mock/customization.rs Outdated
Comment thread fw-update-interface/src/basic.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 18 changed files in this pull request and generated 3 comments.

Comment thread fw-update-interface/Cargo.toml Outdated
Comment thread cfu-service/Cargo.toml Outdated
Comment thread cfu-service/src/lib.rs Outdated
@RobertZ2011 RobertZ2011 force-pushed the cfu-basic-updater branch 2 times, most recently from 34b7faa to 304882e Compare April 21, 2026 23:07
@RobertZ2011 RobertZ2011 requested a review from Copilot April 21, 2026 23:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 17 changed files in this pull request and generated 4 comments.

Comment thread cfu-service/src/basic/test.rs Outdated
Comment thread fw-update-interface/src/basic.rs
Comment thread fw-update-interface/src/lib.rs Outdated
Comment thread cfu-service/src/basic/event_receiver.rs Outdated
@RobertZ2011 RobertZ2011 force-pushed the cfu-basic-updater branch 2 times, most recently from fa3e326 to 276c871 Compare April 22, 2026 18:49
@github-actions github-actions Bot added the cargo vet PRs pending auditor review label Apr 22, 2026
@RobertZ2011 RobertZ2011 force-pushed the cfu-basic-updater branch 5 times, most recently from 5f804a3 to 4ffaa68 Compare April 22, 2026 21:21
@RobertZ2011 RobertZ2011 requested a review from Copilot April 22, 2026 21:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 3 comments.

Comment thread cfu-service/src/basic/event_receiver.rs
Comment thread cfu-service/src/basic/mod.rs Outdated
Comment thread cfu-service/src/basic/mod.rs
@RobertZ2011 RobertZ2011 force-pushed the cfu-basic-updater branch 2 times, most recently from 7c10fad to 9119128 Compare April 22, 2026 22:03
@RobertZ2011 RobertZ2011 requested a review from Copilot April 22, 2026 22:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 2 comments.

Comment thread cfu-service/src/basic/state.rs
Comment thread cfu-service/src/basic/event_receiver.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.

Comment thread fw-update-interface/src/basic.rs
Comment thread fw-update-interface/src/basic.rs Outdated
Comment thread cfu-service/src/basic/test.rs
Comment thread cfu-service/src/basic/event_receiver.rs Outdated
Use the existing CFU logic in type-c-service to create a struct
that can perform CFU updates on anything that implements a basic
FW update trait.
@RobertZ2011 RobertZ2011 marked this pull request as ready for review April 22, 2026 22:46
@RobertZ2011 RobertZ2011 requested review from a team as code owners April 22, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo vet PRs pending auditor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add generic FW update trait

2 participants