Skip to content

fix(codex): run Windows hooks with the verified Desktop Evolver - #90

Open
imxyanua wants to merge 6 commits into
EvoMap:mainfrom
imxyanua:codex/fix-codex-windows-hooks-and-engine
Open

imxyanua wants to merge 6 commits into
EvoMap:mainfrom
imxyanua:codex/fix-codex-windows-hooks-and-engine

Conversation

@imxyanua

@imxyanua imxyanua commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On Windows, Codex can pass literal %PLUGIN_ROOT% to Node, and a detached helper can retain the hook output pipes under Windows PowerShell 5.1. The plugin also needs to discover the Evolver installation selected by EvoMap Desktop.

Codex Windows hook
  → resolve PLUGIN_ROOT inside Node
  → launch a background worker with isolated Windows handles
  → resolve Desktop's selected Evolver installation
  → verify the native release and matching Proxy lifecycle

The Desktop selection producer is evomap-desktop#105, now based directly on master. Codex installations without that record retain the existing engine discovery.

The change also scopes retry state to the current Desktop selection, rejects a selection changed during setup, reports unconfirmed Windows worker launches, and preserves the selected profile for CLI commands.

Evidence

  • Before the fix, Windows Codex 0.169.0 passed an unexpanded plugin path. Resolving that path exposed a separate PowerShell 5.1 cold-start pipe timeout.
  • Real Windows candidate acceptance with Codex 0.169.0 and Windows PowerShell 5.1 ran without a shim. The Proxy matched the signed Desktop Evolver 2.0.50 by PID, executable path and SHA-256. A new authenticated session injected the expected saved Gene by ID and Stop recorded reuse after the task check passed.
  • CI on eef0785 passed all eight Linux, Windows and macOS test jobs on Node 22 and 26.
  • The remaining Sentinel P3 concerns cleanup of launcher metadata. The launcher explicitly clears that metadata before creating the worker. Source and hosted-test evidence has been submitted for independent recheck, together with a request to reconcile the 58 integrity entries and 50 incomplete-input items reported by Sentinel.
  • A later local test rerun timed out under severe memory pressure and supplies no new passing evidence. Hosted exact-commit CI is the current passing matrix evidence.
  • Official marketplace One-click acceptance remains pending a release that contains this patch. The current official v1.0.11 predates these fixes.

Merge Danger

Door Two-way. Blast radius Codex plugin setup and runtime. Handle isolation applies to Codex on Windows. A Desktop selection causes the plugin to use that installation and report mismatches. Native releases are signature/hash verified. The npm path uses the package selected by Desktop, with post-install dependency integrity remaining a hardening item.

After review and merge, please publish an official plugin release so the Desktop marketplace installation can be tested against the shipped artifact.

@evomap-aiqa-bot

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

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

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

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

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

由 Sentinel 审核 · 目标提交 3b22c05dd84e

@evomap-aiqa-bot

Copy link
Copy Markdown

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

  • [P3] Desktop npm 引擎可执行未经发布完整性验证的 CLI — npm 分支只检查 package.json 的名称、版本、入口路径和文件类型,随后返回没有 verify 方法...(truncated) · lib/runtime/engine/desktop.js · advisory_d917d830a507b49da5f55985
  • [P3] Desktop 引擎校验失败会被 needsSetup 静默吞掉 — needsSetup() 新增的 Desktop 分支调用 desktopEngine?.(),但在 catch 中直接 return due。当已有 e...(truncated) · ``lib/runtime/engine/job.js`` · advisory_7d11178100b37bd5ae521df4`
  • [P3] 锁内未重新比较 Desktop Proof,陈旧 setup 请求会重复执行 — setUpUnderLock 获取锁后只检查“当前是否存在任意 desktopProof”,没有比较它和刚重新读取�...(truncated) · lib/runtime/engine/job.js · advisory_54c827d3cd7f47737ac869ae
  • [P3] 直接设置生命周期环境变量可绕过 Desktop 启动保护 — overridesDesktopLaunch() 仅直接检查 EVOLVER_LIFECYCLE_COMMAND 和 EVOLVER_SELF_UPDATE_TARGET_PATH;EVOLVER_...(truncated) · lib/runtime/engine/install.js·advisory_d19245898b1dd9af33f61e5a`
  • [P3] 隔离式 Windows worker 启动失败后没有回退或重试 — 新路径完全依赖一个限时 2 秒的同步 PowerShell/C# 启动器。PowerShell 被 AppLocker/执行策略限制��...(truncated) · lib/runtime/process/spawn.js · advisory_ce44264e0296ad0e8004f4e5

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

由 Sentinel 审核 · 目标提交 3b22c05dd84e

@evomap-aiqa-bot

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

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

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

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

由 Sentinel 审核 · 目标提交 6f0ea1969e86

@evomap-aiqa-bot

Copy link
Copy Markdown

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

  • [P3] Desktop npm 引擎没有执行完整性校验 — npm 分支只校验 package.json 的名称、版本、入口路径和普通文件属性,然后直接返回该入口�...(truncated) · lib/runtime/engine/desktop.js · advisory_dc8f56499a92a26de325e4f6
  • [P3] Desktop 引擎忽略调用方提供的 HOME — desktopEngine 被定义为 () => desktopEngineOf(),没有把当前运行时的 env.HOME 或 env.USERPROFILE ��...(truncated) · lib/runtime/environment.js · advisory_c584b2dedfcef00d3e29ee5f
  • [P3] Desktop 选择损坏时,已有有效状态会阻止重新校验和报错 — needsSetup 捕获 desktopEngine() 的异常后直接返回 due。当已有状态仍未到期时,due 为 false...(truncated) · ``lib/runtime/engine/job.js`` · advisory_352adf51970a6c4fb6782c8b`
  • [P3] 旧的 setup 状态会阻止 Desktop 引擎首次启动或损坏修复 — needsSetup() 先从旧状态计算 due。当 Desktop selection 有效但 Proxy 尚未运行时直接返回 due;s...(truncated) · lib/runtime/engine/job.js · advisory_aa00a812acb025d83214b7cf
  • [P3] 隔离式 Windows worker 启动失败后静默丢弃调度任务 — 新路径通过同步 PowerShell 启动器创建 detached worker;当 PowerShell 被执行策略/AppLocker 拒绝、Cr...(truncated) · ``lib/runtime/process/spawn.js`` · advisory_a4481ecadbfb4c6aa7d38b35`
  • [P3] 直接设置路径环境变量可让伪造生命周期文件通过 Desktop Proof — overridesDesktopLaunch() 只直接拒绝 EVOLVER_LIFECYCLE_COMMAND 和 EVOLVER_SELF_UPDATE_TARGET_PATH;其他敏...(truncated) · lib/runtime/engine/install.js · advisory_9943196e9860819de935675d

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

由 Sentinel 审核 · 目标提交 6f0ea1969e86

@evomap-aiqa-bot

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

Copy link
Copy Markdown

Sentinel 正在审核此变更,尚未形成最终结论。

大 PR 拆片审核中

  • Sentinel 判断这个 PR 规模较大,已经拆成多个 slice 分别审核,所以会比普通 PR 花更久。
  • 当前 check 会保持进行中;这不是绿色通过,也不是红色阻塞。
  • Sentinel 会继续完成 slice review、Cross-Slice Verifier 和聚合;如果后续发现红区问题,会更新本 head 的审核结论。
  • 规模等级: large
  • Slice 数量: 8

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

由 Sentinel 审核 · 目标提交 1c0a87b5bd55

@evomap-aiqa-bot

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

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

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

审核覆盖提示: 2 个 hunk/条目缺少完整输入;它们不作为 bug 报告。

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

由 Sentinel 审核 · 目标提交 f0a60b83ffbc

@evomap-aiqa-bot

Copy link
Copy Markdown

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

  • [P3] Desktop npm 引擎未执行发布产物完整性验证 — kind === 'npm' 分支只验证 package.json 的名称、版本、入口路径及入口文件属性,然后返回 {...(truncated) · ``lib/runtime/engine/desktop.js`` · advisory_348c6c3a35c32483c335055a`
  • [P3] Desktop 引擎切换后会继续复用旧 Proxy — 当前 Desktop 引擎发生变化时,desktopSelectionOf() 会生成新的 selection,但 ensureProxy() 只判断�...(truncated) · lib/engine/setup.js · advisory_de2ee86dc3ffdb53445297f5
  • [P3] SessionEnd 启动失败会丢失已有诊断信息 — 新增的 workerLaunchFailed && SessionEnd 分支直接调用 finish(1) 返回,绕过了后续 if (diagnostic) �...(truncated) · lib/channels/hook/runner.js · advisory_201af5ecf7597c718d620852
  • [P3] Desktop Proxy 身份可被环境变量重定向的文件伪造 — 代码把可由进程环境控制的 settings 和 lifecycle receipt 当作 Desktop 身份证明来源。desktopProofOf(...(truncated) · ``lib/runtime/proxy.js`` · advisory_29d82defe010df08e35040cb`
  • [P3] Desktop Proxy 身份证明未绑定 PID 的实际可执行文件 — 新增证明信任由 EVOLVER_PROXY_SETTINGS_FILE、EVOLVER_SETTINGS_DIR、EVOLVER_HOME、EVOMAP_HOME、EVOLVER...(truncated) · lib/runtime/proxy.js·advisory_dfb65fba1c0927610cc982bd`
  • [P3] 已记录的 Desktop 状态会阻止停止后的代理重新启动 — needsSetup() 在 Desktop selection 有效、但当前没有 desktopProof 的情况下直接返回 due。当已有�...(truncated) · lib/runtime/engine/job.js · advisory_0828ec6f312441f8b19a5d0a
  • [P3] 测试失败路径可能遗留 detached worker — 清理回调只能在 pid 已赋值时终止 worker,但赋值发生在 await execFile(...) 成功返回之后。��...(truncated) · test/runtime/process.test.js · advisory_07a0b2a553ac8b308c476650
  • [P3] 直接环境变量可绕过 Desktop 启动保护 — overridesDesktopLaunch() 只拦截直接设置的 EVOLVER_LIFECYCLE_COMMAND 和 EVOLVER_SELF_UPDATE_TARGET_PATH。...(truncated) · lib/runtime/engine/install.js · advisory_8567c2951beaeae603543092
  • [P3] Desktop 启动保护与 Proxy 身份校验存在组合绕过路径 — client_orchestration 切片指出直接环境变量可绕过 Desktop 启动保护;release_integrity_02 同时指��...(truncated) · lib/runtime/engine/install.js`、`lib/runtime/engine/desktop.js`、`lib/runtime/proxy.js · advisory_c301cd5df60201d0fc2cd8b6
  • [P3] Desktop 引擎切换与 Proxy 生命周期可能复用失效实例 — 一个切片指出切换到 Desktop 引擎后继续复用旧 Proxy,另一个切片指出已记录的 Desktop 状态会...(truncated) · lib/runtime/engine/desktop.js`、`lib/runtime/proxy.js`、`lib/runtime/store/file-stores.js · advisory_017e1454025115572f02ca22
  • [P3] Hook 产物契约的覆盖声明不完整 — hooks.json 是变更文件但被 size_report.skipped_files 明确跳过;与此同时 Hook runner、Codex hook 测�...(truncated) · ``hosts/codex/dist/hooks/hooks.json、lib/channels/hook/runner.js`、`test/hosts/codex/dist.test.js...(truncated)` · `advisory_353074cb3d2ce30f5f13dff2`
  • [P3] runningProxy 的注入式请求路径绕过 Desktop 身份校验 — runningProxy 在存在 proxyFetch 时直接调用它,只检查返回值中的 ok 和 data.running,没有把�...(truncated) · lib/runtime/proxy.js · advisory_7ec4cd6275d637216921c580
  • [P3] 启动器超时可能把已启动的 worker 判为失败 — PowerShell 脚本先调用 CreateProcess 创建 worker,之后才关闭句柄并向 stdout 输出 PID。若 2 秒超�...(truncated) · lib/runtime/process/windows-worker.js · advisory_420bd8dfdc9da1b6c03471fe

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

由 Sentinel 审核 · 目标提交 f0a60b83ffbc

@evomap-aiqa-bot

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

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

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

审核覆盖提示: 50 个 hunk/条目缺少完整输入;它们不作为 bug 报告。

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

由 Sentinel 审核 · 目标提交 eef07855891d

@evomap-aiqa-bot

Copy link
Copy Markdown

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

  • [P3] Windows 隔离 worker 测试断言了不符合输入环境的值 — 测试为 PowerShell launcher 设置了 EVOLVER_WINDOWS_WORKER: 'fixture',随后 startDetached 未传入新的 en...(truncated) · ``test/runtime/process.test.js`` · advisory_8d578988383f4dc57544945c`

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

由 Sentinel 审核 · 目标提交 eef07855891d

Copy link
Copy Markdown
Contributor Author

Please independently recheck the remaining advisory on HEAD eef07855891dfb3af018193f65a0c3c5c07f6a3f.

{
  "head_sha": "eef07855891dfb3af018193f65a0c3c5c07f6a3f",
  "finding_keys": ["advisory_8d578988383f4dc57544945c"],
  "relationship": "single",
  "resolution": "false_positive",
  "explanation": "startWithoutInheritedHandles replaces the fixture value with its encoded launch specification. The PowerShell launcher then explicitly deletes EVOLVER_WINDOWS_WORKER using NullString before CreateProcessW. The child inherits the cleaned environment. The null assertion intentionally verifies that launch metadata does not reach the worker.",
  "evidence": {
    "files": [
      "lib/runtime/process/windows-worker.js:9",
      "lib/runtime/process/windows-worker.js:10",
      "lib/runtime/process/windows-worker.js:37",
      "lib/runtime/process/windows-worker.js:56",
      "test/runtime/process.test.js:118",
      "test/runtime/process.test.js:141",
      "test/runtime/process.test.js:149"
    ],
    "tests": [
      "Exact-HEAD GitHub Actions passed all eight Node 22/26 Linux, Windows and macOS jobs.",
      "The hosted Windows suites include the actual PowerShell worker test with exact PID, argument and cleared launchSpec assertions."
    ],
    "ci_urls": ["https://github.com/EvoMap/evolver-agent-plugin/actions/runs/44100390993"]
  },
  "followup": {}
}

Please reconcile the review-coverage records on this HEAD. Check 134098746474 reports 58 Review/CI integrity blockers. Feedback comment 6950497797 describes 50 hunks/items with incomplete input. GitHub exposes no annotations or individual integrity identifiers. Please publish the affected paths, missing item identifiers and required evidence, and explain how the two counts relate. Please rerun affected slices with complete inputs where needed.

A fresh local targeted rerun timed out in its outer PowerShell process before reaching the launchSpec assertion. Blank PowerShell startup concurrently took about two seconds with 320 MB of 16 GB RAM available. That run supplies no new passing evidence. The linked exact-HEAD hosted CI supplies the passing execution evidence.

After review and merge, official marketplace acceptance requires a release whose packaged Codex files contain this fix. The current official release remains v1.0.11.

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