| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
revert(skill): do not strip skill params after ForegroundNew, fix exitCode propagation Two related fixes folded together: 1. Revert the L2 RemoveSkillParam calls added in "fix(skill): strip skill params from non-skill want paths". The L2 strip in AbilityRecord::ForegroundAbility and ForegroundUIExtensionAbility breaks the legitimate cold-start skill path: StartAbilityByCallWithSkill (target not yet started) -> StartAbilityByCall -> ResolveLocked -> target launches and enters ForegroundAbility -> ForegroundNew(GetWant(), ...) IPCs the want (with skill params) to the app, but the FOREGROUND_NEW branch in UIAbilityImpl::AbilityTransaction only checks InsightIntent, not skill, so HandleExecuteSkill is NOT called here -> L2 then strips skill params from want_ -> later the ability moves to BACKGROUND_NEW -> BackgroundNew(GetWant(), ...) reuses the now-stripped want_ -> app-side IsSkillExecute(want) returns false -> HandleExecuteSkill is never called, skill silently drops InsightIntent is unaffected because it triggers in FOREGROUND_NEW (HandleExecuteInsightIntentForeground), so the params are consumed before L2 clears them. Skill only triggers in BACKGROUND_NEW, which makes L2 unsafe for skill. L1 (entry stripping) and L3 (ExecuteSkillDone cleanup) are sufficient. 2. Propagate AMS failure code to CLI exitCode. BuildSkillSessionInfo sets ExecResult.exitCode from skillResult.code, but SkillExecuteManager constructs a default SkillExecuteResult (code=0) for OnTimeout / OnLaunchFailed / OnTargetProcessDied. The OnExecuteDone resultCode carries the real error (e.g. ERR_SKILL_EXECUTE_TARGET_DIED), yet CLI consumers saw exitCode=0 alongside status="failed", masking the failure. Fix at two layers: - CLI: BuildSkillSessionInfo falls back to resultCode when skillResult.code==0 && resultCode!=ERR_OK. - AMS: SkillExecuteManager now mirrors the resultCode into emptyResult.code at all three failure sites, matching how the app-side ReportSkillError already populates .code with errCode. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> | 2 天前 | |
clidot Signed-off-by: Luobniz21 <luoyicong@h-partners.com> # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Fri Jun 26 14:55:51 2026 +0800 # # On branch dot_cli0626 # Your branch is up to date with 'origin/dot_cli0626'. # # Changes to be committed: # modified: cli_tool_framework/services/climgr/BUILD.gn # modified: cli_tool_framework/services/climgr/include/cli_tool_manager_service.h # modified: cli_tool_framework/services/climgr/include/tool_util.h # modified: cli_tool_framework/services/climgr/src/cli_tool_manager_service.cpp # modified: cli_tool_framework/services/climgr/src/process_manager.cpp # modified: cli_tool_framework/services/climgr/src/tool_util.cpp # new file: cli_tool_framework/services/common/BUILD.gn # new file: cli_tool_framework/services/common/include/cli_event_report.h # new file: cli_tool_framework/services/common/src/cli_event_report.cpp # modified: cli_tool_framework/test/unittest/BUILD.gn # new file: cli_tool_framework/test/unittest/cli_event_report_test/BUILD.gn # new file: cli_tool_framework/test/unittest/cli_event_report_test/cli_event_report_test.cpp # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/cli_tool_mgr_service_test.cpp # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/permission_util_mock.cpp # modified: cli_tool_framework/test/unittest/common_mock/climgr/include/tool_util.h # modified: cli_tool_framework/test/unittest/common_mock/climgr/src/cli_mgr_service_mock.cpp # modified: cli_tool_framework/test/unittest/process_manager_test/BUILD.gn # modified: cli_tool_framework/test/unittest/tool_util_test/tool_util_test.cpp # modified: hisysevent.yaml # # Untracked files: # .claude/ # 1.diff # "CLI\345\267\245\345\205\267\346\211\223\347\202\271\344\274\230\345\214\226\346\200\273\347\273\223.md" # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Fri Jun 26 14:55:51 2026 +0800 # # On branch dot_cli0626 # Your branch is up to date with 'origin/dot_cli0626'. # # Changes to be committed: # modified: cli_tool_framework/services/climgr/BUILD.gn # modified: cli_tool_framework/services/climgr/include/cli_tool_manager_service.h # modified: cli_tool_framework/services/climgr/include/tool_util.h # modified: cli_tool_framework/services/climgr/src/cli_tool_manager_service.cpp # modified: cli_tool_framework/services/climgr/src/process_manager.cpp # modified: cli_tool_framework/services/climgr/src/tool_util.cpp # new file: cli_tool_framework/services/common/BUILD.gn # new file: cli_tool_framework/services/common/include/cli_event_report.h # new file: cli_tool_framework/services/common/src/cli_event_report.cpp # modified: cli_tool_framework/test/unittest/BUILD.gn # new file: cli_tool_framework/test/unittest/cli_event_report_test/BUILD.gn # new file: cli_tool_framework/test/unittest/cli_event_report_test/cli_event_report_test.cpp # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/cli_tool_mgr_service_test.cpp # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/permission_util_mock.cpp # modified: cli_tool_framework/test/unittest/common_mock/climgr/include/tool_util.h # modified: cli_tool_framework/test/unittest/common_mock/climgr/src/cli_mgr_service_mock.cpp # modified: cli_tool_framework/test/unittest/process_manager_test/BUILD.gn # modified: cli_tool_framework/test/unittest/tool_util_test/tool_util_test.cpp # modified: hisysevent.yaml # # Untracked files: # .claude/ # 1.diff # "CLI\345\267\245\345\205\267\346\211\223\347\202\271\344\274\230\345\214\226\346\200\273\347\273\223.md" # | 13 天前 |