Skip to content

chore: release#110

Merged
ZR233 merged 1 commit into
mainfrom
release-plz-2026-05-22T06-47-17Z
May 22, 2026
Merged

chore: release#110
ZR233 merged 1 commit into
mainfrom
release-plz-2026-05-22T06-47-17Z

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 22, 2026

🤖 New release

  • ostool: 0.19.0 -> 0.20.0 (⚠ API breaking changes)
  • ostool-server: 0.2.1 -> 0.3.0 (⚠ API breaking changes)

ostool breaking changes

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field UbootProfile.kernel_load_addr in /tmp/.tmpF4G7S1/ostool/ostool/src/board/client.rs:60
  field UbootProfile.fit_load_addr in /tmp/.tmpF4G7S1/ostool/ostool/src/board/client.rs:62
  field UbootProfile.bootm_addr in /tmp/.tmpF4G7S1/ostool/ostool/src/board/client.rs:64

ostool-server breaking changes

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field UbootProfile.kernel_load_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:433
  field UbootProfile.fit_load_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:435
  field UbootProfile.bootm_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:437
  field UbootProfile.kernel_load_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:433
  field UbootProfile.fit_load_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:435
  field UbootProfile.bootm_addr in /tmp/.tmpF4G7S1/ostool/ostool-server/src/config.rs:437
Changelog

ostool

0.20.0 - 2026-05-22

Other

  • (tool) 拆分调用、项目与进程上下文 (#108)
  • Add board-specific U-Boot load address configuration to ostool-server (#109)

ostool-server

0.3.0 - 2026-05-22

Other

  • Add board-specific U-Boot load address configuration to ostool-server (#109)


This PR was generated with release-plz.

Copy link
Copy Markdown

@mai-team-app mai-team-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查总结

这是由 release-plz 自动生成的版本发布 PR,仅包含版本号升级和 CHANGELOG 更新。

本 PR 的变更(5 个文件,+16/-4)

  • ostool/Cargo.toml: 0.19.0 → 0.20.0
  • ostool-server/Cargo.toml: 0.2.1 → 0.3.0
  • Cargo.lock: 对应版本锁更新
  • 两个 crate 的 CHANGELOG.md: 新增版本条目

源头功能 PR #109 的测试变更分析

本 PR 关联的功能变更来自已合并的 #109(为 ostool-server 增加开发板级 U-Boot 加载地址配置),以下是其测试相关变更的影响分析:

Rust 后端测试

  1. ostool/src/board/client.rs 测试:在已有 JSON 测试数据中增加了 kernel_load_addr/fit_load_addr/bootm_addr 字段并新增对应断言 — 扩展现有测试,不破坏原有行为。
  2. ostool/src/run/uboot.rs 测试
    • 所有已有 build_network_boot_request 调用点均传入 None 作为新参数,保持与原来 "bootm" 裸命令一致的输出(如 "tftp image.fit && bootm""dhcp image.fit && bootm")。
    • 新增测试 network_boot_request_passes_configured_bootm_addr 验证传入具体地址时生成正确的 bootm 0x82200000 命令。
  3. ostool-server/src/config.rs 测试:新增 board_config_uboot_profile_supports_load_addresses 测试 TOML 解析新字段。
  4. ostool-server/src/api/router.rs 测试:新增 normalize_board_upsert_request_trims_uboot_load_addresses 测试新字段的 trim/空值处理逻辑。

前端测试

  1. BoardEditorView.test.ts
    • makeBoard() 工厂函数新增三个 null 字段 — 与未配置时的默认行为一致。
    • makeStaticIpBoard() 工厂函数使用具体地址值 — 新功能场景。
    • 已有测试用例中增加新字段的填写和断言。
  2. SessionsView.test.tsmakeBoard() 工厂函数新增三个 null 字段。

对现有行为的影响评估

向后兼容:所有新字段均为 Option<String> + #[serde(default)],旧配置文件反序列化时自动获得 None

Fallback 链正确resolved_bootm_arg 的优先级链为:本地配置 → 服务端 profile → fit_load_addr 推断 → 裸 bootm,与 PR 描述一致。

已有测试未被削弱:所有原有测试断言保持不变,仅扩展了测试数据以包含新字段。

结论

本 PR 为标准 release-plz 自动发布 PR,内容正确、格式规范。所关联的功能 PR #109 的测试覆盖充分、未影响现有行为。版本号升级(minor + major)符合 semver 规范,API breaking 变更已在 PR 描述中注明。

Powered by glm-5.1

@github-actions github-actions Bot force-pushed the release-plz-2026-05-22T06-47-17Z branch from 0d87456 to 15b4cf8 Compare May 22, 2026 14:09
Copy link
Copy Markdown

@mai-team-app mai-team-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 自动审查报告 — PR #110 chore: release

本 PR 是由 release-plz 自动生成的发布 PR,将 ostool 从 0.19.0 升至 0.20.0,ostool-server 从 0.2.1 升至 0.3.0。PR 本身仅包含版本号和 CHANGELOG 更新(5 个文件,+17/-4),实际代码变更来自已合并的 #108#109


✅ 验证结果

检查项 结果
cargo test -p ostool ✅ 144 个测试全部通过
cargo clippy -p ostool --all-targets --all-features ✅ 无警告
cargo fmt --all -- --check ✅ 格式正确
ostool-server 编译 ⚠️ 因环境缺少 pnpm 无法编译(预期行为)

📋 包含的功能变更(来自 #108#109

#108 — 拆分调用、项目与进程上下文(refactor)

  • 抽出 InvocationProjectLayoutVariableScopeProcessContext 四个显式上下文对象
  • Tool 保留为兼容门面,CLI 和 library 入口改为先构造 Invocation
  • board config、QEMU、U-Boot runner 中的变量替换统一改为使用 VariableScope
  • Cargo build 的 ResolvedCargoArtifact 改为显式返回值传递

#109 — 为 ostool-server 增加开发板级 U-Boot 加载地址配置

  • UbootProfile 新增 kernel_load_addrfit_load_addrbootm_addr 三个可选字段(两端同步)
  • 服务端 admin API 支持 normalize/保存/返回新字段
  • Web UI 增加三个地址输入项
  • 远端 U-Boot runner 把服务端地址作为 runtime fallback
  • ResolvedRuntime 增加 bootm_addr 字段,resolved_bootm_arg 的优先级链:本地配置 > 服务端配置 > FIT 地址推断

🧪 测试变更分析

新增测试

ostool(PR #108):

  • parse_default_qemu_runner_args — 验证 cargo-osrun QEMU 参数解析
  • parse_uboot_runner_subcommand — 验证 U-Boot 子命令解析
  • parse_build_with_manifest_config_package_and_bin — 验证 build 子命令
  • parse_run_qemu_with_build_qemu_and_cargo_selector_args — 验证 QEMU run 解析
  • parse_run_uboot_with_build_uboot_and_cargo_selector_args — 验证 U-Boot run 解析
  • parse_board_run_with_cargo_selector_args — 验证 board run Cargo selector

ostool(PR #109):

  • network_boot_request_passes_configured_bootm_addr — 验证配置了 bootm 地址后 TFTP 命令包含该地址

ostool-server(PR #109):

  • normalize_board_upsert_request_trims_uboot_load_addresses — 验证地址字段 trim + 空字符串转 None
  • board_config_uboot_profile_supports_load_addresses — 验证 TOML 反序列化新字段
  • Web UI 测试更新:BoardEditorView.test.tsSessionsView.test.ts 中的 fixture 增加了三个新字段

修改的测试

  • handle_output_records_runtime_artifact_state_without_objcopy → 重命名为 handle_output_records_runtime_artifact_state_from_resolved_cargo_artifact,适配 ResolvedCargoArtifact 显式传参
  • network_boot_request_* 系列测试增加 bootm_arg 参数(传入 None),断言不变,维持向后兼容
  • parse_board_run_with_build_and_board_config 增加了 assert!(args.cargo_selector.is_empty()) 断言
  • parse_board_ls_with_server_args 增加了 doc comment
  • board/config.rsapply_overrides 测试改为传入 tool.variable_scope().unwrap()

对现有行为的影响评估

  1. 变量替换board/config.rs 中所有 tool.replace_string() 统一替换为 variables::expand_variables(),功能等价,不改变运行时行为。
  2. U-Boot bootm 命令生成:优先级链(本地配置 > 服务端 > FIT 地址推断 > 无参数 bootm)设计合理,新增的服务端 fallback 是纯粹的增量功能,不影响已有场景(服务端未配置时行为不变)。
  3. Cargo builder 重构ResolvedCargoArtifact 从 builder 内部可变状态改为显式传参,消除了隐式状态依赖,测试适配正确。
  4. API 兼容性UbootProfile 新增的字段均有 #[serde(default)],旧配置文件和 API payload 反序列化时自动填充 None,不破坏兼容性。

⚠️ API Breaking Changes(已在 PR 描述中标注)

UbootProfile 新增三个 pub 字段(kernel_load_addrfit_load_addrbootm_addr),对于使用结构体字面量构造 UbootProfile 的下游代码需要补全新字段。这是符合 semver 的正确版本升级。

总结

发布 PR 内容正确,版本号和 CHANGELOG 均已更新。所有 ostool 单元测试通过,clippy 和格式检查无问题。测试变更覆盖了新增功能和重构适配,未发现对现有行为的回归风险。

Powered by glm-5.1

@ZR233 ZR233 merged commit 78830bb into main May 22, 2026
@ZR233 ZR233 deleted the release-plz-2026-05-22T06-47-17Z branch May 22, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant