Signed-off-by: yangxuguang-huawei <yangxuguang3@h-partners.com>
AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%]
Co-authored-by: pi (glm-5.2) <ai@local>
Change-Id: I977d78f28265f6a074bc30c3be06e70338f11a7c
Signed-off-by: Luobniz21 <luoyicong@h-partners.com>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%]
# 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: Mon Jul 27 21:10:59 2026 +0800
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
# modified: cli_tool_framework/services/climgr/src/tool_util.cpp
# modified: cli_tool_framework/services/common/src/cli_event_report.cpp
#
# 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: Mon Jul 27 21:59:16 2026 +0800
#
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
# modified: cli_tool_framework/services/climgr/src/tool_util.cpp
# modified: cli_tool_framework/services/common/src/cli_event_report.cpp
#
Co-authored-by: claude (glm-4.7) <ai@local>
Co-authored-by: opencode (glm-5.2) <ai@local>
Signed-off-by: Luobniz21 <luoyicong@h-partners.com>
🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%]
# 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: Tue Jul 21 19:38:22 2026 +0800
#
# On branch cli-sigterm-report
# Your branch is up to date with 'origin/cli-sigterm-report'.
#
# Changes to be committed:
# modified: cli_tool_framework/services/climgr/include/cli_tool_manager_service.h
# modified: cli_tool_framework/services/climgr/include/session_record.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/test/unittest/cli_event_report_test/BUILD.gn
# modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn
# modified: cli_tool_framework/test/unittest/process_manager_test/BUILD.gn
# modified: services/abilitymgr/include/ability_manager_service.h
# modified: services/abilitymgr/src/ability_manager_service.cpp
# modified: services/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp
# modified: test/unittest/ability_auto_startup_service_third_test/BUILD.gn
# modified: test/unittest/block_all_app_start_interceptor_test/BUILD.gn
#
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>
JsUIAbility::ExecuteSkill and JsServiceExtension::ExecuteSkill had four
silent early-return paths (null napi env, function not found, napi_call
failure, and a previously uncaught pending exception) that left the AMS
record in EXECUTING forever after the skill-timeout PR canceled the
launch timer, hanging the caller. Reuse ERR_TIMED_OUT as the result code
to keep CLI exitCode behavior identical to the pre-timeout baseline and
avoid growing the public error-code surface; the per-path detail rides
in SkillExecuteResult.result (WantParams) under a reserved key
SKILL_ERROR_MSG_KEY. The CLI side (ToolUtil::BuildSkillSessionInfo) now
extracts that message into ExecResult.errorText, which is already wired
through IPC and JS but was never populated for skills. Also removes the
stale "skill will time out" log comment that the timeout PR invalidated.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%]
Co-authored-by: claude (glm-5.2) <ai@local>
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: Wed Jul 1 10:56:51 2026 +0800
#
# On branch GenerateSandboxConfig
# Your branch is up to date with 'origin/GenerateSandboxConfig'.
#
# Changes to be committed:
# modified: cli_tool_framework/services/climgr/src/tool_util.cpp
#
# 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"
#
CliToolManagerService_BatchRegisterFunctions_0100 and _0200 now
construct FunctionsRawData via FromFunctionInfoVec before calling
service_->BatchRegisterFunctions, matching the IDL signature change
from FunctionInfo[] to FunctionsRawData.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%]
Co-authored-by: claude (glm-5.2) <ai@local>
Change BatchRegisterFunctions IDL from [in] FunctionInfo[] (Parcel,
1MB Binder limit) to [in] FunctionsRawData (shared memory/Ashmem),
matching the existing GetAllFunctions pattern. This allows a single
IPC to carry all functions regardless of data size, eliminating the
N/50 batch chunking that caused repeated CheckKvStore loops on
simulators without a KVStore and led to boot timeouts.
Client-side CliToolMGRClient keeps accepting vector<FunctionInfo>
and converts to FunctionsRawData internally via FromFunctionInfoVec.
Service-side converts back via ToFunctionInfoVec before processing.
Chunking logic in BatchRegisterInsightIntentFunctions is removed.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%]
Co-authored-by: claude (glm-5.2) <ai@local>
Static analysis flags FilterGeneric at depth 5 (function → for → if
Entry → for mode → if mode==). Pull the Entry executeMode check into
IsQualifiedEntry helper so FilterGeneric stays at depth 4.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%]
Co-authored-by: claude (glm-5.2) <ai@local>
Drop the two extra BatchRegisterFunctions failure-path cases that
came in from the upstream cherry-pick. Keep 001/002 which already
cover the happy path.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[0%]
mock_insight_intent_db_cache.{h,cpp} for the thirteenth test lacked
GetAllInsightIntentInfoForRegister (added on the real cache), so test
targets linking the mock hit undefined symbol. Add the mock declaration
and a stub implementation that just delegates to GetAllInsightIntentInfo.
CliFunctionDataManager::BatchRegisterFunctions returns ERR_KVSTORE_ERROR
instead of ERR_INVALID_PARAM when no functions were registered, matching
the rest of the KVStore error reporting.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[89%] 👌 AI Adopted[89%] 🧑 Human[11%]
Co-authored-by: claude (glm-5.2) <ai@local>
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"
#