Repository navigation
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an upfront clear to GetInfoPool::initCmd() so repeated initialization rebuilds the command list without duplicates, while preserving the existing single-call device information collection behavior. Sequence diagram for idempotent command initializationsequenceDiagram
participant Caller
participant GetInfoPool
participant m_CmdList
Caller->>GetInfoPool: initCmd()
GetInfoPool->>m_CmdList: clear()
GetInfoPool->>m_CmdList: append 29 commands
GetInfoPool-->>Caller: command list ready
Caller->>GetInfoPool: initCmd()
GetInfoPool->>m_CmdList: clear()
GetInfoPool->>m_CmdList: append 29 commands
GetInfoPool-->>Caller: command list ready
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Root cause: GetInfoPool::initCmd() only appends commands to m_CmdList without clearing it first, making the method non-idempotent; repeated calls double the command count 2. Fix: add m_CmdList.clear() at the start of initCmd() so the method always starts from an empty list 3. Impact: no behavior change for normal single-call path, only fixes the duplicate-command issue when called multiple times Influence: 1. Verify device info collection works correctly after fix 2. Verify command list size is 29 after calling initCmd twice 3. Verify no regression on existing device info collection flow fix: initCmd方法添加clear确保幂等性 1. 根因:GetInfoPool::initCmd() 仅通过 append 追加命令到 m_CmdList,未先清空,方法不具备幂等性,重复调用导致 命令表翻倍 2. 方案:在 initCmd() 开头添加 m_CmdList.clear(),使方法 每次从空列表开始初始化 3. 影响:正常单次调用路径无行为变化,仅修复重复调用时 命令重复问题 Influence: 1. 验证修复后设备信息采集功能正常 2. 验证连续调用两次initCmd后命令列表数量仍为29 3. 验证现有设备信息采集流程无回归 PMS: BUG-DEF-003
The license-check CI (SPDX Header Validation) requires files created in earlier years and modified in 2026 to carry a copyright year range ending with the current year. Extend the SPDX-FileCopyrightText header of GetInfoPool.cpp from 2022 to 2022-2026 so the SPDX summary reports 0 failures.
75b7239 to
228c44f
Compare
|
TAG Bot New tag: 6.0.75 |
fix: add clear to initCmd for idempotency
m_CmdList without clearing it first, making the method
non-idempotent; repeated calls double the command count
method always starts from an empty list
fixes the duplicate-command issue when called multiple times
Influence:
fix: initCmd方法添加clear确保幂等性
m_CmdList,未先清空,方法不具备幂等性,重复调用导致
命令表翻倍
每次从空列表开始初始化
命令重复问题
Influence:
PMS: BUG-DEF-003
Summary by Sourcery
Ensure repeated GetInfoPool command initialization produces a consistent command list without affecting the normal single-call flow.
Bug Fixes:
Chores: