Skip to content

map: 删除全部 PowerShell(DR-0018,两阶段) #450

Closed

Description

@2233admin

主人 2026-10-18 决定:删除全部 PowerShell,分两步(DR-0018)。不再走退役观察窗、回滚演练和审批证据。

现状

  • 106 个 .ps1 / .psm1:legacy/scripts 36、legacy/tools 31、orchestration/retirements 5、legacy/tests 5,其余是入口脚本。
  • CI 中约 112 处引用;Rust 生产代码里还有 pwsh 调用和 .ps1 锚点,integrations.json 的 productionRegistry 有 callSite 指向 .ps1。

Phase 1:删除不在安装/发布路径上的 PowerShell

  • 依赖图:安装/发布闭包,加上每个候选文件的全部引用(CI、Rust src、Rust tests、orchestration pins、Python tests)。正在梳理。
  • 拆成 3–6 个 PR,每个 PR 保持 CI 全绿。仍在测真实行为的 PS 测试先补 Rust 测试再删。
  • productionRegistry 中 callSite 指向 .ps1 的能力,改锚到 Rust 或删除。

Phase 2:Rust 安装器和打包,然后删除剩余部分

被本计划取代、完成后关闭

#323、#78、#341、#400、#335、#336(PS 侧部分),以及 E02/E03/E04/E07/E08 退役包。

关联:#443(恢复计划第 5 段)、#439(ADR-0015 中 CodeNexusLite 的处理随本计划在 Phase 1 删除)。


Generated by Claude Code

Activity

  1. added
    enhancementNew capability or improvement · 新能力或改进
    wayfinder:mapCanonical Wayfinder decision map
    on Oct 18, 2026
  2. 2233admin commented on Oct 18, 2026

    @2233admin
    OwnerAuthor

    范围补充(DR-0018 更新):同时迁移 CI 内联 PowerShell。.github/ 下有 102 处 shell: pwsh,逐个 workflow 迁到 bash 或 code-intel 子命令;最终门禁会断言 .github/ 中不再出现 pwsh 或 powershell。


    Generated by Claude Code

  3. 2233admin commented on Oct 18, 2026

    @2233admin
    OwnerAuthor

    依赖图结论(main @ 6d8e5a7,只读分析)

    106 个 PS 文件: 23 个属于安装/发布闭包,阶段 1 保留;78 个是阶段 1 的删除候选;另有 5 个 rollback-rehearsal 副本。

    安装/发布闭包(阶段 1 保留)

    • 安装器 $requiredFiles:check-code-intel-tools、code-intel、invoke-code-intel、Install-SentruxVlangOverlay(及其测试)、run-code-intel、Invoke-SentruxAgentTool、Invoke-ScopedRepowise、Invoke-CodeNexusLite、bootstrap-new-machine、test-code-intel-pipeline、test-code-intel-provider、update-code-intel-index、tools/code-intel-platform.psm1。
    • sentrux shim 四件套。
    • 打包:New-BetaPackage / Test-BetaPackage。
    • run-code-intel 运行时还会调用:follow-up psm1、New-ModelAdapterRequest、Invoke-ModelChannelDelegate、Invoke-RepowiseProviderProbe。

    关键发现

    • Rust 生产代码不会执行任何 PS。src 里所有 Command::new("pwsh") 都是测试代码。
    • providers.rs 要求 Invoke-CodeNexusLite.ps1 存在;orchestration.rs 的 PRODUCTION_PARTICIPANTS 有 10 条锚点指向 run-code-intel.ps1。这两处属于阶段 2 的耦合。
    • retirement guard 在删 run-code-intel.ps1 时会报错,阶段 2 需要处理。
    • 覆盖面:test-regression-fixes、test-primary-launchers、legacy/tests 里 model-channel 和 follow-up 的测试,覆盖的是阶段 1 保留、阶段 2 才删的 PS。这些测试推迟到阶段 2 随被测代码一起删,避免中间出现覆盖空窗。

    阶段 1 拆分(每个 PR 结束都跑 code-intel repin --repo . --write,CI 必须全绿)

    1. PR1 退役工具链:22 个 legacy/tools/compatibility/*.ps1、test-retirement-packets、5 个 rollback-rehearsal、test-workflow-recommendation-brief、test-repowise-adapter-contract;改 ci.yml(删步骤和 parser 列表);处理 recommender_retirement_packet.rs 里的 pwsh 调用。保留 status.json、deletion-diff.json 和 guard 步骤。
    2. PR2 只在 CI 里跑的 PS 测试套件和 workflow:删除不测保留代码的那部分 PS 测试、4 个 AutoPR 脚本、conformance policy、parity-observe.yml;改 ci.yml、release.yml、test_repository_layout.py、schema-lifecycle。
    3. PR3 孤立的 facade 脚本和 manifest 条目:9 个 facade、facade-finalize 的 policy/fixtures/evidence;删 integrations.json 中 4 个条目。
    4. PR4 带 pin 的一组:merge-queue、codenexus/sentrux 的 PS 测试、project-management 测试;改写 3 个 internalization 记录、internalization_record.rs,以及 pre-push 提示。
    5. PR5 验收门:删 Invoke-CodeIntelAcceptance,claude-code-merge-queue.config.mjs 的 checkCommand 改为 Rust 命令。
    6. advisory 两件(OpenSpec-Detector、Invoke-WorkflowRecommendation)推迟到阶段 2,因为要动 run-code-intel.ps1 的摘要锁。

    CI 内联 pwsh 迁移按 DR-0018 第 3 步,随各 PR 逐个 workflow 推进。


    Generated by Claude Code

  4. 2233admin commented on Oct 18, 2026

    @2233admin
    OwnerAuthor

    进度:PR1 #452、PR2 #453 已开。

    PR2 逐个核对了 38 个 legacy 测试套件,只有 2 个能现在删。计划随之调整:

    • PR3(facade 集群)扩大,纳入 conformance policy 及 Test-CodeIntelProjectConformance / Python314 / parity-floor / parity-baseline、merge-queue、acceptance、compete-score、workspace-preflight、provider-runtime-inventory、facade-finalize 和 Test-FinalCommitmentReconciliation,以及对应的 integrations.json 条目。
    • 阶段 2 才处理:release.yml 159–168、parity-observe.yml、schema-lifecycle.v1.json:172,以及测试安装器、run-code-intel.ps1、启动器的 20 个套件。

    Generated by Claude Code

  5. 2233admin commented on Oct 18, 2026

    @2233admin
    OwnerAuthor

    主人决定(2026-10-18):安装改走 Skill,删掉 PowerShell 安装链路

    阶段 2 不再单独写完整的 Rust 安装器,改为:

    1. skills/code-intel-pipeline/scripts/bootstrap.py(Python,已在 CI 中运行):负责从 Release 下载、校验 SHA-256 和构建来源、解压。这部分现在已经完成。
    2. 解压后调用二进制自带的新子命令 code-intel setup(Rust):
      • 把二进制放到 bin 目录,并持久化 PATH 和 CODE_INTEL_HOME(Windows 写注册表,Unix 写 shell profile,参照 rustup 的做法)。
      • 把 Skill 链接到各 agent 的 skills 目录。
      • 最后运行 code-intel doctor bootstrap。
    3. 缺失的外部工具(rg、repowise、sentrux)不再自动安装,由 doctor 报出缺什么并给出安装命令。
    4. 删除:
      • install-code-intel-pipeline.ps1(1559 行)、bootstrap-new-machine.ps1、check-code-intel-tools.ps1、code-intel.ps1、invoke-code-intel.ps1;
      • 只为 PS 服务的 sentrux shim、thin forwarder、repowise 补丁、vlang overlay。

    这样阶段 2 的安装/发布链路 PS 可以直接删,不需要等完整的 #401。


    Generated by Claude Code

  6. 2233admin commented on Oct 19, 2026

    @2233admin
    OwnerAuthor

    Done. PowerShell is fully removed from the product (DR-0018):

    Guards that keep it out stay in place (no tracked .ps1, manifest names no PowerShell, install smoke without pwsh). Open owner item: .sentrux/baseline.json still lists four deleted legacy/*.ps1 god files until the next intentional save_baseline.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement · 新能力或改进wayfinder:mapCanonical Wayfinder decision map

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions