Skip to content

test: honor AgentTeams GitHub token env#1051

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/test-agentteams-github-token
Open

test: honor AgentTeams GitHub token env#1051
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/test-agentteams-github-token

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Summary

  • normalize GitHub test credentials into TEST_GITHUB_TOKEN, preferring the current AGENTTEAMS_GITHUB_TOKEN contract
  • load both current and legacy GitHub token names from an existing installation's env file
  • document the current variable and add a focused precedence regression test

Problem

The installers persist and pass AGENTTEAMS_GITHUB_TOKEN, but integration tests 08-13 only recognize TEST_GITHUB_TOKEN or the retired HICLAW_GITHUB_TOKEN. Running the suite with the generated AgentTeams env therefore reports that no GitHub token is configured and skips those tests.

The normalization preserves explicit test overrides and the legacy variable while making the current installer output work directly.

Testing

  • the regression pointed at origin/main fails with expected token canonical, got <empty>
  • bash tests/unit/test-github-token-env.sh
  • direct test 08 with only AGENTTEAMS_GITHUB_TOKEN reaches the later LLM prerequisite instead of the GitHub-token skip
  • bash -n tests/lib/test-helpers.sh tests/run-all-tests.sh tests/unit/test-github-token-env.sh
  • shellcheck -S error tests/lib/test-helpers.sh tests/run-all-tests.sh tests/unit/test-github-token-env.sh
  • git diff --check

@github-actions

Copy link
Copy Markdown
Contributor

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

Commit: db972a7
Workflow run: #1673

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

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 87 81 +6 ↑ +7.4%
Input Tokens 2995886 2803871 +192015 ↑ +6.8%
Output Tokens 17811 16791 +1020 ↑ +6.1%
Total Tokens 3013697 2820662 +193035 ↑ +6.8%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 78 68 +10 ↑ +14.7%
Input Tokens 2794461 2502214 +292247 ↑ +11.7%
Output Tokens 15756 13725 +2031 ↑ +14.8%
Total Tokens 2810217 2515939 +294278 ↑ +11.7%
🔧 Workers LLM Calls 9 13 -4 ↓ -30.8%
Input Tokens 201425 301657 -100232 ↓ -33.2%
Output Tokens 2055 3066 -1011 ↓ -33.0%
Total Tokens 203480 304723 -101243 ↓ -33.2%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 11 0 -1 ↓ -8.3% 325612 0 1757 0 -31253 ↓ -8.7% ✅ improved
03-assign-task 11 5 +1 ↑ +6.7% 373327 115549 1792 723 +17735 ↑ +3.7% ⚠️ regressed
04-human-intervene 15 0 +2 ↑ +15.4% 483115 0 2492 0 +52609 ↑ +12.1% ⚠️ regressed
05-heartbeat 9 0 +2 ↑ +28.6% 344772 0 1786 0 +71306 ↑ +25.9% ⚠️ regressed
06-multi-worker 32 4 +2 ↑ +5.9% 1267635 85876 7929 1332 +82638 ↑ +6.5% ⚠️ regressed

Trends

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


Generated by HiClaw CI on 2026-07-16 11:35:35 UTC


📦 Download debug logs & test artifacts

@shiyiyue1102

Copy link
Copy Markdown
Collaborator

This is a useful test-harness compatibility cleanup, but its standalone value is limited because it does not change runtime behavior. Before further review, please either link it to a concrete currently failing workflow caused by the GitHub token variable mismatch, or consolidate it with the related test-environment contract cleanup such as #1028. Keeping several small environment-variable test PRs separate adds more review and merge overhead than the changes justify.

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