[Safe Outputs Conformance] TYPE-016: Conformance checker regex rejects valid enforceCommentLimits signature
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
- 78/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, shell
Hướng nghiên cứu
Đọc check_add_comment_max_links trong scripts/check-safe-outputs-conformance.sh và so sánh phần kiểm tra chữ ký của nó với enforceCommentLimits trong actions/setup/js/comment_limit_helpers.cjs. Cập nhật checker để xác minh maxLinks = MAX_LINKS và linkBody = body trong chữ ký options, đồng thời cho phép các tham số bổ sung. Chạy bash scripts/check-safe-outputs-conformance.sh và xác nhận TYPE-016 đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Conformance Check Failure
Check ID: TYPE-016
Severity: HIGH (as reported by the checker; investigation below suggests this is a false positive in the checker itself, not the implementation)
Category: Specification/Implementation
Problem Description
scripts/check-safe-outputs-conformance.sh (around line 2503) asserts that actions/setup/js/comment_limit_helpers.cjs contains the exact literal signature:
function enforceCommentLimits(body, { maxLinks = MAX_LINKS, linkBody = body }
The actual, current signature is:
function enforceCommentLimits(body, { maxLinks = MAX_LINKS, linkBody = body, maxLength = MAX_COMMENT_LENGTH } = {}) {
A maxLength destructured parameter (with its own default) was added after linkBody = body, so the checkers strict regex — which expects the destructuring to close with \} immediately after linkBody = body — no longer matches, even though the feature required by TYPE-016 (configurable maxLinks, and an agent-only linkBody that excludes generated/footer links from the link count) is fully present and used correctly:
actions/setup/js/add_comment.cjs:918callsenforceCommentLimits(processedBody, { maxLinks, linkBody })— matches the handler-side regex check and correctly separates agent content (linkBody) from the fullprocessedBody.actions/setup/js/safe_outputs_handlers.cjs:2416callsenforceCommentLimits(body, { maxLinks: addCommentConfig.max_links ?? addCommentConfig[\"max-links\"], maxLength: MAX_COMMENT_INPUT_LENGTH })— matches the MCP-gateway-side regex check.- The schema (
pkg/parser/schemas/main_workflow_schema.json) correctly declaresmax-linksas a positive integer.
So three of the four TYPE-016 sub-checks pass; only the first sub-check (exact signature regex) fails, and only because it does not tolerate an additional trailing parameter in the destructuring.
Affected Components
- Files:
scripts/check-safe-outputs-conformance.sh(line ~2503, thecheck_add_comment_max_linksfunction) - Reference implementation (believed correct, should NOT be changed to "fix" this):
actions/setup/js/comment_limit_helpers.cjs
🔍 Current vs Expected Behavior
Current Behavior
The checkers regex for the helper signature is an exact literal match that breaks whenever an additional keyword parameter (here maxLength) is added to the destructured options object, producing a HIGH-severity false positive even though the semantic requirement (configurable maxLinks, agent-only linkBody) is satisfied.
Expected Behavior
The checker should verify the semantic presence of a configurable maxLinks parameter and a linkBody parameter that defaults to body (so callers may pass agent-only content), without being brittle to additional, unrelated parameters being added to the same destructuring (e.g. match on maxLinks = MAX_LINKS and linkBody = body as independent substrings rather than one contiguous literal sequence terminated by \}).
Remediation Steps
This task can be assigned to a Copilot coding agent with the following steps:
- In
scripts/check-safe-outputs-conformance.sh, update thecheck_add_comment_max_linksfunctions first regex (around line 2503) so it independently checks formaxLinks = MAX_LINKSandlinkBody = bodyappearing within theenforceCommentLimitsfunction signature, instead of requiring them to be immediately followed by}(e.g. two separategrep -qchecks, or a regex that allows trailing, ...before the closing brace). - Do NOT modify
actions/setup/js/comment_limit_helpers.cjs,add_comment.cjs, orsafe_outputs_handlers.cjsto "fix" this — their current behavior already satisfies the TYPE-016 requirement. - Re-run the checker and confirm TYPE-016 reports PASS.
Verification
After remediation, verify the fix by running:
bash scripts/check-safe-outputs-conformance.sh
The check TYPE-016 should pass without errors.
References
- Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md (Section 7.1 Enforced Constraints, Section 8.3 MCE5)
- Conformance Checker: scripts/check-safe-outputs-conformance.sh
- Run ID: 39907463914
- Date: 2026-10-23
Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · ~67 AIC · ⌖ ~1 AIC · ⊞ 5.4K · ◷
- expires on Oct 23, 2026, 9:51 PM UTC-08:00
- Ngôn ngữ chính
- Go
- Star
- 5.6k
- Fork
- 615
- Merge trung bình
- 5 giờ 36 phút
- Pull request đã merge (30 ngày)
- 805
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/gh-aw
-
agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automation cli cookie documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automation cookie documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automation observability optimization traces
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Cluster details: the Control Plane version field has a different border color than its icon boxĐang mởkind/design sig/ui
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
kubermatic/dashboard#8449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
filecoin-project/curio#1632 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
compose: derived node options overwrite each other's targetsCó thể đã có người làm @yangjj-iso đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày