USB PD: extended Alert event 5 is rejected although it is defined
@RobertZ2011 がすでに取り組んでいます。
2026年10月26日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 73/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- embedded-iot
調査の方向性
src/ado.rsの124~130行付近にあるextended alertの変換と、220~279行付近にあるtest_ado_try_from_standard_alertsテストを読んでください。提案されているとおり、イベント5とそのエンコード経路のサポートを追加し、関連するテストを実行してイベントが受け入れられることを確認してください。また、後続コードの網羅的なmatchに対する、指摘されている互換性への影響も考慮してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
The extended alert parser handles events 1 through 4 only. Event 5 is defined by the current PD specification and is rejected.
What the specification requires
USB PD R3.2 V1.2 S6.4.5, Table 6.25 (Extended Alert Event Type):
5 - Source is about to reduce Source Capabilities
What the code does
0x80 => match raw.extended_alert_type() {
0x01 => Ok(Ado::PowerStateChange),
0x02 => Ok(Ado::PowerButtonPress),
0x03 => Ok(Ado::PowerButtonRelease),
0x04 => Ok(Ado::ControllerInitiatedWake),
_ => Err(InvalidType(raw.0)),
},
A conforming 0x80000005 alert is rejected rather than reporting impending capability reduction.
Failing test
test_ado_try_from_standard_alerts on branch audit. The test previously asserted that event 5 is invalid; that assertion is now inverted:
raw.set_extended_alert_type(0x04);
assert_eq!(Ado::try_from(raw).unwrap(), Ado::ControllerInitiatedWake);
// USB PD R3.2 V1.2 Table 6.25 (Extended Alert Event Type) defines:
// "5 - Source is about to reduce Source Capabilities"
// A conforming extended alert carrying event 5 must not be rejected.
raw.set_extended_alert_type(0x05);
assert!(
Ado::try_from(raw).is_ok(),
"extended alert event 5 (Source about to reduce Source Capabilities) is defined by \
USB PD R3.2 V1.2 Table 6.25 and must be accepted"
);
}
Suggested fix
Add the variant and its encode path. Adding an enum variant is breaking for downstream exhaustive matches.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 8
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenDevicePartnership/embedded-usb-pd のほかの issue
-
bug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
USB PD: Structured VDM Command accepts values wider than the 5-bit field再び着手できるかも @RobertZ2011 が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンBREAKING CHANGE bug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenDevicePartnership/embedded-usb-pd#92 · 担当者 1 名 ·
-
USB PD: deprecated and invalid Passive Cable VDO encodings are rejected instead of normalized再び着手できるかも @RobertZ2011 が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenDevicePartnership/embedded-usb-pd#91 · コメント 1 件 · 担当者 1 名 ·
-
PD r3.2 v1.1 ->r3.2 v1.2 upgrade再び着手できるかも @RobertZ2011 が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenDevicePartnership/embedded-usb-pd#119 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
OpenDevicePartnership/embedded-usb-pd の issue をすべて見る
似ている issue
-
app bug session
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
macOS autosubmit enable passes unsupported --wait to launchctl bootout対応中かも @iqdoctor が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
junhoyeo/tokscale#1713 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信