GitLab reviewer and refiner never post on a local Agent Server

Đang mở Phù hợp với người mới
#970 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu với _remove_checkout() trong skills/gitlab-mr-reviewer/scripts/common.py và so sánh hành vi của nó với _release_checkout() trong đường dẫn mã gitlab-issue-to-mr, vốn theo issue đã ghi log và tiếp tục. Kiểm tra cách xử lý các đường dẫn nằm ngoài WORKSPACE_BASE hiện tại, sau đó xác minh rằng việc bỏ qua checkout như vậy sẽ giữ nó trên đĩa, đồng thời cho phép tiếp tục ghi chú và cập nhật bản ghi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
184
Fork
137
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenHands/extensions

Tất cả issue của OpenHands/extensions

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.