Skip to content

fix(copaw): guard managed skill cleanup#982

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-626-copaw-delete-guards
Open

fix(copaw): guard managed skill cleanup#982
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-626-copaw-delete-guards

Conversation

@RerankerGuo

Copy link
Copy Markdown

Summary

  • add a managed-directory removal guard for CoPaw skill cleanup paths
  • refuse recursive deletion unless the target is a non-symlink direct child of the expected managed directory
  • cover the sync cleanup guard with unit tests

Addresses the recursive-delete hardening items in #626.

Verification

  • python3 -m py_compile copaw/src/copaw_worker/sync.py copaw/src/copaw_worker/worker.py copaw/tests/test_sync.py
  • PYTHONPATH=/tmp/agentteams-pytest:copaw/src python3 -m pytest copaw/tests/test_sync.py (15 passed)
  • git diff --check

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 165 81 +84 ↑ +103.7%
Input Tokens 7029898 2803871 +4226027 ↑ +150.7%
Output Tokens 43169 16791 +26378 ↑ +157.1%
Total Tokens 7073067 2820662 +4252405 ↑ +150.8%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 115 68 +47 ↑ +69.1%
Input Tokens 5247008 2502214 +2744794 ↑ +109.7%
Output Tokens 22172 13725 +8447 ↑ +61.5%
Total Tokens 5269180 2515939 +2753241 ↑ +109.4%
🔧 Workers LLM Calls 50 13 +37 ↑ +284.6%
Input Tokens 1782890 301657 +1481233 ↑ +491.0%
Output Tokens 20997 3066 +17931 ↑ +584.8%
Total Tokens 1803887 304723 +1499164 ↑ +492.0%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 7 0 -5 ↓ -41.7% 193821 0 998 0 -163803 ↓ -45.7% ✅ improved
03-assign-task 16 5 +6 ↑ +40.0% 483732 119217 2199 856 +132348 ↑ +27.9% ⚠️ regressed
04-human-intervene 12 5 +4 ↑ +30.8% 368875 100951 1676 487 +38991 ↑ +9.0% ⚠️ regressed
05-heartbeat 8 5 +6 ↑ +85.7% 274787 128949 1598 1113 +131195 ↑ +47.7% ⚠️ regressed
06-multi-worker 72 35 +73 ↑ +214.7% 3925793 1433773 15701 18541 +4113674 ↑ +321.3% ⚠️ regressed

Trends

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


Generated by HiClaw CI on 2026-07-08 07:36:57 UTC


📦 Download debug logs & test artifacts

@RerankerGuo RerankerGuo force-pushed the fix/issue-626-copaw-delete-guards branch from 6e04f61 to ec46157 Compare July 8, 2026 05:48
@RerankerGuo

Copy link
Copy Markdown
Author

@shiyiyue1102 Hi! This PR addresses #626. Just rebased onto current main (was conflicting) — CI is now green (18/18). Adds managed child-directory guards around CoPaw recursive skill cleanup; refuses deletion unless the target is a non-symlink direct child of the expected managed directory. 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.

1 participant