GitLab reviewer and refiner never post on a local Agent Server

Open Beginner friendly
#970 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
devtools

Research direction

Start with _remove_checkout() in skills/gitlab-mr-reviewer/scripts/common.py and compare its behavior with _release_checkout() in the gitlab-issue-to-mr code path, which the issue says already logs and continues. Check how paths outside the current WORKSPACE_BASE are handled, then verify that skipping such a checkout leaves it on disk while allowing the note and record update to proceed.

Written by the indexing model from the issue text.

Description

What happens

On a local Agent Canvas, the GitLab MR reviewer starts a review, the review conversation finishes, but the review note is never posted to the merge request. The work item refiner shares the same code path, so its notes don't appear either.

Cause

On a local Agent Canvas each automation run gets its own WORKSPACE_BASE (.../workspaces/automation-runs/<run-id>). The reviewer and refiner start a conversation in one run and publish its result in a later one.

When they publish, _remove_checkout() in skills/gitlab-mr-reviewer/scripts/common.py resolves the checkout root from the current run's WORKSPACE_BASE. The earlier run's checkout is outside that root, so it raises:

ValueError: Refusing to remove a workspace outside GitLab review checkouts

This happens before the note is posted and before the record is updated, so every later run fails the same way.

gitlab-issue-to-mr uses the same layout, but its _release_checkout() logs "Refusing to remove …" and continues.

Proposed fix

Do the same in _remove_checkout(): skip a path outside the current root with a warning instead of raising. Nothing outside the root is deleted. A checkout skipped this way stays on disk under its own run's directory.

Environment

Local Agent Canvas (Docker), openhands-agent-server 1.62.0, extensions main at cfd1d0f. Found together with #969.

Dominant language
Python
Stars
184
Forks
137
Avg merge
1d 16h
Merged PRs (30d)
60

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenHands/extensions

All issues in OpenHands/extensions

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.