Skip to content

fix(copaw): retry prompt reads during worker startup#979

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-711-copaw-prompt-read-race
Open

fix(copaw): retry prompt reads during worker startup#979
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-711-copaw-prompt-read-race

Conversation

@RerankerGuo

Copy link
Copy Markdown

Summary

  • add a bounded stable UTF-8 prompt reader for CoPaw worker SOUL.md / AGENTS.md materialization
  • use it during startup and config re-bridge so transient mc mirror/read races do not crash the worker
  • add focused unit coverage and changelog entry

Tests

  • git diff --check
  • python3 -m py_compile copaw/src/copaw_worker/worker.py copaw/tests/test_worker_health.py
  • not run: python3 -m pytest copaw/tests/test_worker_health.py -q (pytest is not installed in this environment)

Fixes #711.
Also addresses #728.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 119 81 +38 ↑ +46.9%
Input Tokens 4020892 2803871 +1217021 ↑ +43.4%
Output Tokens 26030 16791 +9239 ↑ +55.0%
Total Tokens 4046922 2820662 +1226260 ↑ +43.5%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 87 68 +19 ↑ +27.9%
Input Tokens 3312158 2502214 +809944 ↑ +32.4%
Output Tokens 18203 13725 +4478 ↑ +32.6%
Total Tokens 3330361 2515939 +814422 ↑ +32.4%
🔧 Workers LLM Calls 32 13 +19 ↑ +146.2%
Input Tokens 708734 301657 +407077 ↑ +134.9%
Output Tokens 7827 3066 +4761 ↑ +155.3%
Total Tokens 716561 304723 +411838 ↑ +135.2%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 10 0 -2 ↓ -16.7% 292190 0 1629 0 -64803 ↓ -18.1% ✅ improved
03-assign-task 11 9 +5 ↑ +33.3% 371815 202978 1764 2091 +104992 ↑ +22.2% ⚠️ regressed
04-human-intervene 14 0 +1 ↑ +7.7% 441918 0 2355 0 +11275 ↑ +2.6% ⚠️ regressed
05-heartbeat 8 0 +1 ↑ +14.3% 299705 0 1682 0 +26135 ↑ +9.5% ⚠️ regressed
06-multi-worker 44 23 +33 ↑ +97.1% 1906530 505756 10773 5736 +1148661 ↑ +89.7% ⚠️ regressed

Trends

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


Generated by HiClaw CI on 2026-07-02 15:55:04 UTC


📦 Download debug logs & test artifacts

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.

[Bug] copaw worker can crash reading partially-written merged AGENTS.md during apply --zip update

1 participant