eust-w da1cfcea13 🔥 Remove the cloud IDE
The cluster never ran Theia or the IDE gateway, so every workspace stayed
"未配置" forever. The feature is gone instead of half-present:

- API: workspace, launch and lifecycle endpoints, the gateway identity and
  its internal routes, the dispatcher's workspace provisioning and the
  lifecycle worker. Migration 003 deletes stored workspaces and settles
  their pending outbox items.
- Provisioner: workspace provisioning and lifecycle for both backends.
- Web: the 云 IDE panel, the launch route, the start-branch picker that
  listed IDE branches, and the workspace count on usage.
- apps/ide, infra/oct, dev:ide and the CI job; IDE parts of local k3s,
  network policies, RBAC, docs and the architecture diagram.

A wish can still start from a pushed branch through the API (sourceBranch).
Plan files and stored entitlements may still carry maxWorkspaces; it is
accepted and ignored.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-04 12:43:02 +08:00
..
2026-11-04 12:43:02 +08:00

镜像

runtime.Dockerfile 从仓库根目录构建,目标如下:

目标 内容 额外构建参数
runtime 控制面 API —
worker coordinator、deployer、executor、verifier(含 Git、Python、bubblewrap 与 Docker CLI) DOCKER_CLI_IMAGE
runner 部署 Runner DOCKER_CLI_IMAGE
git-storage 平台 Git 服务 —
web Web 工作台(Next.js 生产构建) 可选 WEB_BUILD=development:本地开发集群用的开发构建,只有它带开发令牌登录
provisioner provisioner(Kubernetes 后端,含 kubectl) KUBECTL_IMAGE,可选 KUBECTL_PATH

所有目标都需要 NODE_IMAGE(Node 22 或以上、基于 Debian)。运维提供经过审阅的不可变镜像引用,仓库中没有可变的默认标签;工具镜像参数默认为 scratch,构建需要它们的目标时没有提供就会失败。

docker build --file infra/images/runtime.Dockerfile --target worker --build-arg NODE_IMAGE="$NODE_IMAGE" --build-arg DOCKER_CLI_IMAGE="$DOCKER_CLI_IMAGE" --tag "$WORKER_IMAGE" .

把镜像推送到私有仓库,并把 worker 镜像的 digest 配置给 provisioner(WF_RUN_WORKER_IMAGE)。根目录的 .dockerignore 排除了 .git、本地环境文件、密钥与证书、依赖与构建目录和本地数据目录。

  • worker 镜像中的 Docker 客户端必须连接单独配置的构建器(本地用 WF_DOCKER_CONTEXT,Kubernetes 中由 provisioner 传入 WF_DOCKER_HOST 与 TLS 证书),不要把宿主机 Docker socket 挂进任何 worker。镜像构建由 verifier 完成,只有它挂载构建器的客户端配置(provisioner 的 WF_VERIFIER_DOCKER_CONFIG_SECRET),executor 拿不到。
  • 受保护验收脚本以 root 所有的镜像内容安装在 /usr/local/lib/wishforge-verification/ 下,并在 API 中登记它们的摘要(见 verification-profiles.md)。不要把 API、Vault 或部署凭据挂进 executor 或 verifier。
  • Runner 的客户环境工具(kubectl、Compose)与 mTLS 证书需要在单独审阅的镜像中补充。
  • 依赖先只按各工作区的 package.json 安装,只改源码时这一层直接复用缓存。新增工作区时要在 runtime.Dockerfile 中补一行 COPY,tests/images.test.ts 会检查。
  • 构建时由 scripts/build-services.mjs 把各服务编译为 dist/<服务>/main.mjs:工作区包编入其中,其他依赖从 node_modules 加载,Temporal 工作流预先打包为 dist/worker/workflow-bundle.js,迁移脚本是 dist/api/migrate.mjs。运行时不再转译 TypeScript(FR-K5)。

这些镜像已在本地 k3s 集群(arm64、node:22-bookworm,见 docs/local-k3s.md)上构建,并完整跑通了愿望的流程。运维选定的基础镜像、x64、嵌套的 bubblewrap、远程 BuildKit 与 Kata/CNI 仍需在目标集群上验收。