Skip to content

feat(architecture): 新增宿主语言特定内容闸门并固定 Java 拆分计划(Refs #1495) - #1727

Merged
xiaoyumuxi merged 7 commits into
previewfrom
feat/1495-java-extraction-gate
Nov 5, 2026
Merged

xiaoyumuxi merged 7 commits into
previewfrom
feat/1495-java-extraction-gate

Conversation

@xiaoyumuxi

@xiaoyumuxi xiaoyumuxi commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

概述

Refs #1495(Java/Maven/Gradle 等语言和构建工具的专属逻辑从 Core 与 macOS 宿主迁出到插件)。

这是拆分的第一个 PR(A0):只新增检查脚本、CI 接线和文档,不改 Core、Swift、前端的业务代码。它做两件事:

  1. 把后续所有 PR 共用的设计固定成 Agent 笔记,并把计划里对应的 API 条目补上说明。
  2. 加一个“棘轮”闸门:现有的 Java 等专属内容允许暂时存在,但不允许再增加,后续每个纵向 PR 删多少,基线就同项收紧多少。

功能点

闸门脚本 scripts/architecture/verify-no-host-language-specifics.mjs

  • 扫描六个目录:rust/lithe-core/src、macos/Sources、frontend/editor/src、shared/contracts/plugins/v1、windows/tauri/src、windows/tauri/src-tauri/src;跳过 vendor、node_modules 和以点开头的目录。
  • 四类统计:
    • 词表命中:java、jdt、jdtls、jvm、maven、mvn、gradle、spring、mybatis、lombok、junit、testng、m2e、surefire;按 camelCase、snake_case、.、/、- 切词后整词匹配,JavaScript 不算。
    • 名字比较:把值与带词表词的字符串字面量做相等比较,或写成 match、switch 分支。
    • 工具名常量表:Rust 里列出词表词或 node、go、python 的 const、static 字符串数组;按条目计数,已有表再加一个工具也会让计数上升。
    • schema 封闭枚举:契约 schema 里写死取值的 tool、runtime、languageImport.kind,以及每个 hostIntegration 属性;按取值个数计数(hostIntegration 数集成名,至少 1),已有枚举加成员也会让计数上升。
  • 三种模式:
    • 默认(棘轮):任何文件计数上升、出现新文件(改名也算新文件)都失败;计数下降但没有更新基线也失败,逼着每个 PR 同步收紧。
    • --update-baseline:只允许调低;基线不存在时才可创建。
    • --strict:不看基线,任何命中都失败,只有白名单文件豁免;留给最终清理 PR,不能和 --update-baseline 同用。
  • --base <ref>:与该提交里的基线和白名单对比,基线增长或白名单新增条目都失败,防止靠改基线放行。
  • 六个旧 token(is_main_method、main_declaration_index、main_class_exists、containsJavaMainMethod、java.runConfigurations、java.testMethods)沿用旧脚本的规则,任何模式下都失败,白名单文件里也一样。
  • 退出码:0 通过,1 有违规,2 参数错误;--root <repository> 可指定仓库根(测试用)。

基线与白名单

  • language-specifics-baseline.json:每个文件一行,减少并行 PR 的合并冲突。
  • language-specifics-allowlist.json:13 项,每项必须有 glob、reason、issue(#\d+)、removeWhen;没有被任何文件用到的条目算错误。3 项是共享前端的 TextMate 语法、主题、语言目录(决定保留),10 项是 Windows 的 Maven/Java/Spring/MyBatis TypeScript 文件(Windows 迁移前的过渡)。
  • 基线统计(基于 preview c63bcd243):
目录 词表命中 文件数
rust/lithe-core/src 8755 114
macos/Sources 4972 185
frontend/editor/src 99 2
shared/contracts/plugins/v1 1045 44
windows/tauri/src 7787 335
windows/tauri/src-tauri/src 1179 14
合计 23837 694

另有名字比较 458、工具名常量表条目 163(18 张表)、schema 封闭取值 13;30 个白名单文件不计数。

变更历史:初版基线是 23781 处,rebase 到 preview 后(#1724 在 Core 里新增了 29 处)重建为 23810 处;处理评审意见时合入 preview c63bcd243(新增 27 处词表命中),并把常量表和 schema 枚举改为按成员计数后再次重建,得到 23837 处。

测试

  • verify-no-host-language-specifics.test.mjs:17 个用例,覆盖切词(含 JavaScript 中性词)、注释与字符串处理(含 return、typeof 后带 /* 字符类的正则)、名字比较、大文件线性扫描、Rust 工具名常量表和 schema 封闭枚举的成员计数(已有列表加 python 时棘轮失败)、跳过目录、白名单(缺字段和未使用条目)、旧 token、棘轮、--strict、--base、参数错误和 glob 匹配;每个用例都带显式超时。

CI 接线

  • scripts/architecture/verify-core.sh:在旧的 verify-java-semantic-ownership.mjs 之后运行新闸门;旧脚本只扫三个目录,是新脚本的子集,由最终清理 PR 删除。
  • 新增 .github/workflows/verify-host-language-specifics.yml:只在 ubuntu 运行,不占用 macOS、Windows runner;pull_request 和 push 到 preview 按 paths 触发,也支持手动运行;步骤是脚本测试(输出 JUnit)、闸门(PR 上带 --base HEAD^1)、耗时报告和产物上传。
  • scripts/ci/common/classify-ci-changes.sh 与其测试:四个闸门文件被当作独立工作流,不触发产品 lane。
  • scripts/ci/common/plan-ci-lane-reuse.mjs 与其测试:新增同样的规则,并断言 verify-java-semantic-ownership.mjs 不属于基础设施。

文档

  • 新增 Agent 笔记 .agents/notes/proposed/architecture/2026-11-04-java-extraction-generic-apis-and-gate.md(状态:提议中):通用 API 映射、API-35 第一阶段规则、导入配置怎样使用中转、版本与权限、PR 拆分与依赖、Windows legacy crate、闸门规则与基线变化预期、Q1-Q8 决定、备选方案、验收标准、风险。
  • 旧的 2026-10-26-maven-java-domain-plugin-migration.md §八:原来的 C1/C2/D1/D2/E1/E2/F 拆分改为指向新笔记,保留“不留中间状态”和“新增资源须更新 worktree 复用清单”两条规则。旧笔记是阶段 A 的静态清单(268 行),拆分和 API 映射变了,所以另写新笔记,不在清单里塞决策。
  • docs/development/macos-plugin-api-plan.md:完成度总表和 §3 里相关条目补充计划说明,API-35 状态写成“第一阶段进行中”,§6 增加指向新笔记的链接,顶部状态行补一句日期说明;不新增任何 API 编号,计划仍是 API-01–44。

修复 preview 上过时的 Swift 断言

  • macos/Tests/LitheTests/PluginManagementPresentationTests.swift 的 javaFeaturesIncludeHostIntegratedCapabilities:feat(plugins): #1495 Maven 模型、配置、测试与服务运行迁移(阶段 D 进行中) #1558 让 Java Support 通过自己的 debugAdapters 声明调试能力,功能页因此把 debug 列为插件提供(detail 为 .none),不再是宿主集成。断言改为 run/test 仍是宿主集成、debug 是插件提供。preview 的 macOS CI 因 lane 复用跳过了 Swift tests,这条断言一直没暴露;本 PR 标为 ready 后完整 CI 跑到它才失败。只改测试,不改产品代码。

涉及的 API 条目

只更新已有条目的说明,不改变其他状态:

条目 说明
API-12 jdt:// 做成按 scheme 注册的通用只读 content provider
API-19 Maven 设置在 Maven 插件内按真实配置读写
API-20 复用现有可写目录,只新增 temporaryDirectory
API-22 语言服务器准备状态 setStatus、输出链接匹配器
API-23 run/start、run/stop、工具 ID 引用、requiresTools
API-25 后端启动解析器,以及向自己声明的语言服务器 request/notify/setStatus;Spring、MyBatis 只补上游缺失的 Provider
API-26 推送式 diagnostics collection,带文档版本
API-27 图标、alternatives、reveal、CodeLens、运行与测试标记
API-29 不改协议,测试发现与运行沿用 #1517
API-30 debug/start、debugAdapters 3 的 features 与 defaults
API-33 projectGenerators 2 增加 type:"tool"
API-35 第一阶段:Core 中转的插件函数调用,状态“第一阶段进行中”
API-37 界面语言走环境信息,不在 workspace context 里加 locale

API-35 第一阶段:不是安装依赖

插件之间的通信走 Core 中转的插件函数调用(插件 1 → Core → 插件 2):接收方在清单里显式导出函数 ID,调用方声明函数 ID(不写插件 ID);Core 校验双方声明与启用,记录调用链并拒绝环路,限制深度、并发、字节和超时,取消沿链传递;信任不传递,被调方用自己的权限;远程工作区按 API-40 拒绝;旧的 wrongPlugin、recursiveCall 检查保留,lithe/build/* 仍然不对后端开放。

它不是安装依赖:不参与安装闭包,不做版本求解,禁用某个插件只是调用时找不到提供方。因此 2026-10-25-plugin-dependencies-and-exports.md 里“第一版先不加入弱依赖、可选依赖”的规则不受影响;该笔记继续留在 proposed/,由 C-IMPORT 落地时更新。本 PR 只写规则,不改 Core。

验证

在 rebase 到 preview 4dd316591 之后运行:

命令 结果
node --test scripts/architecture/verify-no-host-language-specifics.test.mjs 16 通过,0 失败
node scripts/architecture/verify-no-host-language-specifics.mjs Ratchet verified: every count matches the baseline.
node scripts/architecture/verify-no-host-language-specifics.mjs --base origin/preview 与 --base HEAD^1 均通过
node scripts/architecture/verify-java-semantic-ownership.mjs Java semantic ownership verified
./scripts/agent-notes/verify-agent-notes.sh ok: 204 active Agent Note(s) verified
git diff --check origin/preview 无问题
bash scripts/ci/common/test-classify-ci-changes.sh CI change classifier tests passed
node --test scripts/ci/common/plan-ci-lane-reuse.test.mjs scripts/ci/common/ci-workflow-gates.test.mjs 153 通过,0 失败
./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --platform all --base origin/preview --head HEAD Test stability check passed
./scripts/architecture/verify-shared-contracts.sh 通过
./scripts/architecture/verify-service-boundaries.sh 通过
./scripts/macos/verify/verify-runtime-bundle-immutability.sh 通过
scripts/macos/test/test-macos.sh --jobs 4 --filter PluginManagementPresentationTests Plugin management presentation 7 个测试全部通过
node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check 均通过

没有运行 scripts/architecture/verify-core.sh 全量:它的第一步是 swift run LitheCoreVerifier,本 PR 只改了一个 Swift 测试断言,其余各步已单独运行。上一轮完整 CI 里另外两项失败与本 PR 无关:MarkdownPreviewHTMLTests.htmlBadgesUseInlineFlowAndPreserveAlignment 是 WebKit 页面加载超时;Windows shared-1 的 git_patch_exchange::shelf_clean_and_retry_restore_preserve_staged_working_and_untracked 在 Windows git 上用了 15.6 秒,超出单测试时间预算。没有启动任何 Lithe 应用。

已知限制与未完成

  • 白名单文件不参与棘轮,白名单里的内容可以无限增长;靠 --base 防新增条目,但不防条目内部增长。
  • 改名的文件算新文件而失败,需要先改内容再改名,或在同一 PR 说明。
  • 给仍在使用的 macOS Java 路径修缺陷时,只要新增词表命中就会失败,需要同时删别处或等纵向 PR 搬走这段代码。
  • 整词匹配有漏报:javac、javadoc、mvnw、gradlew、springframework 不计入;目录裁剪列表里的 .gradle 会被当成工具名常量表;shared.generated.ts 带 Spring 字符串。最终清理前要逐个核对。
  • 最终清理 PR 切到 --strict 时,Windows 的 334 个 TypeScript 文件和 14 个 Rust 文件仍会命中:要么 Windows 迁移完成,要么由用户决定扩大白名单。
  • API-35 第一阶段只有规则,中转本身、新的错误码(由 C-IMPORT 在 -32027 之后分配,避开 C-LS 的 -32022/23/24/26 和 C-RUN 的 -32025)、三份 SDK 的类型化包装都未实现。
  • 契约里两处与本拆分无关的不一致,待契约维护者处理:schema 的 buildSystems 枚举只到 3,而 Core 和 README 支持到 4;README 能力表里 serverProcess 只写了 1,正文已描述版本 2。
  • Windows 过渡 crate lithe-legacy-java 由 W1 创建,本 PR 只记录设计;跟踪 Issue 待用户确认后再提交。
  • verify-windows-boundaries.ps1 本 PR 没有改,最终清理 PR 再切换。

verify-no-host-language-specifics.mjs 扫描 Core、macOS、共享前端、插件契约和
Windows 六个目录,统计 Java、Maven、Gradle、Spring、MyBatis 等词表命中、名字比较、
工具名常量表和 schema 封闭枚举。

- 默认棘轮:计数上升或出现新文件失败;计数下降须用 --update-baseline 同项收紧
- --strict 供最终清理 PR 使用,不看 baseline,仅白名单豁免
- --base <ref> 拒绝 baseline 增长和白名单新增条目
- 六个旧 token 在任何模式下都失败,沿用 verify-java-semantic-ownership 的规则
- 白名单每项必须有 reason、issue、removeWhen,未被使用的条目报错
- 附 16 个单元测试和首份基线(23810 处命中,693 个文件)

Refs #1495
- verify-core.sh 在旧的 Java 语义检查之后运行新闸门,两者并存直到最终清理 PR
- 新增 verify-host-language-specifics 工作流,只在 Linux 运行,PR 上带 --base
  对比合并基点,push 到 preview 时只做棘轮检查
- CI 变更分类器和 lane 复用规则把闸门脚本、baseline、白名单视为独立工作流,
  不触发 macOS 和 Windows 产品 lane

Refs #1495
- 新增 Agent 笔记,固定 Java 拆分用到的通用接口(对应 API-12/19/20/22/23/25/26/
  27/29/30/33/35/37,不新增编号)、API-35 第一阶段的 Core 中转插件函数调用规则、
  PR 拆分与依赖、Windows legacy crate 过渡和闸门脚本的棘轮规则
- 旧的 Maven/Java 迁移笔记 §八 改为指向新笔记,保留无中间状态与资源复用两条规则
- 插件 API 计划在相关条目补充计划说明,API-35 标为第一阶段进行中

Refs #1495
@ghfind-review ghfind-review Bot added the review: high ghfind author score; see https://ghfind.com label Nov 4, 2026
@xiaoyumuxi
xiaoyumuxi marked this pull request as ready for review November 4, 2026 13:01
@lithe-code-review

lithe-code-review Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Lithe Review

结论: ⚠️ 有建议
范围: preview ← feat/1495-java-extraction-gate · head: 6b75c6c

未发现需要阻塞合并的问题。以下两项均为 P2 非阻塞建议。

Findings

  1. [P2] 正确识别 return 后的正则,避免漏扫后续源码
    scripts/architecture/verify-no-host-language-specifics.mjs:210

    • 实际影响:合法正则可能被当成块注释起点,导致后续新增的语言特定内容不参与检查。
    • 触发条件:正则出现在 return 等关键字后,且字符类包含 /*。当前实现把关键字末尾归为 lastSignificant = "a",无法进入正则扫描分支。
    • 复现输入:在扫描目录新增 .ts 文件,内容为 function f(s: string) { return /[/*]/.test(s); },下一行写 const runtime = "java";。按当前逻辑,字符类中的 /* 会触发第 136 行的注释处理并吞掉剩余文件,新增文件不会产生计数,棘轮检查也就不会拒绝它。
    • 来源:本次引入,属于新闸门的词法处理缺口。
  2. [P2] 检查已有封闭工具列表的成员增长
    scripts/architecture/verify-no-host-language-specifics.mjs:322

    • 实际影响:已有封闭枚举继续增加工具名时,所有计数可能保持不变,无法兑现“不再增加宿主工具特判”的目标。
    • 触发条件:向已计数的枚举加入不在 WORDS 中的工具,例如 python。这里每个字段只加一,不统计枚举成员;第 298 行的 Rust 常量表统计也存在同样情况。
    • 复现路径:将现有 shared/contracts/plugins/v1/plugin-manifest.schema.json:1332 的 tool.enum 从 ["java", "node"] 扩为 ["java", "node", "python"]。words 和 schemaEnums 均不变,基线及 --base 对比无法发现增长。类似地,给现有 KNOWN_RUNTIME_TOOLS 数组增加 python,也不会增加 toolTables。
    • 来源:本次引入;现有 schema 和常量表仅用于说明新计数规则的遗漏。

Scope Check

  • 关联需求:本 PR 覆盖 [Feature] macOS 存量重构计划:清理废弃实现,将 Maven/Java 领域逻辑完整迁入插件后端 #1495 的 A0,即闸门、CI 接线和迁移计划固定;不能据此认定整体迁移完成。
  • 已完成范围:新增检查器、基线、白名单、测试、独立 Linux 工作流,并更新分类器、车道复用规则和计划文档。
  • 未完成范围:插件迁移、API-35 实现、SDK 和 Windows 过渡 crate 均已明确留给后续 PR。
  • 上游复用:本次没有新增语言或项目引擎;计划继续复用 JDT/Maven 与已有 Provider、函数调用机制。
  • 两条 Finding 均由本次新增脚本引入,属于本 PR 职责范围。

Suggestions

  1. 补充关键字后的正则识别,确保正则字符类中的注释形状不会进入注释处理;增加上述输入的回归测试。
  2. 对封闭枚举和工具常量表记录成员集合或成员数量,补充“已有列表增加 python 时棘轮失败”的测试。

Summary

业务代码未改变,CI 接线与交付边界基本清楚。主要不足是闸门存在两类漏检,现有测试尚未覆盖这些输入。

Verification

  • 静态检查固定范围 4dd3165...6b75c6c 的 13 个文件,并追踪旧闸门、相关 schema 和 Rust 工具常量。
  • 读取基线数据得到 693 个文件、23810 个词表命中、458 个名字比较、18 个工具表和 7 个 schema 枚举,与 PR 描述一致;未重新扫描源码确认基线。
  • 作者提供:新增测试 16 项通过,相关 CI 工具测试 153 项通过,以及边界、i18n、笔记和测试稳定性检查通过。
  • 已提供 Check Run 中,Host Language Specifics、CI tooling 和 Agent Notes 有成功记录;仍有 Rust、Swift、Windows 检查处于进行中,不能视为完整 CI 已通过。
  • 本次严格只读,未运行仓库代码、测试、构建或应用,未访问网络。上述复现路径来自静态推导。

@lithe-code-review

Copy link
Copy Markdown

Lithe 运行验收

版本:6b75c6c1d1ebe52a29a4bb051132e47429626175;状态:partial。
本报告独立于代码审查;只报告实际执行的场景,不代表所有问题均已修复。

对照:共同祖先 4dd3165912a7ef4ccfd7240890a33b63751c9b3e → PR head;当前目标分支合并适用性:未运行。

  • 新功能场景通过:The four new architecture gate files must be registered in the production lane-reuse infrastructure classifier as belonging to an independent workflow, without widening product workflow impact or reclassifying verify-java-semantic-ownership.mjs.
    • 基线:target_bug / target_bug;PR:expected_behavior / expected_behavior。
    • 证据层级:真实无界面生产代码/进程探针,不是桌面 UI 验收。
  • 条件不足,未验证:Exercise the real gate's monotonic per-file baseline, new-file and rename handling, mandatory tightening, strict mode, initial baseline creation and --base protection against baseline or allowlist expansion.
    • verify-no-host-language-specifics.mjs and its baseline are newly added and absent from baseline 4dd3165. There is no common executable gate entrypoint usable with the supplied capabilities on both revisions. MODULE_NOT_FOUND would be a setup failure, not evidence that forbidden content was accepted. This needs head-only feature acceptance or a comparison baseline containing the gate; head code must not be transplanted into baseline.
  • 条件不足,未验证:The scanner must count executable language-specific content across all six roots without losing trailing code after regex literals, preserve documented neutral/skipped paths, and enforce retired-token rejection despite allowlisting.
    • The production scanner and CLI are absent from the supplied baseline, preventing the required unchanged probe from obtaining scanner behavior on both revisions. A missing import cannot be reported as the target bug. Requires head-only acceptance or a baseline containing the scanner. The reviewer’s lexical example remains a static concern here; it has not been reproduced.

未覆盖:

  • The ratchet lifecycle and scanner requirements described in the two blocked scenarios have no runnable baseline/head acceptance under the supplied constraints.
  • The reviewer’s second concern—adding python to an existing schema enum or Rust tool table without increasing field/table counts—is unverified. The implementation counts fields/tables; a member-growth acceptance rule needs an explicit decision and a baseline containing the gate.
  • Full-repository accuracy is unverified: 693 counted files, 23810 word hits, 458 comparisons, 18 tool tables, 7 schema fields, 30 exempt files and the intended 13-entry allowlist. Synthetic fixtures would not establish these totals or exemption appropriateness.
  • Allowlist validation beyond the planned valid-entry and legacy-token cases remains uncovered: missing/empty fields, issue syntax, unknown keys, unused entries and all supported or rejected glob forms. Documented unlimited growth inside exempt files is not prevented.
  • CLI error handling remains uncovered: exit code 2 for invalid arguments, missing argument values and strict/update combination; malformed baseline/schema/allowlist input; invalid Git refs; and --base behavior when historical policy files are absent.
  • The Bash change classifier’s four-file exemption and preservation of product lane selection are uncovered. Bash is absent from the capability inventory. The runnable Node API probe does not establish shell classification or complete lane-reuse decisions.
  • Actual GitHub Actions behavior is uncovered: PR/preview/manual triggers, path filters, Ubuntu-only scheduling, checkout depth, HEAD^1 comparison, test deadlines, JUnit generation, timing reports and artifact uploads. External workflow execution is outside this plan.
  • verify-core.sh integration is uncovered: execution after the old ownership verifier and failure propagation. Bash and Swift are unavailable in the supplied inventory.
  • Large-file linearity and performance are uncovered. No prespecified statistical protocol, fixture sizes or comparison criteria were supplied; a single elapsed-time assertion would not establish the claim.
  • Documentation requirements receive no runtime acceptance: proposed status, old-note delegation and retained rules, API-01–44 numbering, the thirteen API mappings, API-35 status and non-installation semantics, permissions/versions, PR dependencies, Windows transition and Q1–Q8 decisions.
  • The existing 16-case gate suite, CI tooling suites, Agent Note validation, boundary checks, bundle-immutability check and localization checks were not run or independently validated.
  • Java/Maven/Gradle extraction, API-35 mediation, SDK wrappers, Windows legacy crate and final strict-mode migration are explicitly deferred beyond A0; no implementation or runtime verification is claimed.

工作副本与运行状态已清理;可复用编译缓存按 12 GiB / 7 天预算保留。
详细步骤和原始证据保存在服务器受限目录(14 天、总计不超过 1 GiB);当前没有公开下载链接。

#1558 让 Java Support 通过自己的 debugAdapters 声明调试能力,功能页因此把
debug 列为插件提供(detail 为 none),不再是宿主集成。preview 的 CI 因 lane
复用跳过了 Swift tests,这条过时断言一直没有暴露。run/test 仍断言为宿主集成。
@lithe-code-review

Copy link
Copy Markdown

Lithe 运行验收

版本:9a07dbe98cf35191014d84d0ac1ee959571e688f;状态:partial。
本报告独立于代码审查;只报告实际执行的场景,不代表所有问题均已修复。

对照:共同祖先 4dd3165912a7ef4ccfd7240890a33b63751c9b3e → PR head;当前目标分支合并适用性:未运行。

  • 新功能场景通过:Register the four new architecture gate files in the production lane-reuse infrastructure classifier as belonging to an independent workflow, without broadening product workflow impact or reclassifying verify-java-semantic-ownership.mjs.
    • 基线:target_bug / target_bug;PR:expected_behavior / expected_behavior。
    • 证据层级:真实无界面生产代码/进程探针,不是桌面 UI 验收。
  • 条件不足,未验证:Enforce the documented six-root language-content scanner and monotonic policy lifecycle through the real CLI, including safe lexical handling, exemptions, retired tokens, strict/update modes and historical-policy protection.
    • The gate CLI, baseline and allowlist do not exist at base 4dd3165. The existing ownership verifier only rejects six retired tokens and cannot provide equivalent scanner or ratchet behavior. An unchanged comparative probe therefore cannot exercise this feature on both revisions; MODULE_NOT_FOUND is a setup failure. Required prerequisite: authorization for head-only feature acceptance, or a comparison baseline containing the gate. Do not transplant head code into base.
  • 条件不足,未验证:Preserve Java run/test as host-integrated capabilities while recognizing debug as plugin-provided, matching the corrected PluginManagementPresentationTests assertion.
    • This Windows environment has no macOS SDK, Xcode or supplied Swift toolchain. The real PluginCapability presentation model and Rust-validated official descriptor cannot be exercised through their macOS target here. Requires a macOS executor with the repository-pinned toolchain and build prerequisites. A Node reconstruction or manifest-only inspection would not establish the Swift behavior.

未覆盖:

  • All gate behavior remains without runnable comparative acceptance because the supplied base predates the gate. The blocked scenario describes intended acceptance, not completed coverage.
  • Scanner details remain unverified: all six roots; vendor/node_modules/hidden-directory pruning; supported extensions; the complete 14-word dictionary; camelCase, snake_case, digit and punctuation splitting; JavaScript neutrality; comment removal; quoted/raw/multiline strings; and executable content following regex literals. The reviewer's return-regex concern has not been reproduced.
  • Structural detection remains unverified: Rust/Swift/TypeScript equality and branch comparisons, Rust const/static tool arrays including node/go/python, closed tool/runtime/languageImport.kind schema fields and every hostIntegration property.
  • Policy lifecycle remains unverified: missing-baseline rejection, initial creation, exact per-file/category matching, new files and renames, mandatory decreases, monotonic updates, failed-update file preservation, strict-mode exemptions, and --base rejection of baseline increases or added allowlist globs.
  • Allowlist validation remains unverified: all required nonempty fields, issue syntax, unknown fields, unused entries and supported/rejected glob forms. Unlimited growth inside an already exempt file is a documented limitation; this plan does not claim to prevent it.
  • All six retired tokens still need checks in every mode, including comments and allowlisted files, with useful file/line diagnostics.
  • CLI/error paths remain unverified: exit codes 0/1/2, unknown arguments, missing values, incompatible modes, malformed policy/schema JSON, invalid baseline counts, invalid Git refs and historical commits lacking policy files.
  • Full-checkout snapshot accuracy and baseline serialization remain unverified: 23810 word hits across 693 files; root word/file pairs 8743/114, 4969/185, 99/2, 1045/44, 7775/334 and 1179/14; 458 comparisons, 18 tool tables, 7 schema fields; 30 exempt files across 13 entries; and one sorted baseline entry per line. Synthetic fixtures cannot establish these totals or exemption appropriateness.
  • The reviewer's proposed rejection of adding python to an existing enum or Rust tool table remains unverified. The documented implementation counts fields/tables rather than members; member-growth enforcement needs an explicit acceptance rule and a usable gate baseline.
  • The Bash change classifier's independent-workflow exemption and preservation of product lane outputs remain uncovered. Bash is absent from the capability inventory. The Node API probe does not prove shell classification, Git-history comparison or complete lane-reuse decisions.
  • GitHub Actions execution remains uncovered: PR event types, preview pushes, manual dispatch, path filters, Ubuntu-only scheduling, permissions/concurrency, checkout depth, HEAD^1 comparisons, deadlines, JUnit output, timing reports and artifact upload. External workflow execution is outside this planning session.
  • verify-core.sh ordering after the old ownership verifier and failure propagation remain uncovered; Bash and Swift are unavailable. The existing gate/CI tooling suites and required architecture, notes, stability, bundle-immutability and localization checks were not run.
  • Large-file linearity and performance remain blocked pending a prespecified protocol defining fixture sizes, repetitions, warmup, measurement boundaries and statistical acceptance criteria. A single elapsed-time assertion cannot establish the claim.
  • The macOS capability model and corrected Swift assertion remain unverified. Actual Features-tab rendering requires macOS desktop capability and is not established by a model-level probe.
  • Documentation requirements have no runtime acceptance: proposed-note lifecycle, old-note delegation and retained migration/resource rules, API-01–44 numbering and other statuses, mappings for API-12/19/20/22/23/25/26/27/29/30/33/35/37, API-35 first-stage status and non-installation semantics, permissions/versions/errors, import-settings flow, PR dependencies, Windows transition design, Q1–Q8, alternatives, risks and acceptance criteria. These require document review and appropriate validators.
  • Java/Maven/Gradle extraction, API-35 mediation and SDK wrappers, new plugin APIs, Windows legacy crate, configuration migration and final strict-mode cleanup are explicitly deferred beyond A0. No implementation or runtime acceptance is claimed for those future deliverables or the unrelated existing contract inconsistencies.

工作副本与运行状态已清理;可复用编译缓存按 12 GiB / 7 天预算保留。
详细步骤和原始证据保存在服务器受限目录(14 天、总计不超过 1 GiB);当前没有公开下载链接。

- stripComments:return、typeof 等关键字后的 / 按正则字面量处理,
  字符类里的 /* 不再被当成块注释吞掉后续源码;属性名 .in / 仍是除号。
- toolTables 改为统计合格常量表的条目数,schemaEnums 改为统计
  tool、runtime、languageImport.kind 的封闭取值个数和 hostIntegration
  的集成名个数(至少 1),已有列表新增 python 等成员时棘轮会失败。
- 补充对应单元测试和棘轮端到端测试。
preview 新增的 Java 词条和本次改为按成员统计的常量表、schema 枚举
一起计入基线,Note 同步计数规则和快照数字。
@xiaoyumuxi
xiaoyumuxi merged commit dbe8441 into preview Nov 5, 2026
9 of 18 checks passed
xiaoyumuxi added a commit that referenced this pull request Nov 5, 2026
- Plan doc: keep this PR's delivered API-22/23/30 rows, take preview's
  API-29 rows, and keep the C-LS setStatus note.
- A declared features.hotCodeReplace now wins over the host's legacy
  service update, which only remains for adapters that declared nothing,
  matching the legacy_java narrowing in the debug engine. Adds a test
  that one button shows.
- Contract README no longer names runtimes when describing the closed
  tool lists of serverProcess 1 to 3.
- Lock the lowered counts: engine.rs nameComparisons 6 -> 5 and the
  manifest schema's schemaEnums 13 -> 5.
xiaoyumuxi added a commit that referenced this pull request Nov 5, 2026
- Plan doc: keep this PR's delivered API-12/20/22/25 rows and the other
  PRs' plan notes; take preview's rows elsewhere.
- The new startPluginLanguageServer overload carries the session policy
  and no build-tool or host-integration parameters. A server with a
  session policy and no hostIntegration starts through it; any other
  server keeps preview's start unchanged.
- The manifest schema forbids hostIntegration on a backend-resolved
  launch with not/required instead of a false property schema; the
  meaning is the same.
@xiaoyumuxi
xiaoyumuxi deleted the feat/1495-java-extraction-gate branch November 9, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant