Repository navigation
feat(logging): 恢复日志事件目录生成器,新增增量更新回退事件 update.delta.fallback_selected - #38
Merged
Merged
Conversation
- scripts/logging/generate-log-events.mjs:从 rust/logging/events/ 生成 rust/crates/diagnostics/src/catalog_generated.rs,--check 只读比较;在未改动的 main 上逐字节一致。去掉已无消费者的 Swift 输出。 - update.delta.fallback_selected(WARN,字段 stage、error):桌面客户端的增量更新 在下载、应用或安装补丁失败、改用完整包时记录。 - README 的检查步骤与现状一致;类型化事件、生成器测试和用法门禁见 Lithe-IDEA#1802。
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.
关联
桌面端(Viva 客户端)接入增量更新:Viva 上游
update包已支持按版本下载补丁、在本地重建新版本后安装。补丁下载、应用或安装失败时,客户端改用完整包继续更新。这是改走备用路径,按日志规则要记 WARN,但 Core 目录里没有合适的事件,需要新增一个。新增事件需要运行生成器,而
scripts/logging/generate-log-events.mjs在 Lithe-IDEA#1799 拆分时没有跟着目录搬进 Core,README 却仍要求运行它。这个 PR 先把生成器恢复,再用它声明新事件。Lithe-IDEA#1802 跟踪的其余部分(桌面端类型化事件、生成器测试、用法门禁)不在这次范围内。改动
scripts/logging/generate-log-events.mjs,从 Lithe-IDEA 删除前的版本(0faecba49^)恢复,只改了三处:rust/logging/events/,唯一输出改为rust/crates/diagnostics/src/catalog_generated.rs,生成文件首行写“edit rust/logging/events/*.json instead.”。LogEvents.generated.swift的消费者已随旧 macOS 客户端删除)。swiftParameters的驼峰参数冲突检查改名为parameters,加注释说明它为类型化绑定保留参数名。--check,生成结果与已提交的catalog_generated.rs逐字节一致。rust/logging/events/update.json新增update.delta.fallback_selected:warn,通道update,消息Delta update {stage} failed, falling back to the full download,限速 60/分钟,ownerLithe。stage(token,必填):失败的步骤,取值download、apply或install。error(error,必填):该步骤返回的错误,编码时带error_code、error_domain。rust/crates/diagnostics/src/catalog_generated.rs,只多出这一个事件(13 行)。rust/logging/README.md:verify-log-usage.mjs还没恢复。README.md的目录表(中英)加scripts/logging/,常用命令加--check。验证
node scripts/logging/generate-log-events.mjs --check:通过,共 210 个事件(update=6)。cargo test -p lithe-diagnostics:69 个测试通过。scripts/rust-core/verify-rust-core-comments.sh:通过。不涉及插件契约、能力版本或插件函数协议,不需要更新协议记录。合入后桌面端把
PINNED_CORE_REVISION升到这个提交。