[Safe Outputs Conformance] USE-001: Five support scripts throw errors without standardized E0xx error codes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, javascript
调研方向
阅读 docs/src/content/docs/specs/safe-outputs-specification.md 的第 9.5 节,然后检查列出的五个 actions/setup/js/*.cjs 文件中的错误调用点,以及 scripts/check-safe-outputs-conformance.sh 中对应的规则。运行检查器查看结果;当它报告五个文件的 USE-001 均通过,且消息仍然易读时,任务就完成了。
由索引模型根据 Issue 内容生成。
描述
Conformance Check Failure
Check ID: USE-001
Severity: LOW (5 occurrences in same category)
Category: Usability
Problem Description
scripts/check-safe-outputs-conformance.sh (Error Code Standardization) flags five files that throw errors or call core.setFailed without a standardized error code (E[0-9]{3}, ERROR_, or ERR_ prefix):
[LOW] USE-001: actions/setup/js/check_version_updates.cjs may not use standardized error codes
[LOW] USE-001: actions/setup/js/grader_session.cjs may not use standardized error codes
[LOW] USE-001: actions/setup/js/model_pin_check.cjs may not use standardized error codes
[LOW] USE-001: actions/setup/js/reconcile_work_queue_run.cjs may not use standardized error codes
[LOW] USE-001: actions/setup/js/start_mcp_gateway.cjs may not use standardized error codes
Unlike the core safe-output type handlers (create_issue.cjs, add_comment.cjs, etc.), which already pass the E001-E010 catalog completeness check (SEC-006), these five support/utility scripts throw plain Error objects with free-form messages, e.g. throw new Error(work_queue_worker_job_context_invalid) in reconcile_work_queue_run.cjs, or throw new Error(MCP gateway safeoutputs readiness requires a numeric MCP_GATEWAY_PORT) in start_mcp_gateway.cjs. This makes errors from these scripts harder to triage consistently with the rest of the codebase.
Affected Components
- actions/setup/js/check_version_updates.cjs
- actions/setup/js/grader_session.cjs
- actions/setup/js/model_pin_check.cjs
- actions/setup/js/reconcile_work_queue_run.cjs
- actions/setup/js/start_mcp_gateway.cjs
Current vs Expected Behavior
Current Behavior
These scripts throw errors / call core.setFailed with descriptive but unprefixed messages (no E0xx-style or ERROR_/ERR_ prefix).
Expected Behavior
Per the Safe Outputs specification error-handling conventions (Section 9.5), thrown errors in scripts that interact with octokit or record safe-output operations should use a consistent, greppable error-code convention so failures can be triaged and documented the same way as the core E001-E010 catalog.
Remediation Steps
This task can be assigned to a Copilot coding agent with the following steps:
- Review the Error Code Catalog in docs/src/content/docs/specs/safe-outputs-specification.md (Section 9.5, E001-E010) to see if any existing code semantically matches these errors; reuse it where it fits.
- For errors that do not fit the existing E001-E010 catalog (these are mostly internal CLI/work-queue/gateway-readiness scripts, not GitHub-facing safe-output handlers), introduce a consistent prefixed code convention for this class of script (e.g. a distinct series, or reuse ERROR_/ERR_ prefixing already recognized by the checker) and apply it to each throw new Error(...) / core.setFailed(...) call site in the five files above.
- Keep messages human-readable - the code should prefix or tag the message, not replace it.
- Re-run bash scripts/check-safe-outputs-conformance.sh and confirm USE-001 reports PASS (no remaining LOW findings for these files).
Verification
After remediation, verify the fix by running: bash scripts/check-safe-outputs-conformance.sh
The check USE-001 should pass without errors for these five files.
References
- Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md
- Conformance Checker: scripts/check-safe-outputs-conformance.sh
- Run ID: 39376524099
- Date: 2026-10-20
Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · 98 AIC · ⌖ 0.625 AIC · ⊞ 5.4K · ◷
- expires on Oct 20, 2026, 9:53 PM UTC-08:00
- 主要语言
- Go
- 星标
- 5.4k
- 派生
- 596
- 平均合并
- 3 小时 24 分钟
- 30 天内合并 PR
- 824
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-aw 的其他 Issue
-
automation models
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
agent-research
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
agentic-workflows automation aw-essential cookie
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
automated conformance safe-outputs
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
automated conformance safe-outputs
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
相似的 Issue
-
bug triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
mvanhorn/cli-printing-press#5146 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
AvengeMedia/DankMaterialShell#3853 ·
-
难度 2/5 1-3 小时 新手友好度 60/100
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复