fix: make setup-hooks targeting and verification explicit - #618
fix: make setup-hooks targeting and verification explicit#618autogame-17 wants to merge 2 commits into
Conversation
Honor desktop-provided runtime and root selections, and expose read-only machine health reports without executing installed workspace code.
|
Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。 GitHub CI 未通过。 此状态来自当前 CI gate,不是 Sentinel finding;请以最新 CI attempt 的日志为准。 另有 7 个需要人工确认的风险;它们不阻塞合并,但开发 agent 必须 review advisory 评论并逐条确认。 审核覆盖提示: 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 a252a4092f2b |
|
Sentinel 保留了 7 个尚未确认的审核候选。它们不阻塞合并;单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 a252a4092f2b |
pull_request_target does not rerun on body edits, so the harness packet needs a new synchronize event.
|
Sentinel 已审核此变更,并发现 4 个已核验问题。 无法定位到 diff 的已核验问题Claude/Codex verify 使用空路径比较 hook 命令,正常安装结果可能始终校验失败🟠 严重程度:中(P2) Finding: 卸载会删除用户原有的
|
|
Sentinel 保留了 7 个尚未确认的审核候选。它们不阻塞合并;单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 d6f9e33bd0de |
| } | ||
|
|
||
| function tomlSectionName(line) { | ||
| const header = line.match(/^\[([^\]]+)\]$/); |
There was a problem hiding this comment.
数组表未结束 [features] 范围,安装与校验操作了错误状态
🟠 严重程度:中(P2)
tomlSectionName() 只匹配单层表头,不识别 [[providers]] 等数组表边界。featuresSection() 因此把数组元素继续视为 [features] 内容,继而把其中的 codex_hooks 当成功能开关。
Finding:finding_b0773b7225dbaa27f9883653
Summary
--runtimeas a checked compatibility alias for--platformWhat changed
--platform,--runtime,--root, and the verify/json flags in one CLI owner--platformand--runtimevaluesconfig.tomledits inside the[features]table and preserve comments or multiline stringsHow to test
node --test test/adapters.test.js test/adapters.opencode.test.js test/proxyCliOptions.test.jsnpm testRisk
Medium -- this changes the adapter execution bridge used by Claude Code, Codex, and OpenCode setup-hooks, including how config files are rewritten and how verify reports health.
Harness/evaluator governance
Upstream governance surface: adapter execution bridge (
src/adapters/*setup-hooks install/verify for Claude Code, Codex, and OpenCode)Downstream EvoX impact: desktop/CLI
evolver setup-hookscallers can now pass--rootand--runtime, andverify --jsonbecomes a read-only health contract they can consume; no EvoX runtime tool surface is opened in this PRRollout-local scope: opt-in operator command only; existing installs stay unchanged until the operator reruns setup-hooks or verify
Promotion boundary: lands as default CLI behavior on merge; no shadow cohort and no automatic rewrite of existing user configs
Evaluator mismatch sets: verification now distinguishes missing, altered, disabled, and merely similarly named hooks; observation/action/repair/evidence/belief evaluator sets are unchanged
Non-regression evidence:
test/adapters.test.jsandtest/adapters.opencode.test.jscover CLI targeting, exact hook matching, TOML comment/multiline preservation, and read-only OpenCode verifyFix-severity review: medium
Owner approval: adapter/setup-hooks owner review required before merge
Security boundary: reads and rewrites user runtime config under an explicit
--rootor detected config root; verify never executes workspace plugin code; no secrets or network egress addedRollback: revert this PR; operators can rerun
setup-hooks --uninstallto remove managed hooksLive promotion: no
Autonomous evaluator self-editing: no
Test plan
node --test test/adapters.test.js test/adapters.opencode.test.js test/proxyCliOptions.test.js(121 passed)npm test(3314 passed)Notes
The first full-suite run hit one unrelated
proxyStreamingECONNRESET flake; its isolated rerun passed, and the final full-suite run completed with zero failures.Self-check
node --test test/*.test.js/npm test).Related
None