Skip to content

feat(harbor): add Kernel browser control arm - #330

Merged
Perry2004 merged 6 commits into
TIGER-AI-Lab:mainfrom
kernel:hypeship/harbor-kernel-control
Sep 8, 2026
Merged

feat(harbor): add Kernel browser control arm#330
Perry2004 merged 6 commits into
TIGER-AI-Lab:mainfrom
kernel:hypeship/harbor-kernel-control

Conversation

@rgarcia

@rgarcia rgarcia commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend clawbench-harbor-adapt with a Kernel-backed browser runtime so Harbor agents can run ClawBench tasks against one managed remote browser per trial.

  • add --browser-runtime kernel with validated runtime options
  • create one headful stealth Kernel browser during task setup
  • connect the agent's pinned Playwright MCP server through a credential-free local CDP bridge
  • finalize and download provider replay recordings during verification
  • delete the browser on success and setup failure, then verify deletion
  • preserve local Chromium as the default Harbor runtime

Why

The native ClawBench runner supports Kernel browsers after #311, while the Harbor adapter currently supports only container-local Chromium. This adds the corresponding Harbor control arm so the same task corpus can be compared across local and managed browser runtimes without changing task semantics or scoring.

The implementation is rebased on the Harbor correctness changes merged in #324. This PR contains only the remaining remote-browser Harbor integration.

Design

Each generated Kernel task:

  1. creates exactly one browser and provider replay during setup
  2. stores the provider CDP endpoint in a root-only runtime file
  3. exposes a local CDP bridge to Playwright MCP
  4. records credential-free session and lifecycle metadata under /my-info/
  5. finalizes the replay, writes recording.mp4, deletes the browser, and verifies deletion

The existing local Chromium path remains the default and does not require Kernel credentials.

Validation

  • uv run pytest -q — 232 passed
  • uv run ruff check src/clawbench tests
  • uv run ruff format --check src/clawbench tests
  • uv run --frozen pyright src/clawbench tests — 0 errors
  • fork CI passes on Ubuntu, macOS, and Windows

@Perry2004
Perry2004 self-requested a review September 8, 2026 05:09
echo "$!" > /tmp/clawbench-run/runtime-server.pid
sleep 1

if [ "$REMOTE_MODE" = true ]; then

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.

This should be moved to before runtime-server start since the server starts the ffmpeg in local mode, which depends on x11y display.

Comment thread src/clawbench/eval/harbor_adapter.py Outdated
"- Do not launch a separate browser. Complete the task through the existing browser session.\n"
"---\n"
)
if browser_runtime == "local":

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.

Please do not change the prompt to the agent. These additional info will have potential impact on agent performance.

@Perry2004 Perry2004 added bug Something isn't working enhancement New feature or request labels Sep 8, 2026
@rgarcia

rgarcia commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

thanks for the review @Perry2004! Just addressed your comments

@Perry2004 Perry2004 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🫡
Thanks for the contribution.

@Perry2004
Perry2004 merged commit 3926d41 into TIGER-AI-Lab:main Sep 8, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in ClawBench Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants