Skip to content

fix: keep compound shell exits out of check verdicts - #38

Draft
imxyanua wants to merge 11 commits into
EvoMap:mainfrom
imxyanua:codex/fix-compound-shell-verdict
Draft

imxyanua wants to merge 11 commits into
EvoMap:mainfrom
imxyanua:codex/fix-compound-shell-verdict

Conversation

@imxyanua

@imxyanua imxyanua commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

A compound shell command can return zero even when its verification command never runs or fails. For example, true || npm test skips the test entirely. Leave the check verdict unknown when only the compound exit is available. Supported test summaries still supply a verdict, and standalone checks retain their exit-based verdict.

Evidence

The false-pass regression failed on the previous head. Focused checks pass on Linux (118) and Windows (81), covering hook evidence, WorkBuddy transcripts and MCP reports.

Dependency

Stacked on #20 at ec1270b. The diff against main includes #20 until it lands. The follow-up itself is commit 826f580.

Merge Danger

Two-way door. Affects verification evidence and candidate eligibility for compound shell commands.

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,并发现 1 个已核验问题。

GitHub CI 未通过。 此状态来自当前 CI gate,不是 Sentinel finding;请以最新 CI attempt 的日志为准。

无法定位到 diff 的已核验问题

WorkBuddy 未完成的复合检查被降级为未知结果

🟠 严重程度:中(P2)
未完成调用原本直接序列化为 failed: true。本次改为把合成的 exit: 1 交给 verificationFailureOf;该函数会因命令含 shell 控制符而将退出码清空,最终返回 null。但这里的失败来自工具调用未完成,�...(truncated)

Finding:finding_a487466c94195487f9f11ed8 · 文件:hosts/workbuddy/transcript.js · 详情:/api/v1/aiqa/findings/finding_a487466c94195487f9f11ed8

当前为 advisory 仓库:这些 item 会逐条保留,但不阻塞合并。

另有 4 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=38、head_sha="826f5804c0f0358dfd01968d3a9d53bcd507b6f5",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 826f5804c0f0

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 4 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] 未完成的复合验证命令被降级为未知而非失败 — result.status !== 'completed' 原本直接返回 true;现在构造 exit: 1 后交给命令归因逻辑。只要�...(truncated) · hosts/workbuddy/transcript.js · advisory_8fa0883bd6f6fc4fc06394fe
  • [P3] 通过路径或 -lc 调用 Shell 时,实际执行的检查不会被识别 — 新增的 SHELL_SCRIPT 只识别字面量 bash -c 和 sh -c。/bin/bash -c 'npm test'、bash -lc 'npm test' ��...(truncated) · lib/verification.js · advisory_f07491c4b4cf90ed6e2b737c
  • [P3] 常见 shell 与 Corepack 包装命令不再被识别为构建验证 — 新实现将验证正则锚定到命令开头,但只把精确的 bash|sh -c 和有限的 WRAPPERS 解包;corepa...(truncated) · lib/verification.js·advisory_5181ec10cea7dea6b7042c68`
  • [P3] 常见的 command/npm exec 验证入口不再被识别 — PR 将验证正则从任意词边界匹配改为命令起始匹配,但新增的 WRAPPERS 没有支持 shell 内建 ...(truncated) · lib/verification.js·advisory_22f93923e828851a7c2b12b5`

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 826f5804c0f0

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,并发现 2 个已核验问题。

无法定位到 diff 的已核验问题

其他命令伪造通过摘要时,未执行的发布验证会被判定成功

🟠 严重程度:中(P2)
新增的 checkExitOf 对含 ;、&&、管道等控制符的命令丢弃整体退出码;verificationFailureOf 随后无条件接受整个 stdout 中的 pass > 0 和 fail 0。因此即使真正的测试、构建或发布检查被前置条件跳过�...(truncated)

Finding:finding_2cbd116c22c813aab15a75ac · 文件:lib/verification.js · 详情:/api/v1/aiqa/findings/finding_2cbd116c22c813aab15a75ac

常见包装命令中的验证任务不再被识别

🟠 严重程度:中(P2)
新实现把验证命令匹配锚定到命令起始位置,并只展开有限的 WRAPPERS。npm exec、corepack、command、带路径或带选项的 shell 包装器没有被展开,因此其中实际执行的 vitest、pnpm test 或 npm test 不...(truncated)

Finding:finding_0e32badec84c2232332f96a7 · 文件:lib/verification.js · 详情:/api/v1/aiqa/findings/finding_0e32badec84c2232332f96a7

当前为 advisory 仓库:这些 item 会逐条保留,但不阻塞合并。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=38、head_sha="404833c9a6df9810809565edfac2dda3472151dc",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 404833c9a6df

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,并发现 2 个已核验问题。

无法定位到 diff 的已核验问题

复合 shell 包装命令会被完全漏记为验证检查

🟠 严重程度:中(P2)
shellCommandOf() 只有在整个字符串都匹配 SHELL_SCRIPT 时才会展开 bash/sh -c。一旦 shell 包装命令后还有 &&、管道或其他控制流,整个命令不会被展开;随后 withoutShellData() 会屏蔽引号中的 npm test��...(truncated)

Finding:finding_f1148fb249156624afb8b74f · 文件:lib/verification.js · 详情:/api/v1/aiqa/findings/finding_f1148fb249156624afb8b74f

当前为 advisory 仓库:这些 item 会逐条保留,但不阻塞合并。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=38、head_sha="5714bda7ad09588bd4da3fa4d7507a07ebcdae0e",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 5714bda7ad09

Comment thread lib/verification.js
/^env\s+(?:(?:-i|--ignore-environment)\s+|(?:-u|--unset|-C|--chdir)(?:=\S+|\s+\S+)\s+|[A-Za-z_]\w*=\S*\s+)*(?:--\s+)?/,
/^npx\s+(?:(?:-y|--yes|--no-install)\s+|(?:-p|--package)(?:=\S+|\s+\S+)\s+)*(?:--\s+)?/,
/^npm\s+exec\s+(?:(?:-y|--yes|--no)\s+|--package(?:=\S+|\s+\S+)\s+)*(?:--\s+)?/,
/^corepack\s+(?=(?:npm|pnpm|yarn)\s)/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm exec 执行的验证命令不再被识别

🟠 严重程度:低(P3)
本 PR 将验证命令匹配改为命令起始位置匹配,并通过 WRAPPERS 展开包装器;列表只包含 npm exec,未包含语义等价的 pnpm exec。因此 pnpm exec vitest run 不匹配 pnpm test/build/lint/... 正则,也不会继续解析到 vitest,被错误判为非验证命令。

Finding:finding_5d50dae441e6bf74fcad15c0

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,并发现 1 个已核验问题。

无法定位到 diff 的已核验问题

带前置包装器的 Shell 检查会被漏识别

🟠 严重程度:低(P3)
shellCommandOf() 只在整条命令严格匹配 bash/sh -c 时展开脚本;isVerificationCommand() 又只在分割 shell 链之前调用一次。带环境变量、sudo 或前置命令的常见形式不会展开内部测试命令。

Finding:finding_6fcd2a2b9a70271238d7196a · 文件:lib/verification.js · 详情:/api/v1/aiqa/findings/finding_6fcd2a2b9a70271238d7196a

当前为 advisory 仓库:这些 item 会逐条保留,但不阻塞合并。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=38、head_sha="10a46ceafa9c28b92c43078495777b7f644b6040",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 10a46ceafa9c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant