qtcloud-devops-cli 0.7.0-beta.3

量潮DevOps云命令行工具
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# CHANGELOG

## [0.7.0-beta.3] - 2026-07-02

### Fixed

- `build status` CI 检查:workflow 名回退路径改为 `build-{scope}`(之前裸用 scope 名)
- `build status` CI 检查:number JSON 解析改用 `take_while(is_ascii_digit)`(修复 `#36}]` 脏数据)
- 提取 `resolve_workflow` 纯函数并加 4 个测试

## [0.7.0-beta.2] - 2026-07-02

### Added

- `build status` 版本检查:扫描 scope 下所有配置文件(Cargo.toml/pyproject.toml/package.json/pubspec.yaml)
- `release publish` 发布前预检所有配置文件版本一致

### Fixed

- `version_status()` 不再只检查 scope.language 对应的单一文件

## [0.7.0-beta.1] - 2026-07-02

### Added

- `build status` 命令:三路检查(CI/本地编译/版本一致性)
  - CI 状态:`gh run list --workflow`,支持 `ci_workflow` 配置
  - 本地编译:多语言语法校验(Rust/Python/Go/Dart/TS)
  - 版本一致:`contract::version_status()`
  - 工作区脏状态检测
- `test status` 命令:测试结果与覆盖率
  - 多语言测试运行(Rust/Python/Go/Dart/TS)
  - lcov/Cobertura 覆盖率解析
  - 阈值从契约读取(scope 级 → 全局默认)
- 四维契约模型(`contract` 模块)
  - Stages / Platforms / Sources / Scopes 四维架构
  - `scope_release()``scope_test_threshold()` 便捷函数
  - `find_scope_by_path()` 按路径自动匹配 scope
  - `ci_workflow` scope 字段

### Changed

- `release publish`/`release status` 改用 contract 模块替代手写 YAML 解析
- `contract.yaml` 从旧格式迁移到四维架构新格式
- 枚举重命名:按文件/工具/行为命名(如 `SourceType::Pyproject`
### Removed

- 旧格式 YAML 解析代码(`OldContractYaml`- `validate` 模块(功能已合并至 contract/preflight)

## [0.6.1] - 2026-06-28

### Added

- `release status` 命令:按 scope 分组展示发布状态
  - GitHub Release 存在性和 body 同步检测
  - 多语言配置文件版本检测(Rust/Python/JS/Dart/Go)
  - scope→子目录映射(`.quanttide/devops/contract.yaml`  - 未发布提交按 scope 子目录过滤

### Fixed

- `extract_notes`: 同版本 `## [` 跳过,不同版本 `break`(修复吞 CHANGELOG bug)
- `publish`: 自动更新 `Cargo.toml`/`pyproject.toml` 版本号
- `publish`: 从 `contract.yaml` 解析 scope 子目录
- CHANGELOG 生成 prompt: 合并同类提交为概括性条目,用中文

### Changed

- 依赖更新(`quanttide-agent`
### Fixed
- 修复 `release status` 命令的多项问题:按 scope 分组展示 tag 与未发布提交、子目录检查回退、配置文件检测优化、以 tag 为事实源等。
- 修复 `extract_notes` 对版本标题行的处理逻辑(跳过 `## [` 而非 break),并支持 `v` 前缀格式。
- 修复 `ensure_changelog` 跳过检查时同时兼容 `[0.1.0]``[v0.1.0]` 两种格式。

## [0.6.0] - 2026-06-26

### Added

- CHANGELOG 自动生成:`release publish` 内置 LLM 调用(`quanttide-agent` 库),
  CHANGELOG 缺失当前版本时自动从 git 提交记录生成
  - 环境变量 `LLM_API_KEY` 配置,未配置时降级为提示文本,不阻塞发布
  - 写入后自动 `git add + git commit`,确保标签包含 CHANGELOG 修改
  - 版本号自动 normalize(去掉 scope 和 `v` 前缀),与预检查格式一致

### Fixed

- `write_changelog` 版本号 normalize 后写入,与 `precheck_version_changelog` 搜索格式一致
- `ensure_changelog` 写入后自动提交,避免标签创建时遗漏 CHANGELOG 修改
- `pyproject.toml` 版本与 `Cargo.toml` 同步,修复 CI validate-version 失败

## [0.6.0-rc.3] - 2026-06-26

### Changed
- Bumped version to v0.6.0-rc.3.

## [0.6.0-rc.2] - 2026-06-26

### Fixed
- CHANGELOG 自动生成:版本号 normalize 后写入,与 precheck 搜索格式一致

## [0.6.0-rc.1] - 2026-06-26

### Added

- CHANGELOG 自动生成:`release publish` 内置 LLM 调用(`quanttide-agent`),
  CHANGELOG 缺失当前版本时自动从 git 提交记录生成
- `llm_changelog` 集成到发布流程,环境变量 `LLM_API_KEY` 配置
  - 未配置时降级为提示文本,不阻塞发布

## [0.5.0-rc.2] - 2026-06-10

### Fixed

- Cargo.toml / pyproject.toml 版本同步 rc 版本号,修复 CI version mismatch

## [0.5.0-rc.1] - 2026-06-10

测试 CI 构建与发布流程(build-cli → publish-crate / publish-pypi)。无功能变更。

## [0.5.1] - 2026-06-11

### Fixed

- `code sync` 改为双向同步:先 fetch + rebase 子模块远程更新,再 push 子模块、更新父指针、push 父仓库
- 父仓库 push 失败后自动回滚父仓库提交

## [0.5.0] - 2026-06-10

### Breaking

- 模块结构重构:`commands/` + `model/``code/` + `git/` + `release/` 三子领域
- 删除 `release stage` 命令,只保留 `release publish`
- 删除 `release retire``code retire``release status` 命令
- 删除 release 状态跟踪(`ReleaseStatus` 枚举、`FileStorage` journal 持久化)
  - `ReleaseStatus``ReleaseRecord``TransitionError` 移入 `packages/toolkit`
- `pub use git::submodule` 移除(外部引用需改为 `git::submodule::*`- `HealthIssue.status``SubmoduleStatus` 枚举改为 `String`
- `RepoState.parent_dirty` 字段移除

### Added

- `code::status()` 返回业务类型 `StatusReport``SyncStatus` 四态)
- `code::sync()` / `code::sync_all()` 封装 sync 原语
- `RepoState::scan_offline()` 支持跳过 fetch
- `SyncStatus::label()` 中文标签输出
- 测试覆盖率从 65.3% 提升至 77.85%

### Fixed

- `--offline` 标志实际生效
- `sync` 签名从 `repo.signature()` 读取,原子化三阶段,前序 fetch
- `python.rs` 绑定和语法错误修复
- `release publish` API 简化,移除 `--pre-release` 参数
- Cargo.toml / pyproject.toml 版本同步

### Changed

- `sync` 跳过 detached HEAD 和无远程场景
- `preflight.sh` 增加 `--features python` 验证

### Breaking

- 模块结构重构:`commands/` + `model/``code/` + `git/` + `release/` 三子领域
- 删除 `release stage` 命令,只保留 `release publish`
  - `code/`:业务层,纯抽象,不暴露 git 概念
  - `git/`:事实源底层,所有 git 操作
  - `release/`:发布子领域
- 删除 `release retire` 命令
- 删除 `code retire` 命令
- 删除 `release status` 命令
- 删除 release 状态跟踪(`ReleaseStatus` 枚举、`FileStorage` journal 持久化)
  - `ReleaseStatus``ReleaseRecord``TransitionError` 移入 `packages/toolkit`
- `pub use git::submodule` 移除(外部引用需改为 `git::submodule::*`- `HealthIssue.status``SubmoduleStatus` 枚举改为 `String`
- `RepoState.parent_dirty` 字段移除

### Added

- `code::status()` 返回业务类型 `StatusReport``SyncStatus` 四态:Synced/PendingPush/PendingPull/Conflict)
- `code::sync()` / `code::sync_all()` 封装 sync 原语
- `RepoState::scan_offline()` / `scan_with_options(offline)` 支持跳过 fetch
- `SyncStatus::label()` 中文标签输出
- 测试覆盖率从 65.3% 提升至 77.85%

### Fixed

- `--offline` 标志实际生效(跳过子模块 fetch)
- `sync` 提交作者从 `repo.signature()` 读取,替代硬编码 `"kse" <kse@local>`
- `sync` 三个阶段原子化:push_parent 失败时 revert parent commit
- `sync` 前先 fetch,确保远端状态最新
- `python.rs` `retire_submodule` 绑定移除、语法错误修复
- `release publish` API 简化:移除 `--pre-release` 参数,确认仅依赖 `-y`
- `src/cli/AGENTS.md` 同步更新 CLI 设计规则

### Changed

- `sync` 推送跳过 detached HEAD 和无远程场景
- `preflight.sh` 包含 `cargo build --features python` 验证

## [0.4.3] - 2026-05-25

### Fixed

- `release stage`/`release publish` 强制检查 CHANGELOG,缺失对应版本记录时拒绝执行

### Added

- 新增 6 个测试覆盖 CHANGELOG 拒绝场景(单元 + 集成 + CLI 子进程三层)
- `src/cli/AGENTS.md` 新建,与子模组级 AGENTS 拆分职责

## [0.4.2] - 2026-05-25

### Fixed

- `code status` fetch 子模块而非主仓库,确保 remote_head 实时

## [0.4.1] - 2026-05-25

### Fixed

- CLI 命令重组:`stage`/`publish`/`retire` 移入 `release` 子命令组
  - 旧:`qtcloud-devops stage -v ...`
  - 新:`qtcloud-devops release stage -v ...`
- `publish` 不再要求先 `stage`,正式版可直接发布
- `create_tag``create_release` 幂等(tag/Release 已存在时跳过)

## [0.4.1-rc.1] - 2026-05-25

## [0.4.0] - 2026-05-25

### Breaking

- `cancel` 命令移除
- `stage` 仅接受预发布版本(含 `-rc.N``-alpha.N` 等后缀)
- `stage` 改为推送 tag + 创建 GitHub Release

### Added

- `publish --registry <name>` 指定发布目标
- `code status --offline` 跳过 fetch
- CLI 集成测试(13 个)

### Fixed

- `code status` 先 fetch 再扫描,确保 remote_head 实时
- `sync` 输出改为单行聚合格式

### Changed

- `--dry-run` 下放到 `sync`/`retire` 子命令级别

## [0.4.0-rc.2] - 2026-05-25

### Breaking

- `cancel` 命令移除
- `stage` 仅接受预发布版本(含 `-rc.N``-alpha.N` 等后缀)
- `stage` 改为推送 tag(不再只是写 journal)

### Added

- `publish --registry <name>` 指定发布目标
- `code status --offline` 跳过 fetch
- CLI 集成测试(13 个)

### Fixed

- `code status` 先 fetch 再扫描,确保 remote_head 实时
- `sync` 输出改为单行聚合格式

### Changed

- `--dry-run` 下放到 `sync`/`retire` 子命令级别

## [0.3.4] - 2026-05-25

### Fixed

- `code status` Dirty 误判(ahead_count > 0 时不标 Dirty)
- `code status` 默认 fetch,确保 remote_head 实时
- `sync` 输出改为单行聚合格式

### Changed

- `--dry-run` 下放到 `code sync`/`code retire` 子命令级别
- `cancel` 标记为废弃(v0.4.0 将移除)

### Added

- `code status --offline` 跳过 fetch

## [0.3.3] - 2026-05-25(CI 失败,未发布)

## [0.3.2] - 2026-05-25

### Added

- `release status` 命令:从 journal 查询发布状态

### Changed

- `release-status``release status``Release` 子命令组)

### Fixed

- Python 构建修复:`python.rs` 适配新的 `model::code` 模块结构

## [0.3.1] - 2026-05-25(CI 失败,未发布)

## [0.3.0] - 2026-05-24

### Added

- 发布状态机:`stage` / `publish` / `cancel` / `retire` 四个命令(BREAKING)
- 事件溯源持久化:`.quanttide/devops/release-journal.jsonl` 追加写
- 多平台 CI 构建(Linux x86_64 / macOS arm64 / Windows x86_64)
- 发布 CI(build-cli → publish-crate + publish-pypi)
- `scripts/preflight.sh``scripts/validate-version.sh``scripts/validate-changelog.sh`
- 安装文档、发布教程、BUGS.md

### Changed

- 纯 Rust CLI,移除 Python 入口(BREAKING:`release --version``stage -v` + `publish -v`- PyPI 包降级为 native 库分发渠道
- `pyo3` 从无条件依赖改为 optional(`python` feature)
- Cargo.toml / pyproject.toml 构建配置分离
- `src/qtcloud_devops_cli/``packages/python/`
- AGENTS.md 补充发布纪律

### Fixed

- git 命令通过 `git -C <repo_path>` 执行,不再污染 CWD
- Windows 构建:添加 `build.rs` 链接 `advapi32`
- macOS 构建:`pyo3` optional 修复
- CI 版本校验:tag 版本正确比对 Cargo.toml + pyproject.toml

---

## [0.3.0-rc.8] - 2026-05-24

修复 crates.io license, PyPI dist path: --allow-dirty, maturin build direct(pyproject.toml 回到项目根目录),Windows 构建添加 build.rs。

## [0.3.0-rc.5] - 2026-05-24

修复 pyo3 无条件编译问题(macOS 构建失败),CI 重测。

## [0.3.0-rc.3] - 2026-05-24

重测 CI,移除 build 流程中的 `cargo test`,修复 pyo3 无条件编译问题。

## [0.3.0-rc.2] - 2026-05-24

重测 CI,移除 build 流程中的 `cargo test`。

## [0.3.0-rc.1] - 2026-05-24

测试 CI 构建与发布流程(build-cli → publish-crate / publish-pypi)。无功能变更。

完整变更日志待 v0.3.0 正式版补充。

## [0.2.3] - 2026-05-24

### Fixed

- CI: wheel 用 `--auditwheel skip` 构建,上传到 GitHub Release 作为附件
- CI: sdist 单独用 `uv build --sdist` 构建并发布到 PyPI
- 版本从 0.2.2 升到 0.2.3 绕过 PyPI 文件重名限制

## [0.2.2] - 2026-05-24

### Fixed

- CI: 改用 `PyO3/maturin-action@v1` 构建 wheel,支持 manylinux

## [0.2.1] - 2026-05-24

### Fixed

- 添加 `manylinux = "2_28"` 修复 PyPI 发布时 wheel 平台标签不被接受的问题

## [0.2.0] - 2026-05-24

Rust 原生子模块管理引擎(`code` 命令)。

### Added

- `code status` 命令:三路 commit 比对 + 7 种子模块状态分类,格式化表格输出
- `code sync` 命令:端到端子模块同步(推送子模块 → 更新父指针 → 推送父仓库)
- `code retire` 命令:自动化反注册(deinit + .gitmodules + index 清理)
- `code status` 输出 `parent_dirty` 字段,无子模块时退化到普通 git 状态检测
- Rust 64 个测试(48 单元 + 6 二进制 + 10 集成),Python 88 个测试
- 覆盖率(Python 94%, Rust 95.8%)记录到 STATUS.md
- 子模组管理文档 docs/code.md

### Changed

- Python 包名 `python``qtcloud_devops_cli`,native 模块改为 `._native` 子模块
- `app/` 目录重组为 `src/`,Rust 代码移至 `src/` 根目录
- `sync` 从只更新本地指针改为完整端到端同步(含 push)
- 测试目录分组:`tests/python/``tests/rust/``integrated_tests/`

### Fixed

- `code.py` sync/retire 函数改为 try/except 返回 dict(之前返回 None 导致 TypeError)
- `#[pymodule]` 函数名与 `module-name` 不匹配导致的 ImportError
- 子模块 orphaned 判定中 `merge_base` 无共同祖先时应为 orphaned

## [0.1.0] - 2026-05-22

CLI 接口重构与文档体系建立。

### Added

- `--tag-only` / `--release-only` 参数,支持分开执行 tag 和 GitHub Release
-`git remote get-url origin` 自动检测 GitHub 仓库,移除 `--repo` 参数
- AGENTS.md CLI 设计规则固化
- README.md、docs/index.md、docs/commands.md、docs/low-level-api.md 文档体系

### Changed

- 默认行为:标签 + GitHub Release(之前仅标签)
- Tag 已存在时默认模式跳过 tag 创建继续发 release

### Fixed

- `--release-only` 预检查验证 tag 必须存在
- 默认模式预检查不再因 tag 已存在而拒绝

## [0.0.2] - 2026-05-21

### Fixed

- 版本号格式校验支持 scope 前缀(`cli/vX.Y.Z` / `python/vX.Y.Z`- CHANGELOG 版本提取逻辑修正,scope 前缀版本不再影响查询

### Added

- STATUS.md:记录工具已知盲区(依赖完整性、uv.lock 同步等)

## [0.0.1] - 2026-05-21

初始版本。

### Added

- `release` 命令:预检查、发布前确认、执行发布、验证、回滚全流程自动化
- `release --version/-V`:版本号参数
- `release --dry-run`:仅检查不执行
- `release -y`:跳过确认直接发布