Harden /review_prs Stage-2 sketch against `args` arriving as a JSON string
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 92/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- javascript
调研方向
打开 .abca/commands/review_prs.md,阅读第 142–164 行附近的 Stage-2 草案以及 Notes 中的说明文字。更新草案和解释,使 Workflow args 无论以 JSON string 还是数组形式传入,都能在使用 .map 之前完成规范化。完成标准是:两个验收条件都已反映在此文件中,同时不改变草案的可适应行为。
由索引模型根据 Issue 内容生成。
描述
Problem
The /review_prs command (.abca/commands/review_prs.md) documents Stage 2 with an illustrative Workflow sketch (lines ~142–164) that the operator regenerates per invocation. That sketch iterates the PR descriptors with args.map(...) directly.
In practice the Workflow harness may deliver args to the script as a JSON-encoded string rather than a parsed array — even when the caller passes a genuine JSON array in the Workflow tool call. When that happens the script throws immediately:
Error: args.map is not a function ('args.map' is undefined)
before any review agent spawns. Because the skill is (correctly) a sketch that gets regenerated each run, every regeneration risks re-hitting this footgun. Observed live during the carve S1–S8 stacked-PR review train (2026-07-28): the first Workflow launch died in ~7ms with agent_count: 0; a one-line defensive unpack fixed it and the resumed run proceeded normally.
Why not freeze the whole script into the skill
The sketch is intentionally adaptable — N==1 skips the Workflow, arg modes differ (explicit list vs. review-requested:@me vs. NL filter), and diff baselining differs for a stack (each PR vs its parent branch) vs. a flat batch (each vs main). Freezing a full script would bake away that variance and pull orchestration mechanics back into a skill that deliberately stays a thin orchestrator. So the fix is a doc hardening, not a canned script.
Proposed fix (small, docs-only)
In the Stage-2 sketch, unpack defensively before iterating and add a half-sentence caveat:
// Workflow may deliver `args` as a JSON string; tolerate either form.
const prs = typeof args === 'string' ? JSON.parse(args) : args
const results = await parallel(prs.map((pr) => () => agent(...)))
Add one line to the Notes / Stage-2 prose noting that Workflow args can arrive JSON-encoded, so generated scripts should normalize before .map.
Scope
- Docs only:
.abca/commands/review_prs.md. - No code, no CDK, no agent-runtime change.
- Self-sufficiency bar for the skill is preserved: a competent agent regenerating the script from the prose will no longer trip on the string/array ambiguity.
Acceptance criteria
- Stage-2 sketch normalizes
args(string-or-array) before.map. - A one-line caveat in the prose explains why.
- No other behavior change; the sketch remains a sketch (not a frozen script).
- 主要语言
- TypeScript
- 星标
- 170
- 派生
- 52
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws-samples/sample-autonomous-cloud-coding-agents 的其他 Issue
-
cdk: support Docker-compatible engines such as Finch (clean:disk hard-codes docker)可能已有人在做 @alvarohare 于 10 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
aws-samples/sample-autonomous-cloud-coding-agents#969 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
aws-samples/sample-autonomous-cloud-coding-agents#968 ·
维护者通常 1 天内回复
-
documentation P2 security
难度 2/5 1-2 天 新手友好度 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
维护者通常 1 天内回复
-
Docs: How to clear previously set attributes for a blueprint可能重新可做 @rkumarus-aws 于 68 天前认领,目前没有进行中的 PR。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
aws-samples/sample-autonomous-cloud-coding-agents#749 · 1 条评论 ·
维护者通常 1 天内回复
查看 aws-samples/sample-autonomous-cloud-coding-agents 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
readest/readest#7413 · 1 条评论 ·
维护者通常 1 天内回复
-
content triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
eliasstravik/herdr-projects#788 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复