feat: align CLI with upstream exe.dev command surface & fleet resource specs#14
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details🔇 Additional comments (3)
📝 WalkthroughWalkthrough扩展 ChangesCLI 命令与安全规则
Fleet 资源与标签传播
API 与自动化文档
Sequence Diagram(s)sequenceDiagram
participant FleetFile
participant FleetPlan
participant exe_new_command
FleetFile->>FleetPlan: 解析 cpu、memory、tags
FleetPlan->>exe_new_command: 传递 NodeSpec
exe_new_command->>exe_new_command: 生成 VM 创建参数
Possibly related PRs
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
k8s_cli/src/fleet.rs (2)
434-450: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win补充其他 CPU 来源的零值测试。
当前只覆盖
defaults.cpu == 0,而新增逻辑还包含cluster.controlPlane.cpu、任务池和备用池的校验。建议使用参数化或表驱动测试覆盖这些路径,避免后续回归。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@k8s_cli/src/fleet.rs` around lines 434 - 450, 补充 CPU 为零时其他来源的校验测试:在 rejects_zero_cpu 或相邻测试中采用参数化/表驱动方式,覆盖 cluster.controlPlane.cpu、任务池 CPU 以及备用池 CPU,并断言各路径返回预期验证错误;保留 defaults.cpu 的现有覆盖。
405-432: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win补充控制面 tags 的回归断言。
该测试验证了控制面的 CPU 和 memory 继承,但没有验证控制面
tags经过merge_tags的路径;同时也没有覆盖重复默认标签的去重行为。建议为控制面配置 tags 并增加对应断言。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@k8s_cli/src/fleet.rs` around lines 405 - 432, 为控制面资源补充 tags 合并的回归覆盖。在 resolves_resources_and_merges_tags 测试使用的样例配置中为控制面设置 tags,断言 control.tags 包含默认与控制面标签的合并结果,并验证重复默认标签已去重。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/exe-dev-api-reference.md`:
- Around line 299-306: Update the exedev-ctl command inventory in the API
reference to include the newly supported comment and invite commands alongside
the existing typed wrappers, keeping the documentation consistent with the
command list in skills/exedev-ctl/SKILL.md.
- Around line 323-327: 统一文档中 exedev-k8s 的最小 token 命令列表:将该 JSON 示例的 cmds 从
ls、new、rm、whoami 调整为上文实际需要的 ls、new、rm;除非补充并同步更新 whoami 的实际调用链和相关说明。
In `@docs/node-labeling.md`:
- Around line 3-7: Update the opening statement in the node-labeling
documentation to limit automatic labeling to VMs created or managed by
exedev-k8s bootstrap, while preserving the manual kubectl guidance for
out-of-band nodes and repairs.
In `@k8s_cli/src/fleet.rs`:
- Around line 278-285: 修复 merge_tags,使默认标签自身也参与去重:不要直接保留 defaults.tags
的重复项,应按首次出现顺序构建唯一标签集合,再追加尚未存在的池级 tags,确保返回的是去重后的并集。
---
Nitpick comments:
In `@k8s_cli/src/fleet.rs`:
- Around line 434-450: 补充 CPU 为零时其他来源的校验测试:在 rejects_zero_cpu
或相邻测试中采用参数化/表驱动方式,覆盖 cluster.controlPlane.cpu、任务池 CPU 以及备用池
CPU,并断言各路径返回预期验证错误;保留 defaults.cpu 的现有覆盖。
- Around line 405-432: 为控制面资源补充 tags 合并的回归覆盖。在
resolves_resources_and_merges_tags 测试使用的样例配置中为控制面设置 tags,断言 control.tags
包含默认与控制面标签的合并结果,并验证重复默认标签已去重。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c31d4658-c733-468c-91c6-98d1f50c36dc
📒 Files selected for processing (13)
cli/src/cli.rscli/src/cli_command.rscore/src/shell.rsdocs/exe-dev-api-reference.mddocs/exedev-automation.mddocs/node-labeling.mdfleet.example.yamlk8s_cli/README.mdk8s_cli/src/fleet.rsk8s_cli/src/manager/mod.rsk8s_cli/src/manager/tests.rsskills/exedev-ctl/SKILL.mdskills/exedev-ctl/references/exedev-ctl.md
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: CodeRabbit / Review
🧰 Additional context used
🪛 LanguageTool
docs/exedev-automation.md
[grammar] ~56-~56: Ensure spelling is correct
Context: ...age=exeuntu --no-email' ``` Prefer the exeuntu image for k3s nodes; generic minimal im...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/exe-dev-api-reference.md
[style] ~138-~138: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tespace. - No newlines or null bytes. - No duplicate keys, at any level. - Only `e...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~160-~160: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ... work everywhere exe0 tokens work, in exactly the same way. An exe1 token is validated throu...
(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)
[style] ~186-~186: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: .... - Confirm exp is not in the past. - Confirm the exact compact JSON payload was sign...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
skills/exedev-ctl/references/exedev-ctl.md
[grammar] ~136-~136: Ensure spelling is correct
Context: ...B --tag prod --no-email ``` Prefer the exeuntu image for nodes that need `sudo`, `curl...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[style] ~164-~164: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ... -d p1-a-1 prod web Set or clear a short comment on a VM: sh exedev-ctl comm...
(QUICK_BRIEF)
🔇 Additional comments (14)
fleet.example.yaml (1)
6-9: LGTM!Also applies to: 23-26, 35-38
k8s_cli/README.md (1)
95-108: LGTM!k8s_cli/src/fleet.rs (1)
33-36: LGTM!Also applies to: 45-49, 69-72, 84-87, 105-108, 154-159, 168-170, 180-182, 203-205, 223-225, 244-246, 270-276, 355-369
k8s_cli/src/manager/mod.rs (1)
183-187: LGTM!Also applies to: 615-646
k8s_cli/src/manager/tests.rs (1)
47-49: LGTM!Also applies to: 59-76
docs/exe-dev-api-reference.md (1)
4-20: LGTM!Also applies to: 38-69, 104-289, 329-344
docs/exedev-automation.md (1)
35-36: LGTM!Also applies to: 53-58, 73-89, 122-132, 145-145, 186-188, 201-201, 218-234
docs/node-labeling.md (1)
9-41: LGTM!Also applies to: 65-80
skills/exedev-ctl/SKILL.md (1)
27-27: LGTM!Also applies to: 41-41
skills/exedev-ctl/references/exedev-ctl.md (1)
20-62: LGTM!Also applies to: 125-138, 157-168, 177-181, 193-201, 226-238
cli/src/cli.rs (1)
50-65: LGTM!Also applies to: 106-110, 114-143, 162-175, 185-207, 293-310, 325-509, 528-533, 570-677, 686-711
cli/src/cli_command.rs (1)
28-105: LGTM!Also applies to: 190-217, 219-306, 308-316, 331-446, 567-764
core/src/shell.rs (2)
53-59: 🔒 Security & Privacy确认危险命令前缀覆盖是否完整。
当前将
team disable、team transfer、team role等纳入危险命令,但team auth set(切换团队身份认证提供方,配置错误可能导致全体成员被锁定)以及team settings vm-sharing等团队级配置变更并未列入。请对照 exe.dev CLI 参考确认这些全局性变更是否也应触发本地确认提示。
90-97: LGTM!
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Audited the code against the exe.dev CLI reference as of 2026-07-10 (
https://exe.dev/docs/cli-*.md) and brought the typed wrappers back in sync. Since clap rejects unknown flags, every gap here previously blocked users from reaching upstream features without theexec --escape hatch.exedev-ctl command surface
comment <vm> <text>(empty text clears),invite(show/link/rewards/set-reward/activity/request/manage)billing updateandls -ano longer exist upstream;billinggains usage (--range)/credits/rewards/capacity/manage,lsgains--groupnew --comment/--cpu/--memory/--registry-auth/--tag,cp --cpu/--memory,domain add --wildcard,ssh-key add --tagresize: all of--memory/--cpu/--diskoptional (at least one required, validated locally)tag: accepts multiple tag names per callteam: bareteamallowed; adds disable/role/rename/billing update/transfer/auth set/settings vm-sharing/vm ls.team disableforwards--yesafter the local confirmation since/exechas no ptyintegrations: neweditsubcommand;addgains--act-as-user/--comment/--fields/--no-auth; remove/attach/detach/rename gain--team; setup gains--nameexedev-k8s fleet resource specs
fleet.yamlnow supports optionalcpu,memory, andtags(exe.dev VM tags, distinct from k8s labels) atdefaults,cluster.controlPlane, and pool level. Pool values override defaults; tags are unioned. Values flow intonew --cpu/--memory/--tagand show up inplanoutput.Docs
docs/exe-dev-api-reference.md,docs/exedev-automation.md,docs/node-labeling.mdrefreshed against upstream pages and current implementation./member prefix), documented dual-binary archives, new command examplesTesting
cargo fmt --check,cargo check --workspace,cargo test --workspace(52 tests) all passls,ls --group tag,billing plan,invite activity,helpall work; server gates unavailable features per account (e.g. noteamwithout a team) and errors pass through cleanlySummary by CodeRabbit