Repository navigation
feat(logging): 接入 litheLogging 1 结构化诊断 - #2
Merged
Merged
Conversation
- vendor 的 Node SDK 更新为 lithe-plugin-docs 29b245c 加本轮日志改动, sdk.lock.json 分开记录 sdkSource(SDK 来源)与 coreSource(集成测试宿主) - 后台 lithe/vcs/status 与 lithe/vcs/baseContent 的成功不再记 INFO,失败照常 ERROR - annotate 读取提交说明失败、截断或无法解析时记一次 WARN degraded, 批注仍正常返回,不带 svn 输出 - prepare-core 支持 --source/--ref/--working-tree/--target-dir,校验宿主 origin、ref、源码摘要和 litheLogging 目录前提 - CI 与 release 改为检出宿主 preview;README 补充诊断日志与 Core 集成来源说明
This was referenced Nov 4, 2026
xiaoyumuxi
marked this pull request as ready for review
November 4, 2026 10:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
SVN 插件接入结构化日志 v2:vendor 的官方 Node SDK 更新到支持
litheLogging1 的版本,VCS 请求的成功/失败终态由 SDK 自动上报;后台高频的status和baseContent成功不再产生 INFO;批注读取提交说明失败时改为一条降级事实。集成测试的 Core 构建脚本改为显式选择宿主来源,并校验宿主具备litheLogging1。依赖:
litheLogging协议与目录事件;集成测试需要它)Provider 行为(
…/provider/svn-provider.mjs)createBackend(...)链式调用.suppressSuccessDiagnostics('lithe/vcs/status').suppressSuccessDiagnostics('lithe/vcs/baseContent'):这两个后台请求的成功保持静默,失败照常 ERROR。annotate读取svn log补充提交说明时,如果失败、输出被截断或无法解析,批注仍正常返回(只是没有提交说明),并上报一次degraded('lithe/vcs/annotate', code):svn.annotation.historyUnavailablesvn.annotation.historyTruncatedsvn.annotation.historyInvalid事实不带 svn 输出。
SDK 来源与集成测试的 Core 来源
和 Cargo 插件采用同一套方案:
29b245c0e1d77c761d9032a3144a301d1818bfc7加 SDK PR #17 的日志改动,新增diagnostics.mjs、host.mjs;sdk.lock.json分开记录sdkSource(SDK 来源,逐文件source、localChanges、upstreamSha256)和coreSource(https://github.com/1lck/Lithe-IDEA,refpreview,要求litheLogging:1);scripts/verify-sdk.mjs校验sdkSource。scripts/core-source.mjs(identifyCore/verifyPreparedCore:校验 origin、ref、源码摘要、plugins.operation.finished目录事件,构建后源码漂移即拒绝);scripts/prepare-core.mjs支持--source、--ref、--target-dir、--working-tree,用 rustc 链接liblithe_core.rlib编译 harness,不再往宿主检出里复制 example。coreSource读取宿主仓库和 ref 并检出。测试
test/core-source.test.mjs。test/scenario.test.mjs新增断言:svn 不可用时,Core 中有一条plugins.operation.failed(ERROR,operation为lithe/vcs/status,code为vcs.tool.unavailable),通道为plugins/io.github.lithe-idea.svn-support/host,op 与宿主请求关联,且不包含临时目录路径。test/support/core.mjs注册 VCS 会话时带上role: 'vcs'、logSubject: 'svn',并改用新的 Core 身份校验。验证
node --test单元测试 0 失败(1 项集成测试因本机没有准备好的 Core 而跳过);node scripts/verify-sdk.mjs通过。svnadmin和 provider;打包通过。预期的 CI 状态与合并顺序
preview之前,CI 的 “Verify host prerequisite and build Core bridge” 会报 “Selected Core lacks litheLogging:1”,这是预期结果。contract/v1)→ 本 PR。发布前把sdkSource重新固定到 SDK #17 合并后的 commit。限制
配套 PR: