Skip to content

fix(dashboard): reuse control-plane Node runtime admission - #7794

Merged
loopx-agent merged 1 commit into
mainfrom
codex/dashboard-node-contract-20261101
Nov 1, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/dashboard-node-contract-20261101

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

The source dashboard launcher accepts Node 20.19 and old Node 22 using Vite's prerequisites, although its control plane requires Node 22.22.3+. It can select an incompatible PATH runtime instead of trying an already installed compatible NVM runtime, then proceed to dependency installation and backend startup.

Reuse the existing TypeScript isSupportedNodeVersion owner for both PATH and NVM admission. Reject unsupported runtimes before npm, retain the owner's prerelease/build precedence, and document the separate npm run dev:web UI-only route. The copied launcher fixture now includes the real version owner.

Author Declaration

  • Written by: model_agent (OpenAI Codex), under contributor direction.
  • Implemented against: the shipped package.json#engines, loopx/control_plane/runtime/node_version.ts, and its existing prerelease test at da4510af61277c0d0786fa5aa040ccb01538b1cb. This self-contained reproduction is the contribution basis; no new roadmap identifier or issue is required.
Existing contract Disposition Evidence
Control-plane Node floor, including minimum prerelease refusal implemented source launcher imports the existing typed owner; explicit version matrix
Try installed compatible NVM candidates implemented two actual Bash fallback cases select the supplied NVM runtime
Refuse unsupported runtimes before frontend dependency installation implemented rejected cases leave the synthetic npm log absent

Scope And Continuation

Complete bounded source-bootstrap repair. No version rule, capability, provider, setting, persisted schema or authority boundary was added. The related refactor removes the duplicate Vite-only admission rule. Source-mode loopx dashboard/dashboard-dev.sh changes; installed packaged Chat, frontend rendering and Lark are unchanged. This does not qualify a full installed-App journey or repair the independent main CI failures.

Validation

Tested signed head 9c016b90752e7cddbf9260320aa6a61dca23f39d, based on main da4510af6. Main advanced two commits to 682080047; GitHub comparison shows no changes in this PR's owning paths or the Node-version owner.

Check Result Evidence / limit
Source entrypoint regression passed New dashboard_node_runtime.test.ts: immutable old launcher 6 failed / 4 passed; repaired launcher 10 passed, rerun after baseline restoration. Actual Git Bash and Node execute the launcher and typed owner; candidate-reported versions are controlled with a preload. npm is synthetic and invalid explicit Python forces the existing UI-only route. No backend or model starts.
Existing typed owner passed Existing minimum/prerelease test 1 passed. Minimum prerelease refusal, build metadata and later prerelease precedence remain unchanged.
Static passed Strict targeted TypeScript compile, changed Python-file Ruff, bash -n, whitespace and staged RFC bilingual checks. Advisory has no supported product vocabulary carriers; test inputs are local and reviewed manually.
Broader Python module failed Base and head both 32 passed / 11 failed, with the same failing test IDs in the same Bash/Python environment. These failures include missing packaged frontend artifacts and native Windows shell/PID behavior. No full module or repository pass is claimed. An initial baseline without the same Bash PATH is kept separately and excluded from this comparison.

Environment: native Windows, CPython 3.12.10, installed Node and Git Bash. The Node test changes reported version data; it does not install or qualify actual Node 20/older22 executables. Linux/macOS and current-head CI remain unqualified pending independent review. Full test-extra synchronization failed on registry connectivity; focused declared-compatible dependencies and this checkout were installed in a disposable project environment. No dependency manifests or lockfiles were changed.

Frontend / Visual Evidence

UI impact: none. This changes the source launcher prerequisite and diagnostic, not a rendered viewport; screenshots are not applicable. Developer documentation discloses rejection of runtimes that can run Vite but cannot run the control plane. UI-only preview remains available through its existing command.

No paid model/benchmark run, active Goal mutation, system upgrade or self-merge. Private logs, local paths, generated package state and source-recovery artifacts are excluded. Current-head CI and independent review remain pending; maintainer merge required.

Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

动机 / Motivation

使用源码模式 Dashboard 的开发者。此前使用 Node 22.12 的开发者启动 Dashboard 时会通过前端检查,随后才遇到控制平面不支持该运行时的问题;现在会在安装依赖前拒绝,或选用已有的兼容 NVM 运行时。已验证不支持的 Node 不执行 npm 安装或启动,兼容运行时及修正后的重试能够继续现有启动流程。范围是源码启动器的 Node 准入及其回归测试;未新增界面、模型执行、安装发布或权限能力。

改动思路 / Approach

版本要求已由现有 TypeScript 函数定义,源码启动器直接复用它即可消除重复规则。本 PR 保留 Bash 的 PATH/NVM 选择与失败监督,只统一 Node 版本判定,不新增配置或状态。反对提交的最强理由是纯前端开发可能仍能使用较旧 Node;但这个入口还承接控制平面启动,单独的 UI-only npm 入口仍可独立使用。不修改时可以稳定复现旧缺陷;另建解析器或配置开关只会增加需要同步的规则。

正向路径是不兼容 PATH → 已有兼容 NVM → 原有 npm 启动流程。失败路径仍由已有启动器负责,无兼容运行时则在 npm 之前退出,npm 安装失败也不会继续运行 UI。本次没有增加人工确认轮次、手动复制已知配置或后台同步状态。

具体改动 / Changes

评审基于完整 base-to-head 差异,head 为 9c016b90752e7cddbf9260320aa6a61dca23f39d,基线为 da4510af61277c0d0786fa5aa040ccb01538b1cb。共 4 个文件,+96/-7:生产脚本 +7/-7,文档 +8,测试及 fixture +81。

已接受规格:CONTRIBUTING.md,固定 revision da4510af61277c0d0786fa5aa040ccb01538b1cb(原文)。验收映射:node-runtime-floor:implemented,Node.js 22.22.3 or newer。首轮裸 tsc 和未显式带 Node types 的单文件调用报了命令配置错误;改用仓库项目和明确 --types node 后都通过,未改代码或放宽断言。

关键代码讲解

  1. node_is_supported 在候选 Node 进程内导入已有 TypeScript 判定函数,并把布尔结果变成退出状态。版本来自实际进程,路径通过 pathToFileURL 传递,避免带空格的检出路径影响导入。它不再维护一份 Vite 版本比较规则。

  2. select_node_runtime 保留 PATH 优先、NVM 后备的顺序;每个候选都使用同一准入判断。已支持的 PATH 不会被损坏的 NVM 候选影响,新出现的兼容 NVM 可以恢复启动;全部不合格时在 npm ci 前停止。

  3. isSupportedNodeVersion 是未改动的规则归属:22.22.3 的预发布版本不合格,构建元数据可接受,而更高补丁版本的预发布值沿用原规则。通过后才进入既有依赖安装、Python 准备和 UI 启动。

检查 基线 / 当前提交
Node 专项,同一矩阵 4 PASS、6 FAIL → 10 PASS
独立入口、候选范围与恢复 3/6 → 6/6 PASS
Dashboard 完整模块 初始均 38 PASS、同名 5 FAIL;当前提交重建资源后 43 PASS
类型、语法、差异及双语 RFC PASS
标准 premerge 5 项直接检查 PASS;目录检查 3 PASS、1 既有结构债务保留为红色

对主干的风险 / Risks

未发现阻塞问题。

独立入口验证实际执行 Bash 与 TypeScript 导入,但旧版本号通过当前 Node 24.21 的 preload 控制;没有把它表述为运行了真实 Node 20/22 二进制。该探针的 npm 是记录调用的桩,Python 故意不可用以走既有 UI-only 分支。另行使用真实 Vite 构建本检出资源,并运行完整 Dashboard 模块,43 项通过;这仍不等于安装后的 App 验收。

最初 5 项失败的完整身份分别是 test_launch_dashboard_in_installed_mode_serves_packaged_chat、test_launch_dashboard_reuses_existing_matching_chat_service、test_launch_dashboard_rejects_foreign_chat_service、test_launch_dashboard_rejects_stale_chat_service、test_dashboard_command_in_installed_mode_resolves_packaged_web_bundle。基线与当前提交都在未改动的资源校验路径报 frontend source changed since the last build;当前提交只重建忽略的资源、未改源码,原命令全过。此前失败保留,不冒充初次全绿。

run_host_process 的结构检查仍失败;独立同命令基线/当前提交的完整失败文本、扫描输入及环境摘要一致,属于未变债务。作者已提供的浏览器失败说明仍是原因未明的诊断,不能称为已修复或已证明与主干相同;本轮没有抓取、轮询或等待 CI。

语义与 CI 对齐

这里有明确的默认行为变化:源码启动器不再接受仅满足 Vite 的旧 Node。它复用既有运行时最低要求,不增加状态、权限或工作义务,也没有声称 default-off 隔离。差异级词汇检查没有发现支持范围内的新产品枚举,完整语义检查通过;这不代表覆盖了所有动态语义。

我的整体评价 / Verdict

goal_achieved 只指本 PR 的启动缺陷修复。长程工作连续性判断为 preserved:既有启动、失败停止与修正后重试路径保留,没有引入调度饥饿、重复工作或新的状态维护成本;未声称测得长程收益。用户体验判断为 improved:同一启动意图沿用已有运行时配置,减少迟发错误或静默换环境,普通路径不增加确认轮次。

已检查 scripts/dashboard-dev.sh 及现有调用者;没有渲染页面或布局改动,因此视觉评审不适用。未运行安装后的 App 视觉验收;本次没有渲染改动。版本要求已由现有 TypeScript 函数定义,源码启动器直接复用它即可消除重复规则。本 PR 保留 Bash 的 PATH/NVM 选择与失败监督,只统一 Node 版本判定,不新增配置或状态。范围和成本相称,合并重复版本规则是已完成的简化;无证据要求在本 PR 再引入抽象或扩大迁移。已有红色诊断和跨平台/安装后的未测范围继续保留,评审通过不代表合并、安装或发布授权。

English verdict: APPROVE at 9c016b90752e7cddbf9260320aa6a61dca23f39d. The bounded startup repair is independently validated; residual platform/build diagnostics remain disclosed.

@BigDataDZ

Copy link
Copy Markdown
Contributor Author

CI follow-through for head 9c016b90752e7cddbf9260320aa6a61dca23f39d:

  • chat-bundle-browser (3) fails in research-display-language.mjs:146, waiting for the first assessment disclosure to open after keyboard activation. Earlier scenarios in that job completed.
  • The same shard passed on main at 682080047. This comparison does not establish the cause of the failure or waive it.
  • The workflow invokes the packaged browser catalog directly. This PR does not change the research scenario, its assessment component, or the packaged browser entrypoint; no speculative UI patch or timeout increase has been added.
  • I downloaded this run's compiled artifact and checked out its exact tested merge snapshot (9ece8836cfba9cbedc9f9e044d152141ecc8fa96) for a focused native Windows rerun. The local packaged server did not reach readiness within the existing 20-second startup limit, so that attempt did not exercise or reproduce the failing disclosure interaction.

The browser failure remains unresolved validation evidence; this is not a green-CI or merge-readiness claim. Next evidence needed is a completed focused run of this scenario on the tested packaged artifact or a matching hosted rerun.

@loopx-agent
loopx-agent merged commit 003508e into main Nov 1, 2026
28 of 37 checks passed
@loopx-agent
loopx-agent deleted the codex/dashboard-node-contract-20261101 branch November 1, 2026 10:17
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.

2 participants