Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Safe Outputs Conformance] MCE-001: add_comment tool description missing explicit CONSTRAINTS disclosure and "50 link" phrasing

已关闭 适合新手
#70,175 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, go, javascript
领域
tooling

调研方向

从 actions/setup/js/safe_outputs_tools.json 开始,找到 add_comment 的描述;将其与 pkg/workflow/js/safe_outputs_tools.json 中同步的副本进行比较。检查 actions/setup/js/generate_safe_outputs_tools.cjs 和提到的测试,以确认生成后措辞得以保留并符合预期。当两个副本都用 CONSTRAINTS 和字面表述 50 link 揭示限制,并且一致性检查通过时,任务即告完成。

由索引模型根据 Issue 内容生成。

描述

automated conformance medium-priority safe-outputs
Conformance Check Failure

Check ID: MCE-001
Severity: MEDIUM
Category: Implementation (Section 8.3 MCE2 — Tool Description Constraint Disclosure)

Problem Description

Per the Safe Outputs specification Section 8.3 (MCE2), the add_comment tool description MUST surface its enforcement constraints (character limit, mention limit, link limit) using recognizable, literal phrasing, and MUST contain an explicit CONSTRAINTS or IMPORTANT ... constraint disclosure block. The conformance checker (scripts/check-safe-outputs-conformance.sh, function check_mce_constraint_disclosure) scans pkg/workflow/js/safe_outputs_tools.json for these literal patterns and two sub-checks fail:

  1. No match for the literal phrase 50 link (case-insensitive).
  2. No match for CONSTRAINTS, IMPORTANT.*constraint, or validation constraint within the add_comment tool entry.
Affected Components
  • Files:

    • actions/setup/js/safe_outputs_tools.json (canonical source of the add_comment tool description)
    • pkg/workflow/js/safe_outputs_tools.json (synced copy embedded for the Go compiler — keep both in sync)
    • actions/setup/js/generate_safe_outputs_tools.cjs (runtime generator that composes the final description with suffixes/notes)
<b>🔍 Current vs Expected Behavior</b>
Current Behavior

The add_comment tool description (around line 525 of pkg/workflow/js/safe_outputs_tools.json) reads:

"...Input is limited to 524288 characters, 10 mentions, and configured max-links URL occurrences (default: 50). Oversized agent content is automatically replaced by notices to fit the complete 65536-character published comment..."

The 50-link default is disclosed, but phrased as "max-links URL occurrences (default: 50)" rather than the literal "50 link(s)" substring the spec checker expects, and there is no CONSTRAINTS: (or equivalent IMPORTANT ... constraint) lead-in labelling this as an enforced constraint block.

Expected Behavior

The description should contain a clearly labelled constraints section using literal, greppable phrasing, e.g.:

"CONSTRAINTS: Input is limited to 524288 characters, 10 mentions, and 50 links (configurable via max-links, default: 50)..."

This keeps the existing semantics identical (524288 chars / 10 mentions / default 50 links) while making the constraint disclosure explicit and literal, satisfying MCE2's requirement that agents reliably discover enforcement limits from the tool description text itself.

Remediation Steps

This task can be assigned to a Copilot coding agent with the following steps:

  1. In actions/setup/js/safe_outputs_tools.json, edit the add_comment tool's description field to prefix the constraint sentence with CONSTRAINTS: and rephrase the link limit using the literal substring 50 link (e.g., "50 links") instead of "(default: 50)" alone, while preserving the existing 524288-character and 10-mention figures.
  2. Apply the equivalent edit to pkg/workflow/js/safe_outputs_tools.json so the embedded Go copy stays byte-identical to the canonical source (check for an existing sync/codegen step before hand-editing both).
  3. Check actions/setup/js/generate_safe_outputs_tools.cjs for any place that appends additional suffixes to the add_comment description (e.g. discussions notes) to confirm the new CONSTRAINTS phrasing survives suffix concatenation.
  4. Update any tests asserting on the exact add_comment description text (e.g. actions/setup/js/generate_safe_outputs_tools.test.cjs, actions/setup/js/safe_outputs_mcp_add_comment_constraints.test.cjs, pkg/workflow/safe_outputs_tools_test.go) to match the new wording.
Verification

After remediation, verify the fix by running:

bash scripts/check-safe-outputs-conformance.sh

The check MCE-001 should pass without errors (no [MEDIUM] MCE-001 lines in the output).

References
  • Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md (Section 8.3, MCE2)
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh (check_mce_constraint_disclosure, line ~665)
  • Run ID: 39206249052
  • Date: 2026-10-19

Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · 74.2 AIC · ⌖ 0.578 AIC · ⊞ 5.3K · ◷

  • expires on Oct 19, 2026, 9:53 PM UTC-08:00
主要语言
Go
星标
5.4k
派生
596
平均合并
3 小时 37 分钟
30 天内合并 PR
833

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-aw 的其他 Issue

查看 github/gh-aw 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。