Own-agent checks: reject the Actions bot id in admit.mjs and test the source label in pr-verify

Đang mở Phù hợp với người mới
#17,374 2 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
74/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ệ
github-actions, javascript, node.js
Lĩnh vực
ci-cd, tooling

Hướng nghiên cứu

Bắt đầu với .github/scripts/intake-triage/admit.mjs quanh dòng 274 và 295-298, nơi trình kiểm tra quy tắc và ownAgentIds chấp nhận số nguyên dương, rồi so sánh với ACTIONS_BOT_ID ở dòng 1101. Sau đó đọc .github/scripts/pr-verify/resolve-pr.mjs quanh dòng 1008 và so sánh phần kiểm tra label source: của nó với SOURCE_LABEL trong admission và babysit_verify_evidence.py. Thêm test để từ chối id bot Actions và label source: sai định dạng, sau đó chạy các bộ test intake-triage và pr-verify liên quan; hoàn tất nghĩa là cả hai kiểm tra đều thất bại sớm trong khi các quy tắc đã phát hành vẫn admit và verify các issue giống như trước.

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

Mô tả

Summary

Two checks that #16999 added for own-agent issues are looser in one place than in the others that read the same rule.

  1. .github/scripts/intake-triage/admit.mjs: the rules validator (line 274) and ownAgentIds (lines 295 to 298) accept any positive integer in own-agents.identities, including the GitHub Actions bot id (ACTIONS_BOT_ID, line 1101), which the rules file's description and the module's comment say must never be listed. The Python merge gate drops that id. No admission can come from it today: apply-verdict.mjs writes nothing for an author authorTrust refuses, and the shipped list is ["lanes-app"]. This is hardening.
  2. .github/scripts/pr-verify/resolve-pr.mjs line 1008 counts source: labels (sourceLabels(...).length === 1) but never tests the label against SOURCE_LABEL, which admission (admit.mjs) and the merge gate (babysit_verify_evidence.py) both do. A malformed source: label passes pr-verify and is refused at the merge gate, so the pull request stalls instead of failing early.

Evidence

  • Lines read at d55250ec; the files are unchanged on main since.
  • Found by a review of the byte-copied files in melodic-software/pr-pipeline-sandbox#387. Neither was seen in a live run.

Done when

  • The rules validator and ownAgentIds reject the Actions bot id, with a test for each.
  • pr-verify tests the single source: label against the same pattern admission uses, with a malformed-label test.
  • No change to which issues are admitted or verified under the shipped rules.
Ngôn ngữ chính
Shell
Star
22
Fork
2
Merge trung bình
1 giờ 47 phút
Pull request đã merge (30 ngày)
942

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

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 melodic-software/claude-code-plugins

Tất cả issue của melodic-software/claude-code-plugins

Issue tương tự

Thêm issue về Shell/Bash

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.