[deep-report] Introduce GuardPolicyMap / RawActionSteps named type aliases for repeated map[string]any / []any shapes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 pkg/workflow/mcp_renderer_types.go、pkg/workflow/mcp_config_types.go 和 pkg/workflow/tools_types.go 中的五个 guard policy 字段声明,以及 pkg/workflow/frontmatter_types.go 中的 steps 切片字段开始。在 compiler_main_job_helpers.go 中确认 steps 仍会被重新序列化为 YAML。当新的别名 GuardPolicyMap 和 RawActionSteps 在所有位置替换原始字面量,并且 go build ./... 和 go test ./pkg/workflow/... 仍然通过时,即为完成。
由索引模型根据 Issue 内容生成。
描述
Description
The same map[string]any shape for guard-policy config is independently re-declared as a field type in 5 locations: pkg/workflow/mcp_renderer_types.go:21,94,131, pkg/workflow/mcp_config_types.go:54, and pkg/workflow/tools_types.go:530 — confirmed via direct grep of all 5 sites. Separately, raw GitHub Actions step passthrough (PreSteps/Steps/PreAgentSteps/PostSteps in frontmatter_types.go:413-416, plus 3 more sites) is independently typed as []any in 8 places; this one is correctly dynamic (confirmed via compiler_main_job_helpers.go's re-serialization to YAML) but the "this is intentional passthrough" intent isn't visible at the type level.
Expected Impact
A single named type documents each concept once; if guard-policy config ever grows real structure there's one declaration to change instead of five, and the step-passthrough alias makes the "intentionally untyped YAML" decision visible without relying solely on a comment on one of the eight fields.
Suggested Fix
Introduce type GuardPolicyMap map[string]any and type RawActionSteps []any type aliases and use them consistently in place of the repeated raw map/slice literals.
Suggested Agent
General Go-focused coding agent (mechanical, low-risk retype).
Estimated Effort
Quick (< 1 hour)
Data Source
Typist — Go Type Consistency Analysis, discussion #67180 (2026-10-09), Category 2 / Priority 3 item #7. Live-verified via direct grep of all declaration sites before filing.
Generated by 🔬 Deep Report · claude · agent · 270.5 AIC · ⌖ 8.95 AIC · ⊞ 7.1K · ◷
- expires on Oct 11, 2026, 4:47 AM UTC-08:00
- 主要语言
- Go
- 星标
- 5.4k
- 派生
- 596
- 平均合并
- 3 小时 37 分钟
- 30 天内合并 PR
- 833
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-aw 的其他 Issue
-
automated-analysis code-quality cookie testing
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
wgdonenotdeferred: parenthesized Done() statement escapes non-deferred detection (paren_unwrap_gap)未关闭cookie sergo
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
cookie eslint
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
agentic-workflows
维护者通常 1 天内回复
-
agentic-workflows
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 74/100
JakeChampion/lang#13132 ·
维护者通常 1 天内回复
-
[BUG] deploy.restart_policy without condition drops the restart policy可能已有人在做 @akshat-lakhera 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
docker/compose#14383 · 1 条评论 ·
维护者通常 1 天内回复