Skip to content

fix(qwenpaw): preserve CoPaw state during runtime migration - #1131

Merged
shiyiyue1102 merged 10 commits into
mainfrom
codex/fix-qwenpaw-copaw-state-migration
Aug 6, 2026
Merged

fix(qwenpaw): preserve CoPaw state during runtime migration#1131
shiyiyue1102 merged 10 commits into
mainfrom
codex/fix-qwenpaw-copaw-state-migration

Conversation

@NingHua-jzp

Copy link
Copy Markdown
Collaborator

Summary

  • restore Worker storage before creating any QwenPaw state directories
  • merge .copaw and .copaw.secret into their QwenPaw counterparts and rebase migrated workspace paths
  • persist migrated state before an idempotency marker, with retry-safe failure handling
  • extend runtime-switch coverage through CoPaw persistence and QwenPaw activation

Verification

  • 71 passed, 1 skipped for the related QwenPaw unit test suite
  • bash -n tests/test-23-runtime-switch.sh
  • git diff --check
  • local install E2E: Manager Agent dialogue created a CoPaw Worker, switched it to QwenPaw, preserved room identity/workspace/session/secret state, and QwenPaw read the migrated sentinel through Matrix
  • built and preflighted local linux/amd64 QwenPaw Worker image

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr-2 / mgr=copaw / wk=copaw)

Commit: 172dc63
Workflow run: #1915

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 98 155 -57 ↓ -36.8%
Input Tokens 2742585 4350104 -1607519 ↓ -37.0%
Output Tokens 29694 39203 -9509 ↓ -24.3%
Total Tokens 2772279 4389307 -1617028 ↓ -36.8%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 59 104 -45 ↓ -43.3%
Input Tokens 1832549 3122188 -1289639 ↓ -41.3%
Output Tokens 10914 18686 -7772 ↓ -41.6%
Total Tokens 1843463 3140874 -1297411 ↓ -41.3%
🔧 Workers LLM Calls 39 51 -12 ↓ -23.5%
Input Tokens 910036 1227916 -317880 ↓ -25.9%
Output Tokens 18780 20517 -1737 ↓ -8.5%
Total Tokens 928816 1248433 -319617 ↓ -25.6%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 6 0 -5 ↓ -45.5% 162201 0 715 0 -170677 ↓ -51.2% ✅ improved
03-assign-task 9 6 -4 ↓ -21.1% 246848 129178 1671 776 -175405 ↓ -31.7% ✅ improved
04-human-intervene 12 12 -1 ↓ -4.0% 303306 271344 1844 1395 -72312 ↓ -11.1% ✅ improved
05-heartbeat 6 7 +2 ↑ +18.2% 181303 168658 1389 706 +4030 ↑ +1.2% ⚠️ regressed
06-multi-worker 26 14 -49 ↓ -55.1% 938891 340856 5295 15903 -1202664 ↓ -48.0% ✅ improved

Trends

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


Generated by AgentTeams CI on 2026-08-05 10:04:25 UTC


📦 Download debug logs & test artifacts

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Commit: f1663ca
Workflow run: #1911

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Commit: f1663ca
Workflow run: #1911

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (qwenpaw-teamharness / mgr=copaw / wk=qwenpaw)

Commit: d0910d5
Workflow run: #1916

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Commit: f1663ca
Workflow run: #1911

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=qwenpaw)

Commit: 0f2e431
Workflow run: #1917

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=openclaw / wk=openclaw)

Commit: 0f2e431
Workflow run: #1917

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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=copaw)

Commit: 0f2e431
Workflow run: #1917

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

📦 Download full debug logs & test artifacts

@shiyiyue1102

Copy link
Copy Markdown
Collaborator

Thanks for the update. The CI rerun is green, but one migration path is still incorrect. _migrate_legacy_state() always copies .copaw.secret to <worker_home>/.qwenpaw.secret, while startup preserves an explicitly configured QWENPAW_SECRET_DIR.

QwenPaw resolves the effective secret directory from QWENPAW_SECRET_DIR (or <QWENPAW_WORKING_DIR>.secret) with Path(...).expanduser().resolve(). Therefore customized absolute paths, and relative paths resolved from the process CWD, will start without the migrated credentials. Please derive the migration target with the same semantics and add coverage for the default, absolute, and relative cases. If the normalized path is outside worker_home, please reject it before writing the completion marker or define a durable persistence/recovery contract for that location.


感谢更新。CI 重跑已通过,但迁移链路仍有一个问题:_migrate_legacy_state() 始终将 .copaw.secret 复制到 <worker_home>/.qwenpaw.secret,而启动逻辑会保留显式配置的 QWENPAW_SECRET_DIR

QwenPaw 实际使用 QWENPAW_SECRET_DIR(未配置时为 <QWENPAW_WORKING_DIR>.secret),并通过 Path(...).expanduser().resolve() 规范化。因此,自定义绝对路径以及按进程 CWD 解析的相对路径都可能读不到迁移后的凭据。请按相同语义确定迁移目标,并补充默认、绝对路径、相对路径的覆盖;若规范化后的目录位于 worker_home 外,请在写入完成标记前明确拒绝,或为该位置定义可持久化、可恢复的契约。

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=hermes)

Commit: 0f2e431
Workflow run: #1917

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 Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

Commit: 539ba70
Workflow run: #1918

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

📦 Download full debug logs & test artifacts

@shiyiyue1102 shiyiyue1102 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The migration now resolves QWENPAW_SECRET_DIR using the QwenPaw child-process path semantics, rejects destinations outside the worker storage root before persistence, and covers default, absolute, relative, and rejected-outside-root cases. All required CI checks are green.

@shiyiyue1102
shiyiyue1102 merged commit 2fd9ddd into main Aug 6, 2026
22 checks passed
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.

2 participants