Skip to content

fix(manager): add safe worker deletion wrapper#969

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-967-delete-worker-loop
Open

fix(manager): add safe worker deletion wrapper#969
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-967-delete-worker-loop

Conversation

@RerankerGuo

Copy link
Copy Markdown

Summary

  • add a worker-management delete wrapper that calls hiclaw delete worker <name> with the valid positional CLI syntax
  • return structured JSON so the Manager only reports deletion after command success
  • add a records-only cleanup path for state.json, worker-lifecycle.json, and workers-registry.json to avoid malformed write_file cleanup loops
  • update Worker management guidance and lifecycle reference to use the wrapper

Fixes #967.

Verification

  • bash -n manager/agent/skills/worker-management/scripts/delete-worker.sh manager/tests/test-delete-worker-script.sh
  • git diff --check
  • bash manager/tests/test-delete-worker-script.sh (skips in this host because jq is not installed; Manager images install jq, and the test runs full assertions when jq exists)

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=hermes)

Commit: 602e96e
Workflow run: #1397

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 155 81 +74 ↑ +91.4%
Input Tokens 4256032 2803871 +1452161 ↑ +51.8%
Output Tokens 27845 16791 +11054 ↑ +65.8%
Total Tokens 4283877 2820662 +1463215 ↑ +51.9%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 103 68 +35 ↑ +51.5%
Input Tokens 2819843 2502214 +317629 ↑ +12.7%
Output Tokens 16148 13725 +2423 ↑ +17.7%
Total Tokens 2835991 2515939 +320052 ↑ +12.7%
🔧 Workers LLM Calls 52 13 +39 ↑ +300.0%
Input Tokens 1436189 301657 +1134532 ↑ +376.1%
Output Tokens 11697 3066 +8631 ↑ +281.5%
Total Tokens 1447886 304723 +1143163 ↑ +375.1%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 6 0 -6 ↓ -50.0% 161713 0 981 0 -195928 ↓ -54.6% ✅ improved
03-assign-task 16 6 +7 ↑ +46.7% 355815 98899 1928 468 -16546 ↓ -3.5% ⚠️ regressed
04-human-intervene 19 0 +6 ↑ +46.2% 287330 0 1598 0 -144070 ↓ -33.3% ⚠️ regressed
05-heartbeat 10 0 +3 ↑ +42.9% 204362 0 1543 0 -69347 ↓ -25.2% ⚠️ regressed
06-multi-worker 52 46 +64 ↑ +188.2% 1810623 1337290 10098 11229 +1889106 ↑ +147.6% ⚠️ regressed

Trends

1 test(s) improved (fewer LLM calls)
⚠️ 4 test(s) regressed (more LLM calls)


Generated by HiClaw CI on 2026-07-08 06:38:48 UTC


📦 Download debug logs & test artifacts

@RerankerGuo RerankerGuo force-pushed the fix/issue-967-delete-worker-loop branch from 602e96e to 6283d69 Compare July 8, 2026 05:47
@RerankerGuo

Copy link
Copy Markdown
Author

@shiyiyue1102 Hi! This PR addresses #967. Just rebased onto current main (was conflicting) — CI is now green (18/18). Adds a safe hiclaw delete worker <name> wrapper that cleans state.json / worker-lifecycle.json / workers-registry.json so Manager stops looping on bad delete commands. Could you take a look when convenient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

关于移除worker陷入死循环

1 participant