Skip to content

Fix/agent id upstream#38

Open
zhuanghaoz wants to merge 3 commits intopinchbench:mainfrom
zhuanghaoz:fix/agent-id-upstream
Open

Fix/agent id upstream#38
zhuanghaoz wants to merge 3 commits intopinchbench:mainfrom
zhuanghaoz:fix/agent-id-upstream

Conversation

@zhuanghaoz
Copy link

No description provided.

zhuanghaoz and others added 3 commits March 9, 2026 22:46
- Fix agent ID normalization to handle lowercase transformation
- Remove BOOTSTRAP.md, SOUL.md, USER.md, IDENTITY.md before running tasks
- Fix model ID normalization to preserve provider-qualified models (e.g., minimax-cn/)

These fixes ensure benchmark tasks work correctly with OpenClaw agents.
- Copy skills from main workspace to benchmark workspace so agents can use nano-pdf
- Add 2-second delay before grading to ensure files are flushed to disk
- Fix model ID normalization to preserve provider-qualified models
import os
import statistics
import subprocess
import time
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: Duplicate import time — this line adds import time, but it already exists at line 23. The PR introduces a redundant import.

Suggested change
import time

if skill_dir_src.is_dir():
dest_skill_dir = dest_skills_dir / skill_dir_src.name
# Copy skill directory
import shutil
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: import shutil inside a loop — this import statement is executed on every iteration of the for skill_dir_src in main_skills_dir.iterdir() loop. While Python caches module imports, placing it here is unnecessary overhead and poor practice. Move it to the top of the file with the other imports.

Copy link
Member

Choose a reason for hiding this comment

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

@zhuanghaoz what do you think about moving this to the top of the file to import it once?

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 9, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
scripts/benchmark.py 21 Duplicate import time — the PR adds a second import time while one already exists at line 23
scripts/lib_agent.py 232 import shutil placed inside a loop body — should be moved to top-level imports
Files Reviewed (2 files)
  • scripts/benchmark.py - 1 issue
  • scripts/lib_agent.py - 1 issue

Fix these issues in Kilo Cloud

Copy link
Member

@olearycrew olearycrew left a comment

Choose a reason for hiding this comment

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

@zhuanghaoz can you fix the conflicts as well here?

Thanks for this contribution!

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