Skip to content

test: make multi-worker bob setup deterministic - #985

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/test-06-deterministic-bob-setup
Open

test: make multi-worker bob setup deterministic#985
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/test-06-deterministic-bob-setup

Conversation

@RerankerGuo

@RerankerGuo RerankerGuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make test-06-multi-worker create Bob via hiclaw apply worker instead of a Manager DM request
  • remove the obsolete Manager-DM quiet gate because deterministic CLI setup does not depend on Manager conversation state
  • use the full 180-second asynchronous provisioning window without reading the removed DM REPLY
  • keep the rest of the test focused on multi-worker collaboration after Alice and Bob exist

Why

test-02-create-worker already covers Manager-mediated worker creation. Repeating that LLM interaction in test-06 made unrelated PR checks depend on Manager backlog and Tool Guard timing rather than multi-worker collaboration.

Two refreshed #984 runs exposed both races:

  • run 29233390641: Bob was provisioned, but a Tool Guard approval was pending when the collaborative-task message arrived, so that message denied the tool instead of becoming a new task
  • run 29236623909: all tests through test-05 passed, but test-06 aborted because the Manager DM did not become quiet within 180 seconds, before Bob setup even started

Direct controller setup removes both dependencies while preserving strict checks for Bob's persisted state, runtime, Higress consumer, and MinIO files. The test still exercises the actual Manager collaboration flow after setup.

Verification

  • bash -n tests/test-06-multi-worker.sh
  • git diff --check
  • rebased onto current main (6f0c7da)
  • refreshed CI run 29238893338: all builds and all 10 integration matrix jobs passed, including the previously failing copaw/hermes SHARD_A

I could not run the embedded integration test locally because this environment cannot access /var/run/docker.sock (permission denied).

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 80 81 -1 ↓ -1.2%
Input Tokens 2751176 2803871 -52695 ↓ -1.9%
Output Tokens 15813 16791 -978 ↓ -5.8%
Total Tokens 2766989 2820662 -53673 ↓ -1.9%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 70 68 +2 ↑ +2.9%
Input Tokens 2517080 2502214 +14866 ↑ +0.6%
Output Tokens 13635 13725 -90 ↓ -0.7%
Total Tokens 2530715 2515939 +14776 ↑ +0.6%
🔧 Workers LLM Calls 10 13 -3 ↓ -23.1%
Input Tokens 234096 301657 -67561 ↓ -22.4%
Output Tokens 2178 3066 -888 ↓ -29.0%
Total Tokens 236274 304723 -68449 ↓ -22.5%

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% 280325 0 1442 0 -76855 ↓ -21.4% ✅ improved
03-assign-task 16 6 +7 ↑ +46.7% 523451 140423 2892 1495 +194605 ↑ +41.1% ⚠️ regressed
04-human-intervene 15 0 +2 ↑ +15.4% 472166 0 2275 0 +41443 ↑ +9.6% ⚠️ regressed
05-heartbeat 9 0 +2 ↑ +28.6% 336205 0 2255 0 +63208 ↑ +23.0% ⚠️ regressed
06-multi-worker 20 4 -10 ↓ -29.4% 904933 93673 4771 683 -276074 ↓ -21.6% ✅ improved

Trends

2 test(s) improved (fewer LLM calls)
⚠️ 3 test(s) regressed (more LLM calls)


Generated by HiClaw CI on 2026-07-13 09:58:10 UTC


📦 Download debug logs & test artifacts

@RerankerGuo
RerankerGuo force-pushed the fix/test-06-deterministic-bob-setup branch from 3a7a1e4 to 067fd41 Compare July 8, 2026 07:46
@RerankerGuo

Copy link
Copy Markdown
Contributor Author

@shiyiyue1102 Hi! This PR makes the multi-worker test-06-multi-worker.sh bob setup deterministic by replacing the LLM-driven DM instruction with a direct hiclaw apply worker --name bob ... call. This bypasses the SHARD_A flake that has been blocking PRs #972, #973, #975, #976, #983, #984 (all hit "Manager never invoked hiclaw create worker --name bob" — confirmed by inspecting #984's downloaded artifacts where the hiclaw-worker-bob session directory did not exist at all).

Just rebased onto current main and CI is 18/18 green (verified just now). If you can land this first, the next CI runs on the six Tier-3 PRs above should turn green automatically — they all hit the same root cause this PR fixes. Branch is MERGEABLE. Could you prioritize this one?

@RerankerGuo
RerankerGuo force-pushed the fix/test-06-deterministic-bob-setup branch from 78e9385 to 43d1048 Compare July 14, 2026 11:00
@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

RerankerGuo added a commit to RerankerGuo/AgentTeams that referenced this pull request Jul 14, 2026
Pre-create the 3 workers (alice, bob, charlie) via hiclaw apply worker and
the shared project via create-project.sh + immediate meta.json activation
+ MinIO sync, before sending the 4-phase task to Manager. Manager now
focuses on phase coordination only — the worker + project setup steps that
previously stalled on Manager's tool-guard approval prompt (jq | mv | cat
on meta.json) are now in the test runner and never enter the LLM control
loop.

Mirrors the fix in agentscope-ai#985 for test-06-multi-worker.sh (bob creation flake).
Both fixes isolate LLM-driven coordination from infrastructure setup so
the test measures coordination quality, not LLM timing.

Fixes the SHARD_B copaw/hermes test-14 failure seen on agentscope-ai#984 (run 28926397804,
job 85816940745), where Manager hung for 30 minutes on a tool-guard approval
prompt while trying to update meta.json status.

Refs: agentscope-ai#984
@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: 43d1048
Workflow run: #1647

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

📦 Download full debug logs & test artifacts

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

CI update: run #1647 failed before any integration test started. All affected jobs exited during embedded install because the base workflow reads the new AGENTTEAMS_LLM_API_KEY secret name while the repository still provides the legacy secret. I opened #1026 with a focused workflow fallback. The #985 test change was not reached in these failed jobs.

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

Fresh independent evidence after the repository secret recovered: draft #1041's base-branch run 29489698196 reached the full copaw/hermes SHARD_A suite and reproduced the setup race this PR removes.

In unpatched test-06, the Manager's create-Bob DM reply was empty, so both reply assertions failed. Bob was nevertheless provisioned, his Higress consumer and MinIO files existed, and the later collaborative task completed successfully. #985 replaces only that flaky LLM-driven setup/reply dependency with hiclaw apply worker, while retaining those downstream provisioning and collaboration checks.

The current red checks on #985 are still the older pre-test secret failure; this newer run does not include #985, but directly reproduces its target failure on the current base. No patch change is needed.

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